Merge branch '4.next'
[exim.git] / src / src / match.c
index f8edd5df5f5884cf10cf50b909ccac538d7832f8..8a1c9e5ea9b345536992829d43d4760caceeab4b 100644 (file)
@@ -128,9 +128,9 @@ required. */
 
 if (pattern[0] == '^')
   {
-  const pcre * re = regex_must_compile(pattern, cb->caseless, FALSE);
+  const pcre2_code * re = regex_must_compile(pattern, cb->caseless, FALSE);
   if (expand_setup < 0
-      ? pcre_exec(re, NULL, CCS s, Ustrlen(s), 0, PCRE_EOPT, NULL, 0) < 0
+      ? !regex_match(re, s, -1, NULL)
       : !regex_match_and_setup(re, s, 0, expand_setup)
      )
     return FAIL;