Revision: 1462
http://vcs.pcre.org/viewvc?view=rev&revision=1462
Author: ph10
Date: 2014-03-10 16:28:54 +0000 (Mon, 10 Mar 2014)
Log Message:
-----------
Fix typo that caused max/min quantifiers in ungreedy mode not to work.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/pcre_compile.c
code/trunk/testdata/testinput2
code/trunk/testdata/testoutput2
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2014-03-07 11:54:31 UTC (rev 1461)
+++ code/trunk/ChangeLog 2014-03-10 16:28:54 UTC (rev 1462)
@@ -105,6 +105,10 @@
variable called pcre_stack_guard that can be set to point to an external
function to check stack availability. It is called at the start of
processing every parenthesized group.
+
+22. A typo in the code meant that in ungreedy mode the max/min qualifier
+ behaved like a min-possessive qualifier, and, for example, /a{1,3}b/U did
+ not match "ab".
Version 8.34 15-December-2013
Modified: code/trunk/pcre_compile.c
===================================================================
--- code/trunk/pcre_compile.c 2014-03-07 11:54:31 UTC (rev 1461)
+++ code/trunk/pcre_compile.c 2014-03-10 16:28:54 UTC (rev 1462)
@@ -3642,7 +3642,7 @@
break;
case OP_MINUPTO:
- *code += OP_MINUPTO - OP_UPTO;
+ *code += OP_POSUPTO - OP_MINUPTO;
break;
}
}
Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2 2014-03-07 11:54:31 UTC (rev 1461)
+++ code/trunk/testdata/testinput2 2014-03-10 16:28:54 UTC (rev 1462)
@@ -907,6 +907,9 @@
/\U/I
+/a{1,3}b/U
+ ab
+
/[/I
/[a-/I
Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2 2014-03-07 11:54:31 UTC (rev 1461)
+++ code/trunk/testdata/testoutput2 2014-03-10 16:28:54 UTC (rev 1462)
@@ -3178,6 +3178,10 @@
/\U/I
Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
+/a{1,3}b/U
+ ab
+ 0: ab
+
/[/I
Failed: missing terminating ] for character class at offset 1