--- embedaddon/pcre/testdata/testoutput1 2012/10/09 09:19:18 1.1.1.3 +++ embedaddon/pcre/testdata/testoutput1 2013/07/22 08:25:57 1.1.1.4 @@ -6160,11 +6160,9 @@ No match 1: bc 2: bc -/-- This tests for an IPv6 address in the form where it can have up to --/ -/-- eight components, one and only one of which is empty. This must be --/ -No match -/-- an internal component. --/ -No match +/-- This tests for an IPv6 address in the form where it can have up to + eight components, one and only one of which is empty. This must be + an internal component. --/ /^(?!:) # colon disallowed at start (?: # start of item @@ -7770,20 +7768,12 @@ No match 1: (ab(cd)ef) 2: ef -/^(?!a(*SKIP)b)/ - ac - 0: - /^(?=a(*SKIP)b|ac)/ ** Failers No match ac No match -/^(?=a(*THEN)b|ac)/ - ac - 0: - /^(?=a(*PRUNE)b)/ ab 0: @@ -7796,10 +7786,6 @@ No match ac 0: -/^(?(?!a(*SKIP)b))/ - ac - 0: - /(?>a\Kb)/ ab 0: b @@ -8169,46 +8155,20 @@ No match 1: AB 2: B -/\A.*?(?:a|b(*THEN)c)/ - ba - 0: ba - -/\A.*?(?:a|bc)/ - ba - 0: ba - -/\A.*?(a|b(*THEN)c)/ - ba - 0: ba - 1: a - /\A.*?(a|bc)/ ba 0: ba 1: a -/\A.*?(?:a|b(*THEN)c)++/ - ba - 0: ba - /\A.*?(?:a|bc)++/ ba 0: ba -/\A.*?(a|b(*THEN)c)++/ - ba - 0: ba - 1: a - /\A.*?(a|bc)++/ ba 0: ba 1: a -/\A.*?(?:a|b(*THEN)c|d)/ - ba - 0: ba - /\A.*?(?:a|bc|d)/ ba 0: ba @@ -8719,10 +8679,6 @@ No match aac 0: aac -/(?!a(*COMMIT)b)ac|cd/ - ac - 0: ac - /((?:a?)*)*c/ aac 0: aac @@ -8732,5 +8688,516 @@ No match aac 0: aac 1: + +/(?>.*?a)(?<=ba)/ + aba + 0: ba + +/(?:.*?a)(?<=ba)/ + aba + 0: aba + +/.*?a(*PRUNE)b/ + aab + 0: ab + +/.*?a(*PRUNE)b/s + aab + 0: ab + +/^a(*PRUNE)b/s + aab +No match + +/.*?a(*SKIP)b/ + aab + 0: ab + +/(?>.*?a)b/s + aab + 0: ab + +/(?>.*?a)b/ + aab + 0: ab + +/(?>^a)b/s + aab +No match + +/(?>.*?)(?<=(abcd)|(wxyz))/ + alphabetabcd + 0: + 1: abcd + endingwxyz + 0: + 1: + 2: wxyz + +/(?>.*)(?<=(abcd)|(wxyz))/ + alphabetabcd + 0: alphabetabcd + 1: abcd + endingwxyz + 0: endingwxyz + 1: + 2: wxyz + +"(?>.*)foo" + abcdfooxyz +No match + +"(?>.*?)foo" + abcdfooxyz + 0: foo + +/(?:(a(*PRUNE)b)){0}(?:(?1)|ac)/ + ac + 0: ac + +/(?:(a(*SKIP)b)){0}(?:(?1)|ac)/ + ac + 0: ac + +/(?<=(*SKIP)ac)a/ + aa +No match + +/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK + AAAC + 0: AC + +/a(*SKIP:m)x|ac(*:n)(*SKIP:n)d|ac/K + acacd + 0: acd +MK: n + +/A(*SKIP:m)x|A(*SKIP:n)x|AB/K + AB + 0: AB + +/((*SKIP:r)d){0}a(*SKIP:m)x|ac(*:n)|ac/K + acacd + 0: ac +MK: n + +/-- Tests that try to figure out how Perl works. My hypothesis is that the + first verb that is backtracked onto is the one that acts. This seems to be + the case almost all the time, but there is one exception that is perhaps a + bug. --/ + +/-- This matches "aaaac"; each PRUNE advances one character until the subject + no longer starts with 5 'a's. --/ + +/aaaaa(*PRUNE)b|a+c/ + aaaaaac + 0: aaaac + +/-- Putting SKIP in front of PRUNE makes no difference, as it is never +backtracked onto, whether or not it has a label. --/ + +/aaaaa(*SKIP)(*PRUNE)b|a+c/ + aaaaaac + 0: aaaac + +/aaaaa(*SKIP:N)(*PRUNE)b|a+c/ + aaaaaac + 0: aaaac + +/aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c/ + aaaaaac + 0: aaaac + +/-- Putting THEN in front makes no difference. */ + +/aaaaa(*THEN)(*PRUNE)b|a+c/ + aaaaaac + 0: aaaac + +/-- However, putting COMMIT in front of the prune changes it to "no match". I + think this is inconsistent and possibly a bug. For the moment, running this + test is moved out of the Perl-compatible file. --/ + +/aaaaa(*COMMIT)(*PRUNE)b|a+c/ + + +/---- OK, lets play the same game again using SKIP instead of PRUNE. ----/ + +/-- This matches "ac" because SKIP forces the next match to start on the + sixth "a". --/ + +/aaaaa(*SKIP)b|a+c/ + aaaaaac + 0: ac + +/-- Putting PRUNE in front makes no difference. --/ + +/aaaaa(*PRUNE)(*SKIP)b|a+c/ + aaaaaac + 0: ac + +/-- Putting THEN in front makes no difference. --/ + +/aaaaa(*THEN)(*SKIP)b|a+c/ + aaaaaac + 0: ac + +/-- In this case, neither does COMMIT. This still matches "ac". --/ + +/aaaaa(*COMMIT)(*SKIP)b|a+c/ + aaaaaac + 0: ac + +/-- This gives "no match", as expected. --/ + +/aaaaa(*COMMIT)b|a+c/ + aaaaaac +No match + + +/------ Tests using THEN ------/ + +/-- This matches "aaaaaac", as expected. --/ + +/aaaaa(*THEN)b|a+c/ + aaaaaac + 0: aaaaaac + +/-- Putting SKIP in front makes no difference. --/ + +/aaaaa(*SKIP)(*THEN)b|a+c/ + aaaaaac + 0: aaaaaac + +/-- Putting PRUNE in front makes no difference. --/ + +/aaaaa(*PRUNE)(*THEN)b|a+c/ + aaaaaac + 0: aaaaaac + +/-- Putting COMMIT in front makes no difference. --/ + +/aaaaa(*COMMIT)(*THEN)b|a+c/ + aaaaaac + 0: aaaaaac + +/-- End of "priority" tests --/ + +/aaaaa(*:m)(*PRUNE:m)(*SKIP:m)m|a+/ + aaaaaa + 0: a + +/aaaaa(*:m)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+/ + aaaaaa + 0: a + +/aaaaa(*:n)(*PRUNE:m)(*SKIP:m)m|a+/ + aaaaaa + 0: aaaa + +/aaaaa(*:n)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+/ + aaaaaa + 0: a + +/a(*MARK:A)aa(*PRUNE:A)a(*SKIP:A)b|a+c/ + aaaac + 0: aac + +/a(*MARK:A)aa(*MARK:A)a(*SKIP:A)b|a+c/ + aaaac + 0: ac + +/aaa(*PRUNE:A)a(*SKIP:A)b|a+c/ + aaaac + 0: aac + +/aaa(*MARK:A)a(*SKIP:A)b|a+c/ + aaaac + 0: ac + +/a(*:m)a(*COMMIT)(*SKIP:m)b|a+c/K + aaaaaac + 0: ac + +/.?(a|b(*THEN)c)/ + ba + 0: ba + 1: a + +/(a(*COMMIT)b)c|abd/ + abc + 0: abc + 1: ab + abd +No match + +/(?=a(*COMMIT)b)abc|abd/ + abc + 0: abc + abd + 0: abd + +/(?>a(*COMMIT)b)c|abd/ + abc + 0: abc + abd + 0: abd + +/a(?=b(*COMMIT)c)[^d]|abd/ + abd +No match + abc + 0: ab + +/a(?=bc).|abd/ + abd + 0: abd + abc + 0: ab + +/a(?>b(*COMMIT)c)d|abd/ + abceabd +No match + +/a(?>bc)d|abd/ + abceabd + 0: abd + +/(?>a(*COMMIT)b)c|abd/ + abd + 0: abd + +/(?>a(*COMMIT)c)d|abd/ + abd +No match + +/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/ + ac + 0: ac + 1: + 2: c + +/-- These tests were formerly in test 2, but changes in PCRE and Perl have + made them compatible. --/ + +/^(a)?(?(1)a|b)+$/ + *** Failers +No match + a +No match + +/(?=a\Kb)ab/ + ab + 0: b + +/(?!a\Kb)ac/ + ac + 0: ac + +/^abc(?<=b\Kc)d/ + abcd + 0: cd + +/^abc(?b))/K + abc + 0: b +MK: m(m + +/(*PRUNE:m(m)(?&y)(?(DEFINE)(?b))/K + abc + 0: b +MK: m(m + +/(*SKIP:m(m)(?&y)(?(DEFINE)(?b))/K + abc + 0: b + +/(*THEN:m(m)(?&y)(?(DEFINE)(?b))/K + abc + 0: b +MK: m(m + +/^\d*\w{4}/ + 1234 + 0: 1234 + 123 +No match + +/^[^b]*\w{4}/ + aaaa + 0: aaaa + aaa +No match + +/^[^b]*\w{4}/i + aaaa + 0: aaaa + aaa +No match + +/^a*\w{4}/ + aaaa + 0: aaaa + aaa +No match + +/^a*\w{4}/i + aaaa + 0: aaaa + aaa +No match /-- End of testinput1 --/