c - pcre的结构信息
问题描述
我有以下函数来编译pcre
正则表达式:
/**
* common options: PCRE_DOTALL, PCRE_EXTENDED, PCRE_CASELESS, PCRE_MULTILINE
* full options located at: https://man7.org/linux/man-pages/man3/pcre_compile.3.html
*/
pcre* pcre_compile_pattern(const char* pattern, int options)
{
const char *pcre_error;
int error_offset;
pcre *re_compiled = pcre_compile(pattern, options, &pcre_error, &error_offset, NULL);
if (re_compiled == NULL) {
fprintf(stderr, "ERROR: '%s' occurs at pattern position %d\n", pcre_error, error_offset);
}
return re_compiled;
}
有没有描述结构的地方pcre
?例如,我正在查看它是否包含pattern
(作为普通字符串)在其中,或者我是否必须单独保留模式。我在手册页中看到了很多参考资料,pcre*
但我真的无法获得有关该结构的更多详细信息。
在搜索 github 时,我可以找到一个地方,这似乎是我正在使用的:https ://github.com/luvit/pcre/blob/e2a236a5737b58d43bf324208406a60fe0dd95f4/pcre_internal.h#L2317 。一切都是私有的,所以你不能访问结构的一部分,例如直接读取/打印它。
解决方案
推荐阅读
- python - 如何分组并绘制它
- vba - Excel VBA 宏查找/剪切/粘贴
- python - 在 apache 服务器上使用烧瓶上传图像
- javascript - 为什么要为回调函数显示多行?
- ios - 分别选择 SegmentedControl 的字体
- asp.net - 选择 ListView Row ASP.NET MVC WEBFORMS 滚动位置
- oracle - 为什么 select 1 from dual 在数据库端会间歇性变慢?
- javascript - 如何在 javascript/typescript/webpack 中强制执行依赖规则
- java - JUnit - 如何对读取目录中的文件并使用外部库的方法进行单元测试
- lua - Lua如何从字符串中删除撇号