Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
apr utils aprstrmatch正则表达式语法_C_Regex_Apr - Fatal编程技术网

apr utils aprstrmatch正则表达式语法

apr utils aprstrmatch正则表达式语法,c,regex,apr,C,Regex,Apr,我想从python移植以下正则表达式: HASH_REGEX = re.compile("([a-fA-F0-9]{32})") if HASH_REGEX.match(target): print "We have match" 使用apr utils apr\U strmatch函数将C转换为: pattern = apr_strmatch_precompile(pool, "([a-fA-F0-9]{32})", 0); if (NULL != apr_strmatch(patt

我想从python移植以下正则表达式:

HASH_REGEX = re.compile("([a-fA-F0-9]{32})")
if HASH_REGEX.match(target):
    print "We have match"
使用apr utils apr\U strmatch函数将C转换为:

pattern = apr_strmatch_precompile(pool, "([a-fA-F0-9]{32})", 0);
if (NULL != apr_strmatch(pattern, target, strlen(target)) {
    printf("We have match!\n");
}
问题是我不明白regex(或方言)apr-utils-apr\strmatch函数的语法是什么。搜索文档和示例时没有结果


提前感谢您的建议…

apr\stratch
根本不进行正则表达式匹配;它使用该算法执行普通子字符串搜索(请参阅)


要在C中重新匹配,请尝试。

apr\stratch
根本不进行正则表达式匹配;它使用该算法执行普通子字符串搜索(请参阅)

要在C中重新匹配,请尝试