/[pcre]/code/trunk/testdata/testinput2
ViewVC logotype

Diff of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 155 by ph10, Tue Apr 24 13:36:11 2007 UTC revision 915 by zherczeg, Tue Feb 14 13:05:39 2012 UTC
# Line 1  Line 1 
1    /-- This set of tests is not Perl-compatible. It checks on special features
2        of PCRE's API, error diagnostics, and the compiled code of some patterns.
3        It also checks the non-Perl syntax the PCRE supports (Python, .NET,
4        Oniguruma). Finally, there are some tests where PCRE and Perl differ,
5        either because PCRE can't be compatible, or there is a possible Perl
6        bug.
7    
8        NOTE: This is a non-UTF set of tests. When UTF support is needed, use
9        test 5, and if Unicode Property Support is needed, use test 7. --/
10    
11  /(a)b|/I  /(a)b|/I
12    
13  /abc/I  /abc/I
# Line 28  Line 38 
38      *** Failers      *** Failers
39      def\nabc      def\nabc
40    
41  /ab\hdef/X  /ab\idef/X
42    
43  /(?X)ab\hdef/X  /(?X)ab\idef/X
44    
45  /x{5,4}/  /x{5,4}/
46    
# Line 40  Line 50 
50    
51  /(?X)[\B]/  /(?X)[\B]/
52    
53    /(?X)[\R]/
54    
55    /(?X)[\X]/
56    
57    /[\B]/BZ
58    
59    /[\R]/BZ
60    
61    /[\X]/BZ
62    
63  /[z-a]/  /[z-a]/
64    
65  /^*/  /^*/
# Line 123  Line 143 
143      defabc      defabc
144      \Zdefabc      \Zdefabc
145    
 /abc/IP  
     abc  
     *** Failers  
   
 /^abc|def/IP  
     abcdef  
     abcdef\B  
   
 /.*((abc)$|(def))/IP  
     defabc  
     \Zdefabc  
   
 /the quick brown fox/IP  
     the quick brown fox  
     *** Failers  
     The Quick Brown Fox  
   
 /the quick brown fox/IPi  
     the quick brown fox  
     The Quick Brown Fox  
   
 /abc.def/IP  
     *** Failers  
     abc\ndef  
   
 /abc$/IP  
     abc  
     abc\n  
   
 /(abc)\2/IP  
   
 /(abc\1)/IP  
     abc  
   
146  /)/  /)/
147    
148  /a[]b/  /a[]b/
# Line 236  Line 222 
222    
223  /((?i)blah)\s+\1/I  /((?i)blah)\s+\1/I
224    
225  /((?i)b)/IDS  /((?i)b)/IDZS
226    
227  /(a*b|(?i:c*(?-i)d))/IS  /(a*b|(?i:c*(?-i)d))/IS
228    
# Line 333  Line 319 
319      *** Failers      *** Failers
320      a      a
321    
322  /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I  /This one is here because Perl behaves differently; see also the following/I
323    
324  /^(a\1?){4}$/I  /^(a\1?){4}$/I
325        aaaa
326      aaaaaa      aaaaaa
327    
328    /Perl does not fail these two for the final subjects. Neither did PCRE until/
329    /release 8.01. The problem is in backtracking into a subpattern that contains/
330    /a recursive reference to itself. PCRE has now made these into atomic patterns./
331    
332    /^(xa|=?\1a){2}$/
333        xa=xaa
334        ** Failers
335        xa=xaaa
336    
337    /^(xa|=?\1a)+$/
338        xa=xaa
339        ** Failers
340        xa=xaaa
341    
342  /These are syntax tests from Perl 5.005/I  /These are syntax tests from Perl 5.005/I
343    
# Line 398  Line 399 
399    
400  /(?(1?)a|b)/  /(?(1?)a|b)/
401    
 /(?(1)a|b|c)/  
   
402  /[a[:xyz:/  /[a[:xyz:/
403    
404  /(?<=x+)y/  /(?<=x+)y/
# Line 408  Line 407 
407    
408  /abc/\  /abc/\
409    
 /abc/\P  
   
410  /abc/\i  /abc/\i
411    
412  /(a)bc(d)/I  /(a)bc(d)/I
# Line 440  Line 437 
437    
438  /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+  /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
439  )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+  )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
440  )?)?)?)?)?)?)?)?)?otherword/IM  )?)?)?)?)?)?)?)?)?otherword/I
441    
442  /.*X/ID  /.*X/IDZ
443    
444  /.*X/IDs  /.*X/IDZs
445    
446  /(.*X|^B)/ID  /(.*X|^B)/IDZ
447    
448  /(.*X|^B)/IDs  /(.*X|^B)/IDZs
449    
450  /(?s)(.*X|^B)/ID  /(?s)(.*X|^B)/IDZ
451    
452  /(?s:.*X|^B)/ID  /(?s:.*X|^B)/IDZ
453    
454  /\Biss\B/I+  /\Biss\B/I+
455      Mississippi      Mississippi
456    
 /\Biss\B/I+P  
     Mississippi  
   
457  /iss/IG+  /iss/IG+
458      Mississippi      Mississippi
459    
# Line 568  Line 562 
562    
563  /ab\d+/I  /ab\d+/I
564    
565  /a(?(1)b)/I  /a(?(1)b)(.)/I
566    
567  /a(?(1)bag|big)/I  /a(?(1)bag|big)(.)/I
568    
569  /a(?(1)bag|big)*/I  /a(?(1)bag|big)*(.)/I
570    
571  /a(?(1)bag|big)+/I  /a(?(1)bag|big)+(.)/I
572    
573  /a(?(1)b..|b..)/I  /a(?(1)b..|b..)(.)/I
574    
575  /ab\d{0}e/I  /ab\d{0}e/I
576    
# Line 595  Line 589 
589      *** Failers      *** Failers
590      \Nabc      \Nabc
591    
 /a*(b+)(z)(z)/IP  
     aaaabbbbzzzz  
     aaaabbbbzzzz\O0  
     aaaabbbbzzzz\O1  
     aaaabbbbzzzz\O2  
     aaaabbbbzzzz\O3  
     aaaabbbbzzzz\O4  
     aaaabbbbzzzz\O5  
   
592  /^.?abcd/IS  /^.?abcd/IS
593    
594  /\(             # ( at start  /\(             # ( at start
# Line 666  Line 651 
651      (ab(cd)ef)      (ab(cd)ef)
652      (ab(cd(ef)gh)ij)      (ab(cd(ef)gh)ij)
653    
654  /^[[:alnum:]]/D  /^[[:alnum:]]/DZ
655    
656  /^[[:^alnum:]]/D  /^[[:^alnum:]]/DZ
657    
658  /^[[:alpha:]]/D  /^[[:alpha:]]/DZ
659    
660  /^[[:^alpha:]]/D  /^[[:^alpha:]]/DZ
661    
662  /[_[:alpha:]]/IS  /[_[:alpha:]]/IS
663    
664  /^[[:ascii:]]/D  /^[[:ascii:]]/DZ
665    
666  /^[[:^ascii:]]/D  /^[[:^ascii:]]/DZ
667    
668  /^[[:blank:]]/D  /^[[:blank:]]/DZ
669    
670  /^[[:^blank:]]/D  /^[[:^blank:]]/DZ
671    
672  /[\n\x0b\x0c\x0d[:blank:]]/IS  /[\n\x0b\x0c\x0d[:blank:]]/IS
673    
674  /^[[:cntrl:]]/D  /^[[:cntrl:]]/DZ
675    
676  /^[[:digit:]]/D  /^[[:digit:]]/DZ
677    
678  /^[[:graph:]]/D  /^[[:graph:]]/DZ
679    
680  /^[[:lower:]]/D  /^[[:lower:]]/DZ
681    
682  /^[[:print:]]/D  /^[[:print:]]/DZ
683    
684  /^[[:punct:]]/D  /^[[:punct:]]/DZ
685    
686  /^[[:space:]]/D  /^[[:space:]]/DZ
687    
688  /^[[:upper:]]/D  /^[[:upper:]]/DZ
689    
690  /^[[:xdigit:]]/D  /^[[:xdigit:]]/DZ
691    
692  /^[[:word:]]/D  /^[[:word:]]/DZ
693    
694  /^[[:^cntrl:]]/D  /^[[:^cntrl:]]/DZ
695    
696  /^[12[:^digit:]]/D  /^[12[:^digit:]]/DZ
697    
698  /^[[:^blank:]]/D  /^[[:^blank:]]/DZ
699    
700  /[01[:alpha:]%]/D  /[01[:alpha:]%]/DZ
701    
702  /[[.ch.]]/I  /[[.ch.]]/I
703    
# Line 796  Line 781 
781    
782  /--------------------------------------------------------------------/I  /--------------------------------------------------------------------/I
783    
784  /#/IxMD  /#/IxDZ
785    
786  /a#/IxMD  /a#/IxDZ
787    
788  /[\s]/D  /[\s]/DZ
789    
790  /[\S]/D  /[\S]/DZ
791    
792  /a(?i)b/D  /a(?i)b/DZ
793      ab      ab
794      aB      aB
795      *** Failers      *** Failers
796      AB      AB
797    
798  /(a(?i)b)/D  /(a(?i)b)/DZ
799      ab      ab
800      aB      aB
801      *** Failers      *** Failers
802      AB      AB
803    
804  /   (?i)abc/IxD  /   (?i)abc/IxDZ
805    
806  /#this is a comment  /#this is a comment
807    (?i)abc/IxD    (?i)abc/IxDZ
808    
809  /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D  /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
810    
811  /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D  /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
812    
813  /\Q\E/D  /\Q\E/DZ
814      \      \
815    
816  /\Q\Ex/D  /\Q\Ex/DZ
817    
818  / \Q\E/D  / \Q\E/DZ
819    
820  /a\Q\E/D  /a\Q\E/DZ
821    abc    abc
822    bca    bca
823    bac    bac
824    
825  /a\Q\Eb/D  /a\Q\Eb/DZ
826    abc    abc
827    
828  /\Q\Eabc/D  /\Q\Eabc/DZ
829    
830  /x*+\w/D  /x*+\w/DZ
831      *** Failers      *** Failers
832      xxxxx      xxxxx
833    
834  /x?+/D  /x?+/DZ
835    
836  /x++/D  /x++/DZ
837    
838  /x{1,3}+/D  /x{1,3}+/DZ
839    
840  /(x)*+/D  /(x)*+/DZ
841    
842  /^(\w++|\s++)*$/I  /^(\w++|\s++)*$/I
843      now is the time for all good men to come to the aid of the party      now is the time for all good men to come to the aid of the party
# Line 882  Line 867 
867      *** Failers      *** Failers
868      ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa      ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
869    
870  /(abc){1,3}+/D  /(abc){1,3}+/DZ
871    
872  /a+?+/I  /a+?+/I
873    
# Line 892  Line 877 
877    
878  /a{2,3}?+b/IU  /a{2,3}?+b/IU
879    
880  /x(?U)a++b/D  /x(?U)a++b/DZ
881      xaaaab      xaaaab
882    
883  /(?U)xa++b/D  /(?U)xa++b/DZ
884      xaaaab      xaaaab
885    
886  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/D  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
887    
888  /^x(?U)a+b/D  /^x(?U)a+b/DZ
889    
890  /^x(?U)(a+)b/D  /^x(?U)(a+)b/DZ
891    
892  /[.x.]/I  /[.x.]/I
893    
# Line 926  Line 911 
911    
912  /[[:space:]/I  /[[:space:]/I
913    
914  /[\s]/IDM  /[\s]/IDZ
915    
916  /[[:space:]]/IDM  /[[:space:]]/IDZ
917    
918  /[[:space:]abcde]/IDM  /[[:space:]abcde]/IDZ
919    
920  /< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/Ix  /< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/Ix
921      <>      <>
# Line 942  Line 927 
927      *** Failers      *** Failers
928      <abc      <abc
929    
930  |8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>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|IDM  |8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>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
931    
932  |\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>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|IDM  |\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>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
933    
934  /(.*)\d+\1/I  /(.*)\d+\1/I
935    
# Line 977  Line 962 
962    
963  /()a/I  /()a/I
964    
965  /(?(1)ab|ac)/I  /(?(1)ab|ac)(.)/I
966    
967  /(?(1)abz|acz)/I  /(?(1)abz|acz)(.)/I
968    
969  /(?(1)abz)/I  /(?(1)abz)(.)/I
970    
971  /(?(1)abz)123/I  /(?(1)abz)(1)23/I
972    
973  /(a)+/I  /(a)+/I
974    
# Line 1027  Line 1012 
1012  /abc(?C)de(?C1)f/I  /abc(?C)de(?C1)f/I
1013      123abcdef      123abcdef
1014    
1015  /(?C1)\dabc(?C2)def/I  /(?C1)\dabc(?C2)def/IS
1016        1234abcdef
1017        *** Failers
1018        abcdef
1019    
1020    /(?C1)\dabc(?C2)def/ISS
1021      1234abcdef      1234abcdef
1022      *** Failers      *** Failers
1023      abcdef      abcdef
# Line 1120  Line 1110 
1110     >abc>1(2)3<xyz<     >abc>1(2)3<xyz<
1111     >abc>(1(2)3)<xyz<     >abc>(1(2)3)<xyz<
1112    
1113  /(a(?1)b)/D  /(a(?1)b)/DZ
   
 /(a(?1)+b)/D  
1114    
1115  /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/Ii  /(a(?1)+b)/DZ
     1221  
     Satan, oscillate my metallic sonatas!  
     A man, a plan, a canal: Panama!  
     Able was I ere I saw Elba.  
     *** Failers  
     The quick brown fox  
1116    
1117  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
1118      12      12
# Line 1173  Line 1155 
1155      a=b      a=b
1156      a=bc      a=bc
1157    
1158  /a(?P<name1>b|c)d(?P<longername2>e)/D  /a(?P<name1>b|c)d(?P<longername2>e)/DZ
1159      abde      abde
1160      acde      acde
1161    
1162  /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/D  /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
1163    
1164  /(?P<a>a)...(?P=a)bbb(?P>a)d/D  /(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
1165    
1166  /^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/Ii  /^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/Ii
1167      1221      1221
# Line 1215  Line 1197 
1197    
1198  /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is  /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
1199    
1200  /(a)(bc)/IND  /(a)(bc)/INDZ
1201    abc    abc
1202    
1203  /(?P<one>a)(bc)/IND  /(?P<one>a)(bc)/INDZ
1204    abc    abc
1205    
1206  /(a)(?P<named>bc)/IND  /(a)(?P<named>bc)/INDZ
1207    
1208  /(a+)*zz/I  /(a+)*zz/I
1209    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
# Line 1239  Line 1221 
1221      abcdefgh\Cone\Ctwo      abcdefgh\Cone\Ctwo
1222      abcdefgh\Cthree      abcdefgh\Cthree
1223    
1224  /(?P<Tes>)(?P<Test>)/D  /(?P<Tes>)(?P<Test>)/DZ
1225    
1226  /(?P<Test>)(?P<Tes>)/D  /(?P<Test>)(?P<Tes>)/DZ
1227    
1228  /(?P<Z>zz)(?P<A>aa)/I  /(?P<Z>zz)(?P<A>aa)/I
1229      zzaa\CZ      zzaa\CZ
# Line 1260  Line 1242 
1242      [10,20,30,5,5,4,4,2,43,23,4234]      [10,20,30,5,5,4,4,2,43,23,4234]
1243      []      []
1244    
1245  /(a(b(?2)c))?/D  /(a(b(?2)c))?/DZ
1246    
1247  /(a(b(?2)c))*/D  /(a(b(?2)c))*/DZ
1248    
1249  /(a(b(?2)c)){0,2}/D  /(a(b(?2)c)){0,2}/DZ
1250    
1251  /[ab]{1}+/D  /[ab]{1}+/DZ
1252    
1253  /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii  /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
1254       Baby Bjorn Active Carrier - With free SHIPPING!!       Baby Bjorn Active Carrier - With free SHIPPING!!
# Line 1274  Line 1256 
1256  /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS  /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
1257       Baby Bjorn Active Carrier - With free SHIPPING!!       Baby Bjorn Active Carrier - With free SHIPPING!!
1258    
1259  /a*.*b/ISD  /a*.*b/ISDZ
1260    
1261  /(a|b)*.?c/ISD  /(a|b)*.?c/ISDZ
1262    
1263  /abc(?C255)de(?C)f/D  /abc(?C255)de(?C)f/DZ
1264    
1265  /abcde/ICD  /abcde/ICDZ
1266    abcde    abcde
1267    abcdfe    abcdfe
1268    
1269  /a*b/ICD  /a*b/ICDZS
1270      ab
1271      aaaab
1272      aaaacb
1273    
1274    /a*b/ICDZSS
1275    ab    ab
1276    aaaab    aaaab
1277    aaaacb    aaaacb
1278    
1279  /a+b/ICD  /a+b/ICDZ
1280    ab    ab
1281    aaaab    aaaab
1282    aaaacb    aaaacb
1283    
1284  /(abc|def)x/ICD  /(abc|def)x/ICDZS
1285      abcx
1286      defx
1287      ** Failers
1288      abcdefzx
1289    
1290    /(abc|def)x/ICDZSS
1291    abcx    abcx
1292    defx    defx
1293      ** Failers
1294    abcdefzx    abcdefzx
1295    
1296  /(ab|cd){3,4}/IC  /(ab|cd){3,4}/IC
# Line 1304  Line 1298 
1298    abcdabcd    abcdabcd
1299    abcdcdcdcdcd    abcdcdcdcdcd
1300    
1301  /([ab]{,4}c|xy)/ICD  /([ab]{,4}c|xy)/ICDZS
1302        Note: that { does NOT introduce a quantifier
1303    
1304    /([ab]{,4}c|xy)/ICDZSS
1305      Note: that { does NOT introduce a quantifier      Note: that { does NOT introduce a quantifier
1306    
1307  /([ab]{1,4}c|xy){4,5}?123/ICD  /([ab]{1,4}c|xy){4,5}?123/ICDZ
1308      aacaacaacaacaac123      aacaacaacaacaac123
1309    
1310  /\b.*/I  /\b.*/I
# Line 1378  Line 1375 
1375      1X      1X
1376      123456\P      123456\P
1377    
1378  /abc/I>testsavedregex  /abc/IS>testsavedregex
1379    <testsavedregex
1380        abc
1381        ** Failers
1382        bca
1383    
1384    /abc/ISS>testsavedregex
1385    <testsavedregex
1386        abc
1387        ** Failers
1388        bca
1389    
1390    /abc/IFS>testsavedregex
1391  <testsavedregex  <testsavedregex
1392      abc      abc
1393      ** Failers      ** Failers
1394      bca      bca
1395    
1396  /abc/IF>testsavedregex  /abc/IFSS>testsavedregex
1397  <testsavedregex  <testsavedregex
1398      abc      abc
1399      ** Failers      ** Failers
# Line 1396  Line 1405 
1405      ** Failers      ** Failers
1406      def      def
1407    
1408    /(a|b)/ISS>testsavedregex
1409    <testsavedregex
1410        abc
1411        ** Failers
1412        def
1413    
1414  /(a|b)/ISF>testsavedregex  /(a|b)/ISF>testsavedregex
1415  <testsavedregex  <testsavedregex
1416      abc      abc
1417      ** Failers      ** Failers
1418      def      def
1419    
1420    /(a|b)/ISSF>testsavedregex
1421    <testsavedregex
1422        abc
1423        ** Failers
1424        def
1425    
1426  ~<(\w+)/?>(.)*</(\1)>~smgI  ~<(\w+)/?>(.)*</(\1)>~smgI
1427      <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>      \J1024<!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
1428    
1429  /^a/IF  /^a/IF
1430    
# Line 1421  Line 1442 
1442      ** Failers      ** Failers
1443      line one\nthis is a line\nbreak in the second line      line one\nthis is a line\nbreak in the second line
1444    
 /ab.cd/IP  
     ab-cd  
     ab=cd  
     ** Failers  
     ab\ncd  
   
 /ab.cd/IPs  
     ab-cd  
     ab=cd  
     ab\ncd  
   
1445  /(?i)(?-i)AbCd/I  /(?i)(?-i)AbCd/I
1446      AbCd      AbCd
1447      ** Failers      ** Failers
# Line 1482  Line 1492 
1492      (this)      (this)
1493      ((this))      ((this))
1494    
 /a(b)c/IPN  
     abc  
   
 /a(?P<name>b)c/IPN  
     abc  
   
 /\x{100}/I  
   
1495  /\x{0000ff}/I  /\x{0000ff}/I
1496    
1497  /^((?P<A>a1)|(?P<A>a2)b)/I  /^((?P<A>a1)|(?P<A>a2)b)/I
# Line 1567  a random value. /Ix Line 1569  a random value. /Ix
1569  /()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I  /()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1570      bXXaYYaY      bXXaYYaY
1571    
 /\777/I  
   
1572  /\s*,\s*/IS  /\s*,\s*/IS
1573      \x0b,\x0b      \x0b,\x0b
1574      \x0c,\x0d      \x0c,\x0d
# Line 1667  a random value. /Ix Line 1667  a random value. /Ix
1667    
1668  /(d?|c)[ab]xyz/IS  /(d?|c)[ab]xyz/IS
1669    
1670  /^a*b\d/D  /^a*b\d/DZ
1671    
1672  /^a*+b\d/D  /^a*+b\d/DZ
1673    
1674  /^a*?b\d/D  /^a*?b\d/DZ
1675    
1676  /^a+A\d/D  /^a+A\d/DZ
1677      aaaA5      aaaA5
1678      ** Failers      ** Failers
1679      aaaa5      aaaa5
1680    
1681  /^a*A\d/IiD  /^a*A\d/IiDZ
1682      aaaA5      aaaA5
1683      aaaa5      aaaa5
1684    
# Line 1700  a random value. /Ix Line 1700  a random value. /Ix
1700  /Ix  /Ix
1701    large nest    large nest
1702    
1703  /a*\d/B  /a*\d/BZ
1704    
1705  /a*\D/B  /a*\D/BZ
1706    
1707  /0*\d/B  /0*\d/BZ
1708    
1709  /0*\D/B  /0*\D/BZ
1710    
1711  /a*\s/B  /a*\s/BZ
1712    
1713  /a*\S/B  /a*\S/BZ
1714    
1715  / *\s/B  / *\s/BZ
1716    
1717  / *\S/B  / *\S/BZ
1718    
1719  /a*\w/B  /a*\w/BZ
1720    
1721  /a*\W/B  /a*\W/BZ
1722    
1723  /=*\w/B  /=*\w/BZ
1724    
1725  /=*\W/B  /=*\W/BZ
1726    
1727  /\d*a/B  /\d*a/BZ
1728    
1729  /\d*2/B  /\d*2/BZ
1730    
1731  /\d*\d/B  /\d*\d/BZ
1732    
1733  /\d*\D/B  /\d*\D/BZ
1734    
1735  /\d*\s/B  /\d*\s/BZ
1736    
1737  /\d*\S/B  /\d*\S/BZ
1738    
1739  /\d*\w/B  /\d*\w/BZ
1740    
1741  /\d*\W/B  /\d*\W/BZ
1742    
1743  /\D*a/B  /\D*a/BZ
1744    
1745  /\D*2/B  /\D*2/BZ
1746    
1747  /\D*\d/B  /\D*\d/BZ
1748    
1749  /\D*\D/B  /\D*\D/BZ
1750    
1751  /\D*\s/B  /\D*\s/BZ
1752    
1753  /\D*\S/B  /\D*\S/BZ
1754    
1755  /\D*\w/B  /\D*\w/BZ
1756    
1757  /\D*\W/B  /\D*\W/BZ
1758    
1759  /\s*a/B  /\s*a/BZ
1760    
1761  /\s*2/B  /\s*2/BZ
1762    
1763  /\s*\d/B  /\s*\d/BZ
1764    
1765  /\s*\D/B  /\s*\D/BZ
1766    
1767  /\s*\s/B  /\s*\s/BZ
1768    
1769  /\s*\S/B  /\s*\S/BZ
1770    
1771  /\s*\w/B  /\s*\w/BZ
1772    
1773  /\s*\W/B  /\s*\W/BZ
1774    
1775  /\S*a/B  /\S*a/BZ
1776    
1777  /\S*2/B  /\S*2/BZ
1778    
1779  /\S*\d/B  /\S*\d/BZ
1780    
1781  /\S*\D/B  /\S*\D/BZ
1782    
1783  /\S*\s/B  /\S*\s/BZ
1784    
1785  /\S*\S/B  /\S*\S/BZ
1786    
1787  /\S*\w/B  /\S*\w/BZ
1788    
1789  /\S*\W/B  /\S*\W/BZ
1790    
1791  /\w*a/B  /\w*a/BZ
1792    
1793  /\w*2/B  /\w*2/BZ
1794    
1795  /\w*\d/B  /\w*\d/BZ
1796    
1797  /\w*\D/B  /\w*\D/BZ
1798    
1799  /\w*\s/B  /\w*\s/BZ
1800    
1801  /\w*\S/B  /\w*\S/BZ
1802    
1803  /\w*\w/B  /\w*\w/BZ
1804    
1805  /\w*\W/B  /\w*\W/BZ
1806    
1807  /\W*a/B  /\W*a/BZ
1808    
1809  /\W*2/B  /\W*2/BZ
1810    
1811  /\W*\d/B  /\W*\d/BZ
1812    
1813  /\W*\D/B  /\W*\D/BZ
1814    
1815  /\W*\s/B  /\W*\s/BZ
1816    
1817  /\W*\S/B  /\W*\S/BZ
1818    
1819  /\W*\w/B  /\W*\w/BZ
1820    
1821  /\W*\W/B  /\W*\W/BZ
1822    
1823  /[^a]+a/B  /[^a]+a/BZ
1824    
1825  /[^a]+a/Bi  /[^a]+a/BZi
1826    
1827  /[^a]+A/Bi  /[^a]+A/BZi
1828    
1829  /[^a]+b/B  /[^a]+b/BZ
1830    
1831  /[^a]+\d/B  /[^a]+\d/BZ
1832    
1833  /a*[^a]/B  /a*[^a]/BZ
1834    
1835  /(?P<abc>x)(?P<xyz>y)/I  /(?P<abc>x)(?P<xyz>y)/I
1836      xy\Cabc\Cxyz      xy\Cabc\Cxyz
# Line 1885  a random value. /Ix Line 1885  a random value. /Ix
1885      Xaaa      Xaaa
1886      Xaba      Xaba
1887    
1888  /^[\E\Qa\E-\Qz\E]+/B  /^[\E\Qa\E-\Qz\E]+/BZ
1889    
1890  /^[a\Q]bc\E]/B  /^[a\Q]bc\E]/BZ
1891    
1892  /^[a-\Q\E]/B  /^[a-\Q\E]/BZ
1893    
1894  /^(?P>abc)[()](?<abc>)/B  /^(?P>abc)[()](?<abc>)/BZ
1895    
1896  /^((?(abc)y)[()](?P<abc>x))+/B  /^((?(abc)y)[()](?P<abc>x))+/BZ
1897      (xy)x      (xy)x
1898    
1899  /^(?P>abc)\Q()\E(?<abc>)/B  /^(?P>abc)\Q()\E(?<abc>)/BZ
1900    
1901  /^(?P>abc)[a\Q(]\E(](?<abc>)/B  /^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
1902    
1903  /^(?P>abc) # this is (a comment)  /^(?P>abc) # this is (a comment)
1904    (?<abc>)/Bx    (?<abc>)/BZx
1905    
1906  /^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii  /^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
1907      1221      1221
# Line 1917  a random value. /Ix Line 1917  a random value. /Ix
1917  /(?=(?'abc'\w+))\k<abc>:/I  /(?=(?'abc'\w+))\k<abc>:/I
1918      abcd:      abcd:
1919    
 /(?'abc'\w+):\k<abc>{2}/  
     a:aaxyz  
     ab:ababxyz  
     ** Failers  
     a:axyz  
     ab:abxyz  
   
1920  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
1921      adaa      adaa
1922      ** Failers      ** Failers
# Line 1936  a random value. /Ix Line 1929  a random value. /Ix
1929      ** Failers      ** Failers
1930      bddd      bddd
1931    
 /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x  
     abd  
     ce  
   
1932  /(?(<bc))/  /(?(<bc))/
1933    
1934  /(?(''))/  /(?(''))/
# Line 1957  a random value. /Ix Line 1946  a random value. /Ix
1946  /(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x  /(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
1947      abcabc1Xabc2XabcXabcabc      abcabc1Xabc2XabcXabcabc
1948    
 /^(?(DEFINE) (?<A> a) (?<B> b) )  (?&A) (?&B) /x  
     abcd  
   
 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))  
   (?(DEFINE)  
   (?<NAME_PAT>[a-z]+)  
   (?<ADDRESS_PAT>\d+)  
   )/x  
     metcalfe 33  
   
1949  /^(?(DEFINE) abc | xyz ) /x  /^(?(DEFINE) abc | xyz ) /x
1950    
1951  /(?(DEFINE) abc) xyz/xI  /(?(DEFINE) abc) xyz/xI
1952    
 /(?(DEFINE) abc){3} xyz/x  
   
1953  /(a|)*\d/  /(a|)*\d/
1954    \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa    \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1955    \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4    \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
# Line 1990  a random value. /Ix Line 1967  a random value. /Ix
1967      a\rb\<anycrlf>      a\rb\<anycrlf>
1968    
1969  /^abc./mgx<any>  /^abc./mgx<any>
1970      abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK      abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
1971    
1972  /abc.$/mgx<any>  /abc.$/mgx<any>
1973      abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9      abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
1974    
1975  /a/<cr><any>  /a/<cr><any>
1976    
1977  /a/<any><crlf>  /a/<any><crlf>
1978    
1979  /^a\Rb/  /^a\Rb/<bsr_unicode>
1980      a\nb      a\nb
1981      a\rb      a\rb
1982      a\r\nb      a\r\nb
# Line 2009  a random value. /Ix Line 1986  a random value. /Ix
1986      ** Failers      ** Failers
1987      a\n\rb      a\n\rb
1988    
1989  /^a\R*b/  /^a\R*b/<bsr_unicode>
1990      ab      ab
1991      a\nb      a\nb
1992      a\rb      a\rb
# Line 2020  a random value. /Ix Line 1997  a random value. /Ix
1997      a\n\rb      a\n\rb
1998      a\n\r\x85\x0cb      a\n\r\x85\x0cb
1999    
2000  /^a\R+b/  /^a\R+b/<bsr_unicode>
2001      a\nb      a\nb
2002      a\rb      a\rb
2003      a\r\nb      a\r\nb
# Line 2032  a random value. /Ix Line 2009  a random value. /Ix
2009      ** Failers      ** Failers
2010      ab      ab
2011    
2012  /^a\R{1,3}b/  /^a\R{1,3}b/<bsr_unicode>
2013      a\nb      a\nb
2014      a\n\rb      a\n\rb
2015      a\n\r\x85b      a\n\r\x85b
# Line 2044  a random value. /Ix Line 2021  a random value. /Ix
2021      a\n\n\n\rb      a\n\n\n\rb
2022      a\r      a\r
2023    
2024  /^a[\R]b/  /^a[\R]b/<bsr_unicode>
2025      aRb      aRb
2026      ** Failers      ** Failers
2027      a\nb      a\nb
# Line 2055  a random value. /Ix Line 2032  a random value. /Ix
2032  /(?1)X(?<abc>P)/I  /(?1)X(?<abc>P)/I
2033      abcPXP123      abcPXP123
2034    
 /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/  
     1.2.3.4  
     131.111.10.206  
     10.0.0.0  
     ** Failers  
     10.6  
     455.3.4.5  
   
 /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/  
     1.2.3.4  
     131.111.10.206  
     10.0.0.0  
     ** Failers  
     10.6  
     455.3.4.5  
   
2035  /(?:a(?&abc)b)*(?<abc>x)/  /(?:a(?&abc)b)*(?<abc>x)/
2036      123axbaxbaxbx456      123axbaxbaxbx456
2037      123axbaxbaxb456      123axbaxbaxb456
# Line 2092  a random value. /Ix Line 2053  a random value. /Ix
2053     defabcabcxyz     defabcabcxyz
2054     DEFabcABCXYZ     DEFabcABCXYZ
2055    
 /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/  
     ababababbbabZXXXX  
   
2056  /^(a)\g-2/  /^(a)\g-2/
2057    
2058  /^(a)\g/  /^(a)\g/
# Line 2149  a random value. /Ix Line 2107  a random value. /Ix
2107      abc\r\n\r\n      abc\r\n\r\n
2108    
2109  /abc.$/mgx<anycrlf>  /abc.$/mgx<anycrlf>
2110      abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9      abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
2111    
2112  /^X/m  /^X/m
2113      XABC      XABC
2114      ** Failers      ** Failers
2115      XABC\B      XABC\B
2116    
2117  / End of testinput2 /  /(ab|c)(?-1)/BZ
2118        abc
2119    
2120    /xy(?+1)(abc)/BZ
2121        xyabcabc
2122        ** Failers
2123        xyabc
2124    
2125    /x(?-0)y/
2126    
2127    /x(?-1)y/
2128    
2129    /x(?+0)y/
2130    
2131    /x(?+1)y/
2132    
2133    /^(abc)?(?(-1)X|Y)/BZ
2134        abcX
2135        Y
2136        ** Failers
2137        abcY
2138    
2139    /^((?(+1)X|Y)(abc))+/BZ
2140        YabcXabc
2141        YabcXabcXabc
2142        ** Failers
2143        XabcXabc
2144    
2145    /(?(-1)a)/BZ
2146    
2147    /((?(-1)a))/BZ
2148    
2149    /((?(-2)a))/BZ
2150    
2151    /^(?(+1)X|Y)(.)/BZ
2152        Y!
2153    
2154    /(?<A>tom|bon)-\k{A}/
2155        tom-tom
2156        bon-bon
2157        ** Failers
2158        tom-bon
2159    
2160    /\g{A/
2161    
2162    /(?|(abc)|(xyz))/BZ
2163       >abc<
2164       >xyz<
2165    
2166    /(x)(?|(abc)|(xyz))(x)/BZ
2167        xabcx
2168        xxyzx
2169    
2170    /(x)(?|(abc)(pqr)|(xyz))(x)/BZ
2171        xabcpqrx
2172        xxyzx
2173    
2174    /\H++X/BZ
2175        ** Failers
2176        XXXX
2177    
2178    /\H+\hY/BZ
2179        XXXX Y
2180    
2181    /\H+ Y/BZ
2182    
2183    /\h+A/BZ
2184    
2185    /\v*B/BZ
2186    
2187    /\V+\x0a/BZ
2188    
2189    /A+\h/BZ
2190    
2191    / *\H/BZ
2192    
2193    /A*\v/BZ
2194    
2195    /\x0b*\V/BZ
2196    
2197    /\d+\h/BZ
2198    
2199    /\d*\v/BZ
2200    
2201    /S+\h\S+\v/BZ
2202    
2203    /\w{3,}\h\w+\v/BZ
2204    
2205    /\h+\d\h+\w\h+\S\h+\H/BZ
2206    
2207    /\v+\d\v+\w\v+\S\v+\V/BZ
2208    
2209    /\H+\h\H+\d/BZ
2210    
2211    /\V+\v\V+\w/BZ
2212    
2213    /\( (?: [^()]* | (?R) )* \)/x
2214    \J1024(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
2215    
2216    /[\E]AAA/
2217    
2218    /[\Q\E]AAA/
2219    
2220    /[^\E]AAA/
2221    
2222    /[^\Q\E]AAA/
2223    
2224    /[\E^]AAA/
2225    
2226    /[\Q\E^]AAA/
2227    
2228    /A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ
2229    
2230    /^a+(*FAIL)/C
2231        aaaaaa
2232    
2233    /a+b?c+(*FAIL)/C
2234        aaabccc
2235    
2236    /a+b?(*PRUNE)c+(*FAIL)/C
2237        aaabccc
2238    
2239    /a+b?(*COMMIT)c+(*FAIL)/C
2240        aaabccc
2241    
2242    /a+b?(*SKIP)c+(*FAIL)/C
2243        aaabcccaaabccc
2244    
2245    /a+b?(*THEN)c+(*FAIL)/C
2246        aaabccc
2247    
2248    /a(*MARK)b/
2249    
2250    /(?i:A{1,}\6666666666)/
2251    
2252    /\g6666666666/
2253    
2254    /[\g6666666666]/BZ
2255    
2256    /(?1)\c[/
2257    
2258    /.+A/<crlf>
2259        \r\nA
2260    
2261    /\nA/<crlf>
2262        \r\nA
2263    
2264    /[\r\n]A/<crlf>
2265        \r\nA
2266    
2267    /(\r|\n)A/<crlf>
2268        \r\nA
2269    
2270    /a(*CR)b/
2271    
2272    /(*CR)a.b/
2273        a\nb
2274        ** Failers
2275        a\rb
2276    
2277    /(*CR)a.b/<lf>
2278        a\nb
2279        ** Failers
2280        a\rb
2281    
2282    /(*LF)a.b/<CRLF>
2283        a\rb
2284        ** Failers
2285        a\nb
2286    
2287    /(*CRLF)a.b/
2288        a\rb
2289        a\nb
2290        ** Failers
2291        a\r\nb
2292    
2293    /(*ANYCRLF)a.b/<CR>
2294        ** Failers
2295        a\rb
2296        a\nb
2297        a\r\nb
2298    
2299    /(*ANY)a.b/<cr>
2300        ** Failers
2301        a\rb
2302        a\nb
2303        a\r\nb
2304        a\x85b
2305    
2306    /(*ANY).*/g
2307        abc\r\ndef
2308    
2309    /(*ANYCRLF).*/g
2310        abc\r\ndef
2311    
2312    /(*CRLF).*/g
2313        abc\r\ndef
2314    
2315    /a\Rb/I<bsr_anycrlf>
2316        a\rb
2317        a\nb
2318        a\r\nb
2319        ** Failers
2320        a\x85b
2321        a\x0bb
2322    
2323    /a\Rb/I<bsr_unicode>
2324        a\rb
2325        a\nb
2326        a\r\nb
2327        a\x85b
2328        a\x0bb
2329        ** Failers
2330        a\x85b\<bsr_anycrlf>
2331        a\x0bb\<bsr_anycrlf>
2332    
2333    /a\R?b/I<bsr_anycrlf>
2334        a\rb
2335        a\nb
2336        a\r\nb
2337        ** Failers
2338        a\x85b
2339        a\x0bb
2340    
2341    /a\R?b/I<bsr_unicode>
2342        a\rb
2343        a\nb
2344        a\r\nb
2345        a\x85b
2346        a\x0bb
2347        ** Failers
2348        a\x85b\<bsr_anycrlf>
2349        a\x0bb\<bsr_anycrlf>
2350    
2351    /a\R{2,4}b/I<bsr_anycrlf>
2352        a\r\n\nb
2353        a\n\r\rb
2354        a\r\n\r\n\r\n\r\nb
2355        ** Failers
2356        a\x85\85b
2357        a\x0b\0bb
2358    
2359    /a\R{2,4}b/I<bsr_unicode>
2360        a\r\rb
2361        a\n\n\nb
2362        a\r\n\n\r\rb
2363        a\x85\85b
2364        a\x0b\0bb
2365        ** Failers
2366        a\r\r\r\r\rb
2367        a\x85\85b\<bsr_anycrlf>
2368        a\x0b\0bb\<bsr_anycrlf>
2369    
2370    /(*BSR_ANYCRLF)a\Rb/I
2371        a\nb
2372        a\rb
2373    
2374    /(*BSR_UNICODE)a\Rb/I
2375        a\x85b
2376    
2377    /(*BSR_ANYCRLF)(*CRLF)a\Rb/I
2378        a\nb
2379        a\rb
2380    
2381    /(*CRLF)(*BSR_UNICODE)a\Rb/I
2382        a\x85b
2383    
2384    /(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
2385    
2386    /(?<a>)(?&)/
2387    
2388    /(?<abc>)(?&a)/
2389    
2390    /(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
2391    
2392    /(?+-a)/
2393    
2394    /(?-+a)/
2395    
2396    /(?(-1))/
2397    
2398    /(?(+10))/
2399    
2400    /(?(10))/
2401    
2402    /(?(+2))()()/
2403    
2404    /(?(2))()()/
2405    
2406    /\k''/
2407    
2408    /\k<>/
2409    
2410    /\k{}/
2411    
2412    /\k/
2413    
2414    /\kabc/
2415    
2416    /(?P=)/
2417    
2418    /(?P>)/
2419    
2420    /(?!\w)(?R)/
2421    
2422    /(?=\w)(?R)/
2423    
2424    /(?<!\w)(?R)/
2425    
2426    /(?<=\w)(?R)/
2427    
2428    /[[:foo:]]/
2429    
2430    /[[:1234:]]/
2431    
2432    /[[:f\oo:]]/
2433    
2434    /[[: :]]/
2435    
2436    /[[:...:]]/
2437    
2438    /[[:l\ower:]]/
2439    
2440    /[[:abc\:]]/
2441    
2442    /[abc[:x\]pqr:]]/
2443    
2444    /[[:a\dz:]]/
2445    
2446    /(^(a|b\g<-1'c))/
2447    
2448    /^(?+1)(?<a>x|y){0}z/
2449        xzxx
2450        yzyy
2451        ** Failers
2452        xxz
2453    
2454    /(\3)(\1)(a)/
2455        cat
2456    
2457    /(\3)(\1)(a)/<JS>
2458        cat
2459    
2460    /TA]/
2461        The ACTA] comes
2462    
2463    /TA]/<JS>
2464        The ACTA] comes
2465    
2466    /(?2)[]a()b](abc)/
2467        abcbabc
2468    
2469    /(?2)[^]a()b](abc)/
2470        abcbabc
2471    
2472    /(?1)[]a()b](abc)/
2473        abcbabc
2474        ** Failers
2475        abcXabc
2476    
2477    /(?1)[^]a()b](abc)/
2478        abcXabc
2479        ** Failers
2480        abcbabc
2481    
2482    /(?2)[]a()b](abc)(xyz)/
2483        xyzbabcxyz
2484    
2485    /(?&N)[]a(?<N>)](?<M>abc)/
2486       abc<abc
2487    
2488    /(?&N)[]a(?<N>)](abc)/
2489       abc<abc
2490    
2491    /a[]b/
2492    
2493    /a[^]b/
2494    
2495    /a[]b/<JS>
2496        ** Failers
2497        ab
2498    
2499    /a[]+b/<JS>
2500        ** Failers
2501        ab
2502    
2503    /a[]*+b/<JS>
2504        ** Failers
2505        ab
2506    
2507    /a[^]b/<JS>
2508        aXb
2509        a\nb
2510        ** Failers
2511        ab
2512    
2513    /a[^]+b/<JS>
2514        aXb
2515        a\nX\nXb
2516        ** Failers
2517        ab
2518    
2519    /a(?!)+b/
2520    
2521    /a(*FAIL)+b/
2522    
2523    /(abc|pqr|123){0}[xyz]/SI
2524    
2525    /(?(?=.*b)b|^)/CI
2526       adc
2527       abc
2528    
2529    /(?(?=b).*b|^d)/I
2530    
2531    /(?(?=.*b).*b|^d)/I
2532    
2533    /xyz/C
2534      xyz
2535      abcxyz
2536      abcxyz\Y
2537      ** Failers
2538      abc
2539      abc\Y
2540      abcxypqr
2541      abcxypqr\Y
2542    
2543    /(*NO_START_OPT)xyz/C
2544      abcxyz
2545    
2546    /xyz/CY
2547      abcxyz
2548    
2549    /^"((?(?=[a])[^"])|b)*"$/C
2550        "ab"
2551    
2552    /^"((?(?=[a])[^"])|b)*"$/
2553        "ab"
2554    
2555    /^X(?5)(a)(?|(b)|(q))(c)(d)Y/
2556        XYabcdY
2557    
2558    /^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
2559        XYabcdY
2560    
2561    /Xa{2,4}b/
2562        X\P
2563        Xa\P
2564        Xaa\P
2565        Xaaa\P
2566        Xaaaa\P
2567    
2568    /Xa{2,4}?b/
2569        X\P
2570        Xa\P
2571        Xaa\P
2572        Xaaa\P
2573        Xaaaa\P
2574    
2575    /Xa{2,4}+b/
2576        X\P
2577        Xa\P
2578        Xaa\P
2579        Xaaa\P
2580        Xaaaa\P
2581    
2582    /X\d{2,4}b/
2583        X\P
2584        X3\P
2585        X33\P
2586        X333\P
2587        X3333\P
2588    
2589    /X\d{2,4}?b/
2590        X\P
2591        X3\P
2592        X33\P
2593        X333\P
2594        X3333\P
2595    
2596    /X\d{2,4}+b/
2597        X\P
2598        X3\P
2599        X33\P
2600        X333\P
2601        X3333\P
2602    
2603    /X\D{2,4}b/
2604        X\P
2605        Xa\P
2606        Xaa\P
2607        Xaaa\P
2608        Xaaaa\P
2609    
2610    /X\D{2,4}?b/
2611        X\P
2612        Xa\P
2613        Xaa\P
2614        Xaaa\P
2615        Xaaaa\P
2616    
2617    /X\D{2,4}+b/
2618        X\P
2619        Xa\P
2620        Xaa\P
2621        Xaaa\P
2622        Xaaaa\P
2623    
2624    /X[abc]{2,4}b/
2625        X\P
2626        Xa\P
2627        Xaa\P
2628        Xaaa\P
2629        Xaaaa\P
2630    
2631    /X[abc]{2,4}?b/
2632        X\P
2633        Xa\P
2634        Xaa\P
2635        Xaaa\P
2636        Xaaaa\P
2637    
2638    /X[abc]{2,4}+b/
2639        X\P
2640        Xa\P
2641        Xaa\P
2642        Xaaa\P
2643        Xaaaa\P
2644    
2645    /X[^a]{2,4}b/
2646        X\P
2647        Xz\P
2648        Xzz\P
2649        Xzzz\P
2650        Xzzzz\P
2651    
2652    /X[^a]{2,4}?b/
2653        X\P
2654        Xz\P
2655        Xzz\P
2656        Xzzz\P
2657        Xzzzz\P
2658    
2659    /X[^a]{2,4}+b/
2660        X\P
2661        Xz\P
2662        Xzz\P
2663        Xzzz\P
2664        Xzzzz\P
2665    
2666    /(Y)X\1{2,4}b/
2667        YX\P
2668        YXY\P
2669        YXYY\P
2670        YXYYY\P
2671        YXYYYY\P
2672    
2673    /(Y)X\1{2,4}?b/
2674        YX\P
2675        YXY\P
2676        YXYY\P
2677        YXYYY\P
2678        YXYYYY\P
2679    
2680    /(Y)X\1{2,4}+b/
2681        YX\P
2682        YXY\P
2683        YXYY\P
2684        YXYYY\P
2685        YXYYYY\P
2686    
2687    /\++\KZ|\d+X|9+Y/
2688        ++++123999\P
2689        ++++123999Y\P
2690        ++++Z1234\P
2691    
2692    /Z(*F)/
2693        Z\P
2694        ZA\P
2695    
2696    /Z(?!)/
2697        Z\P
2698        ZA\P
2699    
2700    /dog(sbody)?/
2701        dogs\P
2702        dogs\P\P
2703    
2704    /dog(sbody)??/
2705        dogs\P
2706        dogs\P\P
2707    
2708    /dog|dogsbody/
2709        dogs\P
2710        dogs\P\P
2711    
2712    /dogsbody|dog/
2713        dogs\P
2714        dogs\P\P
2715    
2716    /\bthe cat\b/
2717        the cat\P
2718        the cat\P\P
2719    
2720    /abc/
2721       abc\P
2722       abc\P\P
2723    
2724    /abc\K123/
2725        xyzabc123pqr
2726        xyzabc12\P
2727        xyzabc12\P\P
2728    
2729    /(?<=abc)123/
2730        xyzabc123pqr
2731        xyzabc12\P
2732        xyzabc12\P\P
2733    
2734    /\babc\b/
2735        +++abc+++
2736        +++ab\P
2737        +++ab\P\P
2738    
2739    /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
2740    
2741    /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
2742    
2743    /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
2744    
2745    /abc\K/+
2746        abcdef
2747        abcdef\N\N
2748        xyzabcdef\N\N
2749        ** Failers
2750        abcdef\N
2751        xyzabcdef\N
2752    
2753    /^(?:(?=abc)|abc\K)/+
2754        abcdef
2755        abcdef\N\N
2756        ** Failers
2757        abcdef\N
2758    
2759    /a?b?/+
2760        xyz
2761        xyzabc
2762        xyzabc\N
2763        xyzabc\N\N
2764        xyz\N\N
2765        ** Failers
2766        xyz\N
2767    
2768    /^a?b?/+
2769        xyz
2770        xyzabc
2771        ** Failers
2772        xyzabc\N
2773        xyzabc\N\N
2774        xyz\N\N
2775        xyz\N
2776    
2777    /^(?<name>a|b\g<name>c)/
2778        aaaa
2779        bacxxx
2780        bbaccxxx
2781        bbbacccxx
2782    
2783    /^(?<name>a|b\g'name'c)/
2784        aaaa
2785        bacxxx
2786        bbaccxxx
2787        bbbacccxx
2788    
2789    /^(a|b\g<1>c)/
2790        aaaa
2791        bacxxx
2792        bbaccxxx
2793        bbbacccxx
2794    
2795    /^(a|b\g'1'c)/
2796        aaaa
2797        bacxxx
2798        bbaccxxx
2799        bbbacccxx
2800    
2801    /^(a|b\g'-1'c)/
2802        aaaa
2803        bacxxx
2804        bbaccxxx
2805        bbbacccxx
2806    
2807    /(^(a|b\g<-1>c))/
2808        aaaa
2809        bacxxx
2810        bbaccxxx
2811        bbbacccxx
2812    
2813    /(?-i:\g<name>)(?i:(?<name>a))/
2814        XaaX
2815        XAAX
2816    
2817    /(?i:\g<name>)(?-i:(?<name>a))/
2818        XaaX
2819        ** Failers
2820        XAAX
2821    
2822    /(?-i:\g<+1>)(?i:(a))/
2823        XaaX
2824        XAAX
2825    
2826    /(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/
2827    
2828    /(?<n>a|b|c)\g<n>*/
2829       abc
2830       accccbbb
2831    
2832    /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
2833        XYabcdY
2834    
2835    /(?<=b(?1)|zzz)(a)/
2836        xbaax
2837        xzzzax
2838    
2839    /(a)(?<=b\1)/
2840    
2841    /(a)(?<=b+(?1))/
2842    
2843    /(a+)(?<=b(?1))/
2844    
2845    /(a(?<=b(?1)))/
2846    
2847    /(?<=b(?1))xyz/
2848    
2849    /(?<=b(?1))xyz(b+)pqrstuvew/
2850    
2851    /(a|bc)\1/SI
2852    
2853    /(a|bc)\1{2,3}/SI
2854    
2855    /(a|bc)(?1)/SI
2856    
2857    /(a|b\1)(a|b\1)/SI
2858    
2859    /(a|b\1){2}/SI
2860    
2861    /(a|bbbb\1)(a|bbbb\1)/SI
2862    
2863    /(a|bbbb\1){2}/SI
2864    
2865    /^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/SI
2866    
2867    /<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS
2868    
2869    "(?>.*/)foo"SI
2870    
2871    /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /xSI
2872    
2873    /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
2874    
2875    /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
2876    
2877    /<a[\s]+href[\s]*=[\s]*          # find <a href=
2878     ([\"\'])?                       # find single or double quote
2879     (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
2880                                     # quote, otherwise match up to next space
2881    /isxSI
2882    
2883    /^(?!:)                       # colon disallowed at start
2884      (?:                         # start of item
2885        (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
2886        (?(1)0 | () ) )           # if null previously matched, fail; else null
2887        :                         # followed by colon
2888      ){1,7}                      # end item; 1-7 of them required
2889      [0-9a-f]{1,4} $             # final hex number at end of string
2890      (?(1)|.)                    # check that there was an empty component
2891      /xiIS
2892    
2893    /(?|(?<a>A)|(?<a>B))/I
2894        AB\Ca
2895        BA\Ca
2896    
2897    /(?|(?<a>A)|(?<b>B))/
2898    
2899    /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
2900        b(?<quote> (?<apostrophe>')|(?<realquote>")) )
2901        (?('quote')[a-z]+|[0-9]+)/JIx
2902        a"aaaaa
2903        b"aaaaa
2904        ** Failers
2905        b"11111
2906        a"11111
2907    
2908    /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
2909        abcdX
2910        eX
2911        ** Failers
2912        abcdY
2913        ey
2914    
2915    /(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
2916        abcdd
2917        ** Failers
2918        abcdde
2919    
2920    /abcd*/
2921        xxxxabcd\P
2922        xxxxabcd\P\P
2923    
2924    /abcd*/i
2925        xxxxabcd\P
2926        xxxxabcd\P\P
2927        XXXXABCD\P
2928        XXXXABCD\P\P
2929    
2930    /abc\d*/
2931        xxxxabc1\P
2932        xxxxabc1\P\P
2933    
2934    /(a)bc\1*/
2935        xxxxabca\P
2936        xxxxabca\P\P
2937    
2938    /abc[de]*/
2939        xxxxabcde\P
2940        xxxxabcde\P\P
2941    
2942    /-- This is not in the Perl >= 5.10 test because Perl seems currently to be
2943        broken and not behaving as specified in that it *does* bumpalong after
2944        hitting (*COMMIT). --/
2945    
2946    /(?1)(A(*COMMIT)|B)D/
2947        ABD
2948        XABD
2949        BAD
2950        ABXABD
2951        ** Failers
2952        ABX
2953        BAXBAD
2954    
2955    /(\3)(\1)(a)/<JS>
2956        cat
2957    
2958    /(\3)(\1)(a)/SI<JS>
2959        cat
2960    
2961    /(\3)(\1)(a)/SI
2962        cat
2963    
2964    /i(?(DEFINE)(?<s>a))/SI
2965        i
2966    
2967    /()i(?(1)a)/SI
2968        ia
2969    
2970    /(?i)a(?-i)b|c/BZ
2971        XabX
2972        XAbX
2973        CcC
2974        ** Failers
2975        XABX
2976    
2977    /(?i)a(?s)b|c/BZ
2978    
2979    /(?i)a(?s-i)b|c/BZ
2980    
2981    /^(ab(c\1)d|x){2}$/BZ
2982        xabcxd
2983    
2984    /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
2985    
2986    /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
2987    
2988    / -- The first four of these are not in the Perl >= 5.10 test because Perl
2989         documents that the use of \K in assertions is "not well defined". The
2990         last is here because Perl gives the match as "b" rather than "ab". I
2991         believe this to be a Perl bug. --/
2992    
2993    /(?=a\Kb)ab/
2994        ab
2995    
2996    /(?!a\Kb)ac/
2997        ac
2998    
2999    /^abc(?<=b\Kc)d/
3000        abcd
3001    
3002    /^abc(?<!b\Kq)d/
3003        abcd
3004    
3005    /(?>a\Kb)z|(ab)/
3006        ab
3007    
3008    /----------------------/
3009    
3010    /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
3011    
3012    /abc(*MARK:)pqr/
3013    
3014    /abc(*:)pqr/
3015    
3016    /abc(*FAIL:123)xyz/
3017    
3018    /--- This should, and does, fail. In Perl, it does not, which I think is a
3019         bug because replacing the B in the pattern by (B|D) does make it fail. ---/
3020    
3021    /A(*COMMIT)B/+K
3022        ACABX
3023    
3024    /--- These should be different, but in Perl 5.11 are not, which I think
3025         is a bug in Perl. ---/
3026    
3027    /A(*THEN)B|A(*THEN)C/K
3028        AC
3029    
3030    /A(*PRUNE)B|A(*PRUNE)C/K
3031        AC
3032    
3033    /--- This should fail; the SKIP advances by one, but when we get to AC, the
3034         PRUNE kills it. Perl behaves differently. ---/
3035    
3036    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
3037        AAAC
3038    
3039    /--- Mark names can be duplicated. Perl doesn't give a mark for this one,
3040    though PCRE does. ---/
3041    
3042    /^A(*:A)B|^X(*:A)Y/K
3043        ** Failers
3044        XAQQ
3045    
3046    /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
3047    optimizations defeat this. So does the PCRE optimization unless we disable it
3048    with \Y. ---/
3049    
3050    /(*COMMIT)ABC/
3051        ABCDEFG
3052        ** Failers
3053        DEFGABC\Y
3054    
3055    /^(ab (c+(*THEN)cd) | xyz)/x
3056        abcccd
3057    
3058    /^(ab (c+(*PRUNE)cd) | xyz)/x
3059        abcccd
3060    
3061    /^(ab (c+(*FAIL)cd) | xyz)/x
3062        abcccd
3063    
3064    /--- Perl 5.11 gets some of these wrong ---/
3065    
3066    /(?>.(*ACCEPT))*?5/
3067        abcde
3068    
3069    /(.(*ACCEPT))*?5/
3070        abcde
3071    
3072    /(.(*ACCEPT))5/
3073        abcde
3074    
3075    /(.(*ACCEPT))*5/
3076        abcde
3077    
3078    /A\NB./BZ
3079        ACBD
3080        *** Failers
3081        A\nB
3082        ACB\n
3083    
3084    /A\NB./sBZ
3085        ACBD
3086        ACB\n
3087        *** Failers
3088        A\nB
3089    
3090    /A\NB/<crlf>
3091        A\nB
3092        A\rB
3093        ** Failers
3094        A\r\nB
3095    
3096    /\R+b/BZ
3097    
3098    /\R+\n/BZ
3099    
3100    /\R+\d/BZ
3101    
3102    /\d*\R/BZ
3103    
3104    /\s*\R/BZ
3105    
3106    /-- Perl treats this one differently, not failing the second string. I believe
3107        that is a bug in Perl. --/
3108    
3109    /^((abc|abcx)(*THEN)y|abcd)/
3110        abcd
3111        *** Failers
3112        abcxy
3113    
3114    /(?<=abc)def/
3115        abc\P\P
3116    
3117    /abc$/
3118        abc
3119        abc\P
3120        abc\P\P
3121    
3122    /abc$/m
3123        abc
3124        abc\n
3125        abc\P\P
3126        abc\n\P\P
3127        abc\P
3128        abc\n\P
3129    
3130    /abc\z/
3131        abc
3132        abc\P
3133        abc\P\P
3134    
3135    /abc\Z/
3136        abc
3137        abc\P
3138        abc\P\P
3139    
3140    /abc\b/
3141        abc
3142        abc\P
3143        abc\P\P
3144    
3145    /abc\B/
3146        abc
3147        abc\P
3148        abc\P\P
3149    
3150    /.+/
3151        abc\>0
3152        abc\>1
3153        abc\>2
3154        abc\>3
3155        abc\>4
3156        abc\>-4
3157    
3158    /^\cģ/
3159    
3160    /(?P<abn>(?P=abn)xxx)/BZ
3161    
3162    /(a\1z)/BZ
3163    
3164    /(?P<abn>(?P=abn)(?<badstufxxx)/BZ
3165    
3166    /(?P<abn>(?P=axn)xxx)/BZ
3167    
3168    /(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
3169    
3170    /-- These tests are here because Perl gets the first one wrong. --/
3171    
3172    /(\R*)(.)/s
3173        \r\n
3174        \r\r\n\n\r
3175        \r\r\n\n\r\n
3176    
3177    /(\R)*(.)/s
3178        \r\n
3179        \r\r\n\n\r
3180        \r\r\n\n\r\n
3181    
3182    /((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
3183        \r\n
3184        \r\r\n\n\r
3185        \r\r\n\n\r\n
3186    
3187    /-- --/
3188    
3189    /^abc$/BZ
3190    
3191    /^abc$/BZm
3192    
3193    /^(a)*+(\w)/S
3194        aaaaX
3195        ** Failers
3196        aaaa
3197    
3198    /^(?:a)*+(\w)/S
3199        aaaaX
3200        ** Failers
3201        aaaa
3202    
3203    /(a)++1234/SDZ
3204    
3205    /([abc])++1234/SI
3206    
3207    /(?<=(abc)+)X/
3208    
3209    /(^ab)/I
3210    
3211    /(^ab)++/I
3212    
3213    /(^ab|^)+/I
3214    
3215    /(^ab|^)++/I
3216    
3217    /(?:^ab)/I
3218    
3219    /(?:^ab)++/I
3220    
3221    /(?:^ab|^)+/I
3222    
3223    /(?:^ab|^)++/I
3224    
3225    /(.*ab)/I
3226    
3227    /(.*ab)++/I
3228    
3229    /(.*ab|.*)+/I
3230    
3231    /(.*ab|.*)++/I
3232    
3233    /(?:.*ab)/I
3234    
3235    /(?:.*ab)++/I
3236    
3237    /(?:.*ab|.*)+/I
3238    
3239    /(?:.*ab|.*)++/I
3240    
3241    /(?=a)[bcd]/I
3242    
3243    /((?=a))[bcd]/I
3244    
3245    /((?=a))+[bcd]/I
3246    
3247    /((?=a))++[bcd]/I
3248    
3249    /(?=a+)[bcd]/iI
3250    
3251    /(?=a+?)[bcd]/iI
3252    
3253    /(?=a++)[bcd]/iI
3254    
3255    /(?=a{3})[bcd]/iI
3256    
3257    /(abc)\1+/S
3258    
3259    /-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
3260    
3261    /(?1)(?:(b(*ACCEPT))){0}/
3262        b
3263    
3264    /(?1)(?:(b(*ACCEPT))){0}c/
3265        bc
3266        ** Failers
3267        b
3268    
3269    /(?1)(?:((*ACCEPT))){0}c/
3270        c
3271        c\N
3272    
3273    /^.*?(?(?=a)a|b(*THEN)c)/
3274        ba
3275    
3276    /^.*?(?(?=a)a|bc)/
3277        ba
3278    
3279    /^.*?(?(?=a)a(*THEN)b|c)/
3280        ac
3281    
3282    /^.*?(?(?=a)a(*THEN)b)c/
3283        ac
3284    
3285    /^.*?(a(*THEN)b)c/
3286        aabc
3287    
3288    /^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
3289        aabc
3290    
3291    /^.*?(a(*THEN)b|z)c/
3292        aabc
3293    
3294    /^.*?(z|a(*THEN)b)c/
3295        aabc
3296    
3297    /-- --/
3298    
3299    /-- These studied versions are here because they are not Perl-compatible; the
3300        studying means the mark is not seen. --/
3301    
3302    /(*MARK:A)(*SKIP:B)(C|X)/KS
3303        C
3304        D
3305    
3306    /(*:A)A+(*SKIP:A)(B|Z)/KS
3307        AAAC
3308    
3309    /-- --/
3310    
3311    "(?=a*(*ACCEPT)b)c"
3312        c
3313        c\N
3314    
3315    /(?1)c(?(DEFINE)((*ACCEPT)b))/
3316        c
3317        c\N
3318    
3319    /(?>(*ACCEPT)b)c/
3320        c
3321        c\N
3322    
3323    /(?:(?>(a)))+a%/++
3324        %aa%
3325    
3326    /(a)b|ac/++SS
3327        ac\O3
3328    
3329    /(a)(b)x|abc/++
3330         abc\O6
3331    
3332    /(a)bc|(a)(b)\2/
3333        \O3abc
3334        \O4abc
3335    
3336    /(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
3337    
3338    /(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
3339    
3340    /(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
3341    
3342    /(abc)(?1)/SI
3343    
3344    /^(?>a)++/
3345        aa\M
3346        aaaaaaaaa\M
3347    
3348    /(a)(?1)++/
3349        aa\M
3350        aaaaaaaaa\M
3351    
3352    /(?:(foo)|(bar)|(baz))X/SS=
3353        bazfooX
3354        foobazbarX
3355        barfooX
3356        bazX
3357        foobarbazX
3358        bazfooX\O0
3359        bazfooX\O2
3360        bazfooX\O4
3361        bazfooX\O6
3362        bazfooX\O8
3363        bazfooX\O10
3364    
3365    /(?=abc){3}abc/BZ
3366    
3367    /(?=abc)+abc/BZ
3368    
3369    /(?=abc)++abc/BZ
3370    
3371    /(?=abc){0}xyz/BZ
3372    
3373    /(?=(a))?./BZ
3374    
3375    /(?=(a))??./BZ
3376    
3377    /^(?=(a)){0}b(?1)/BZ
3378    
3379    /(?(DEFINE)(a))?b(?1)/BZ
3380    
3381    /^(?=(?1))?[az]([abc])d/BZ
3382    
3383    /^(?!a){0}\w+/BZ
3384    
3385    /(?<=(abc))?xyz/BZ
3386    
3387    /[:a[:abc]b:]/BZ
3388    
3389    /((?2))((?1))/SS
3390        abc
3391    
3392    /((?(R2)a+|(?1)b))/SS
3393        aaaabcde
3394    
3395    /(?(R)a*(?1)|((?R))b)/SS
3396        aaaabcde
3397    
3398    /(a+|(?R)b)/
3399    
3400    /^(a(*:A)(d|e(*:B))z|aeq)/C
3401        adz
3402        aez
3403        aeqwerty
3404    
3405    /.(*F)/
3406        \P\Pabc
3407    
3408    /\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
3409    
3410    /\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
3411    
3412    /a(*SKIP)c|b(*ACCEPT)|/+SI
3413        a
3414    
3415    /a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
3416        ax
3417    
3418    'a*(*ACCEPT)b'+
3419        \N\N
3420        abc\N\N
3421        bbb\N\N
3422    
3423    /(*ACCEPT)a/+I
3424        bax
3425    
3426    /z(*ACCEPT)a/+I
3427        baxzbx
3428    
3429    /a(?:.)*?a/ims
3430        \Mabbbbbbbbbbbbbbbbbbbbba
3431    
3432    /a(?:.(*THEN))*?a/ims
3433        \Mabbbbbbbbbbbbbbbbbbbbba
3434    
3435    /a(?:.(*THEN:ABC))*?a/ims
3436        \Mabbbbbbbbbbbbbbbbbbbbba
3437    
3438    /-- These tests are in agreement with development Perl 5.015, which has fixed
3439        some things, but they don't all work with 5.012, so they aren't in the
3440        Perl-compatible tests. Those after the first come from Perl's own test
3441        files. --/
3442    
3443    /^((yes|no)(*THEN)(*F))?/
3444      yes
3445    
3446    /(A (.*)   C? (*THEN)  | A D) (*FAIL)/x
3447    AbcdCBefgBhiBqz
3448    
3449    /(A (.*)   C? (*THEN)  | A D) z/x
3450    AbcdCBefgBhiBqz
3451    
3452    /(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x
3453    AbcdCBefgBhiBqz
3454    
3455    /(A (.*)   C? (*THEN)  | A D) \s* z/x
3456    AbcdCBefgBhiBqz
3457    
3458    /(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x
3459    AbcdCBefgBhiBqz
3460    
3461    /(A (.*)   (?:C|) (*THEN)  | A D) z/x
3462    AbcdCBefgBhiBqz
3463    
3464    /(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x
3465    AbcdCBefgBhiBqz
3466    
3467    /(A (.*)   C{0,6} (*THEN)  | A D) z/x
3468    AbcdCBefgBhiBqz
3469    
3470    /(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x
3471    AbcdCEBefgBhiBqz
3472    
3473    /(A (.*)   (CE){0,6} (*THEN)  | A D) z/x
3474    AbcdCEBefgBhiBqz
3475    
3476    /(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x
3477    AbcdCBefgBhiBqz
3478    
3479    /(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x
3480    AbcdCBefgBhiBqz
3481    
3482    /-----------------------------------------------/
3483    
3484    /^(?>a+)(?>(z+))\w/BZ
3485        aaaazzzzb
3486        ** Failers
3487        aazz
3488    
3489    /(.)(\1|a(?2))/
3490        bab
3491    
3492    /\1|(.)(?R)\1/
3493        cbbbc
3494    
3495    /(.)((?(1)c|a)|a(?2))/
3496        baa
3497    
3498    /(?P<abn>(?P=abn)xxx)/BZ
3499    
3500    /(a\1z)/BZ
3501    
3502    /^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
3503         \Maabbccddee
3504    
3505    /^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
3506         \Maabbccddee
3507    
3508    /^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
3509         \Maabbccddee
3510    
3511    /^a\x41z/<JS>
3512        aAz
3513        *** Failers
3514        ax41z
3515    
3516    /^a[m\x41]z/<JS>
3517        aAz
3518    
3519    /^a\x1z/<JS>
3520        ax1z
3521    
3522    /^a\u0041z/<JS>
3523        aAz
3524        *** Failers
3525        au0041z
3526    
3527    /^a[m\u0041]z/<JS>
3528        aAz
3529    
3530    /^a\u041z/<JS>
3531        au041z
3532        *** Failers
3533        aAz
3534    
3535    /^a\U0041z/<JS>
3536        aU0041z
3537        *** Failers
3538        aAz
3539    
3540    /(?(?=c)c|d)++Y/BZ
3541    
3542    /(?(?=c)c|d)*+Y/BZ
3543    
3544    /a[\NB]c/
3545        aNc
3546    
3547    /a[B-\Nc]/
3548    
3549    /(a)(?2){0,1999}?(b)/
3550    
3551    /(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
3552    
3553    /--- This test, with something more complicated than individual letters, causes
3554    different behaviour in Perl. Perhaps it disables some optimization; no tag is
3555    passed back for the failures, whereas in PCRE there is a tag. ---/
3556    
3557    /(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
3558        AABC
3559        XXYZ
3560        ** Failers
3561        XAQQ
3562        XAQQXZZ
3563        AXQQQ
3564        AXXQQQ
3565    
3566    /-- Perl doesn't give marks for these, though it does if the alternatives are
3567    replaced by single letters. --/
3568    
3569    /(b|q)(*:m)f|a(*:n)w/K
3570        aw
3571        ** Failers
3572        abc
3573    
3574    /(q|b)(*:m)f|a(*:n)w/K
3575        aw
3576        ** Failers
3577        abc
3578    
3579    /-- After a partial match, the behaviour is as for a failure. --/
3580    
3581    /^a(*:X)bcde/K
3582       abc\P
3583    
3584    /-- These are here because Perl doesn't return a mark, except for the first --/
3585    
3586    /(?=(*:x))(q|)/K+
3587        abc
3588    
3589    /(?=(*:x))((*:y)q|)/K+
3590        abc
3591    
3592    /(?=(*:x))(?:(*:y)q|)/K+
3593        abc
3594    
3595    /(?=(*:x))(?>(*:y)q|)/K+
3596        abc
3597    
3598    /(?=a(*:x))(?!a(*:y)c)/K+
3599        ab
3600    
3601    /(?=a(*:x))(?=a(*:y)c|)/K+
3602        ab
3603    
3604    /(..)\1/
3605        ab\P
3606        aba\P
3607        abab\P
3608    
3609    /(..)\1/i
3610        ab\P
3611        abA\P
3612        aBAb\P
3613    
3614    /(..)\1{2,}/
3615        ab\P
3616        aba\P
3617        abab\P
3618        ababa\P
3619        ababab\P
3620        ababab\P\P
3621        abababa\P
3622        abababa\P\P
3623    
3624    /(..)\1{2,}/i
3625        ab\P
3626        aBa\P
3627        aBAb\P
3628        AbaBA\P
3629        abABAb\P
3630        aBAbaB\P\P
3631        abABabA\P
3632        abaBABa\P\P
3633    
3634    /(..)\1{2,}?x/i
3635        ab\P
3636        abA\P
3637        aBAb\P
3638        abaBA\P
3639        abAbaB\P
3640        abaBabA\P
3641        abAbABaBx\P
3642    
3643    /-- End of testinput2 --/

Legend:
Removed from v.155  
changed lines
  Added in v.915

  ViewVC Help
Powered by ViewVC 1.1.5