RE2 介绍
例子:
// copyright 2008 The RE2 Authors. All Rights Reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include<re2/re2.h> #include<re2/filtered_re2.h> #includeusing namespace re2; int main(void) { FilteredRE2 f; int id; f.Add("a.*b.*c", RE2::DefaultOptions, &id); vectorv; f.Compile(&v); vectorids; f.FirstMatch("abbccc", ids); if(RE2::FullMatch("axbyc", "a.*b.*c")) { printf("PASS\n"); return 0; } printf("FAIL\n"); return 2; }
RE2 官网
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。