diff --git a/src/pcre2_convert.c b/src/pcre2_convert.c index ee3f055..8036ac8 100644 --- a/src/pcre2_convert.c +++ b/src/pcre2_convert.c @@ -284,7 +284,7 @@ while (plength > 0) break; default: - if (c < 256 && strchr("\\{}?*+[]()|.^$", c) != NULL) + if (c < 256 && strchr("\\{}?*+[]()|", c) != NULL) { PUTCHARS(STR_BACKSLASH); } diff --git a/testdata/testinput24 b/testdata/testinput24 index 62f160a..6a22f9d 100644 --- a/testdata/testinput24 +++ b/testdata/testinput24 @@ -257,6 +257,10 @@ \= Expect no match a1b +/how.to/ + +/^how to/ + #pattern convert=unset /abc/ diff --git a/testdata/testoutput24 b/testdata/testoutput24 index 06d5549..ab133d7 100644 --- a/testdata/testoutput24 +++ b/testdata/testoutput24 @@ -411,6 +411,12 @@ a*b\+c+[def]\(ab\)(cd) a1b No match +/how.to/ +how.to + +/^how to/ +^how to + #pattern convert=unset /abc/