24 int errorcode, offset;
28 int options = PCRE_UTF8;
34 while (!(re->
regex = pcre_compile2(pattern, options, &errorcode, &error, &offset, NULL))) {
37 if (errorcode == 32) {
38 options &= ~PCRE_UTF8;
41 ELOG(
"PCRE regular expression compilation failed at %d: %s\n",
50 ELOG(
"PCRE regular expression studying failed: %s\n", error);
78 if ((rc = pcre_exec(regex->
regex, regex->
extra, input, strlen(input), 0, 0, NULL, 0)) == 0) {
79 LOG(
"Regular expression \"%s\" matches \"%s\"\n",
84 if (rc == PCRE_ERROR_NOMATCH) {
85 LOG(
"Regular expression \"%s\" does not match \"%s\"\n",
90 ELOG(
"PCRE error %d while trying to use regular expression \"%s\" on input \"%s\", see pcreapi(3)\n",