/[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 131 by ph10, Mon Mar 26 15:10:12 2007 UTC revision 488 by ph10, Mon Jan 11 15:29:42 2010 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 potential Perl
6        bug. --/
7    
8    /-- Originally, the Perl 5.10 things were in here too, but now I have separated
9        many (most?) of them out into test 11. However, there may still be some
10        that were overlooked. --/
11    
12  /(a)b|/I  /(a)b|/I
13    
14  /abc/I  /abc/I
# Line 28  Line 39 
39      *** Failers      *** Failers
40      def\nabc      def\nabc
41    
42  /ab\hdef/X  /ab\idef/X
43    
44  /(?X)ab\hdef/X  /(?X)ab\idef/X
45    
46  /x{5,4}/  /x{5,4}/
47    
# Line 123  Line 134 
134      defabc      defabc
135      \Zdefabc      \Zdefabc
136    
137  /abc/IP  /abc/P
138      abc      abc
139      *** Failers      *** Failers
140    
141  /^abc|def/IP  /^abc|def/P
142      abcdef      abcdef
143      abcdef\B      abcdef\B
144    
145  /.*((abc)$|(def))/IP  /.*((abc)$|(def))/P
146      defabc      defabc
147      \Zdefabc      \Zdefabc
148    
149  /the quick brown fox/IP  /the quick brown fox/P
150      the quick brown fox      the quick brown fox
151      *** Failers      *** Failers
152      The Quick Brown Fox      The Quick Brown Fox
153    
154  /the quick brown fox/IPi  /the quick brown fox/Pi
155      the quick brown fox      the quick brown fox
156      The Quick Brown Fox      The Quick Brown Fox
157    
158  /abc.def/IP  /abc.def/P
159      *** Failers      *** Failers
160      abc\ndef      abc\ndef
161    
162  /abc$/IP  /abc$/P
163      abc      abc
164      abc\n      abc\n
165    
166  /(abc)\2/IP  /(abc)\2/P
167    
168  /(abc\1)/IP  /(abc\1)/P
169      abc      abc
170    
171  /)/  /)/
# Line 236  Line 247 
247    
248  /((?i)blah)\s+\1/I  /((?i)blah)\s+\1/I
249    
250  /((?i)b)/IDS  /((?i)b)/IDZS
251    
252  /(a*b|(?i:c*(?-i)d))/IS  /(a*b|(?i:c*(?-i)d))/IS
253    
# Line 333  Line 344 
344      *** Failers      *** Failers
345      a      a
346    
347  /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
348    
349  /^(a\1?){4}$/I  /^(a\1?){4}$/I
350        aaaa
351      aaaaaa      aaaaaa
352    
353    /Perl does not fail these two for the final subjects. Neither did PCRE until/
354    /release 8.01. The problem is in backtracking into a subpattern that contains/
355    /a recursive reference to itself. PCRE has now made these into atomic patterns./
356    
357    /^(xa|=?\1a){2}$/
358        xa=xaa
359        ** Failers
360        xa=xaaa
361    
362    /^(xa|=?\1a)+$/
363        xa=xaa
364        ** Failers
365        xa=xaaa
366    
367  /These are syntax tests from Perl 5.005/I  /These are syntax tests from Perl 5.005/I
368    
# Line 398  Line 424 
424    
425  /(?(1?)a|b)/  /(?(1?)a|b)/
426    
 /(?(1)a|b|c)/  
   
427  /[a[:xyz:/  /[a[:xyz:/
428    
429  /(?<=x+)y/  /(?<=x+)y/
# Line 440  Line 464 
464    
465  /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]+
466  )((?:[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]+
467  )?)?)?)?)?)?)?)?)?otherword/IM  )?)?)?)?)?)?)?)?)?otherword/I
468    
469  /.*X/ID  /.*X/IDZ
470    
471  /.*X/IDs  /.*X/IDZs
472    
473  /(.*X|^B)/ID  /(.*X|^B)/IDZ
474    
475  /(.*X|^B)/IDs  /(.*X|^B)/IDZs
476    
477  /(?s)(.*X|^B)/ID  /(?s)(.*X|^B)/IDZ
478    
479  /(?s:.*X|^B)/ID  /(?s:.*X|^B)/IDZ
480    
481  /\Biss\B/I+  /\Biss\B/I+
482      Mississippi      Mississippi
# Line 568  Line 592 
592    
593  /ab\d+/I  /ab\d+/I
594    
595  /a(?(1)b)/I  /a(?(1)b)(.)/I
596    
597  /a(?(1)bag|big)/I  /a(?(1)bag|big)(.)/I
598    
599  /a(?(1)bag|big)*/I  /a(?(1)bag|big)*(.)/I
600    
601  /a(?(1)bag|big)+/I  /a(?(1)bag|big)+(.)/I
602    
603  /a(?(1)b..|b..)/I  /a(?(1)b..|b..)(.)/I
604    
605  /ab\d{0}e/I  /ab\d{0}e/I
606    
# Line 595  Line 619 
619      *** Failers      *** Failers
620      \Nabc      \Nabc
621    
622  /a*(b+)(z)(z)/IP  /a*(b+)(z)(z)/P
623      aaaabbbbzzzz      aaaabbbbzzzz
624      aaaabbbbzzzz\O0      aaaabbbbzzzz\O0
625      aaaabbbbzzzz\O1      aaaabbbbzzzz\O1
# Line 666  Line 690 
690      (ab(cd)ef)      (ab(cd)ef)
691      (ab(cd(ef)gh)ij)      (ab(cd(ef)gh)ij)
692    
693  /^[[:alnum:]]/D  /^[[:alnum:]]/DZ
694    
695  /^[[:^alnum:]]/D  /^[[:^alnum:]]/DZ
696    
697  /^[[:alpha:]]/D  /^[[:alpha:]]/DZ
698    
699  /^[[:^alpha:]]/D  /^[[:^alpha:]]/DZ
700    
701  /[_[:alpha:]]/IS  /[_[:alpha:]]/IS
702    
703  /^[[:ascii:]]/D  /^[[:ascii:]]/DZ
704    
705  /^[[:^ascii:]]/D  /^[[:^ascii:]]/DZ
706    
707  /^[[:blank:]]/D  /^[[:blank:]]/DZ
708    
709  /^[[:^blank:]]/D  /^[[:^blank:]]/DZ
710    
711  /[\n\x0b\x0c\x0d[:blank:]]/IS  /[\n\x0b\x0c\x0d[:blank:]]/IS
712    
713  /^[[:cntrl:]]/D  /^[[:cntrl:]]/DZ
714    
715  /^[[:digit:]]/D  /^[[:digit:]]/DZ
716    
717  /^[[:graph:]]/D  /^[[:graph:]]/DZ
718    
719  /^[[:lower:]]/D  /^[[:lower:]]/DZ
720    
721  /^[[:print:]]/D  /^[[:print:]]/DZ
722    
723  /^[[:punct:]]/D  /^[[:punct:]]/DZ
724    
725  /^[[:space:]]/D  /^[[:space:]]/DZ
726    
727  /^[[:upper:]]/D  /^[[:upper:]]/DZ
728    
729  /^[[:xdigit:]]/D  /^[[:xdigit:]]/DZ
730    
731  /^[[:word:]]/D  /^[[:word:]]/DZ
732    
733  /^[[:^cntrl:]]/D  /^[[:^cntrl:]]/DZ
734    
735  /^[12[:^digit:]]/D  /^[12[:^digit:]]/DZ
736    
737  /^[[:^blank:]]/D  /^[[:^blank:]]/DZ
738    
739  /[01[:alpha:]%]/D  /[01[:alpha:]%]/DZ
740    
741  /[[.ch.]]/I  /[[.ch.]]/I
742    
# Line 796  Line 820 
820    
821  /--------------------------------------------------------------------/I  /--------------------------------------------------------------------/I
822    
823  /#/IxMD  /#/IxDZ
824    
825  /a#/IxMD  /a#/IxDZ
826    
827  /[\s]/D  /[\s]/DZ
828    
829  /[\S]/D  /[\S]/DZ
830    
831  /a(?i)b/D  /a(?i)b/DZ
832      ab      ab
833      aB      aB
834      *** Failers      *** Failers
835      AB      AB
836    
837  /(a(?i)b)/D  /(a(?i)b)/DZ
838      ab      ab
839      aB      aB
840      *** Failers      *** Failers
841      AB      AB
842    
843  /   (?i)abc/IxD  /   (?i)abc/IxDZ
844    
845  /#this is a comment  /#this is a comment
846    (?i)abc/IxD    (?i)abc/IxDZ
847    
848  /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D  /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
849    
850  /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D  /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
851    
852  /\Q\E/D  /\Q\E/DZ
853      \      \
854    
855  /\Q\Ex/D  /\Q\Ex/DZ
856    
857  / \Q\E/D  / \Q\E/DZ
858    
859  /a\Q\E/D  /a\Q\E/DZ
860    abc    abc
861    bca    bca
862    bac    bac
863    
864  /a\Q\Eb/D  /a\Q\Eb/DZ
865    abc    abc
866    
867  /\Q\Eabc/D  /\Q\Eabc/DZ
868    
869  /x*+\w/D  /x*+\w/DZ
870      *** Failers      *** Failers
871      xxxxx      xxxxx
872    
873  /x?+/D  /x?+/DZ
874    
875  /x++/D  /x++/DZ
876    
877  /x{1,3}+/D  /x{1,3}+/DZ
878    
879  /(x)*+/D  /(x)*+/DZ
880    
881  /^(\w++|\s++)*$/I  /^(\w++|\s++)*$/I
882      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 906 
906      *** Failers      *** Failers
907      ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa      ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
908    
909  /(abc){1,3}+/D  /(abc){1,3}+/DZ
910    
911  /a+?+/I  /a+?+/I
912    
# Line 892  Line 916 
916    
917  /a{2,3}?+b/IU  /a{2,3}?+b/IU
918    
919  /x(?U)a++b/D  /x(?U)a++b/DZ
920      xaaaab      xaaaab
921    
922  /(?U)xa++b/D  /(?U)xa++b/DZ
923      xaaaab      xaaaab
924    
925  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/D  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
926    
927  /^x(?U)a+b/D  /^x(?U)a+b/DZ
928    
929  /^x(?U)(a+)b/D  /^x(?U)(a+)b/DZ
930    
931  /[.x.]/I  /[.x.]/I
932    
# Line 926  Line 950 
950    
951  /[[:space:]/I  /[[:space:]/I
952    
953  /[\s]/IDM  /[\s]/IDZ
954    
955  /[[:space:]]/IDM  /[[:space:]]/IDZ
956    
957  /[[:space:]abcde]/IDM  /[[:space:]abcde]/IDZ
958    
959  /< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/Ix  /< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/Ix
960      <>      <>
# Line 942  Line 966 
966      *** Failers      *** Failers
967      <abc      <abc
968    
969  |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\)0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vL\,\^\;\&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
972    
973  /(.*)\d+\1/I  /(.*)\d+\1/I
974    
# Line 977  Line 1001 
1001    
1002  /()a/I  /()a/I
1003    
1004  /(?(1)ab|ac)/I  /(?(1)ab|ac)(.)/I
1005    
1006  /(?(1)abz|acz)/I  /(?(1)abz|acz)(.)/I
1007    
1008  /(?(1)abz)/I  /(?(1)abz)(.)/I
1009    
1010  /(?(1)abz)123/I  /(?(1)abz)(1)23/I
1011    
1012  /(a)+/I  /(a)+/I
1013    
# Line 1120  Line 1144 
1144     >abc>1(2)3<xyz<     >abc>1(2)3<xyz<
1145     >abc>(1(2)3)<xyz<     >abc>(1(2)3)<xyz<
1146    
1147  /(a(?1)b)/D  /(a(?1)b)/DZ
1148    
1149  /(a(?1)+b)/D  /(a(?1)+b)/DZ
   
 /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/Ii  
     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  
1150    
1151  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
1152      12      12
# Line 1173  Line 1189 
1189      a=b      a=b
1190      a=bc      a=bc
1191    
1192  /a(?P<name1>b|c)d(?P<longername2>e)/D  /a(?P<name1>b|c)d(?P<longername2>e)/DZ
1193      abde      abde
1194      acde      acde
1195    
1196  /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/D  /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
1197    
1198  /(?P<a>a)...(?P=a)bbb(?P>a)d/D  /(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
1199    
1200  /^\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
1201      1221      1221
# Line 1215  Line 1231 
1231    
1232  /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is  /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
1233    
1234  /(a)(bc)/IND  /(a)(bc)/INDZ
1235    abc    abc
1236    
1237  /(?P<one>a)(bc)/IND  /(?P<one>a)(bc)/INDZ
1238    abc    abc
1239    
1240  /(a)(?P<named>bc)/IND  /(a)(?P<named>bc)/INDZ
1241    
1242  /(a+)*zz/I  /(a+)*zz/I
1243    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
# Line 1239  Line 1255 
1255      abcdefgh\Cone\Ctwo      abcdefgh\Cone\Ctwo
1256      abcdefgh\Cthree      abcdefgh\Cthree
1257    
1258  /(?P<Tes>)(?P<Test>)/D  /(?P<Tes>)(?P<Test>)/DZ
1259    
1260  /(?P<Test>)(?P<Tes>)/D  /(?P<Test>)(?P<Tes>)/DZ
1261    
1262  /(?P<Z>zz)(?P<A>aa)/I  /(?P<Z>zz)(?P<A>aa)/I
1263      zzaa\CZ      zzaa\CZ
# Line 1260  Line 1276 
1276      [10,20,30,5,5,4,4,2,43,23,4234]      [10,20,30,5,5,4,4,2,43,23,4234]
1277      []      []
1278    
1279  /(a(b(?2)c))?/D  /(a(b(?2)c))?/DZ
1280    
1281  /(a(b(?2)c))*/D  /(a(b(?2)c))*/DZ
1282    
1283  /(a(b(?2)c)){0,2}/D  /(a(b(?2)c)){0,2}/DZ
1284    
1285  /[ab]{1}+/D  /[ab]{1}+/DZ
1286    
1287  /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii  /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
1288       Baby Bjorn Active Carrier - With free SHIPPING!!       Baby Bjorn Active Carrier - With free SHIPPING!!
# Line 1274  Line 1290 
1290  /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS  /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
1291       Baby Bjorn Active Carrier - With free SHIPPING!!       Baby Bjorn Active Carrier - With free SHIPPING!!
1292    
1293  /a*.*b/ISD  /a*.*b/ISDZ
1294    
1295  /(a|b)*.?c/ISD  /(a|b)*.?c/ISDZ
1296    
1297  /abc(?C255)de(?C)f/D  /abc(?C255)de(?C)f/DZ
1298    
1299  /abcde/ICD  /abcde/ICDZ
1300    abcde    abcde
1301    abcdfe    abcdfe
1302    
1303  /a*b/ICD  /a*b/ICDZ
1304    ab    ab
1305    aaaab    aaaab
1306    aaaacb    aaaacb
1307    
1308  /a+b/ICD  /a+b/ICDZ
1309    ab    ab
1310    aaaab    aaaab
1311    aaaacb    aaaacb
1312    
1313  /(abc|def)x/ICD  /(abc|def)x/ICDZ
1314    abcx    abcx
1315    defx    defx
1316    abcdefzx    abcdefzx
# Line 1304  Line 1320 
1320    abcdabcd    abcdabcd
1321    abcdcdcdcdcd    abcdcdcdcdcd
1322    
1323  /([ab]{,4}c|xy)/ICD  /([ab]{,4}c|xy)/ICDZ
1324      Note: that { does NOT introduce a quantifier      Note: that { does NOT introduce a quantifier
1325    
1326  /([ab]{1,4}c|xy){4,5}?123/ICD  /([ab]{1,4}c|xy){4,5}?123/ICDZ
1327      aacaacaacaacaac123      aacaacaacaacaac123
1328    
1329  /\b.*/I  /\b.*/I
# Line 1421  Line 1437 
1437      ** Failers      ** Failers
1438      line one\nthis is a line\nbreak in the second line      line one\nthis is a line\nbreak in the second line
1439    
1440  /ab.cd/IP  /ab.cd/P
1441      ab-cd      ab-cd
1442      ab=cd      ab=cd
1443      ** Failers      ** Failers
1444      ab\ncd      ab\ncd
1445    
1446  /ab.cd/IPs  /ab.cd/Ps
1447      ab-cd      ab-cd
1448      ab=cd      ab=cd
1449      ab\ncd      ab\ncd
# Line 1482  Line 1498 
1498      (this)      (this)
1499      ((this))      ((this))
1500    
1501  /a(b)c/IPN  /a(b)c/PN
1502      abc      abc
1503    
1504  /a(?P<name>b)c/IPN  /a(?P<name>b)c/PN
1505      abc      abc
1506    
1507  /\x{100}/I  /\x{100}/I
# Line 1667  a random value. /Ix Line 1683  a random value. /Ix
1683    
1684  /(d?|c)[ab]xyz/IS  /(d?|c)[ab]xyz/IS
1685    
1686  /^a*b\d/D  /^a*b\d/DZ
1687    
1688  /^a*+b\d/D  /^a*+b\d/DZ
1689    
1690  /^a*?b\d/D  /^a*?b\d/DZ
1691    
1692  /^a+A\d/D  /^a+A\d/DZ
1693      aaaA5      aaaA5
1694      ** Failers      ** Failers
1695      aaaa5      aaaa5
1696    
1697  /^a*A\d/IiD  /^a*A\d/IiDZ
1698      aaaA5      aaaA5
1699      aaaa5      aaaa5
1700    
# Line 1700  a random value. /Ix Line 1716  a random value. /Ix
1716  /Ix  /Ix
1717    large nest    large nest
1718    
1719  /a*\d/B  /a*\d/BZ
1720    
1721  /a*\D/B  /a*\D/BZ
1722    
1723  /0*\d/B  /0*\d/BZ
1724    
1725  /0*\D/B  /0*\D/BZ
1726    
1727  /a*\s/B  /a*\s/BZ
1728    
1729  /a*\S/B  /a*\S/BZ
1730    
1731  / *\s/B  / *\s/BZ
1732    
1733  / *\S/B  / *\S/BZ
1734    
1735  /a*\w/B  /a*\w/BZ
1736    
1737  /a*\W/B  /a*\W/BZ
1738    
1739  /=*\w/B  /=*\w/BZ
1740    
1741  /=*\W/B  /=*\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  /\D*a/B  /\D*a/BZ
1760    
1761  /\D*2/B  /\D*2/BZ
1762    
1763  /\D*\d/B  /\D*\d/BZ
1764    
1765  /\D*\D/B  /\D*\D/BZ
1766    
1767  /\D*\s/B  /\D*\s/BZ
1768    
1769  /\D*\S/B  /\D*\S/BZ
1770    
1771  /\D*\w/B  /\D*\w/BZ
1772    
1773  /\D*\W/B  /\D*\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  /\S*a/B  /\S*a/BZ
1792    
1793  /\S*2/B  /\S*2/BZ
1794    
1795  /\S*\d/B  /\S*\d/BZ
1796    
1797  /\S*\D/B  /\S*\D/BZ
1798    
1799  /\S*\s/B  /\S*\s/BZ
1800    
1801  /\S*\S/B  /\S*\S/BZ
1802    
1803  /\S*\w/B  /\S*\w/BZ
1804    
1805  /\S*\W/B  /\S*\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  /\W*a/B  /\W*a/BZ
1824    
1825  /\W*2/B  /\W*2/BZ
1826    
1827  /\W*\d/B  /\W*\d/BZ
1828    
1829  /\W*\D/B  /\W*\D/BZ
1830    
1831  /\W*\s/B  /\W*\s/BZ
1832    
1833  /\W*\S/B  /\W*\S/BZ
1834    
1835  /\W*\w/B  /\W*\w/BZ
1836    
1837  /\W*\W/B  /\W*\W/BZ
1838    
1839  /[^a]+a/B  /[^a]+a/BZ
1840    
1841  /[^a]+a/Bi  /[^a]+a/BZi
1842    
1843  /[^a]+A/Bi  /[^a]+A/BZi
1844    
1845  /[^a]+b/B  /[^a]+b/BZ
1846    
1847  /[^a]+\d/B  /[^a]+\d/BZ
1848    
1849  /a*[^a]/B  /a*[^a]/BZ
1850    
1851  /(?P<abc>x)(?P<xyz>y)/I  /(?P<abc>x)(?P<xyz>y)/I
1852      xy\Cabc\Cxyz      xy\Cabc\Cxyz
# Line 1885  a random value. /Ix Line 1901  a random value. /Ix
1901      Xaaa      Xaaa
1902      Xaba      Xaba
1903    
1904  /^[\E\Qa\E-\Qz\E]+/B  /^[\E\Qa\E-\Qz\E]+/BZ
1905    
1906  /^[a\Q]bc\E]/B  /^[a\Q]bc\E]/BZ
1907    
1908  /^[a-\Q\E]/B  /^[a-\Q\E]/BZ
1909    
1910  /^(?P>abc)[()](?<abc>)/B  /^(?P>abc)[()](?<abc>)/BZ
1911    
1912  /^((?(abc)y)[()](?P<abc>x))+/B  /^((?(abc)y)[()](?P<abc>x))+/BZ
1913      (xy)x      (xy)x
1914    
1915  /^(?P>abc)\Q()\E(?<abc>)/B  /^(?P>abc)\Q()\E(?<abc>)/BZ
1916    
1917  /^(?P>abc)[a\Q(]\E(](?<abc>)/B  /^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
1918    
1919  /^(?P>abc) # this is (a comment)  /^(?P>abc) # this is (a comment)
1920    (?<abc>)/Bx    (?<abc>)/BZx
1921    
1922  /^\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
1923      1221      1221
# Line 1917  a random value. /Ix Line 1933  a random value. /Ix
1933  /(?=(?'abc'\w+))\k<abc>:/I  /(?=(?'abc'\w+))\k<abc>:/I
1934      abcd:      abcd:
1935    
 /(?'abc'\w+):\k<abc>{2}/  
     a:aaxyz  
     ab:ababxyz  
     ** Failers  
     a:axyz  
     ab:abxyz  
   
1936  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
1937      adaa      adaa
1938      ** Failers      ** Failers
# Line 1936  a random value. /Ix Line 1945  a random value. /Ix
1945      ** Failers      ** Failers
1946      bddd      bddd
1947    
 /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x  
     abd  
     ce  
   
1948  /(?(<bc))/  /(?(<bc))/
1949    
1950  /(?(''))/  /(?(''))/
# Line 1957  a random value. /Ix Line 1962  a random value. /Ix
1962  /(?<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
1963      abcabc1Xabc2XabcXabcabc      abcabc1Xabc2XabcXabcabc
1964    
 /^(?(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  
   
1965  /^(?(DEFINE) abc | xyz ) /x  /^(?(DEFINE) abc | xyz ) /x
1966    
1967  /(?(DEFINE) abc) xyz/xI  /(?(DEFINE) abc) xyz/xI
# Line 1980  a random value. /Ix Line 1975  a random value. /Ix
1975  /^a.b/<lf>  /^a.b/<lf>
1976      a\rb      a\rb
1977      a\nb\<cr>      a\nb\<cr>
1978        a\x85b\<anycrlf>
1979      ** Failers      ** Failers
1980      a\nb      a\nb
1981      a\nb\<any>      a\nb\<any>
1982      a\rb\<cr>      a\rb\<cr>
1983      a\rb\<any>      a\rb\<any>
1984        a\x85b\<any>
1985        a\rb\<anycrlf>
1986    
1987  /^abc./mgx<any>  /^abc./mgx<any>
1988      abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK      abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
1989    
1990  /abc.$/mgx<any>  /abc.$/mgx<any>
1991      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
1992    
1993  /a/<cr><any>  /a/<cr><any>
1994    
1995  /a/<any><crlf>  /a/<any><crlf>
1996    
1997  /^a\Rb/  /^a\Rb/<bsr_unicode>
1998      a\nb      a\nb
1999      a\rb      a\rb
2000      a\r\nb      a\r\nb
# Line 2006  a random value. /Ix Line 2004  a random value. /Ix
2004      ** Failers      ** Failers
2005      a\n\rb      a\n\rb
2006    
2007  /^a\R*b/  /^a\R*b/<bsr_unicode>
2008      ab      ab
2009      a\nb      a\nb
2010      a\rb      a\rb
# Line 2017  a random value. /Ix Line 2015  a random value. /Ix
2015      a\n\rb      a\n\rb
2016      a\n\r\x85\x0cb      a\n\r\x85\x0cb
2017    
2018  /^a\R+b/  /^a\R+b/<bsr_unicode>
2019      a\nb      a\nb
2020      a\rb      a\rb
2021      a\r\nb      a\r\nb
# Line 2029  a random value. /Ix Line 2027  a random value. /Ix
2027      ** Failers      ** Failers
2028      ab      ab
2029    
2030  /^a\R{1,3}b/  /^a\R{1,3}b/<bsr_unicode>
2031      a\nb      a\nb
2032      a\n\rb      a\n\rb
2033      a\n\r\x85b      a\n\r\x85b
# Line 2041  a random value. /Ix Line 2039  a random value. /Ix
2039      a\n\n\n\rb      a\n\n\n\rb
2040      a\r      a\r
2041    
2042  /^a[\R]b/  /^a[\R]b/<bsr_unicode>
2043      aRb      aRb
2044      ** Failers      ** Failers
2045      a\nb      a\nb
# Line 2052  a random value. /Ix Line 2050  a random value. /Ix
2050  /(?1)X(?<abc>P)/I  /(?1)X(?<abc>P)/I
2051      abcPXP123      abcPXP123
2052    
 /(?(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  
   
2053  /(?:a(?&abc)b)*(?<abc>x)/  /(?:a(?&abc)b)*(?<abc>x)/
2054      123axbaxbaxbx456      123axbaxbaxbx456
2055      123axbaxbaxb456      123axbaxbaxb456
# Line 2089  a random value. /Ix Line 2071  a random value. /Ix
2071     defabcabcxyz     defabcabcxyz
2072     DEFabcABCXYZ     DEFabcABCXYZ
2073    
 /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/  
     ababababbbabZXXXX  
   
2074  /^(a)\g-2/  /^(a)\g-2/
2075    
2076  /^(a)\g/  /^(a)\g/
# Line 2136  a random value. /Ix Line 2115  a random value. /Ix
2115      ** Failers      ** Failers
2116      abc\r\nxyz      abc\r\nxyz
2117    
2118  / End of testinput2 /  /(?m)^$/<any>g+
2119        abc\r\n\r\n
2120    
2121    /(?m)^$|^\r\n/<any>g+
2122        abc\r\n\r\n
2123    
2124    /(?m)$/<any>g+
2125        abc\r\n\r\n
2126    
2127    /abc.$/mgx<anycrlf>
2128        abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
2129    
2130    /^X/m
2131        XABC
2132        ** Failers
2133        XABC\B
2134    
2135    /(ab|c)(?-1)/BZ
2136        abc
2137    
2138    /xy(?+1)(abc)/BZ
2139        xyabcabc
2140        ** Failers
2141        xyabc
2142    
2143    /x(?-0)y/
2144    
2145    /x(?-1)y/
2146    
2147    /x(?+0)y/
2148    
2149    /x(?+1)y/
2150    
2151    /^(abc)?(?(-1)X|Y)/BZ
2152        abcX
2153        Y
2154        ** Failers
2155        abcY
2156    
2157    /^((?(+1)X|Y)(abc))+/BZ
2158        YabcXabc
2159        YabcXabcXabc
2160        ** Failers
2161        XabcXabc
2162    
2163    /(?(-1)a)/BZ
2164    
2165    /((?(-1)a))/BZ
2166    
2167    /((?(-2)a))/BZ
2168    
2169    /^(?(+1)X|Y)(.)/BZ
2170        Y!
2171    
2172    /(?<A>tom|bon)-\k{A}/
2173        tom-tom
2174        bon-bon
2175        ** Failers
2176        tom-bon
2177    
2178    /\g{A/
2179    
2180    /(?|(abc)|(xyz))/BZ
2181       >abc<
2182       >xyz<
2183    
2184    /(x)(?|(abc)|(xyz))(x)/BZ
2185        xabcx
2186        xxyzx
2187    
2188    /(x)(?|(abc)(pqr)|(xyz))(x)/BZ
2189        xabcpqrx
2190        xxyzx
2191    
2192    /[\h]/BZ
2193        >\x09<
2194    
2195    /[\h]+/BZ
2196        >\x09\x20\xa0<
2197    
2198    /[\v]/BZ
2199    
2200    /[\H]/BZ
2201    
2202    /[^\h]/BZ
2203    
2204    /[\V]/BZ
2205    
2206    /[\x0a\V]/BZ
2207    
2208    /\H++X/BZ
2209        ** Failers
2210        XXXX
2211    
2212    /\H+\hY/BZ
2213        XXXX Y
2214    
2215    /\H+ Y/BZ
2216    
2217    /\h+A/BZ
2218    
2219    /\v*B/BZ
2220    
2221    /\V+\x0a/BZ
2222    
2223    /A+\h/BZ
2224    
2225    / *\H/BZ
2226    
2227    /A*\v/BZ
2228    
2229    /\x0b*\V/BZ
2230    
2231    /\d+\h/BZ
2232    
2233    /\d*\v/BZ
2234    
2235    /S+\h\S+\v/BZ
2236    
2237    /\w{3,}\h\w+\v/BZ
2238    
2239    /\h+\d\h+\w\h+\S\h+\H/BZ
2240    
2241    /\v+\d\v+\w\v+\S\v+\V/BZ
2242    
2243    /\H+\h\H+\d/BZ
2244    
2245    /\V+\v\V+\w/BZ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
2255    
2256    /[^\Q\E]AAA/
2257    
2258    /[\E^]AAA/
2259    
2260    /[\Q\E^]AAA/
2261    
2262    /A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ
2263    
2264    /^a+(*FAIL)/C
2265        aaaaaa
2266    
2267    /a+b?c+(*FAIL)/C
2268        aaabccc
2269    
2270    /a+b?(*PRUNE)c+(*FAIL)/C
2271        aaabccc
2272    
2273    /a+b?(*COMMIT)c+(*FAIL)/C
2274        aaabccc
2275    
2276    /a+b?(*SKIP)c+(*FAIL)/C
2277        aaabcccaaabccc
2278    
2279    /a+b?(*THEN)c+(*FAIL)/C
2280        aaabccc
2281    
2282    /a(*PRUNE:XXX)b/
2283    
2284    /a(*MARK)b/
2285    
2286    /(?i:A{1,}\6666666666)/
2287    
2288    /\g6666666666/
2289    
2290    /[\g6666666666]/
2291    
2292    /(?1)\c[/
2293    
2294    /.+A/<crlf>
2295        \r\nA
2296    
2297    /\nA/<crlf>
2298        \r\nA
2299    
2300    /[\r\n]A/<crlf>
2301        \r\nA
2302    
2303    /(\r|\n)A/<crlf>
2304        \r\nA
2305    
2306    /a(*CR)b/
2307    
2308    /(*CR)a.b/
2309        a\nb
2310        ** Failers
2311        a\rb
2312    
2313    /(*CR)a.b/<lf>
2314        a\nb
2315        ** Failers
2316        a\rb
2317    
2318    /(*LF)a.b/<CRLF>
2319        a\rb
2320        ** Failers
2321        a\nb
2322    
2323    /(*CRLF)a.b/
2324        a\rb
2325        a\nb
2326        ** Failers
2327        a\r\nb
2328    
2329    /(*ANYCRLF)a.b/<CR>
2330        ** Failers
2331        a\rb
2332        a\nb
2333        a\r\nb
2334    
2335    /(*ANY)a.b/<cr>
2336        ** Failers
2337        a\rb
2338        a\nb
2339        a\r\nb
2340        a\x85b
2341    
2342    /a\Rb/I<bsr_anycrlf>
2343        a\rb
2344        a\nb
2345        a\r\nb
2346        ** Failers
2347        a\x85b
2348        a\x0bb
2349    
2350    /a\Rb/I<bsr_unicode>
2351        a\rb
2352        a\nb
2353        a\r\nb
2354        a\x85b
2355        a\x0bb
2356        ** Failers
2357        a\x85b\<bsr_anycrlf>
2358        a\x0bb\<bsr_anycrlf>
2359    
2360    /a\R?b/I<bsr_anycrlf>
2361        a\rb
2362        a\nb
2363        a\r\nb
2364        ** Failers
2365        a\x85b
2366        a\x0bb
2367    
2368    /a\R?b/I<bsr_unicode>
2369        a\rb
2370        a\nb
2371        a\r\nb
2372        a\x85b
2373        a\x0bb
2374        ** Failers
2375        a\x85b\<bsr_anycrlf>
2376        a\x0bb\<bsr_anycrlf>
2377    
2378    /a\R{2,4}b/I<bsr_anycrlf>
2379        a\r\n\nb
2380        a\n\r\rb
2381        a\r\n\r\n\r\n\r\nb
2382        ** Failers
2383        a\x85\85b
2384        a\x0b\0bb
2385    
2386    /a\R{2,4}b/I<bsr_unicode>
2387        a\r\rb
2388        a\n\n\nb
2389        a\r\n\n\r\rb
2390        a\x85\85b
2391        a\x0b\0bb
2392        ** Failers
2393        a\r\r\r\r\rb
2394        a\x85\85b\<bsr_anycrlf>
2395        a\x0b\0bb\<bsr_anycrlf>
2396    
2397    /(*BSR_ANYCRLF)a\Rb/I
2398        a\nb
2399        a\rb
2400    
2401    /(*BSR_UNICODE)a\Rb/I
2402        a\x85b
2403    
2404    /(*BSR_ANYCRLF)(*CRLF)a\Rb/I
2405        a\nb
2406        a\rb
2407    
2408    /(*CRLF)(*BSR_UNICODE)a\Rb/I
2409        a\x85b
2410    
2411    /(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
2412    
2413    /(?<a>)(?&)/
2414    
2415    /(?<abc>)(?&a)/
2416    
2417    /(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
2418    
2419    /(?+-a)/
2420    
2421    /(?-+a)/
2422    
2423    /(?(-1))/
2424    
2425    /(?(+10))/
2426    
2427    /(?(10))/
2428    
2429    /(?(+2))()()/
2430    
2431    /(?(2))()()/
2432    
2433    /\k''/
2434    
2435    /\k<>/
2436    
2437    /\k{}/
2438    
2439    /(?P=)/
2440    
2441    /(?P>)/
2442    
2443    /(?!\w)(?R)/
2444    
2445    /(?=\w)(?R)/
2446    
2447    /(?<!\w)(?R)/
2448    
2449    /(?<=\w)(?R)/
2450    
2451    /[[:foo:]]/
2452    
2453    /[[:1234:]]/
2454    
2455    /[[:f\oo:]]/
2456    
2457    /[[: :]]/
2458    
2459    /[[:...:]]/
2460    
2461    /[[:l\ower:]]/
2462    
2463    /[[:abc\:]]/
2464    
2465    /[abc[:x\]pqr:]]/
2466    
2467    /[[:a\dz:]]/
2468    
2469    /(^(a|b\g<-1'c))/
2470    
2471    /^(?+1)(?<a>x|y){0}z/
2472        xzxx
2473        yzyy
2474        ** Failers
2475        xxz
2476    
2477    /(\3)(\1)(a)/
2478        cat
2479    
2480    /(\3)(\1)(a)/<JS>
2481        cat
2482    
2483    /TA]/
2484        The ACTA] comes
2485    
2486    /TA]/<JS>
2487        The ACTA] comes
2488    
2489    /(?2)[]a()b](abc)/
2490        abcbabc
2491    
2492    /(?2)[^]a()b](abc)/
2493        abcbabc
2494    
2495    /(?1)[]a()b](abc)/
2496        abcbabc
2497        ** Failers
2498        abcXabc
2499    
2500    /(?1)[^]a()b](abc)/
2501        abcXabc
2502        ** Failers
2503        abcbabc
2504    
2505    /(?2)[]a()b](abc)(xyz)/
2506        xyzbabcxyz
2507    
2508    /(?&N)[]a(?<N>)](?<M>abc)/
2509       abc<abc
2510    
2511    /(?&N)[]a(?<N>)](abc)/
2512       abc<abc
2513    
2514    /a[]b/
2515    
2516    /a[^]b/
2517    
2518    /a[]b/<JS>
2519        ** Failers
2520        ab
2521    
2522    /a[]+b/<JS>
2523        ** Failers
2524        ab
2525    
2526    /a[]*+b/<JS>
2527        ** Failers
2528        ab
2529    
2530    /a[^]b/<JS>
2531        aXb
2532        a\nb
2533        ** Failers
2534        ab
2535    
2536    /a[^]+b/<JS>
2537        aXb
2538        a\nX\nXb
2539        ** Failers
2540        ab
2541    
2542    /a(?!)+b/
2543    
2544    /a(*FAIL)+b/
2545    
2546    /(abc|pqr|123){0}[xyz]/SI
2547    
2548    /(?(?=.*b)b|^)/CI
2549       adc
2550       abc
2551    
2552    /(?(?=b).*b|^d)/I
2553    
2554    /(?(?=.*b).*b|^d)/I
2555    
2556    /a?|b?/P
2557        abc
2558        ** Failers
2559        ddd\N
2560    
2561    /xyz/C
2562      xyz
2563      abcxyz
2564      abcxyz\Y
2565      ** Failers
2566      abc
2567      abc\Y
2568      abcxypqr
2569      abcxypqr\Y
2570    
2571    /^"((?(?=[a])[^"])|b)*"$/C
2572        "ab"
2573    
2574    /^"((?(?=[a])[^"])|b)*"$/
2575        "ab"
2576    
2577    /^X(?5)(a)(?|(b)|(q))(c)(d)Y/
2578        XYabcdY
2579    
2580    /^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
2581        XYabcdY
2582    
2583    /Xa{2,4}b/
2584        X\P
2585        Xa\P
2586        Xaa\P
2587        Xaaa\P
2588        Xaaaa\P
2589    
2590    /Xa{2,4}?b/
2591        X\P
2592        Xa\P
2593        Xaa\P
2594        Xaaa\P
2595        Xaaaa\P
2596    
2597    /Xa{2,4}+b/
2598        X\P
2599        Xa\P
2600        Xaa\P
2601        Xaaa\P
2602        Xaaaa\P
2603    
2604    /X\d{2,4}b/
2605        X\P
2606        X3\P
2607        X33\P
2608        X333\P
2609        X3333\P
2610    
2611    /X\d{2,4}?b/
2612        X\P
2613        X3\P
2614        X33\P
2615        X333\P
2616        X3333\P
2617    
2618    /X\d{2,4}+b/
2619        X\P
2620        X3\P
2621        X33\P
2622        X333\P
2623        X3333\P
2624    
2625    /X\D{2,4}b/
2626        X\P
2627        Xa\P
2628        Xaa\P
2629        Xaaa\P
2630        Xaaaa\P
2631    
2632    /X\D{2,4}?b/
2633        X\P
2634        Xa\P
2635        Xaa\P
2636        Xaaa\P
2637        Xaaaa\P
2638    
2639    /X\D{2,4}+b/
2640        X\P
2641        Xa\P
2642        Xaa\P
2643        Xaaa\P
2644        Xaaaa\P
2645    
2646    /X[abc]{2,4}b/
2647        X\P
2648        Xa\P
2649        Xaa\P
2650        Xaaa\P
2651        Xaaaa\P
2652    
2653    /X[abc]{2,4}?b/
2654        X\P
2655        Xa\P
2656        Xaa\P
2657        Xaaa\P
2658        Xaaaa\P
2659    
2660    /X[abc]{2,4}+b/
2661        X\P
2662        Xa\P
2663        Xaa\P
2664        Xaaa\P
2665        Xaaaa\P
2666    
2667    /X[^a]{2,4}b/
2668        X\P
2669        Xz\P
2670        Xzz\P
2671        Xzzz\P
2672        Xzzzz\P
2673    
2674    /X[^a]{2,4}?b/
2675        X\P
2676        Xz\P
2677        Xzz\P
2678        Xzzz\P
2679        Xzzzz\P
2680    
2681    /X[^a]{2,4}+b/
2682        X\P
2683        Xz\P
2684        Xzz\P
2685        Xzzz\P
2686        Xzzzz\P
2687    
2688    /(Y)X\1{2,4}b/
2689        YX\P
2690        YXY\P
2691        YXYY\P
2692        YXYYY\P
2693        YXYYYY\P
2694    
2695    /(Y)X\1{2,4}?b/
2696        YX\P
2697        YXY\P
2698        YXYY\P
2699        YXYYY\P
2700        YXYYYY\P
2701    
2702    /(Y)X\1{2,4}+b/
2703        YX\P
2704        YXY\P
2705        YXYY\P
2706        YXYYY\P
2707        YXYYYY\P
2708    
2709    /\++\KZ|\d+X|9+Y/
2710        ++++123999\P
2711        ++++123999Y\P
2712        ++++Z1234\P
2713    
2714    /Z(*F)/
2715        Z\P
2716        ZA\P
2717    
2718    /Z(?!)/
2719        Z\P
2720        ZA\P
2721    
2722    /dog(sbody)?/
2723        dogs\P
2724        dogs\P\P
2725    
2726    /dog(sbody)??/
2727        dogs\P
2728        dogs\P\P
2729    
2730    /dog|dogsbody/
2731        dogs\P
2732        dogs\P\P
2733    
2734    /dogsbody|dog/
2735        dogs\P
2736        dogs\P\P
2737    
2738    /\bthe cat\b/
2739        the cat\P
2740        the cat\P\P
2741    
2742    /abc/
2743       abc\P
2744       abc\P\P
2745    
2746    /\w+A/P
2747       CDAAAAB
2748    
2749    /\w+A/PU
2750       CDAAAAB
2751    
2752    /abc\K123/
2753        xyzabc123pqr
2754        xyzabc12\P
2755        xyzabc12\P\P
2756    
2757    /(?<=abc)123/
2758        xyzabc123pqr
2759        xyzabc12\P
2760        xyzabc12\P\P
2761    
2762    /\babc\b/
2763        +++abc+++
2764        +++ab\P
2765        +++ab\P\P
2766    
2767    /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
2768    
2769    /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
2770    
2771    /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
2772    
2773    /abc\K/+
2774        abcdef
2775        abcdef\N\N
2776        xyzabcdef\N\N
2777        ** Failers
2778        abcdef\N
2779        xyzabcdef\N
2780    
2781    /^(?:(?=abc)|abc\K)/+
2782        abcdef
2783        abcdef\N\N
2784        ** Failers
2785        abcdef\N
2786    
2787    /a?b?/+
2788        xyz
2789        xyzabc
2790        xyzabc\N
2791        xyzabc\N\N
2792        xyz\N\N
2793        ** Failers
2794        xyz\N
2795    
2796    /^a?b?/+
2797        xyz
2798        xyzabc
2799        ** Failers
2800        xyzabc\N
2801        xyzabc\N\N
2802        xyz\N\N
2803        xyz\N
2804    
2805    /^(?<name>a|b\g<name>c)/
2806        aaaa
2807        bacxxx
2808        bbaccxxx
2809        bbbacccxx
2810    
2811    /^(?<name>a|b\g'name'c)/
2812        aaaa
2813        bacxxx
2814        bbaccxxx
2815        bbbacccxx
2816    
2817    /^(a|b\g<1>c)/
2818        aaaa
2819        bacxxx
2820        bbaccxxx
2821        bbbacccxx
2822    
2823    /^(a|b\g'1'c)/
2824        aaaa
2825        bacxxx
2826        bbaccxxx
2827        bbbacccxx
2828    
2829    /^(a|b\g'-1'c)/
2830        aaaa
2831        bacxxx
2832        bbaccxxx
2833        bbbacccxx
2834    
2835    /(^(a|b\g<-1>c))/
2836        aaaa
2837        bacxxx
2838        bbaccxxx
2839        bbbacccxx
2840    
2841    /(?-i:\g<name>)(?i:(?<name>a))/
2842        XaaX
2843        XAAX
2844    
2845    /(?i:\g<name>)(?-i:(?<name>a))/
2846        XaaX
2847        ** Failers
2848        XAAX
2849    
2850    /(?-i:\g<+1>)(?i:(a))/
2851        XaaX
2852        XAAX
2853    
2854    /(?=(?<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>\})\}))\{/
2855    
2856    /(?<n>a|b|c)\g<n>*/
2857       abc
2858       accccbbb
2859    
2860    /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
2861        XYabcdY
2862    
2863    /(?<=b(?1)|zzz)(a)/
2864        xbaax
2865        xzzzax
2866    
2867    /(a)(?<=b\1)/
2868    
2869    /(a)(?<=b+(?1))/
2870    
2871    /(a+)(?<=b(?1))/
2872    
2873    /(a(?<=b(?1)))/
2874    
2875    /(?<=b(?1))xyz/
2876    
2877    /(?<=b(?1))xyz(b+)pqrstuvew/
2878    
2879    /(a|bc)\1/SI
2880    
2881    /(a|bc)\1{2,3}/SI
2882    
2883    /(a|bc)(?1)/SI
2884    
2885    /(a|b\1)(a|b\1)/SI
2886    
2887    /(a|b\1){2}/SI
2888    
2889    /(a|bbbb\1)(a|bbbb\1)/SI
2890    
2891    /(a|bbbb\1){2}/SI
2892    
2893    /^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
2894    
2895    /  (?: [\040\t] |  \(
2896    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2897    \)  )*                          # optional leading comment
2898    (?:    (?:
2899    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2900    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2901    |
2902    " (?:                      # opening quote...
2903    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
2904    |                     #    or
2905    \\ [^\x80-\xff]           #   Escaped something (something != CR)
2906    )* "  # closing quote
2907    )                    # initial word
2908    (?:  (?: [\040\t] |  \(
2909    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2910    \)  )*  \.  (?: [\040\t] |  \(
2911    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2912    \)  )*   (?:
2913    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2914    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2915    |
2916    " (?:                      # opening quote...
2917    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
2918    |                     #    or
2919    \\ [^\x80-\xff]           #   Escaped something (something != CR)
2920    )* "  # closing quote
2921    )  )* # further okay, if led by a period
2922    (?: [\040\t] |  \(
2923    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2924    \)  )*  @  (?: [\040\t] |  \(
2925    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2926    \)  )*    (?:
2927    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2928    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2929    |   \[                         # [
2930    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
2931    \]                        #           ]
2932    )                           # initial subdomain
2933    (?:                                  #
2934    (?: [\040\t] |  \(
2935    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2936    \)  )*  \.                        # if led by a period...
2937    (?: [\040\t] |  \(
2938    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2939    \)  )*   (?:
2940    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2941    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2942    |   \[                         # [
2943    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
2944    \]                        #           ]
2945    )                     #   ...further okay
2946    )*
2947    # address
2948    |                     #  or
2949    (?:
2950    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2951    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2952    |
2953    " (?:                      # opening quote...
2954    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
2955    |                     #    or
2956    \\ [^\x80-\xff]           #   Escaped something (something != CR)
2957    )* "  # closing quote
2958    )             # one word, optionally followed by....
2959    (?:
2960    [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
2961    \(
2962    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2963    \)       |  # comments, or...
2964    
2965    " (?:                      # opening quote...
2966    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
2967    |                     #    or
2968    \\ [^\x80-\xff]           #   Escaped something (something != CR)
2969    )* "  # closing quote
2970    # quoted strings
2971    )*
2972    <  (?: [\040\t] |  \(
2973    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2974    \)  )*                     # leading <
2975    (?:  @  (?: [\040\t] |  \(
2976    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2977    \)  )*    (?:
2978    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2979    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2980    |   \[                         # [
2981    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
2982    \]                        #           ]
2983    )                           # initial subdomain
2984    (?:                                  #
2985    (?: [\040\t] |  \(
2986    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2987    \)  )*  \.                        # if led by a period...
2988    (?: [\040\t] |  \(
2989    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2990    \)  )*   (?:
2991    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2992    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2993    |   \[                         # [
2994    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
2995    \]                        #           ]
2996    )                     #   ...further okay
2997    )*
2998    
2999    (?:  (?: [\040\t] |  \(
3000    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3001    \)  )*  ,  (?: [\040\t] |  \(
3002    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3003    \)  )*  @  (?: [\040\t] |  \(
3004    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3005    \)  )*    (?:
3006    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3007    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3008    |   \[                         # [
3009    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3010    \]                        #           ]
3011    )                           # initial subdomain
3012    (?:                                  #
3013    (?: [\040\t] |  \(
3014    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3015    \)  )*  \.                        # if led by a period...
3016    (?: [\040\t] |  \(
3017    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3018    \)  )*   (?:
3019    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3020    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3021    |   \[                         # [
3022    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3023    \]                        #           ]
3024    )                     #   ...further okay
3025    )*
3026    )* # further okay, if led by comma
3027    :                                # closing colon
3028    (?: [\040\t] |  \(
3029    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3030    \)  )*  )? #       optional route
3031    (?:
3032    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3033    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3034    |
3035    " (?:                      # opening quote...
3036    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
3037    |                     #    or
3038    \\ [^\x80-\xff]           #   Escaped something (something != CR)
3039    )* "  # closing quote
3040    )                    # initial word
3041    (?:  (?: [\040\t] |  \(
3042    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3043    \)  )*  \.  (?: [\040\t] |  \(
3044    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3045    \)  )*   (?:
3046    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3047    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3048    |
3049    " (?:                      # opening quote...
3050    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
3051    |                     #    or
3052    \\ [^\x80-\xff]           #   Escaped something (something != CR)
3053    )* "  # closing quote
3054    )  )* # further okay, if led by a period
3055    (?: [\040\t] |  \(
3056    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3057    \)  )*  @  (?: [\040\t] |  \(
3058    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3059    \)  )*    (?:
3060    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3061    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3062    |   \[                         # [
3063    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3064    \]                        #           ]
3065    )                           # initial subdomain
3066    (?:                                  #
3067    (?: [\040\t] |  \(
3068    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3069    \)  )*  \.                        # if led by a period...
3070    (?: [\040\t] |  \(
3071    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3072    \)  )*   (?:
3073    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3074    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3075    |   \[                         # [
3076    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3077    \]                        #           ]
3078    )                     #   ...further okay
3079    )*
3080    #       address spec
3081    (?: [\040\t] |  \(
3082    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3083    \)  )*  > #                  trailing >
3084    # name and address
3085    )  (?: [\040\t] |  \(
3086    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3087    \)  )*                       # optional trailing comment
3088    /xSI
3089    
3090    /<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
3091    
3092    "(?>.*/)foo"SI
3093    
3094    /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /xSI
3095    
3096    /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
3097    
3098    /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
3099    
3100    /<a[\s]+href[\s]*=[\s]*          # find <a href=
3101     ([\"\'])?                       # find single or double quote
3102     (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
3103                                     # quote, otherwise match up to next space
3104    /isxSI
3105    
3106    /^(?!:)                       # colon disallowed at start
3107      (?:                         # start of item
3108        (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
3109        (?(1)0 | () ) )           # if null previously matched, fail; else null
3110        :                         # followed by colon
3111      ){1,7}                      # end item; 1-7 of them required
3112      [0-9a-f]{1,4} $             # final hex number at end of string
3113      (?(1)|.)                    # check that there was an empty component
3114      /xiIS
3115    
3116    /(?|(?<a>A)|(?<a>B))/I
3117        AB\Ca
3118        BA\Ca
3119    
3120    /(?|(?<a>A)|(?<b>B))/
3121    
3122    /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
3123        b(?<quote> (?<apostrophe>')|(?<realquote>")) )
3124        (?('quote')[a-z]+|[0-9]+)/JIx
3125        a"aaaaa
3126        b"aaaaa
3127        ** Failers
3128        b"11111
3129        a"11111
3130    
3131    /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
3132        abcdX
3133        eX
3134        ** Failers
3135        abcdY
3136        ey
3137    
3138    /(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
3139        abcdd
3140        ** Failers
3141        abcdde
3142    
3143    /abcd*/
3144        xxxxabcd\P
3145        xxxxabcd\P\P
3146    
3147    /abcd*/i
3148        xxxxabcd\P
3149        xxxxabcd\P\P
3150        XXXXABCD\P
3151        XXXXABCD\P\P
3152    
3153    /abc\d*/
3154        xxxxabc1\P
3155        xxxxabc1\P\P
3156    
3157    /(a)bc\1*/
3158        xxxxabca\P
3159        xxxxabca\P\P
3160    
3161    /abc[de]*/
3162        xxxxabcde\P
3163        xxxxabcde\P\P
3164    
3165    /-- This is not in the Perl 5.10 test because Perl seems currently to be broken
3166        and not behaving as specified in that it *does* bumpalong after hitting
3167        (*COMMIT). --/
3168    
3169    /(?1)(A(*COMMIT)|B)D/
3170        ABD
3171        XABD
3172        BAD
3173        ABXABD
3174        ** Failers
3175        ABX
3176        BAXBAD
3177    
3178    /(\3)(\1)(a)/<JS>
3179        cat
3180    
3181    /(\3)(\1)(a)/SI<JS>
3182        cat
3183    
3184    /(\3)(\1)(a)/SI
3185        cat
3186    
3187    /i(?(DEFINE)(?<s>a))/SI
3188        i
3189    
3190    /()i(?(1)a)/SI
3191        ia
3192    
3193    /(?i)a(?-i)b|c/BZ
3194        XabX
3195        XAbX
3196        CcC
3197        ** Failers
3198        XABX
3199    
3200    /(?i)a(?s)b|c/BZ
3201    
3202    /(?i)a(?s-i)b|c/BZ
3203    
3204    /^(ab(c\1)d|x){2}$/BZ
3205        xabcxd
3206    
3207    /-- End of testinput2 --/

Legend:
Removed from v.131  
changed lines
  Added in v.488

  ViewVC Help
Powered by ViewVC 1.1.5