summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-11-15 15:07:02 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-11-15 15:07:02 +0000
commitf021e15fd4f782eed4d409c68d8cbffc5200fb3b (patch)
treef834155ef53e8c92ad03bc13f7ccdcd80864eb37
parentcc87f05b24e3944bf2bb4416dfc704593ef0a6f5 (diff)
downloadpcre-f021e15fd4f782eed4d409c68d8cbffc5200fb3b.tar.gz
Caseless matching of backreferences with fixed length repetitions was broken.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@746 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog4
-rw-r--r--pcre_compile.c1
-rw-r--r--testdata/testinput110
-rw-r--r--testdata/testoutput116
4 files changed, 31 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b843407..b6e3e25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,10 @@ Version 8.21
5. Supporting of \x, \U and \u in JavaScript compatibility mode based on the
ECMA-262 standard.
+6. Lookbehinds such as (?<=a{2}b) that contained a fixed repetition were
+ erroneously being rejected as "not fixed length" if PCRE_CASELESS was set.
+ This bug was probably introduced by change 9 of 8.13.
+
Version 8.20 21-Oct-2011
------------------------
diff --git a/pcre_compile.c b/pcre_compile.c
index 7ece490..0f875d0 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -1646,6 +1646,7 @@ for (;;)
need to skip over a multibyte character in UTF8 mode. */
case OP_EXACT:
+ case OP_EXACTI:
branchlength += GET2(cc,1);
cc += 4;
#ifdef SUPPORT_UTF8
diff --git a/testdata/testinput1 b/testdata/testinput1
index c913ee4..aa9ce42 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -4251,4 +4251,14 @@
/[:a]xxx[b:]/
:xxx:
+/(?<=a{2})b/i
+ xaabc
+ ** Failers
+ xabc
+
+/(?<!a{2})b/i
+ xabc
+ ** Failers
+ xaabc
+
/-- End of testinput1 --/
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index 030f04f..5a025e2 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -6952,4 +6952,20 @@ No match
:xxx:
0: :xxx:
+/(?<=a{2})b/i
+ xaabc
+ 0: b
+ ** Failers
+No match
+ xabc
+No match
+
+/(?<!a{2})b/i
+ xabc
+ 0: b
+ ** Failers
+No match
+ xaabc
+No match
+
/-- End of testinput1 --/