diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | pcre_compile.c | 5 | ||||
-rw-r--r-- | testdata/testinput5 | 9 | ||||
-rw-r--r-- | testdata/testoutput5 | 26 |
4 files changed, 42 insertions, 2 deletions
@@ -155,6 +155,10 @@ Version 8.38 xx-xxx-xxxx 41. Remove the use of /dev/null in testdata/testinput2, because it doesn't work under Windows. (Why has it taken so long for anyone to notice?) + +42. In a character class such as [\W\p{Any}] where both a negative-type escape + ("not a word character") and a property escape were present, the property + escape was being ignored. Version 8.37 28-April-2015 diff --git a/pcre_compile.c b/pcre_compile.c index 191330a..f8ce576 100644 --- a/pcre_compile.c +++ b/pcre_compile.c @@ -5512,9 +5512,10 @@ for (;; ptr++) actual compiled code. */ #ifdef SUPPORT_UTF - if (xclass && (!should_flip_negation || (options & PCRE_UCP) != 0)) + if (xclass && (xclass_has_prop || !should_flip_negation || + (options & PCRE_UCP) != 0)) #elif !defined COMPILE_PCRE8 - if (xclass && !should_flip_negation) + if (xclass && (xclass_has_prop || !should_flip_negation)) #endif #if defined SUPPORT_UTF || !defined COMPILE_PCRE8 { diff --git a/testdata/testinput5 b/testdata/testinput5 index 28561a9..c825ca2 100644 --- a/testdata/testinput5 +++ b/testdata/testinput5 @@ -798,4 +798,13 @@ /(?<=\K\x{17f})/8G+ \x{17f}\x{17f}\x{17f}\x{17f}\x{17f} +/[\W\p{Any}]/BZ + abc + 123 + +/[\W\pL]/BZ + abc + ** Failers + 123 + /-- End of testinput5 --/ diff --git a/testdata/testoutput5 b/testdata/testoutput5 index bab989c..42e5e16 100644 --- a/testdata/testoutput5 +++ b/testdata/testoutput5 @@ -1942,4 +1942,30 @@ Need char = 'z' 0: \x{17f} 0+ +/[\W\p{Any}]/BZ +------------------------------------------------------------------ + Bra + [\x00-/:-@[-^`{-\xff\p{Any}] + Ket + End +------------------------------------------------------------------ + abc + 0: a + 123 + 0: 1 + +/[\W\pL]/BZ +------------------------------------------------------------------ + Bra + [\x00-/:-@[-^`{-\xff\p{L}] + Ket + End +------------------------------------------------------------------ + abc + 0: a + ** Failers + 0: * + 123 +No match + /-- End of testinput5 --/ |