--- embedaddon/pcre/testdata/testoutput2 2012/10/09 09:19:18 1.1.1.3 +++ embedaddon/pcre/testdata/testoutput2 2013/07/22 08:25:57 1.1.1.4 @@ -448,10 +448,10 @@ Need char = '=' /(?.*)(?<=(abcd)|(xyz))/I Capturing subpattern count = 2 +Max lookbehind = 4 No options -First char at start or follows newline +No first char No need char -Max lookbehind = 4 alphabetabcd 0: alphabetabcd 1: abcd @@ -781,10 +782,10 @@ Max lookbehind = 4 /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I Capturing subpattern count = 0 +Max lookbehind = 4 No options First char = 'Z' Need char = 'Z' -Max lookbehind = 4 abxyZZ 0: ZZ abXyZZ @@ -810,10 +811,10 @@ No match /(?iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ ------------------------------------------------------------------ @@ -3247,10 +3232,10 @@ Max lookbehind = 1 End ------------------------------------------------------------------ Capturing subpattern count = 0 +Max lookbehind = 1 No options First char = '$' Need char = 'X' -Max lookbehind = 1 /(.*)\d+\1/I Capturing subpattern count = 1 @@ -3763,10 +3748,10 @@ Callout 2: last capture = -1 /(?<=(abc)(?C))xyz/I Capturing subpattern count = 1 +Max lookbehind = 3 No options First char = 'x' Need char = 'z' -Max lookbehind = 3 abcxyz\C+ Callout 0: last capture = 1 0: @@ -4363,7 +4348,7 @@ Minimum match() recursion limit = 6 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaz\M Minimum match() limit = 32768 -Minimum match() recursion limit = 42 +Minimum match() recursion limit = 29 No match /(aaa(?C1)bbb|ab)/I @@ -5411,19 +5396,19 @@ Need char = '3' /\b.*/I Capturing subpattern count = 0 +Max lookbehind = 1 No options No first char No need char -Max lookbehind = 1 ab cd\>1 0: cd /\b.*/Is Capturing subpattern count = 0 +Max lookbehind = 1 Options: dotall No first char No need char -Max lookbehind = 1 ab cd\>1 0: cd @@ -8803,7 +8788,7 @@ No match 1: \x0a /a(*CR)b/ -Failed: (*VERB) not recognized at offset 5 +Failed: (*VERB) not recognized or malformed at offset 5 /(*CR)a.b/ a\nb @@ -9276,6 +9261,7 @@ No need char +7 ^ ^ b +7 ^^ b +7 ^ b ++11 ^ ^ +12 ^ ) +13 ^ 0: @@ -9406,12 +9392,14 @@ No match +3 ^ ^ (?(?=[a])[^"]) +5 ^ ^ (?=[a]) +8 ^ ^ [a] ++17 ^ ^ | +21 ^ ^ " +18 ^ ^ b +19 ^ ^ ) +3 ^ ^ (?(?=[a])[^"]) +5 ^ ^ (?=[a]) +8 ^ ^ [a] ++17 ^ ^ | +21 ^ ^ " +22 ^ ^ $ +23 ^ ^ @@ -9719,17 +9707,17 @@ Partial match: abc12 xyzabc123pqr 0: 123 xyzabc12\P -Partial match: abc12 +Partial match at offset 6: abc12 xyzabc12\P\P -Partial match: abc12 +Partial match at offset 6: abc12 /\babc\b/ +++abc+++ 0: abc +++ab\P -Partial match: +ab +Partial match at offset 3: +ab +++ab\P\P -Partial match: +ab +Partial match at offset 3: +ab /(?&word)(?&element)(?(DEFINE)(?<[^m][^>]>[^<])(?\w*+))/BZ ------------------------------------------------------------------ @@ -10110,7 +10098,7 @@ No set of starting bytes "(?>.*/)foo"SI Capturing subpattern count = 0 No options -First char at start or follows newline +No first char Need char = 'o' Subject length lower bound = 4 No set of starting bytes @@ -10353,7 +10341,7 @@ Partial match: abca xxxxabcde\P\P Partial match: abcde -/-- This is not in the Perl >= 5.10 test because Perl seems currently to be +/-- This is not in the Perl-compatible test because Perl seems currently to be broken and not behaving as specified in that it *does* bumpalong after hitting (*COMMIT). --/ @@ -10549,34 +10537,14 @@ No match End ------------------------------------------------------------------ -/ -- The first four of these are not in the Perl >= 5.10 test because Perl - documents that the use of \K in assertions is "not well defined". The - last is here because Perl gives the match as "b" rather than "ab". I +/ -- This one is here because Perl gives the match as "b" rather than "ab". I believe this to be a Perl bug. --/ -/(?=a\Kb)ab/ - ab - 0: b - -/(?!a\Kb)ac/ - ac - 0: ac - -/^abc(?<=b\Kc)d/ - abcd - 0: cd - -/^abc(?a\Kb)z|(ab)/ ab 0: ab 1: ab -/----------------------/ - /(?P(?P0|)|(?P>L2)(?P>L1))/ Failed: recursive call could loop indefinitely at offset 31 @@ -10596,7 +10564,7 @@ Failed: an argument is not allowed for (*ACCEPT), (*FA ACABX No match -/--- These should be different, but in Perl 5.11 are not, which I think +/--- These should be different, but in Perl they are not, which I think is a bug in Perl. ---/ /A(*THEN)B|A(*THEN)C/K @@ -10607,13 +10575,6 @@ No match AC No match -/--- This should fail; the SKIP advances by one, but when we get to AC, the - PRUNE kills it. Perl behaves differently. ---/ - -/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK - AAAC -No match, mark = A - /--- Mark names can be duplicated. Perl doesn't give a mark for this one, though PCRE does. ---/ @@ -10647,7 +10608,7 @@ No match abcccd No match -/--- Perl 5.11 gets some of these wrong ---/ +/--- Perl gets some of these wrong ---/ /(?>.(*ACCEPT))*?5/ abcde @@ -10826,21 +10787,9 @@ No match X\x0d\x0a No match -/-- Perl treats this one differently, not failing the second string. I believe - that is a bug in Perl. --/ - -/^((abc|abcx)(*THEN)y|abcd)/ - abcd - 0: abcd - 1: abcd - *** Failers -No match - abcxy -No match - /(?<=abc)def/ abc\P\P -Partial match: abc +Partial match at offset 3: abc /abc$/ abc @@ -11319,7 +11268,6 @@ No match /(a)b|ac/++SS ac\O3 -Matched, but too many substrings 0: ac 0+ @@ -11679,28 +11627,29 @@ No match /\btype\b\W*?\btext\b\W*?\bjavascript\b/IS Capturing subpattern count = 0 +Max lookbehind = 1 No options First char = 't' Need char = 't' -Max lookbehind = 1 Subject length lower bound = 18 No set of starting bytes /\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|a+)(?>(z+))\w/BZ ------------------------------------------------------------------ Bra @@ -12336,29 +12226,443 @@ Partial match: \x0d\x0d \r\r\r\P\P 0: \x0d\x0d -/-- These two are here because Perl does not match: it seems to allow the -COMMIT to escape from the assertion. --/ +"AB(C(D))(E(F))?(?(?=\2)(?=\4))" + ABCDGHI\O03 +Matched, but too many substrings + 0: ABCD + +/-- These are all run as real matches in test 1; here we are just checking the +settings of the anchored and startline bits. --/ -/(?=a(*COMMIT)b|ac)ac|ac/ - ac - 0: ac +/(?>.*?a)(?<=ba)/I +Capturing subpattern count = 0 +Max lookbehind = 2 +No options +No first char +Need char = 'a' -/(?=a(*COMMIT)b|(ac)) ac | (a)c/x - ac - 0: ac +/(?:.*?a)(?<=ba)/I +Capturing subpattern count = 0 +Max lookbehind = 2 +No options +First char at start or follows newline +Need char = 'a' + +/.*?a(*PRUNE)b/I +Capturing subpattern count = 0 +No options +No first char +Need char = 'b' + +/.*?a(*PRUNE)b/sI +Capturing subpattern count = 0 +Options: dotall +No first char +Need char = 'b' + +/^a(*PRUNE)b/sI +Capturing subpattern count = 0 +Options: anchored dotall +No first char +No need char + +/.*?a(*SKIP)b/I +Capturing subpattern count = 0 +No options +No first char +Need char = 'b' + +/(?>.*?a)b/sI +Capturing subpattern count = 0 +Options: dotall +No first char +Need char = 'b' + +/(?>.*?a)b/I +Capturing subpattern count = 0 +No options +No first char +Need char = 'b' + +/(?>^a)b/sI +Capturing subpattern count = 0 +Options: anchored dotall +No first char +No need char + +/(?>.*?)(?<=(abcd)|(wxyz))/I +Capturing subpattern count = 2 +Max lookbehind = 4 +No options +No first char +No need char + +/(?>.*)(?<=(abcd)|(wxyz))/I +Capturing subpattern count = 2 +Max lookbehind = 4 +No options +No first char +No need char + +"(?>.*)foo"I +Capturing subpattern count = 0 +No options +No first char +Need char = 'o' + +"(?>.*?)foo"I +Capturing subpattern count = 0 +No options +No first char +Need char = 'o' + +/(?>^abc)/mI +Capturing subpattern count = 0 +Options: multiline +First char at start or follows newline +Need char = 'c' + +/(?>.*abc)/mI +Capturing subpattern count = 0 +Options: multiline +No first char +Need char = 'c' + +/(?:.*abc)/mI +Capturing subpattern count = 0 +Options: multiline +First char at start or follows newline +Need char = 'c' + +/-- Check PCRE_STUDY_EXTRA_NEEDED --/ + +/.?/S-I +Capturing subpattern count = 0 +No options +No first char +No need char +Study returned NULL + +/.?/S!I +Capturing subpattern count = 0 +No options +No first char +No need char +Subject length lower bound = -1 +No set of starting bytes + +/(?:(a)+(?C1)bb|aa(?C2)b)/ + aab\C+ +Callout 1: last capture = 1 + 0: + 1: a +--->aab + ^ ^ b +Callout 1: last capture = 1 + 0: + 1: a +--->aab + ^^ b +Callout 2: last capture = -1 + 0: +--->aab + ^ ^ b + 0: aab + +/(?:(a)++(?C1)bb|aa(?C2)b)/ + aab\C+ +Callout 1: last capture = 1 + 0: + 1: a +--->aab + ^ ^ b +Callout 2: last capture = -1 + 0: +--->aab + ^ ^ b + 0: aab + +/(?:(?>(a))(?C1)bb|aa(?C2)b)/ + aab\C+ +Callout 1: last capture = 1 + 0: + 1: a +--->aab + ^^ b +Callout 2: last capture = -1 + 0: +--->aab + ^ ^ b + 0: aab + +/(?:(?1)(?C1)x|ab(?C2))((a)){0}/ + aab\C+ +Callout 1: last capture = -1 + 0: +--->aab + ^^ x +Callout 1: last capture = -1 + 0: +--->aab + ^^ x +Callout 2: last capture = -1 + 0: +--->aab + ^ ^ ) + 0: ab + +/(?1)(?C1)((a)(?C2)){0}/ + aab\C+ +Callout 2: last capture = 2 + 0: 1: 2: a +--->aab + ^^ ) +Callout 1: last capture = -1 + 0: +--->aab + ^^ ((a)(?C2)){0} + 0: a -"AB(C(D))(E(F))?(?(?=\2)(?=\4))" - ABCDGHI\O03 +/(?:(a)+(?C1)bb|aa(?C2)b)++/ + aab\C+ +Callout 1: last capture = 1 + 0: + 1: a +--->aab + ^ ^ b +Callout 1: last capture = 1 + 0: + 1: a +--->aab + ^^ b +Callout 2: last capture = -1 + 0: +--->aab + ^ ^ b + 0: aab + aab\C+\O2 +Callout 1: last capture = 1 + 0: +--->aab + ^ ^ b +Callout 1: last capture = 1 + 0: +--->aab + ^^ b +Callout 2: last capture = -1 + 0: +--->aab + ^ ^ b + 0: aab + +/(ab)x|ab/ + ab\O3 + 0: ab + ab\O2 + 0: ab + +/(ab)/ + ab\O3 Matched, but too many substrings - 0: ABCD + 0: ab + ab\O2 +Matched, but too many substrings + 0: ab -/-- This one is here because Perl does not confine the *COMMIT to the -assertion, and therefore fails the entire subroutine call. --/ +/(?<=123)(*MARK:xx)abc/K + xxxx123a\P\P +Partial match at offset 7, mark=xx: 123a + xxxx123a\P +Partial match at offset 7, mark=xx: 123a -/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/ - ac +/123\Kabc/ + xxxx123a\P\P +Partial match: 123a + xxxx123a\P +Partial match: 123a + +/^(?(?=a)aa|bb)/C + bb +--->bb + +0 ^ ^ + +1 ^ (?(?=a)aa|bb) + +3 ^ (?=a) + +6 ^ a ++11 ^ b ++12 ^^ b ++13 ^ ^ ) ++14 ^ ^ + 0: bb + +/(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/ + bb +--->bb + 1 ^ ^ + 2 ^ (?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10)) + 99 ^ (?=(?C3)a(?C4)) + 3 ^ a + 8 ^ b + 9 ^^ b + 10 ^ ^ ) + 11 ^ ^ + 0: bb + +/-- Perl seems to have a bug with this one --/ + +/aaaaa(*COMMIT)(*PRUNE)b|a+c/ + aaaaaac + 0: aaaac + +/-- Here are some that Perl treats differently because of the way it handles +backtracking verbs. --/ + + /(?!a(*COMMIT)b)ac|ad/ + ac 0: ac + ad + 0: ad + +/^(?!a(*THEN)b|ac)../ + ac +No match + ad + 0: ad + +/^(?=a(*THEN)b|ac)/ + ac + 0: + +/\A.*?(?:a|b(*THEN)c)/ + ba + 0: ba + +/\A.*?(?:a|b(*THEN)c)++/ + ba + 0: ba + +/\A.*?(?:a|b(*THEN)c|d)/ + ba + 0: ba + +/(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/ + aac + 0: aac + +/\A.*?(a|b(*THEN)c)/ + ba + 0: ba + 1: a + +/^(A(*THEN)B|A(*THEN)D)/ + AD + 0: AD + 1: AD + +/(?!b(*THEN)a)bn|bnn/ + bnn + 0: bn + +/(?(?=b(*SKIP)a)bn|bnn)/ + bnn +No match + +/(?=b(*THEN)a|)bn|bnn/ + bnn + 0: bn + +/-------------------------/ + +/(*LIMIT_MATCH=12bc)abc/ +Failed: (*VERB) not recognized or malformed at offset 7 + +/(*LIMIT_MATCH=4294967290)abc/ +Failed: (*VERB) not recognized or malformed at offset 7 + +/(*LIMIT_RECURSION=4294967280)abc/I +Capturing subpattern count = 0 +Recursion limit = 4294967280 +No options +First char = 'a' +Need char = 'c' + +/(a+)*zz/ + aaaaaaaaaaaaaz +No match + aaaaaaaaaaaaaz\q3000 +Error -8 (match limit exceeded) + +/(a+)*zz/S- + aaaaaaaaaaaaaz\Q10 +Error -21 (recursion limit exceeded) + +/(*LIMIT_MATCH=3000)(a+)*zz/I +Capturing subpattern count = 1 +Match limit = 3000 +No options +No first char +Need char = 'z' + aaaaaaaaaaaaaz +Error -8 (match limit exceeded) + aaaaaaaaaaaaaz\q60000 +Error -8 (match limit exceeded) + +/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I +Capturing subpattern count = 1 +Match limit = 3000 +No options +No first char +Need char = 'z' + aaaaaaaaaaaaaz +Error -8 (match limit exceeded) + +/(*LIMIT_MATCH=60000)(a+)*zz/I +Capturing subpattern count = 1 +Match limit = 60000 +No options +No first char +Need char = 'z' + aaaaaaaaaaaaaz +No match + aaaaaaaaaaaaaz\q3000 +Error -8 (match limit exceeded) + +/(*LIMIT_RECURSION=10)(a+)*zz/IS- +Capturing subpattern count = 1 +Recursion limit = 10 +No options +No first char +Need char = 'z' +Subject length lower bound = 2 +Starting byte set: a z + aaaaaaaaaaaaaz +Error -21 (recursion limit exceeded) + aaaaaaaaaaaaaz\Q1000 +Error -21 (recursion limit exceeded) + +/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/IS- +Capturing subpattern count = 1 +Recursion limit = 10 +No options +No first char +Need char = 'z' +Subject length lower bound = 2 +Starting byte set: a z + aaaaaaaaaaaaaz +Error -21 (recursion limit exceeded) + +/(*LIMIT_RECURSION=1000)(a+)*zz/IS- +Capturing subpattern count = 1 +Recursion limit = 1000 +No options +No first char +Need char = 'z' +Subject length lower bound = 2 +Starting byte set: a z + aaaaaaaaaaaaaz +No match + aaaaaaaaaaaaaz\Q10 +Error -21 (recursion limit exceeded) /-- End of testinput2 --/