From 1dc6dc7cc711aced434813a3f0b19f4f98476ea3 Mon Sep 17 00:00:00 2001 From: ph10 Date: Tue, 9 May 2017 10:44:50 +0000 Subject: [PATCH] Fix bug in experimental conversion code. --- src/pcre2_convert.c | 2 +- testdata/testinput24 | 4 ++++ testdata/testoutput24 | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) 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/