1 Star 0 Fork 36

zhangcui/third_party_re2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
testinstall.cc 533 Bytes
一键复制 编辑 原始数据 按行查看 历史
mamingshuai 提交于 2021-06-02 00:36 +08:00 . update OpenHarmony 2.0 Canary
// 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>
#include <stdio.h>
int main(void) {
re2::FilteredRE2 f;
int id;
f.Add("a.*b.*c", RE2::DefaultOptions, &id);
std::vector<std::string> v;
f.Compile(&v);
std::vector<int> ids;
f.FirstMatch("abbccc", ids);
if(RE2::FullMatch("axbyc", "a.*b.*c")) {
printf("PASS\n");
return 0;
}
printf("FAIL\n");
return 2;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhang-cui11/third_party_re2.git
git@gitee.com:zhang-cui11/third_party_re2.git
zhang-cui11
third_party_re2
third_party_re2
master

搜索帮助