Python から次の正規表現を移植したい:
HASH_REGEX = re.compile("([a-fA-F0-9]{32})")
if HASH_REGEX.match(target):
print "We have match"
apr-utils apr_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");
}
問題は、正規表現 (または方言) の apr-utils apr_strmatch 関数が使用している構文を理解できないことです。ドキュメントと例の検索は結果なしで終了しました。
事前にアドバイスをありがとう...