apr utils aprstrmatch正则表达式语法
我想从python移植以下正则表达式: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
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中重新匹配,请尝试