File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / pcre / testdata / testinput2
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:05:52 2012 UTC (12 years, 5 months ago) by misho
Branches: pcre, MAIN
CVS tags: v8_21, HEAD
pcre

    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-8 set of tests. When UTF-8 is needed, use test
    9:     5, and if Unicode Property Support is needed, use test 13. --/  
   10:   
   11: /-- Originally, the Perl >= 5.10 things were in here too, but now I have 
   12:     separated many (most?) of them out into test 11. However, there may still 
   13:     be some that were overlooked. --/   
   14: 
   15: /(a)b|/I
   16: 
   17: /abc/I
   18:     abc
   19:     defabc
   20:     \Aabc
   21:     *** Failers
   22:     \Adefabc
   23:     ABC
   24: 
   25: /^abc/I
   26:     abc
   27:     \Aabc
   28:     *** Failers
   29:     defabc
   30:     \Adefabc
   31: 
   32: /a+bc/I
   33: 
   34: /a*bc/I
   35: 
   36: /a{3}bc/I
   37: 
   38: /(abc|a+z)/I
   39: 
   40: /^abc$/I
   41:     abc
   42:     *** Failers
   43:     def\nabc
   44: 
   45: /ab\idef/X
   46: 
   47: /(?X)ab\idef/X
   48: 
   49: /x{5,4}/
   50: 
   51: /z{65536}/
   52: 
   53: /[abcd/
   54: 
   55: /(?X)[\B]/
   56: 
   57: /(?X)[\R]/
   58: 
   59: /(?X)[\X]/
   60: 
   61: /[\B]/BZ
   62: 
   63: /[\R]/BZ
   64: 
   65: /[\X]/BZ
   66: 
   67: /[z-a]/
   68: 
   69: /^*/
   70: 
   71: /(abc/
   72: 
   73: /(?# abc/
   74: 
   75: /(?z)abc/
   76: 
   77: /.*b/I
   78: 
   79: /.*?b/I
   80: 
   81: /cat|dog|elephant/I
   82:     this sentence eventually mentions a cat
   83:     this sentences rambles on and on for a while and then reaches elephant
   84: 
   85: /cat|dog|elephant/IS
   86:     this sentence eventually mentions a cat
   87:     this sentences rambles on and on for a while and then reaches elephant
   88: 
   89: /cat|dog|elephant/IiS
   90:     this sentence eventually mentions a CAT cat
   91:     this sentences rambles on and on for a while to elephant ElePhant
   92: 
   93: /a|[bcd]/IS
   94: 
   95: /(a|[^\dZ])/IS
   96: 
   97: /(a|b)*[\s]/IS
   98: 
   99: /(ab\2)/
  100: 
  101: /{4,5}abc/
  102: 
  103: /(a)(b)(c)\2/I
  104:     abcb
  105:     \O0abcb
  106:     \O3abcb
  107:     \O6abcb
  108:     \O9abcb
  109:     \O12abcb
  110: 
  111: /(a)bc|(a)(b)\2/I
  112:     abc
  113:     \O0abc
  114:     \O3abc
  115:     \O6abc
  116:     aba
  117:     \O0aba
  118:     \O3aba
  119:     \O6aba
  120:     \O9aba
  121:     \O12aba
  122: 
  123: /abc$/IE
  124:     abc
  125:     *** Failers
  126:     abc\n
  127:     abc\ndef
  128: 
  129: /(a)(b)(c)(d)(e)\6/
  130: 
  131: /the quick brown fox/I
  132:     the quick brown fox
  133:     this is a line with the quick brown fox
  134: 
  135: /the quick brown fox/IA
  136:     the quick brown fox
  137:     *** Failers
  138:     this is a line with the quick brown fox
  139: 
  140: /ab(?z)cd/
  141: 
  142: /^abc|def/I
  143:     abcdef
  144:     abcdef\B
  145: 
  146: /.*((abc)$|(def))/I
  147:     defabc
  148:     \Zdefabc
  149: 
  150: /abc/P
  151:     abc
  152:     *** Failers
  153: 
  154: /^abc|def/P
  155:     abcdef
  156:     abcdef\B
  157: 
  158: /.*((abc)$|(def))/P
  159:     defabc
  160:     \Zdefabc
  161: 
  162: /the quick brown fox/P
  163:     the quick brown fox
  164:     *** Failers
  165:     The Quick Brown Fox
  166: 
  167: /the quick brown fox/Pi
  168:     the quick brown fox
  169:     The Quick Brown Fox
  170: 
  171: /abc.def/P
  172:     *** Failers
  173:     abc\ndef
  174: 
  175: /abc$/P
  176:     abc
  177:     abc\n
  178: 
  179: /(abc)\2/P
  180: 
  181: /(abc\1)/P
  182:     abc
  183: 
  184: /)/
  185: 
  186: /a[]b/
  187: 
  188: /[^aeiou ]{3,}/I
  189:     co-processors, and for
  190: 
  191: /<.*>/I
  192:     abc<def>ghi<klm>nop
  193: 
  194: /<.*?>/I
  195:     abc<def>ghi<klm>nop
  196: 
  197: /<.*>/IU
  198:     abc<def>ghi<klm>nop
  199: 
  200: /(?U)<.*>/I
  201:     abc<def>ghi<klm>nop
  202: 
  203: /<.*?>/IU
  204:     abc<def>ghi<klm>nop
  205: 
  206: /={3,}/IU
  207:     abc========def
  208: 
  209: /(?U)={3,}?/I
  210:     abc========def
  211: 
  212: /(?<!bar|cattle)foo/I
  213:     foo
  214:     catfoo
  215:     *** Failers
  216:     the barfoo
  217:     and cattlefoo
  218: 
  219: /(?<=a+)b/
  220: 
  221: /(?<=aaa|b{0,3})b/
  222: 
  223: /(?<!(foo)a\1)bar/
  224: 
  225: /(?i)abc/I
  226: 
  227: /(a|(?m)a)/I
  228: 
  229: /(?i)^1234/I
  230: 
  231: /(^b|(?i)^d)/I
  232: 
  233: /(?s).*/I
  234: 
  235: /[abcd]/IS
  236: 
  237: /(?i)[abcd]/IS
  238: 
  239: /(?m)[xy]|(b|c)/IS
  240: 
  241: /(^a|^b)/Im
  242: 
  243: /(?i)(^a|^b)/Im
  244: 
  245: /(a)(?(1)a|b|c)/
  246: 
  247: /(?(?=a)a|b|c)/
  248: 
  249: /(?(1a)/
  250: 
  251: /(?(1a))/
  252: 
  253: /(?(?i))/
  254: 
  255: /(?(abc))/
  256: 
  257: /(?(?<ab))/
  258: 
  259: /((?s)blah)\s+\1/I
  260: 
  261: /((?i)blah)\s+\1/I
  262: 
  263: /((?i)b)/IDZS
  264: 
  265: /(a*b|(?i:c*(?-i)d))/IS
  266: 
  267: /a$/I
  268:     a
  269:     a\n
  270:     *** Failers
  271:     \Za
  272:     \Za\n
  273: 
  274: /a$/Im
  275:     a
  276:     a\n
  277:     \Za\n
  278:     *** Failers
  279:     \Za
  280: 
  281: /\Aabc/Im
  282: 
  283: /^abc/Im
  284: 
  285: /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
  286:   aaaaabbbbbcccccdef
  287: 
  288: /(?<=foo)[ab]/IS
  289: 
  290: /(?<!foo)(alpha|omega)/IS
  291: 
  292: /(?!alphabet)[ab]/IS
  293: 
  294: /(?<=foo\n)^bar/Im
  295:     foo\nbarbar
  296:     ***Failers
  297:     rhubarb
  298:     barbell
  299:     abc\nbarton
  300: 
  301: /^(?<=foo\n)bar/Im
  302:     foo\nbarbar
  303:     ***Failers
  304:     rhubarb
  305:     barbell
  306:     abc\nbarton
  307: 
  308: /(?>^abc)/Im
  309:     abc
  310:     def\nabc
  311:     *** Failers
  312:     defabc
  313: 
  314: /(?<=ab(c+)d)ef/
  315: 
  316: /(?<=ab(?<=c+)d)ef/
  317: 
  318: /(?<=ab(c|de)f)g/
  319: 
  320: /The next three are in testinput2 because they have variable length branches/
  321: 
  322: /(?<=bullock|donkey)-cart/I
  323:     the bullock-cart
  324:     a donkey-cart race
  325:     *** Failers
  326:     cart
  327:     horse-and-cart
  328: 
  329: /(?<=ab(?i)x|y|z)/I
  330: 
  331: /(?>.*)(?<=(abcd)|(xyz))/I
  332:     alphabetabcd
  333:     endingxyz
  334: 
  335: /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
  336:     abxyZZ
  337:     abXyZZ
  338:     ZZZ
  339:     zZZ
  340:     bZZ
  341:     BZZ
  342:     *** Failers
  343:     ZZ
  344:     abXYZZ
  345:     zzz
  346:     bzz
  347: 
  348: /(?<!(foo)a)bar/I
  349:     bar
  350:     foobbar
  351:     *** Failers
  352:     fooabar
  353: 
  354: /This one is here because Perl 5.005_02 doesn't fail it/I
  355: 
  356: /^(a)?(?(1)a|b)+$/I
  357:     *** Failers
  358:     a
  359: 
  360: /This one is here because Perl behaves differently; see also the following/I
  361: 
  362: /^(a\1?){4}$/I
  363:     aaaa
  364:     aaaaaa
  365:     
  366: /Perl does not fail these two for the final subjects. Neither did PCRE until/
  367: /release 8.01. The problem is in backtracking into a subpattern that contains/
  368: /a recursive reference to itself. PCRE has now made these into atomic patterns./
  369: 
  370: /^(xa|=?\1a){2}$/
  371:     xa=xaa
  372:     ** Failers
  373:     xa=xaaa
  374: 
  375: /^(xa|=?\1a)+$/
  376:     xa=xaa
  377:     ** Failers
  378:     xa=xaaa
  379: 
  380: /These are syntax tests from Perl 5.005/I
  381: 
  382: /a[b-a]/
  383: 
  384: /a[]b/
  385: 
  386: /a[/
  387: 
  388: /*a/
  389: 
  390: /(*)b/
  391: 
  392: /abc)/
  393: 
  394: /(abc/
  395: 
  396: /a**/
  397: 
  398: /)(/
  399: 
  400: /\1/
  401: 
  402: /\2/
  403: 
  404: /(a)|\2/
  405: 
  406: /a[b-a]/Ii
  407: 
  408: /a[]b/Ii
  409: 
  410: /a[/Ii
  411: 
  412: /*a/Ii
  413: 
  414: /(*)b/Ii
  415: 
  416: /abc)/Ii
  417: 
  418: /(abc/Ii
  419: 
  420: /a**/Ii
  421: 
  422: /)(/Ii
  423: 
  424: /:(?:/
  425: 
  426: /(?<%)b/
  427: 
  428: /a(?{)b/
  429: 
  430: /a(?{{})b/
  431: 
  432: /a(?{}})b/
  433: 
  434: /a(?{"{"})b/
  435: 
  436: /a(?{"{"}})b/
  437: 
  438: /(?(1?)a|b)/
  439: 
  440: /[a[:xyz:/
  441: 
  442: /(?<=x+)y/
  443: 
  444: /a{37,17}/
  445: 
  446: /abc/\
  447: 
  448: /abc/\P
  449: 
  450: /abc/\i
  451: 
  452: /(a)bc(d)/I
  453:     abcd
  454:     abcd\C2
  455:     abcd\C5
  456: 
  457: /(.{20})/I
  458:     abcdefghijklmnopqrstuvwxyz
  459:     abcdefghijklmnopqrstuvwxyz\C1
  460:     abcdefghijklmnopqrstuvwxyz\G1
  461: 
  462: /(.{15})/I
  463:     abcdefghijklmnopqrstuvwxyz
  464:     abcdefghijklmnopqrstuvwxyz\C1\G1
  465: 
  466: /(.{16})/I
  467:     abcdefghijklmnopqrstuvwxyz
  468:     abcdefghijklmnopqrstuvwxyz\C1\G1\L
  469: 
  470: /^(a|(bc))de(f)/I
  471:     adef\G1\G2\G3\G4\L
  472:     bcdef\G1\G2\G3\G4\L
  473:     adefghijk\C0
  474: 
  475: /^abc\00def/I
  476:     abc\00def\L\C0
  477: 
  478: /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
  479: )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
  480: )?)?)?)?)?)?)?)?)?otherword/I
  481: 
  482: /.*X/IDZ
  483: 
  484: /.*X/IDZs
  485: 
  486: /(.*X|^B)/IDZ
  487: 
  488: /(.*X|^B)/IDZs
  489: 
  490: /(?s)(.*X|^B)/IDZ
  491: 
  492: /(?s:.*X|^B)/IDZ
  493: 
  494: /\Biss\B/I+
  495:     Mississippi
  496: 
  497: /\Biss\B/I+P
  498:     Mississippi
  499: 
  500: /iss/IG+
  501:     Mississippi
  502: 
  503: /\Biss\B/IG+
  504:     Mississippi
  505: 
  506: /\Biss\B/Ig+
  507:     Mississippi
  508:     *** Failers
  509:     Mississippi\A
  510: 
  511: /(?<=[Ms])iss/Ig+
  512:     Mississippi
  513: 
  514: /(?<=[Ms])iss/IG+
  515:     Mississippi
  516: 
  517: /^iss/Ig+
  518:     ississippi
  519: 
  520: /.*iss/Ig+
  521:     abciss\nxyzisspqr
  522: 
  523: /.i./I+g
  524:     Mississippi
  525:     Mississippi\A
  526:     Missouri river
  527:     Missouri river\A
  528: 
  529: /^.is/I+g
  530:     Mississippi
  531: 
  532: /^ab\n/Ig+
  533:     ab\nab\ncd
  534: 
  535: /^ab\n/Img+
  536:     ab\nab\ncd
  537: 
  538: /abc/I
  539: 
  540: /abc|bac/I
  541: 
  542: /(abc|bac)/I
  543: 
  544: /(abc|(c|dc))/I
  545: 
  546: /(abc|(d|de)c)/I
  547: 
  548: /a*/I
  549: 
  550: /a+/I
  551: 
  552: /(baa|a+)/I
  553: 
  554: /a{0,3}/I
  555: 
  556: /baa{3,}/I
  557: 
  558: /"([^\\"]+|\\.)*"/I
  559: 
  560: /(abc|ab[cd])/I
  561: 
  562: /(a|.)/I
  563: 
  564: /a|ba|\w/I
  565: 
  566: /abc(?=pqr)/I
  567: 
  568: /...(?<=abc)/I
  569: 
  570: /abc(?!pqr)/I
  571: 
  572: /ab./I
  573: 
  574: /ab[xyz]/I
  575: 
  576: /abc*/I
  577: 
  578: /ab.c*/I
  579: 
  580: /a.c*/I
  581: 
  582: /.c*/I
  583: 
  584: /ac*/I
  585: 
  586: /(a.c*|b.c*)/I
  587: 
  588: /a.c*|aba/I
  589: 
  590: /.+a/I
  591: 
  592: /(?=abcda)a.*/I
  593: 
  594: /(?=a)a.*/I
  595: 
  596: /a(b)*/I
  597: 
  598: /a\d*/I
  599: 
  600: /ab\d*/I
  601: 
  602: /a(\d)*/I
  603: 
  604: /abcde{0,0}/I
  605: 
  606: /ab\d+/I
  607: 
  608: /a(?(1)b)(.)/I
  609: 
  610: /a(?(1)bag|big)(.)/I
  611: 
  612: /a(?(1)bag|big)*(.)/I
  613: 
  614: /a(?(1)bag|big)+(.)/I
  615: 
  616: /a(?(1)b..|b..)(.)/I
  617: 
  618: /ab\d{0}e/I
  619: 
  620: /a?b?/I
  621:     a
  622:     b
  623:     ab
  624:     \
  625:     *** Failers
  626:     \N
  627: 
  628: /|-/I
  629:     abcd
  630:     -abc
  631:     \Nab-c
  632:     *** Failers
  633:     \Nabc
  634: 
  635: /a*(b+)(z)(z)/P
  636:     aaaabbbbzzzz
  637:     aaaabbbbzzzz\O0
  638:     aaaabbbbzzzz\O1
  639:     aaaabbbbzzzz\O2
  640:     aaaabbbbzzzz\O3
  641:     aaaabbbbzzzz\O4
  642:     aaaabbbbzzzz\O5
  643: 
  644: /^.?abcd/IS
  645: 
  646: /\(             # ( at start
  647:   (?:           # Non-capturing bracket
  648:   (?>[^()]+)    # Either a sequence of non-brackets (no backtracking)
  649:   |             # Or
  650:   (?R)          # Recurse - i.e. nested bracketed string
  651:   )*            # Zero or more contents
  652:   \)            # Closing )
  653:   /Ix
  654:     (abcd)
  655:     (abcd)xyz
  656:     xyz(abcd)
  657:     (ab(xy)cd)pqr
  658:     (ab(xycd)pqr
  659:     () abc ()
  660:     12(abcde(fsh)xyz(foo(bar))lmno)89
  661:     *** Failers
  662:     abcd
  663:     abcd)
  664:     (abcd
  665: 
  666: /\(  ( (?>[^()]+) | (?R) )* \) /Ixg
  667:     (ab(xy)cd)pqr
  668:     1(abcd)(x(y)z)pqr
  669: 
  670: /\(  (?: (?>[^()]+) | (?R) ) \) /Ix
  671:     (abcd)
  672:     (ab(xy)cd)
  673:     (a(b(c)d)e)
  674:     ((ab))
  675:     *** Failers
  676:     ()
  677: 
  678: /\(  (?: (?>[^()]+) | (?R) )? \) /Ix
  679:     ()
  680:     12(abcde(fsh)xyz(foo(bar))lmno)89
  681: 
  682: /\(  ( (?>[^()]+) | (?R) )* \) /Ix
  683:     (ab(xy)cd)
  684: 
  685: /\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
  686:     (ab(xy)cd)
  687: 
  688: /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
  689:     (ab(xy)cd)
  690:     (123ab(xy)cd)
  691: 
  692: /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
  693:     (ab(xy)cd)
  694:     (123ab(xy)cd)
  695: 
  696: /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
  697:     (ab(xy)cd)
  698: 
  699: /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
  700:     (abcd(xyz<p>qrs)123)
  701: 
  702: /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
  703:     (ab(cd)ef)
  704:     (ab(cd(ef)gh)ij)
  705: 
  706: /^[[:alnum:]]/DZ
  707: 
  708: /^[[:^alnum:]]/DZ
  709: 
  710: /^[[:alpha:]]/DZ
  711: 
  712: /^[[:^alpha:]]/DZ
  713: 
  714: /[_[:alpha:]]/IS
  715: 
  716: /^[[:ascii:]]/DZ
  717: 
  718: /^[[:^ascii:]]/DZ
  719: 
  720: /^[[:blank:]]/DZ
  721: 
  722: /^[[:^blank:]]/DZ
  723: 
  724: /[\n\x0b\x0c\x0d[:blank:]]/IS
  725: 
  726: /^[[:cntrl:]]/DZ
  727: 
  728: /^[[:digit:]]/DZ
  729: 
  730: /^[[:graph:]]/DZ
  731: 
  732: /^[[:lower:]]/DZ
  733: 
  734: /^[[:print:]]/DZ
  735: 
  736: /^[[:punct:]]/DZ
  737: 
  738: /^[[:space:]]/DZ
  739: 
  740: /^[[:upper:]]/DZ
  741: 
  742: /^[[:xdigit:]]/DZ
  743: 
  744: /^[[:word:]]/DZ
  745: 
  746: /^[[:^cntrl:]]/DZ
  747: 
  748: /^[12[:^digit:]]/DZ
  749: 
  750: /^[[:^blank:]]/DZ
  751: 
  752: /[01[:alpha:]%]/DZ
  753: 
  754: /[[.ch.]]/I
  755: 
  756: /[[=ch=]]/I
  757: 
  758: /[[:rhubarb:]]/I
  759: 
  760: /[[:upper:]]/Ii
  761:     A
  762:     a
  763: 
  764: /[[:lower:]]/Ii
  765:     A
  766:     a
  767: 
  768: /((?-i)[[:lower:]])[[:lower:]]/Ii
  769:     ab
  770:     aB
  771:     *** Failers
  772:     Ab
  773:     AB
  774: 
  775: /[\200-\110]/I
  776: 
  777: /^(?(0)f|b)oo/I
  778: 
  779: /This one's here because of the large output vector needed/I
  780: 
  781: /(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\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d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/I
  782:     \O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC
  783: 
  784: /This one's here because Perl does this differently and PCRE can't at present/I
  785: 
  786: /(main(O)?)+/I
  787:     mainmain
  788:     mainOmain
  789: 
  790: /These are all cases where Perl does it differently (nested captures)/I
  791: 
  792: /^(a(b)?)+$/I
  793:     aba
  794: 
  795: /^(aa(bb)?)+$/I
  796:     aabbaa
  797: 
  798: /^(aa|aa(bb))+$/I
  799:     aabbaa
  800: 
  801: /^(aa(bb)??)+$/I
  802:     aabbaa
  803: 
  804: /^(?:aa(bb)?)+$/I
  805:     aabbaa
  806: 
  807: /^(aa(b(b))?)+$/I
  808:     aabbaa
  809: 
  810: /^(?:aa(b(b))?)+$/I
  811:     aabbaa
  812: 
  813: /^(?:aa(b(?:b))?)+$/I
  814:     aabbaa
  815: 
  816: /^(?:aa(bb(?:b))?)+$/I
  817:     aabbbaa
  818: 
  819: /^(?:aa(b(?:bb))?)+$/I
  820:     aabbbaa
  821: 
  822: /^(?:aa(?:b(b))?)+$/I
  823:     aabbaa
  824: 
  825: /^(?:aa(?:b(bb))?)+$/I
  826:     aabbbaa
  827: 
  828: /^(aa(b(bb))?)+$/I
  829:     aabbbaa
  830: 
  831: /^(aa(bb(bb))?)+$/I
  832:     aabbbbaa
  833: 
  834: /--------------------------------------------------------------------/I
  835: 
  836: /#/IxDZ
  837: 
  838: /a#/IxDZ
  839: 
  840: /[\s]/DZ
  841: 
  842: /[\S]/DZ
  843: 
  844: /a(?i)b/DZ
  845:     ab
  846:     aB
  847:     *** Failers
  848:     AB
  849: 
  850: /(a(?i)b)/DZ
  851:     ab
  852:     aB
  853:     *** Failers
  854:     AB
  855: 
  856: /   (?i)abc/IxDZ
  857: 
  858: /#this is a comment
  859:   (?i)abc/IxDZ
  860: 
  861: /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
  862: 
  863: /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
  864: 
  865: /\Q\E/DZ
  866:     \
  867: 
  868: /\Q\Ex/DZ
  869: 
  870: / \Q\E/DZ
  871: 
  872: /a\Q\E/DZ
  873:   abc
  874:   bca
  875:   bac
  876: 
  877: /a\Q\Eb/DZ
  878:   abc
  879: 
  880: /\Q\Eabc/DZ
  881: 
  882: /x*+\w/DZ
  883:     *** Failers
  884:     xxxxx
  885: 
  886: /x?+/DZ
  887: 
  888: /x++/DZ
  889: 
  890: /x{1,3}+/DZ
  891: 
  892: /(x)*+/DZ
  893: 
  894: /^(\w++|\s++)*$/I
  895:     now is the time for all good men to come to the aid of the party
  896:     *** Failers
  897:     this is not a line with only words and spaces!
  898: 
  899: /(\d++)(\w)/I
  900:     12345a
  901:     *** Failers
  902:     12345+
  903: 
  904: /a++b/I
  905:     aaab
  906: 
  907: /(a++b)/I
  908:     aaab
  909: 
  910: /(a++)b/I
  911:     aaab
  912: 
  913: /([^()]++|\([^()]*\))+/I
  914:     ((abc(ade)ufh()()x
  915: 
  916: /\(([^()]++|\([^()]+\))+\)/I
  917:     (abc)
  918:     (abc(def)xyz)
  919:     *** Failers
  920:     ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  921: 
  922: /(abc){1,3}+/DZ
  923: 
  924: /a+?+/I
  925: 
  926: /a{2,3}?+b/I
  927: 
  928: /(?U)a+?+/I
  929: 
  930: /a{2,3}?+b/IU
  931: 
  932: /x(?U)a++b/DZ
  933:     xaaaab
  934: 
  935: /(?U)xa++b/DZ
  936:     xaaaab
  937: 
  938: /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
  939: 
  940: /^x(?U)a+b/DZ
  941: 
  942: /^x(?U)(a+)b/DZ
  943: 
  944: /[.x.]/I
  945: 
  946: /[=x=]/I
  947: 
  948: /[:x:]/I
  949: 
  950: /\l/I
  951: 
  952: /\L/I
  953: 
  954: /\N{name}/I
  955: 
  956: /\u/I
  957: 
  958: /\U/I
  959: 
  960: /[/I
  961: 
  962: /[a-/I
  963: 
  964: /[[:space:]/I
  965: 
  966: /[\s]/IDZ
  967: 
  968: /[[:space:]]/IDZ
  969: 
  970: /[[:space:]abcde]/IDZ
  971: 
  972: /< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/Ix
  973:     <>
  974:     <abcd>
  975:     <abc <123> hij>
  976:     <abc <def> hij>
  977:     <abc<>def>
  978:     <abc<>
  979:     *** Failers
  980:     <abc
  981: 
  982: |8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@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: 
  988: /(.*)\d+/I
  989: 
  990: /(.*)\d+\1/Is
  991: 
  992: /(.*)\d+/Is
  993: 
  994: /(.*(xyz))\d+\2/I
  995: 
  996: /((.*))\d+\1/I
  997:     abc123bc
  998: 
  999: /a[b]/I
 1000: 
 1001: /(?=a).*/I
 1002: 
 1003: /(?=abc).xyz/IiI
 1004: 
 1005: /(?=abc)(?i).xyz/I
 1006: 
 1007: /(?=a)(?=b)/I
 1008: 
 1009: /(?=.)a/I
 1010: 
 1011: /((?=abcda)a)/I
 1012: 
 1013: /((?=abcda)ab)/I
 1014: 
 1015: /()a/I
 1016: 
 1017: /(?(1)ab|ac)(.)/I
 1018: 
 1019: /(?(1)abz|acz)(.)/I
 1020: 
 1021: /(?(1)abz)(.)/I
 1022: 
 1023: /(?(1)abz)(1)23/I
 1024: 
 1025: /(a)+/I
 1026: 
 1027: /(a){2,3}/I
 1028: 
 1029: /(a)*/I
 1030: 
 1031: /[a]/I
 1032: 
 1033: /[ab]/I
 1034: 
 1035: /[ab]/IS
 1036: 
 1037: /[^a]/I
 1038: 
 1039: /\d456/I
 1040: 
 1041: /\d456/IS
 1042: 
 1043: /a^b/I
 1044: 
 1045: /^a/Im
 1046:   abcde
 1047:   xy\nabc
 1048:   *** Failers
 1049:   xyabc
 1050: 
 1051: /c|abc/I
 1052: 
 1053: /(?i)[ab]/IS
 1054: 
 1055: /[ab](?i)cd/IS
 1056: 
 1057: /abc(?C)def/I
 1058:     abcdef
 1059:     1234abcdef
 1060:     *** Failers
 1061:     abcxyz
 1062:     abcxyzf
 1063: 
 1064: /abc(?C)de(?C1)f/I
 1065:     123abcdef
 1066: 
 1067: /(?C1)\dabc(?C2)def/IS
 1068:     1234abcdef
 1069:     *** Failers
 1070:     abcdef
 1071: 
 1072: /(?C1)\dabc(?C2)def/ISS
 1073:     1234abcdef
 1074:     *** Failers
 1075:     abcdef
 1076: 
 1077: /(?C255)ab/I
 1078: 
 1079: /(?C256)ab/I
 1080: 
 1081: /(?Cab)xx/I
 1082: 
 1083: /(?C12vr)x/I
 1084: 
 1085: /abc(?C)def/I
 1086:     *** Failers
 1087:     \x83\x0\x61bcdef
 1088: 
 1089: /(abc)(?C)de(?C1)f/I
 1090:     123abcdef
 1091:     123abcdef\C+
 1092:     123abcdef\C-
 1093:     *** Failers
 1094:     123abcdef\C!1
 1095: 
 1096: /(?C0)(abc(?C1))*/I
 1097:     abcabcabc
 1098:     abcabc\C!1!3
 1099:     *** Failers
 1100:     abcabcabc\C!1!3
 1101: 
 1102: /(\d{3}(?C))*/I
 1103:     123\C+
 1104:     123456\C+
 1105:     123456789\C+
 1106: 
 1107: /((xyz)(?C)p|(?C1)xyzabc)/I
 1108:     xyzabc\C+
 1109: 
 1110: /(X)((xyz)(?C)p|(?C1)xyzabc)/I
 1111:     Xxyzabc\C+
 1112: 
 1113: /(?=(abc))(?C)abcdef/I
 1114:     abcdef\C+
 1115: 
 1116: /(?!(abc)(?C1)d)(?C2)abcxyz/I
 1117:     abcxyz\C+
 1118: 
 1119: /(?<=(abc)(?C))xyz/I
 1120:    abcxyz\C+
 1121: 
 1122: /a(b+)(c*)(?C1)/I
 1123:     abbbbbccc\C*1
 1124: 
 1125: /a(b+?)(c*?)(?C1)/I
 1126:     abbbbbccc\C*1
 1127: 
 1128: /(?C)abc/I
 1129: 
 1130: /(?C)^abc/I
 1131: 
 1132: /(?C)a|b/IS
 1133: 
 1134: /(?R)/I
 1135: 
 1136: /(a|(?R))/I
 1137: 
 1138: /(ab|(bc|(de|(?R))))/I
 1139: 
 1140: /x(ab|(bc|(de|(?R))))/I
 1141:     xab
 1142:     xbc
 1143:     xde
 1144:     xxab
 1145:     xxxab
 1146:     *** Failers
 1147:     xyab
 1148: 
 1149: /(ab|(bc|(de|(?1))))/I
 1150: 
 1151: /x(ab|(bc|(de|(?1)x)x)x)/I
 1152: 
 1153: /^([^()]|\((?1)*\))*$/I
 1154:     abc
 1155:     a(b)c
 1156:     a(b(c))d
 1157:     *** Failers)
 1158:     a(b(c)d
 1159: 
 1160: /^>abc>([^()]|\((?1)*\))*<xyz<$/I
 1161:    >abc>123<xyz<
 1162:    >abc>1(2)3<xyz<
 1163:    >abc>(1(2)3)<xyz<
 1164: 
 1165: /(a(?1)b)/DZ
 1166: 
 1167: /(a(?1)+b)/DZ
 1168: 
 1169: /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
 1170:     12
 1171:     (((2+2)*-3)-7)
 1172:     -12
 1173:     *** Failers
 1174:     ((2+2)*-3)-7)
 1175: 
 1176: /^(x(y|(?1){2})z)/I
 1177:     xyz
 1178:     xxyzxyzz
 1179:     *** Failers
 1180:     xxyzz
 1181:     xxyzxyzxyzz
 1182: 
 1183: /((< (?: (?(R) \d++  | [^<>]*+) | (?2)) * >))/Ix
 1184:     <>
 1185:     <abcd>
 1186:     <abc <123> hij>
 1187:     <abc <def> hij>
 1188:     <abc<>def>
 1189:     <abc<>
 1190:     *** Failers
 1191:     <abc
 1192: 
 1193: /(?1)/I
 1194: 
 1195: /((?2)(abc)/I
 1196: 
 1197: /^(abc)def(?1)/I
 1198:     abcdefabc
 1199: 
 1200: /^(a|b|c)=(?1)+/I
 1201:     a=a
 1202:     a=b
 1203:     a=bc
 1204: 
 1205: /^(a|b|c)=((?1))+/I
 1206:     a=a
 1207:     a=b
 1208:     a=bc
 1209: 
 1210: /a(?P<name1>b|c)d(?P<longername2>e)/DZ
 1211:     abde
 1212:     acde
 1213: 
 1214: /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
 1215: 
 1216: /(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
 1217: 
 1218: /^\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
 1219:     1221
 1220:     Satan, oscillate my metallic sonatas!
 1221:     A man, a plan, a canal: Panama!
 1222:     Able was I ere I saw Elba.
 1223:     *** Failers
 1224:     The quick brown fox
 1225: 
 1226: /((?(R)a|b))\1(?1)?/I
 1227:   bb
 1228:   bbaa
 1229: 
 1230: /(.*)a/Is
 1231: 
 1232: /(.*)a\1/Is
 1233: 
 1234: /(.*)a(b)\2/Is
 1235: 
 1236: /((.*)a|(.*)b)z/Is
 1237: 
 1238: /((.*)a|(.*)b)z\1/Is
 1239: 
 1240: /((.*)a|(.*)b)z\2/Is
 1241: 
 1242: /((.*)a|(.*)b)z\3/Is
 1243: 
 1244: /((.*)a|^(.*)b)z\3/Is
 1245: 
 1246: /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
 1247: 
 1248: /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
 1249: 
 1250: /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
 1251: 
 1252: /(a)(bc)/INDZ
 1253:   abc
 1254: 
 1255: /(?P<one>a)(bc)/INDZ
 1256:   abc
 1257: 
 1258: /(a)(?P<named>bc)/INDZ
 1259: 
 1260: /(a+)*zz/I
 1261:   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
 1262:   aaaaaaaaaaaaaz\M
 1263: 
 1264: /(aaa(?C1)bbb|ab)/I
 1265:    aaabbb
 1266:    aaabbb\C*0
 1267:    aaabbb\C*1
 1268:    aaabbb\C*-1
 1269: 
 1270: /ab(?P<one>cd)ef(?P<two>gh)/I
 1271:     abcdefgh
 1272:     abcdefgh\C1\Gtwo
 1273:     abcdefgh\Cone\Ctwo
 1274:     abcdefgh\Cthree
 1275: 
 1276: /(?P<Tes>)(?P<Test>)/DZ
 1277: 
 1278: /(?P<Test>)(?P<Tes>)/DZ
 1279: 
 1280: /(?P<Z>zz)(?P<A>aa)/I
 1281:     zzaa\CZ
 1282:     zzaa\CA
 1283: 
 1284: /(?P<x>eks)(?P<x>eccs)/I
 1285: 
 1286: /(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
 1287: 
 1288: "\[((?P<elem>\d+)(,(?P>elem))*)\]"I
 1289:     [10,20,30,5,5,4,4,2,43,23,4234]
 1290:     *** Failers
 1291:     []
 1292: 
 1293: "\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
 1294:     [10,20,30,5,5,4,4,2,43,23,4234]
 1295:     []
 1296: 
 1297: /(a(b(?2)c))?/DZ
 1298: 
 1299: /(a(b(?2)c))*/DZ
 1300: 
 1301: /(a(b(?2)c)){0,2}/DZ
 1302: 
 1303: /[ab]{1}+/DZ
 1304: 
 1305: /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
 1306:      Baby Bjorn Active Carrier - With free SHIPPING!!
 1307: 
 1308: /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
 1309:      Baby Bjorn Active Carrier - With free SHIPPING!!
 1310: 
 1311: /a*.*b/ISDZ
 1312: 
 1313: /(a|b)*.?c/ISDZ
 1314: 
 1315: /abc(?C255)de(?C)f/DZ
 1316: 
 1317: /abcde/ICDZ
 1318:   abcde
 1319:   abcdfe
 1320: 
 1321: /a*b/ICDZS
 1322:   ab
 1323:   aaaab
 1324:   aaaacb
 1325: 
 1326: /a*b/ICDZSS
 1327:   ab
 1328:   aaaab
 1329:   aaaacb
 1330: 
 1331: /a+b/ICDZ
 1332:   ab
 1333:   aaaab
 1334:   aaaacb
 1335: 
 1336: /(abc|def)x/ICDZS
 1337:   abcx
 1338:   defx
 1339:   ** Failers 
 1340:   abcdefzx
 1341: 
 1342: /(abc|def)x/ICDZSS
 1343:   abcx
 1344:   defx
 1345:   ** Failers 
 1346:   abcdefzx
 1347: 
 1348: /(ab|cd){3,4}/IC
 1349:   ababab
 1350:   abcdabcd
 1351:   abcdcdcdcdcd
 1352: 
 1353: /([ab]{,4}c|xy)/ICDZS
 1354:     Note: that { does NOT introduce a quantifier
 1355: 
 1356: /([ab]{,4}c|xy)/ICDZSS
 1357:     Note: that { does NOT introduce a quantifier
 1358: 
 1359: /([ab]{1,4}c|xy){4,5}?123/ICDZ
 1360:     aacaacaacaacaac123
 1361: 
 1362: /\b.*/I
 1363:   ab cd\>1
 1364: 
 1365: /\b.*/Is
 1366:   ab cd\>1
 1367: 
 1368: /(?!.bcd).*/I
 1369:   Xbcd12345
 1370: 
 1371: /abcde/I
 1372:     ab\P
 1373:     abc\P
 1374:     abcd\P
 1375:     abcde\P
 1376:     the quick brown abc\P
 1377:     ** Failers\P
 1378:     the quick brown abxyz fox\P
 1379: 
 1380: "^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
 1381:     13/05/04\P
 1382:     13/5/2004\P
 1383:     02/05/09\P
 1384:     1\P
 1385:     1/2\P
 1386:     1/2/0\P
 1387:     1/2/04\P
 1388:     0\P
 1389:     02/\P
 1390:     02/0\P
 1391:     02/1\P
 1392:     ** Failers\P
 1393:     \P
 1394:     123\P
 1395:     33/4/04\P
 1396:     3/13/04\P
 1397:     0/1/2003\P
 1398:     0/\P
 1399:     02/0/\P
 1400:     02/13\P
 1401: 
 1402: /0{0,2}ABC/I
 1403: 
 1404: /\d{3,}ABC/I
 1405: 
 1406: /\d*ABC/I
 1407: 
 1408: /[abc]+DE/I
 1409: 
 1410: /[abc]?123/I
 1411:     123\P
 1412:     a\P
 1413:     b\P
 1414:     c\P
 1415:     c12\P
 1416:     c123\P
 1417: 
 1418: /^(?:\d){3,5}X/I
 1419:     1\P
 1420:     123\P
 1421:     123X
 1422:     1234\P
 1423:     1234X
 1424:     12345\P
 1425:     12345X
 1426:     *** Failers
 1427:     1X
 1428:     123456\P
 1429: 
 1430: /abc/IS>testsavedregex
 1431: <testsavedregex
 1432:     abc
 1433:     ** Failers
 1434:     bca
 1435: 
 1436: /abc/ISS>testsavedregex
 1437: <testsavedregex
 1438:     abc
 1439:     ** Failers
 1440:     bca
 1441: 
 1442: /abc/IFS>testsavedregex
 1443: <testsavedregex
 1444:     abc
 1445:     ** Failers
 1446:     bca
 1447: 
 1448: /abc/IFSS>testsavedregex
 1449: <testsavedregex
 1450:     abc
 1451:     ** Failers
 1452:     bca
 1453: 
 1454: /(a|b)/IS>testsavedregex
 1455: <testsavedregex
 1456:     abc
 1457:     ** Failers
 1458:     def
 1459: 
 1460: /(a|b)/ISS>testsavedregex
 1461: <testsavedregex
 1462:     abc
 1463:     ** Failers
 1464:     def
 1465: 
 1466: /(a|b)/ISF>testsavedregex
 1467: <testsavedregex
 1468:     abc
 1469:     ** Failers
 1470:     def
 1471: 
 1472: /(a|b)/ISSF>testsavedregex
 1473: <testsavedregex
 1474:     abc
 1475:     ** Failers
 1476:     def
 1477: 
 1478: ~<(\w+)/?>(.)*</(\1)>~smgI
 1479:     \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>
 1480: 
 1481: /^a/IF
 1482: 
 1483: /line\nbreak/I
 1484:     this is a line\nbreak
 1485:     line one\nthis is a line\nbreak in the second line
 1486: 
 1487: /line\nbreak/If
 1488:     this is a line\nbreak
 1489:     ** Failers
 1490:     line one\nthis is a line\nbreak in the second line
 1491: 
 1492: /line\nbreak/Imf
 1493:     this is a line\nbreak
 1494:     ** Failers
 1495:     line one\nthis is a line\nbreak in the second line
 1496: 
 1497: /ab.cd/P
 1498:     ab-cd
 1499:     ab=cd
 1500:     ** Failers
 1501:     ab\ncd
 1502: 
 1503: /ab.cd/Ps
 1504:     ab-cd
 1505:     ab=cd
 1506:     ab\ncd
 1507: 
 1508: /(?i)(?-i)AbCd/I
 1509:     AbCd
 1510:     ** Failers
 1511:     abcd
 1512: 
 1513: /a{11111111111111111111}/I
 1514: 
 1515: /(){64294967295}/I
 1516: 
 1517: /(){2,4294967295}/I
 1518: 
 1519: "(?i:a)(?i:b)(?i:c)(?i:d)(?i:e)(?i:f)(?i:g)(?i:h)(?i:i)(?i:j)(k)(?i:l)A\1B"I
 1520:     abcdefghijklAkB
 1521: 
 1522: "(?P<n0>a)(?P<n1>b)(?P<n2>c)(?P<n3>d)(?P<n4>e)(?P<n5>f)(?P<n6>g)(?P<n7>h)(?P<n8>i)(?P<n9>j)(?P<n10>k)(?P<n11>l)A\11B"I
 1523:     abcdefghijklAkB
 1524: 
 1525: "(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
 1526:     abcdefghijklAkB
 1527: 
 1528: "(?P<name0>a)(?P<name1>a)(?P<name2>a)(?P<name3>a)(?P<name4>a)(?P<name5>a)(?P<name6>a)(?P<name7>a)(?P<name8>a)(?P<name9>a)(?P<name10>a)(?P<name11>a)(?P<name12>a)(?P<name13>a)(?P<name14>a)(?P<name15>a)(?P<name16>a)(?P<name17>a)(?P<name18>a)(?P<name19>a)(?P<name20>a)(?P<name21>a)(?P<name22>a)(?P<name23>a)(?P<name24>a)(?P<name25>a)(?P<name26>a)(?P<name27>a)(?P<name28>a)(?P<name29>a)(?P<name30>a)(?P<name31>a)(?P<name32>a)(?P<name33>a)(?P<name34>a)(?P<name35>a)(?P<name36>a)(?P<name37>a)(?P<name38>a)(?P<name39>a)(?P<name40>a)(?P<name41>a)(?P<name42>a)(?P<name43>a)(?P<name44>a)(?P<name45>a)(?P<name46>a)(?P<name47>a)(?P<name48>a)(?P<name49>a)(?P<name50>a)(?P<name51>a)(?P<name52>a)(?P<name53>a)(?P<name54>a)(?P<name55>a)(?P<name56>a)(?P<name57>a)(?P<name58>a)(?P<name59>a)(?P<name60>a)(?P<name61>a)(?P<name62>a)(?P<name63>a)(?P<name64>a)(?P<name65>a)(?P<name66>a)(?P<name67>a)(?P<name68>a)(?P<name69>a)(?P<name70>a)(?P<name71>a)(?P<name72>a)(?P<name73>a)(?P<name74>a)(?P<name75>a)(?P<name76>a)(?P<name77>a)(?P<name78>a)(?P<name79>a)(?P<name80>a)(?P<name81>a)(?P<name82>a)(?P<name83>a)(?P<name84>a)(?P<name85>a)(?P<name86>a)(?P<name87>a)(?P<name88>a)(?P<name89>a)(?P<name90>a)(?P<name91>a)(?P<name92>a)(?P<name93>a)(?P<name94>a)(?P<name95>a)(?P<name96>a)(?P<name97>a)(?P<name98>a)(?P<name99>a)(?P<name100>a)"I
 1529:     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 1530: 
 1531: "(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)"I
 1532:     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 1533: 
 1534: /[^()]*(?:\((?R)\)[^()]*)*/I
 1535:     (this(and)that
 1536:     (this(and)that)
 1537:     (this(and)that)stuff
 1538: 
 1539: /[^()]*(?:\((?>(?R))\)[^()]*)*/I
 1540:     (this(and)that
 1541:     (this(and)that)
 1542: 
 1543: /[^()]*(?:\((?R)\))*[^()]*/I
 1544:     (this(and)that
 1545:     (this(and)that)
 1546: 
 1547: /(?:\((?R)\))*[^()]*/I
 1548:     (this(and)that
 1549:     (this(and)that)
 1550:     ((this))
 1551: 
 1552: /(?:\((?R)\))|[^()]*/I
 1553:     (this(and)that
 1554:     (this(and)that)
 1555:     (this)
 1556:     ((this))
 1557: 
 1558: /a(b)c/PN
 1559:     abc
 1560: 
 1561: /a(?P<name>b)c/PN
 1562:     abc
 1563: 
 1564: /\x{100}/I
 1565: 
 1566: /\x{0000ff}/I
 1567: 
 1568: /^((?P<A>a1)|(?P<A>a2)b)/I
 1569: 
 1570: /^((?P<A>a1)|(?P<A>a2)b)/IJ
 1571:     a1b\CA
 1572:     a2b\CA
 1573:     ** Failers
 1574:     a1b\CZ\CA
 1575: 
 1576: /^(?P<A>a)(?P<A>b)/IJ
 1577:     ab\CA
 1578: 
 1579: /^(?P<A>a)(?P<A>b)|cd/IJ
 1580:     ab\CA
 1581:     cd\CA
 1582: 
 1583: /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
 1584:     cdefgh\CA
 1585: 
 1586: /^((?P<A>a1)|(?P<A>a2)b)/IJ
 1587:     a1b\GA
 1588:     a2b\GA
 1589:     ** Failers
 1590:     a1b\GZ\GA
 1591: 
 1592: /^(?P<A>a)(?P<A>b)/IJ
 1593:     ab\GA
 1594: 
 1595: /^(?P<A>a)(?P<A>b)|cd/IJ
 1596:     ab\GA
 1597:     cd\GA
 1598: 
 1599: /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
 1600:     cdefgh\GA
 1601: 
 1602: /(?J)^((?P<A>a1)|(?P<A>a2)b)/I
 1603:     a1b\CA
 1604:     a2b\CA
 1605: 
 1606: /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
 1607: 
 1608: / In this next test, J is not set at the outer level; consequently it isn't
 1609: set in the pattern's options; consequently pcre_get_named_substring() produces
 1610: a random value. /Ix
 1611: 
 1612: /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
 1613:     a bc d\CA\CB\CC
 1614: 
 1615: /^(?P<A>a)?(?(A)a|b)/I
 1616:     aabc
 1617:     bc
 1618:     ** Failers
 1619:     abc
 1620: 
 1621: /(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
 1622:     bXaX
 1623: 
 1624: /(?:(?(2y)a|b)(X))+/I
 1625: 
 1626: /(?:(?(ZA)a|b)(?P<ZZ>X))+/I
 1627: 
 1628: /(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
 1629:     bbXaaX
 1630: 
 1631: /(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
 1632:     (b)\\Xa\\X
 1633: 
 1634: /(?P<ABC/I
 1635: 
 1636: /(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
 1637:     bXXaYYaY
 1638:     bXYaXXaX
 1639: 
 1640: /()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
 1641:     bXXaYYaY
 1642: 
 1643: /\777/I
 1644: 
 1645: /\s*,\s*/IS
 1646:     \x0b,\x0b
 1647:     \x0c,\x0d
 1648: 
 1649: /^abc/Im
 1650:     xyz\nabc
 1651:     xyz\nabc\<lf>
 1652:     xyz\r\nabc\<lf>
 1653:     xyz\rabc\<cr>
 1654:     xyz\r\nabc\<crlf>
 1655:     ** Failers
 1656:     xyz\nabc\<cr>
 1657:     xyz\r\nabc\<cr>
 1658:     xyz\nabc\<crlf>
 1659:     xyz\rabc\<crlf>
 1660:     xyz\rabc\<lf>
 1661: 
 1662: /abc$/Im<lf>
 1663:     xyzabc
 1664:     xyzabc\n
 1665:     xyzabc\npqr
 1666:     xyzabc\r\<cr>
 1667:     xyzabc\rpqr\<cr>
 1668:     xyzabc\r\n\<crlf>
 1669:     xyzabc\r\npqr\<crlf>
 1670:     ** Failers
 1671:     xyzabc\r
 1672:     xyzabc\rpqr
 1673:     xyzabc\r\n
 1674:     xyzabc\r\npqr
 1675: 
 1676: /^abc/Im<cr>
 1677:     xyz\rabcdef
 1678:     xyz\nabcdef\<lf>
 1679:     ** Failers
 1680:     xyz\nabcdef
 1681: 
 1682: /^abc/Im<lf>
 1683:     xyz\nabcdef
 1684:     xyz\rabcdef\<cr>
 1685:     ** Failers
 1686:     xyz\rabcdef
 1687: 
 1688: /^abc/Im<crlf>
 1689:     xyz\r\nabcdef
 1690:     xyz\rabcdef\<cr>
 1691:     ** Failers
 1692:     xyz\rabcdef
 1693: 
 1694: /^abc/Im<bad>
 1695: 
 1696: /abc/I
 1697:     xyz\rabc\<bad>
 1698:     abc
 1699: 
 1700: /.*/I<lf>
 1701:     abc\ndef
 1702:     abc\rdef
 1703:     abc\r\ndef
 1704:     \<cr>abc\ndef
 1705:     \<cr>abc\rdef
 1706:     \<cr>abc\r\ndef
 1707:     \<crlf>abc\ndef
 1708:     \<crlf>abc\rdef
 1709:     \<crlf>abc\r\ndef
 1710: 
 1711: /\w+(.)(.)?def/Is
 1712:     abc\ndef
 1713:     abc\rdef
 1714:     abc\r\ndef
 1715: 
 1716: +((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
 1717:    /* this is a C style comment */\M
 1718: 
 1719: /(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
 1720: 
 1721: /()()()()()()()()()()()()()()()()()()()()
 1722:  ()()()()()()()()()()()()()()()()()()()()
 1723:  ()()()()()()()()()()()()()()()()()()()()
 1724:  ()()()()()()()()()()()()()()()()()()()()
 1725:  ()()()()()()()()()()()()()()()()()()()()
 1726:  (.(.))/Ix
 1727:     XY\O400
 1728: 
 1729: /(a*b|(?i:c*(?-i)d))/IS
 1730: 
 1731: /()[ab]xyz/IS
 1732: 
 1733: /(|)[ab]xyz/IS
 1734: 
 1735: /(|c)[ab]xyz/IS
 1736: 
 1737: /(|c?)[ab]xyz/IS
 1738: 
 1739: /(d?|c?)[ab]xyz/IS
 1740: 
 1741: /(d?|c)[ab]xyz/IS
 1742: 
 1743: /^a*b\d/DZ
 1744: 
 1745: /^a*+b\d/DZ
 1746: 
 1747: /^a*?b\d/DZ
 1748: 
 1749: /^a+A\d/DZ
 1750:     aaaA5
 1751:     ** Failers
 1752:     aaaa5
 1753: 
 1754: /^a*A\d/IiDZ
 1755:     aaaA5
 1756:     aaaa5
 1757: 
 1758: /(a*|b*)[cd]/IS
 1759: 
 1760: /(a+|b*)[cd]/IS
 1761: 
 1762: /(a*|b+)[cd]/IS
 1763: 
 1764: /(a+|b+)[cd]/IS
 1765: 
 1766: /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
 1767:  ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
 1768:  (((
 1769:  a
 1770:  ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
 1771:  ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
 1772:  )))
 1773: /Ix
 1774:   large nest
 1775: 
 1776: /a*\d/BZ
 1777: 
 1778: /a*\D/BZ
 1779: 
 1780: /0*\d/BZ
 1781: 
 1782: /0*\D/BZ
 1783: 
 1784: /a*\s/BZ
 1785: 
 1786: /a*\S/BZ
 1787: 
 1788: / *\s/BZ
 1789: 
 1790: / *\S/BZ
 1791: 
 1792: /a*\w/BZ
 1793: 
 1794: /a*\W/BZ
 1795: 
 1796: /=*\w/BZ
 1797: 
 1798: /=*\W/BZ
 1799: 
 1800: /\d*a/BZ
 1801: 
 1802: /\d*2/BZ
 1803: 
 1804: /\d*\d/BZ
 1805: 
 1806: /\d*\D/BZ
 1807: 
 1808: /\d*\s/BZ
 1809: 
 1810: /\d*\S/BZ
 1811: 
 1812: /\d*\w/BZ
 1813: 
 1814: /\d*\W/BZ
 1815: 
 1816: /\D*a/BZ
 1817: 
 1818: /\D*2/BZ
 1819: 
 1820: /\D*\d/BZ
 1821: 
 1822: /\D*\D/BZ
 1823: 
 1824: /\D*\s/BZ
 1825: 
 1826: /\D*\S/BZ
 1827: 
 1828: /\D*\w/BZ
 1829: 
 1830: /\D*\W/BZ
 1831: 
 1832: /\s*a/BZ
 1833: 
 1834: /\s*2/BZ
 1835: 
 1836: /\s*\d/BZ
 1837: 
 1838: /\s*\D/BZ
 1839: 
 1840: /\s*\s/BZ
 1841: 
 1842: /\s*\S/BZ
 1843: 
 1844: /\s*\w/BZ
 1845: 
 1846: /\s*\W/BZ
 1847: 
 1848: /\S*a/BZ
 1849: 
 1850: /\S*2/BZ
 1851: 
 1852: /\S*\d/BZ
 1853: 
 1854: /\S*\D/BZ
 1855: 
 1856: /\S*\s/BZ
 1857: 
 1858: /\S*\S/BZ
 1859: 
 1860: /\S*\w/BZ
 1861: 
 1862: /\S*\W/BZ
 1863: 
 1864: /\w*a/BZ
 1865: 
 1866: /\w*2/BZ
 1867: 
 1868: /\w*\d/BZ
 1869: 
 1870: /\w*\D/BZ
 1871: 
 1872: /\w*\s/BZ
 1873: 
 1874: /\w*\S/BZ
 1875: 
 1876: /\w*\w/BZ
 1877: 
 1878: /\w*\W/BZ
 1879: 
 1880: /\W*a/BZ
 1881: 
 1882: /\W*2/BZ
 1883: 
 1884: /\W*\d/BZ
 1885: 
 1886: /\W*\D/BZ
 1887: 
 1888: /\W*\s/BZ
 1889: 
 1890: /\W*\S/BZ
 1891: 
 1892: /\W*\w/BZ
 1893: 
 1894: /\W*\W/BZ
 1895: 
 1896: /[^a]+a/BZ
 1897: 
 1898: /[^a]+a/BZi
 1899: 
 1900: /[^a]+A/BZi
 1901: 
 1902: /[^a]+b/BZ
 1903: 
 1904: /[^a]+\d/BZ
 1905: 
 1906: /a*[^a]/BZ
 1907: 
 1908: /(?P<abc>x)(?P<xyz>y)/I
 1909:     xy\Cabc\Cxyz
 1910: 
 1911: /(?<abc>x)(?'xyz'y)/I
 1912:     xy\Cabc\Cxyz
 1913: 
 1914: /(?<abc'x)(?'xyz'y)/I
 1915: 
 1916: /(?<abc>x)(?'xyz>y)/I
 1917: 
 1918: /(?P'abc'x)(?P<xyz>y)/I
 1919: 
 1920: /^(?:(?(ZZ)a|b)(?<ZZ>X))+/
 1921:     bXaX
 1922:     bXbX
 1923:     ** Failers
 1924:     aXaX
 1925:     aXbX
 1926: 
 1927: /^(?P>abc)(?<abcd>xxx)/
 1928: 
 1929: /^(?P>abc)(?<abc>x|y)/
 1930:     xx
 1931:     xy
 1932:     yy
 1933:     yx
 1934: 
 1935: /^(?P>abc)(?P<abc>x|y)/
 1936:     xx
 1937:     xy
 1938:     yy
 1939:     yx
 1940: 
 1941: /^((?(abc)a|b)(?<abc>x|y))+/
 1942:     bxay
 1943:     bxby
 1944:     ** Failers
 1945:     axby
 1946: 
 1947: /^(((?P=abc)|X)(?<abc>x|y))+/
 1948:     XxXxxx
 1949:     XxXyyx
 1950:     XxXyxx
 1951:     ** Failers
 1952:     x
 1953: 
 1954: /^(?1)(abc)/
 1955:     abcabc
 1956: 
 1957: /^(?:(?:\1|X)(a|b))+/
 1958:     Xaaa
 1959:     Xaba
 1960: 
 1961: /^[\E\Qa\E-\Qz\E]+/BZ
 1962: 
 1963: /^[a\Q]bc\E]/BZ
 1964: 
 1965: /^[a-\Q\E]/BZ
 1966: 
 1967: /^(?P>abc)[()](?<abc>)/BZ
 1968: 
 1969: /^((?(abc)y)[()](?P<abc>x))+/BZ
 1970:     (xy)x
 1971: 
 1972: /^(?P>abc)\Q()\E(?<abc>)/BZ
 1973: 
 1974: /^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
 1975: 
 1976: /^(?P>abc) # this is (a comment)
 1977:   (?<abc>)/BZx
 1978: 
 1979: /^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
 1980:     1221
 1981:     Satan, oscillate my metallic sonatas!
 1982:     A man, a plan, a canal: Panama!
 1983:     Able was I ere I saw Elba.
 1984:     *** Failers
 1985:     The quick brown fox
 1986: 
 1987: /(?=(\w+))\1:/I
 1988:     abcd:
 1989: 
 1990: /(?=(?'abc'\w+))\k<abc>:/I
 1991:     abcd:
 1992: 
 1993: /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
 1994:     adaa
 1995:     ** Failers
 1996:     addd
 1997:     adbb
 1998: 
 1999: /(?'abc'a|b)(?<abc>d|e)(?&abc){2}/J
 2000:     bdaa
 2001:     bdab
 2002:     ** Failers
 2003:     bddd
 2004: 
 2005: /(?(<bc))/
 2006: 
 2007: /(?(''))/
 2008: 
 2009: /(?('R')stuff)/
 2010: 
 2011: /((abc (?(R) (?(R1)1) (?(R2)2) X  |  (?1)  (?2)   (?R) ))) /x
 2012:     abcabc1Xabc2XabcXabcabc
 2013: 
 2014: /(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
 2015:     abcabc1Xabc2XabcXabcabc
 2016: 
 2017: /(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
 2018: 
 2019: /(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
 2020:     abcabc1Xabc2XabcXabcabc
 2021: 
 2022: /^(?(DEFINE) abc | xyz ) /x
 2023: 
 2024: /(?(DEFINE) abc) xyz/xI
 2025: 
 2026: /(a|)*\d/
 2027:   \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 2028:   \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
 2029: 
 2030: /^a.b/<lf>
 2031:     a\rb
 2032:     a\nb\<cr>
 2033:     a\x85b\<anycrlf> 
 2034:     ** Failers
 2035:     a\nb
 2036:     a\nb\<any>
 2037:     a\rb\<cr>
 2038:     a\rb\<any>
 2039:     a\x85b\<any> 
 2040:     a\rb\<anycrlf>
 2041: 
 2042: /^abc./mgx<any>
 2043:     abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
 2044: 
 2045: /abc.$/mgx<any>
 2046:     abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
 2047: 
 2048: /a/<cr><any>
 2049: 
 2050: /a/<any><crlf>
 2051: 
 2052: /^a\Rb/<bsr_unicode>
 2053:     a\nb
 2054:     a\rb
 2055:     a\r\nb
 2056:     a\x0bb
 2057:     a\x0cb
 2058:     a\x85b
 2059:     ** Failers
 2060:     a\n\rb
 2061: 
 2062: /^a\R*b/<bsr_unicode>
 2063:     ab
 2064:     a\nb
 2065:     a\rb
 2066:     a\r\nb
 2067:     a\x0bb
 2068:     a\x0cb
 2069:     a\x85b
 2070:     a\n\rb
 2071:     a\n\r\x85\x0cb
 2072: 
 2073: /^a\R+b/<bsr_unicode>
 2074:     a\nb
 2075:     a\rb
 2076:     a\r\nb
 2077:     a\x0bb
 2078:     a\x0cb
 2079:     a\x85b
 2080:     a\n\rb
 2081:     a\n\r\x85\x0cb
 2082:     ** Failers
 2083:     ab
 2084: 
 2085: /^a\R{1,3}b/<bsr_unicode>
 2086:     a\nb
 2087:     a\n\rb
 2088:     a\n\r\x85b
 2089:     a\r\n\r\nb
 2090:     a\r\n\r\n\r\nb
 2091:     a\n\r\n\rb
 2092:     a\n\n\r\nb
 2093:     ** Failers
 2094:     a\n\n\n\rb
 2095:     a\r
 2096: 
 2097: /^a[\R]b/<bsr_unicode>
 2098:     aRb
 2099:     ** Failers
 2100:     a\nb
 2101: 
 2102: /(?&abc)X(?<abc>P)/I
 2103:     abcPXP123
 2104: 
 2105: /(?1)X(?<abc>P)/I
 2106:     abcPXP123
 2107: 
 2108: /(?:a(?&abc)b)*(?<abc>x)/
 2109:     123axbaxbaxbx456
 2110:     123axbaxbaxb456
 2111: 
 2112: /(?:a(?&abc)b){1,5}(?<abc>x)/
 2113:     123axbaxbaxbx456
 2114: 
 2115: /(?:a(?&abc)b){2,5}(?<abc>x)/
 2116:     123axbaxbaxbx456
 2117: 
 2118: /(?:a(?&abc)b){2,}(?<abc>x)/
 2119:     123axbaxbaxbx456
 2120: 
 2121: /(abc)(?i:(?1))/
 2122:    defabcabcxyz
 2123:    DEFabcABCXYZ
 2124: 
 2125: /(abc)(?:(?i)(?1))/
 2126:    defabcabcxyz
 2127:    DEFabcABCXYZ
 2128: 
 2129: /^(a)\g-2/
 2130: 
 2131: /^(a)\g/
 2132: 
 2133: /^(a)\g{0}/
 2134: 
 2135: /^(a)\g{3/
 2136: 
 2137: /^(a)\g{4a}/
 2138: 
 2139: /^a.b/<lf>
 2140:     a\rb
 2141:     *** Failers
 2142:     a\nb
 2143: 
 2144: /.+foo/
 2145:     afoo
 2146:     ** Failers
 2147:     \r\nfoo
 2148:     \nfoo
 2149: 
 2150: /.+foo/<crlf>
 2151:     afoo
 2152:     \nfoo
 2153:     ** Failers
 2154:     \r\nfoo
 2155: 
 2156: /.+foo/<any>
 2157:     afoo
 2158:     ** Failers
 2159:     \nfoo
 2160:     \r\nfoo
 2161: 
 2162: /.+foo/s
 2163:     afoo
 2164:     \r\nfoo
 2165:     \nfoo
 2166:     
 2167: /^$/mg<any>
 2168:     abc\r\rxyz
 2169:     abc\n\rxyz  
 2170:     ** Failers 
 2171:     abc\r\nxyz
 2172: 
 2173: /(?m)^$/<any>g+
 2174:     abc\r\n\r\n
 2175: 
 2176: /(?m)^$|^\r\n/<any>g+ 
 2177:     abc\r\n\r\n
 2178:     
 2179: /(?m)$/<any>g+ 
 2180:     abc\r\n\r\n
 2181: 
 2182: /abc.$/mgx<anycrlf>
 2183:     abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
 2184: 
 2185: /^X/m
 2186:     XABC
 2187:     ** Failers 
 2188:     XABC\B
 2189: 
 2190: /(ab|c)(?-1)/BZ
 2191:     abc
 2192: 
 2193: /xy(?+1)(abc)/BZ
 2194:     xyabcabc
 2195:     ** Failers
 2196:     xyabc  
 2197:     
 2198: /x(?-0)y/
 2199: 
 2200: /x(?-1)y/
 2201: 
 2202: /x(?+0)y/ 
 2203: 
 2204: /x(?+1)y/
 2205: 
 2206: /^(abc)?(?(-1)X|Y)/BZ
 2207:     abcX
 2208:     Y
 2209:     ** Failers
 2210:     abcY   
 2211:     
 2212: /^((?(+1)X|Y)(abc))+/BZ 
 2213:     YabcXabc
 2214:     YabcXabcXabc
 2215:     ** Failers
 2216:     XabcXabc  
 2217: 
 2218: /(?(-1)a)/BZ
 2219: 
 2220: /((?(-1)a))/BZ
 2221: 
 2222: /((?(-2)a))/BZ
 2223: 
 2224: /^(?(+1)X|Y)(.)/BZ
 2225:     Y!
 2226: 
 2227: /(?<A>tom|bon)-\k{A}/
 2228:     tom-tom
 2229:     bon-bon 
 2230:     ** Failers
 2231:     tom-bon  
 2232: 
 2233: /\g{A/ 
 2234: 
 2235: /(?|(abc)|(xyz))/BZ
 2236:    >abc<
 2237:    >xyz< 
 2238: 
 2239: /(x)(?|(abc)|(xyz))(x)/BZ
 2240:     xabcx
 2241:     xxyzx 
 2242: 
 2243: /(x)(?|(abc)(pqr)|(xyz))(x)/BZ
 2244:     xabcpqrx
 2245:     xxyzx 
 2246: 
 2247: /[\h]/BZ
 2248:     >\x09<
 2249: 
 2250: /[\h]+/BZ
 2251:     >\x09\x20\xa0<
 2252: 
 2253: /[\v]/BZ
 2254: 
 2255: /[\H]/BZ
 2256: 
 2257: /[^\h]/BZ
 2258: 
 2259: /[\V]/BZ
 2260: 
 2261: /[\x0a\V]/BZ
 2262: 
 2263: /\H++X/BZ
 2264:     ** Failers
 2265:     XXXX
 2266:     
 2267: /\H+\hY/BZ
 2268:     XXXX Y 
 2269: 
 2270: /\H+ Y/BZ
 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0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
 2304: 
 2305: /[\E]AAA/
 2306: 
 2307: /[\Q\E]AAA/
 2308: 
 2309: /[^\E]AAA/
 2310: 
 2311: /[^\Q\E]AAA/
 2312: 
 2313: /[\E^]AAA/
 2314: 
 2315: /[\Q\E^]AAA/
 2316: 
 2317: /A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ
 2318: 
 2319: /^a+(*FAIL)/C
 2320:     aaaaaa
 2321:     
 2322: /a+b?c+(*FAIL)/C
 2323:     aaabccc
 2324: 
 2325: /a+b?(*PRUNE)c+(*FAIL)/C
 2326:     aaabccc
 2327: 
 2328: /a+b?(*COMMIT)c+(*FAIL)/C
 2329:     aaabccc
 2330:     
 2331: /a+b?(*SKIP)c+(*FAIL)/C
 2332:     aaabcccaaabccc
 2333: 
 2334: /a+b?(*THEN)c+(*FAIL)/C
 2335:     aaabccc
 2336:     
 2337: /a(*MARK)b/ 
 2338: 
 2339: /(?i:A{1,}\6666666666)/
 2340: 
 2341: /\g6666666666/
 2342: 
 2343: /[\g6666666666]/BZ
 2344: 
 2345: /(?1)\c[/
 2346: 
 2347: /.+A/<crlf>
 2348:     \r\nA
 2349:     
 2350: /\nA/<crlf>
 2351:     \r\nA 
 2352: 
 2353: /[\r\n]A/<crlf>
 2354:     \r\nA 
 2355: 
 2356: /(\r|\n)A/<crlf>
 2357:     \r\nA 
 2358: 
 2359: /a(*CR)b/
 2360: 
 2361: /(*CR)a.b/
 2362:     a\nb
 2363:     ** Failers
 2364:     a\rb  
 2365: 
 2366: /(*CR)a.b/<lf>
 2367:     a\nb
 2368:     ** Failers
 2369:     a\rb  
 2370: 
 2371: /(*LF)a.b/<CRLF>
 2372:     a\rb
 2373:     ** Failers
 2374:     a\nb  
 2375: 
 2376: /(*CRLF)a.b/
 2377:     a\rb
 2378:     a\nb  
 2379:     ** Failers
 2380:     a\r\nb  
 2381: 
 2382: /(*ANYCRLF)a.b/<CR>
 2383:     ** Failers
 2384:     a\rb
 2385:     a\nb  
 2386:     a\r\nb  
 2387: 
 2388: /(*ANY)a.b/<cr>
 2389:     ** Failers
 2390:     a\rb
 2391:     a\nb  
 2392:     a\r\nb  
 2393:     a\x85b 
 2394:     
 2395: /(*ANY).*/g
 2396:     abc\r\ndef
 2397: 
 2398: /(*ANYCRLF).*/g
 2399:     abc\r\ndef
 2400: 
 2401: /(*CRLF).*/g
 2402:     abc\r\ndef
 2403: 
 2404: /a\Rb/I<bsr_anycrlf>
 2405:     a\rb
 2406:     a\nb
 2407:     a\r\nb
 2408:     ** Failers
 2409:     a\x85b
 2410:     a\x0bb     
 2411: 
 2412: /a\Rb/I<bsr_unicode>
 2413:     a\rb
 2414:     a\nb
 2415:     a\r\nb
 2416:     a\x85b
 2417:     a\x0bb     
 2418:     ** Failers 
 2419:     a\x85b\<bsr_anycrlf>
 2420:     a\x0bb\<bsr_anycrlf>
 2421:     
 2422: /a\R?b/I<bsr_anycrlf>
 2423:     a\rb
 2424:     a\nb
 2425:     a\r\nb
 2426:     ** Failers
 2427:     a\x85b
 2428:     a\x0bb     
 2429: 
 2430: /a\R?b/I<bsr_unicode>
 2431:     a\rb
 2432:     a\nb
 2433:     a\r\nb
 2434:     a\x85b
 2435:     a\x0bb     
 2436:     ** Failers 
 2437:     a\x85b\<bsr_anycrlf>
 2438:     a\x0bb\<bsr_anycrlf>
 2439:     
 2440: /a\R{2,4}b/I<bsr_anycrlf>
 2441:     a\r\n\nb
 2442:     a\n\r\rb
 2443:     a\r\n\r\n\r\n\r\nb
 2444:     ** Failers
 2445:     a\x85\85b
 2446:     a\x0b\0bb     
 2447: 
 2448: /a\R{2,4}b/I<bsr_unicode>
 2449:     a\r\rb
 2450:     a\n\n\nb
 2451:     a\r\n\n\r\rb
 2452:     a\x85\85b
 2453:     a\x0b\0bb     
 2454:     ** Failers 
 2455:     a\r\r\r\r\rb 
 2456:     a\x85\85b\<bsr_anycrlf>
 2457:     a\x0b\0bb\<bsr_anycrlf>
 2458:  
 2459: /(*BSR_ANYCRLF)a\Rb/I
 2460:     a\nb
 2461:     a\rb 
 2462: 
 2463: /(*BSR_UNICODE)a\Rb/I
 2464:     a\x85b
 2465: 
 2466: /(*BSR_ANYCRLF)(*CRLF)a\Rb/I
 2467:     a\nb
 2468:     a\rb 
 2469: 
 2470: /(*CRLF)(*BSR_UNICODE)a\Rb/I
 2471:     a\x85b
 2472: 
 2473: /(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
 2474: 
 2475: /(?<a>)(?&)/
 2476: 
 2477: /(?<abc>)(?&a)/
 2478: 
 2479: /(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
 2480: 
 2481: /(?+-a)/
 2482: 
 2483: /(?-+a)/
 2484: 
 2485: /(?(-1))/
 2486: 
 2487: /(?(+10))/
 2488: 
 2489: /(?(10))/
 2490: 
 2491: /(?(+2))()()/
 2492: 
 2493: /(?(2))()()/
 2494: 
 2495: /\k''/
 2496: 
 2497: /\k<>/
 2498: 
 2499: /\k{}/
 2500: 
 2501: /\k/
 2502: 
 2503: /\kabc/
 2504: 
 2505: /(?P=)/
 2506: 
 2507: /(?P>)/
 2508: 
 2509: /(?!\w)(?R)/
 2510: 
 2511: /(?=\w)(?R)/
 2512: 
 2513: /(?<!\w)(?R)/
 2514: 
 2515: /(?<=\w)(?R)/
 2516: 
 2517: /[[:foo:]]/
 2518: 
 2519: /[[:1234:]]/
 2520: 
 2521: /[[:f\oo:]]/
 2522: 
 2523: /[[: :]]/
 2524: 
 2525: /[[:...:]]/
 2526: 
 2527: /[[:l\ower:]]/
 2528: 
 2529: /[[:abc\:]]/
 2530: 
 2531: /[abc[:x\]pqr:]]/
 2532: 
 2533: /[[:a\dz:]]/
 2534: 
 2535: /(^(a|b\g<-1'c))/
 2536: 
 2537: /^(?+1)(?<a>x|y){0}z/
 2538:     xzxx
 2539:     yzyy 
 2540:     ** Failers
 2541:     xxz  
 2542: 
 2543: /(\3)(\1)(a)/
 2544:     cat
 2545: 
 2546: /(\3)(\1)(a)/<JS>
 2547:     cat
 2548:     
 2549: /TA]/
 2550:     The ACTA] comes 
 2551: 
 2552: /TA]/<JS>
 2553:     The ACTA] comes 
 2554: 
 2555: /(?2)[]a()b](abc)/
 2556:     abcbabc
 2557: 
 2558: /(?2)[^]a()b](abc)/
 2559:     abcbabc
 2560: 
 2561: /(?1)[]a()b](abc)/
 2562:     abcbabc
 2563:     ** Failers 
 2564:     abcXabc
 2565: 
 2566: /(?1)[^]a()b](abc)/
 2567:     abcXabc
 2568:     ** Failers 
 2569:     abcbabc
 2570: 
 2571: /(?2)[]a()b](abc)(xyz)/
 2572:     xyzbabcxyz
 2573: 
 2574: /(?&N)[]a(?<N>)](?<M>abc)/
 2575:    abc<abc
 2576: 
 2577: /(?&N)[]a(?<N>)](abc)/
 2578:    abc<abc
 2579: 
 2580: /a[]b/
 2581: 
 2582: /a[^]b/
 2583: 
 2584: /a[]b/<JS>
 2585:     ** Failers
 2586:     ab
 2587: 
 2588: /a[]+b/<JS>
 2589:     ** Failers
 2590:     ab 
 2591: 
 2592: /a[]*+b/<JS>
 2593:     ** Failers
 2594:     ab 
 2595: 
 2596: /a[^]b/<JS>
 2597:     aXb
 2598:     a\nb 
 2599:     ** Failers
 2600:     ab  
 2601:     
 2602: /a[^]+b/<JS> 
 2603:     aXb
 2604:     a\nX\nXb 
 2605:     ** Failers
 2606:     ab  
 2607: 
 2608: /a(?!)+b/
 2609: 
 2610: /a(*FAIL)+b/
 2611: 
 2612: /(abc|pqr|123){0}[xyz]/SI
 2613: 
 2614: /(?(?=.*b)b|^)/CI
 2615:    adc
 2616:    abc 
 2617:    
 2618: /(?(?=b).*b|^d)/I
 2619: 
 2620: /(?(?=.*b).*b|^d)/I
 2621: 
 2622: /a?|b?/P
 2623:     abc
 2624:     ** Failers
 2625:     ddd\N   
 2626: 
 2627: /xyz/C
 2628:   xyz 
 2629:   abcxyz 
 2630:   abcxyz\Y
 2631:   ** Failers 
 2632:   abc
 2633:   abc\Y
 2634:   abcxypqr  
 2635:   abcxypqr\Y  
 2636:   
 2637: /(*NO_START_OPT)xyz/C
 2638:   abcxyz 
 2639: 
 2640: /xyz/CY
 2641:   abcxyz 
 2642: 
 2643: /^"((?(?=[a])[^"])|b)*"$/C
 2644:     "ab"
 2645: 
 2646: /^"((?(?=[a])[^"])|b)*"$/
 2647:     "ab"
 2648: 
 2649: /^X(?5)(a)(?|(b)|(q))(c)(d)Y/
 2650:     XYabcdY
 2651: 
 2652: /^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
 2653:     XYabcdY
 2654:  
 2655: /Xa{2,4}b/
 2656:     X\P
 2657:     Xa\P
 2658:     Xaa\P 
 2659:     Xaaa\P
 2660:     Xaaaa\P 
 2661:     
 2662: /Xa{2,4}?b/
 2663:     X\P
 2664:     Xa\P
 2665:     Xaa\P 
 2666:     Xaaa\P
 2667:     Xaaaa\P 
 2668:     
 2669: /Xa{2,4}+b/
 2670:     X\P
 2671:     Xa\P
 2672:     Xaa\P 
 2673:     Xaaa\P
 2674:     Xaaaa\P 
 2675:     
 2676: /X\d{2,4}b/
 2677:     X\P
 2678:     X3\P
 2679:     X33\P 
 2680:     X333\P
 2681:     X3333\P 
 2682:     
 2683: /X\d{2,4}?b/
 2684:     X\P
 2685:     X3\P
 2686:     X33\P 
 2687:     X333\P
 2688:     X3333\P 
 2689:     
 2690: /X\d{2,4}+b/
 2691:     X\P
 2692:     X3\P
 2693:     X33\P 
 2694:     X333\P
 2695:     X3333\P 
 2696:     
 2697: /X\D{2,4}b/
 2698:     X\P
 2699:     Xa\P
 2700:     Xaa\P 
 2701:     Xaaa\P
 2702:     Xaaaa\P 
 2703:     
 2704: /X\D{2,4}?b/
 2705:     X\P
 2706:     Xa\P
 2707:     Xaa\P 
 2708:     Xaaa\P
 2709:     Xaaaa\P 
 2710:     
 2711: /X\D{2,4}+b/
 2712:     X\P
 2713:     Xa\P
 2714:     Xaa\P 
 2715:     Xaaa\P
 2716:     Xaaaa\P 
 2717:     
 2718: /X[abc]{2,4}b/
 2719:     X\P
 2720:     Xa\P
 2721:     Xaa\P 
 2722:     Xaaa\P
 2723:     Xaaaa\P 
 2724:     
 2725: /X[abc]{2,4}?b/
 2726:     X\P
 2727:     Xa\P
 2728:     Xaa\P 
 2729:     Xaaa\P
 2730:     Xaaaa\P 
 2731:     
 2732: /X[abc]{2,4}+b/
 2733:     X\P
 2734:     Xa\P
 2735:     Xaa\P 
 2736:     Xaaa\P
 2737:     Xaaaa\P 
 2738:     
 2739: /X[^a]{2,4}b/
 2740:     X\P
 2741:     Xz\P
 2742:     Xzz\P 
 2743:     Xzzz\P
 2744:     Xzzzz\P 
 2745:     
 2746: /X[^a]{2,4}?b/
 2747:     X\P
 2748:     Xz\P
 2749:     Xzz\P 
 2750:     Xzzz\P
 2751:     Xzzzz\P 
 2752:     
 2753: /X[^a]{2,4}+b/
 2754:     X\P
 2755:     Xz\P
 2756:     Xzz\P 
 2757:     Xzzz\P
 2758:     Xzzzz\P 
 2759:     
 2760: /(Y)X\1{2,4}b/
 2761:     YX\P
 2762:     YXY\P
 2763:     YXYY\P 
 2764:     YXYYY\P
 2765:     YXYYYY\P 
 2766:     
 2767: /(Y)X\1{2,4}?b/
 2768:     YX\P
 2769:     YXY\P
 2770:     YXYY\P 
 2771:     YXYYY\P
 2772:     YXYYYY\P 
 2773:     
 2774: /(Y)X\1{2,4}+b/
 2775:     YX\P
 2776:     YXY\P
 2777:     YXYY\P 
 2778:     YXYYY\P
 2779:     YXYYYY\P 
 2780:     
 2781: /\++\KZ|\d+X|9+Y/
 2782:     ++++123999\P
 2783:     ++++123999Y\P
 2784:     ++++Z1234\P 
 2785: 
 2786: /Z(*F)/
 2787:     Z\P
 2788:     ZA\P 
 2789:     
 2790: /Z(?!)/
 2791:     Z\P 
 2792:     ZA\P 
 2793: 
 2794: /dog(sbody)?/
 2795:     dogs\P
 2796:     dogs\P\P 
 2797:     
 2798: /dog(sbody)??/
 2799:     dogs\P
 2800:     dogs\P\P 
 2801: 
 2802: /dog|dogsbody/
 2803:     dogs\P
 2804:     dogs\P\P 
 2805:  
 2806: /dogsbody|dog/
 2807:     dogs\P
 2808:     dogs\P\P 
 2809: 
 2810: /\bthe cat\b/
 2811:     the cat\P
 2812:     the cat\P\P
 2813: 
 2814: /abc/
 2815:    abc\P
 2816:    abc\P\P
 2817:    
 2818: /\w+A/P
 2819:    CDAAAAB 
 2820: 
 2821: /\w+A/PU
 2822:    CDAAAAB 
 2823: 
 2824: /abc\K123/
 2825:     xyzabc123pqr
 2826:     xyzabc12\P
 2827:     xyzabc12\P\P
 2828:     
 2829: /(?<=abc)123/
 2830:     xyzabc123pqr 
 2831:     xyzabc12\P
 2832:     xyzabc12\P\P
 2833: 
 2834: /\babc\b/
 2835:     +++abc+++
 2836:     +++ab\P
 2837:     +++ab\P\P  
 2838: 
 2839: /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
 2840: 
 2841: /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
 2842: 
 2843: /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
 2844: 
 2845: /abc\K/+
 2846:     abcdef
 2847:     abcdef\N\N
 2848:     xyzabcdef\N\N
 2849:     ** Failers
 2850:     abcdef\N 
 2851:     xyzabcdef\N
 2852:     
 2853: /^(?:(?=abc)|abc\K)/+
 2854:     abcdef
 2855:     abcdef\N\N 
 2856:     ** Failers 
 2857:     abcdef\N 
 2858: 
 2859: /a?b?/+
 2860:     xyz
 2861:     xyzabc
 2862:     xyzabc\N
 2863:     xyzabc\N\N
 2864:     xyz\N\N    
 2865:     ** Failers 
 2866:     xyz\N 
 2867: 
 2868: /^a?b?/+
 2869:     xyz
 2870:     xyzabc
 2871:     ** Failers 
 2872:     xyzabc\N
 2873:     xyzabc\N\N
 2874:     xyz\N\N    
 2875:     xyz\N 
 2876:     
 2877: /^(?<name>a|b\g<name>c)/
 2878:     aaaa
 2879:     bacxxx
 2880:     bbaccxxx 
 2881:     bbbacccxx
 2882: 
 2883: /^(?<name>a|b\g'name'c)/
 2884:     aaaa
 2885:     bacxxx
 2886:     bbaccxxx 
 2887:     bbbacccxx
 2888: 
 2889: /^(a|b\g<1>c)/
 2890:     aaaa
 2891:     bacxxx
 2892:     bbaccxxx 
 2893:     bbbacccxx
 2894: 
 2895: /^(a|b\g'1'c)/
 2896:     aaaa
 2897:     bacxxx
 2898:     bbaccxxx 
 2899:     bbbacccxx
 2900: 
 2901: /^(a|b\g'-1'c)/
 2902:     aaaa
 2903:     bacxxx
 2904:     bbaccxxx 
 2905:     bbbacccxx
 2906: 
 2907: /(^(a|b\g<-1>c))/
 2908:     aaaa
 2909:     bacxxx
 2910:     bbaccxxx 
 2911:     bbbacccxx
 2912: 
 2913: /(?-i:\g<name>)(?i:(?<name>a))/
 2914:     XaaX
 2915:     XAAX 
 2916: 
 2917: /(?i:\g<name>)(?-i:(?<name>a))/
 2918:     XaaX
 2919:     ** Failers 
 2920:     XAAX 
 2921: 
 2922: /(?-i:\g<+1>)(?i:(a))/
 2923:     XaaX
 2924:     XAAX 
 2925: 
 2926: /(?=(?<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>\})\}))\{/
 2927: 
 2928: /(?<n>a|b|c)\g<n>*/
 2929:    abc
 2930:    accccbbb 
 2931: 
 2932: /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
 2933:     XYabcdY
 2934: 
 2935: /(?<=b(?1)|zzz)(a)/
 2936:     xbaax
 2937:     xzzzax 
 2938: 
 2939: /(a)(?<=b\1)/
 2940: 
 2941: /(a)(?<=b+(?1))/
 2942: 
 2943: /(a+)(?<=b(?1))/
 2944: 
 2945: /(a(?<=b(?1)))/
 2946: 
 2947: /(?<=b(?1))xyz/
 2948: 
 2949: /(?<=b(?1))xyz(b+)pqrstuvew/
 2950: 
 2951: /(a|bc)\1/SI
 2952: 
 2953: /(a|bc)\1{2,3}/SI
 2954: 
 2955: /(a|bc)(?1)/SI
 2956: 
 2957: /(a|b\1)(a|b\1)/SI
 2958: 
 2959: /(a|b\1){2}/SI
 2960: 
 2961: /(a|bbbb\1)(a|bbbb\1)/SI
 2962: 
 2963: /(a|bbbb\1){2}/SI
 2964: 
 2965: /^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
 2966: 
 2967: /  (?: [\040\t] |  \(
 2968: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 2969: \)  )*                          # optional leading comment
 2970: (?:    (?:
 2971: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 2972: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 2973: |
 2974: " (?:                      # opening quote...
 2975: [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 2976: |                     #    or
 2977: \\ [^\x80-\xff]           #   Escaped something (something != CR)
 2978: )* "  # closing quote
 2979: )                    # initial word
 2980: (?:  (?: [\040\t] |  \(
 2981: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 2982: \)  )*  \.  (?: [\040\t] |  \(
 2983: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 2984: \)  )*   (?:
 2985: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 2986: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 2987: |
 2988: " (?:                      # opening quote...
 2989: [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 2990: |                     #    or
 2991: \\ [^\x80-\xff]           #   Escaped something (something != CR)
 2992: )* "  # closing quote
 2993: )  )* # further okay, if led by a period
 2994: (?: [\040\t] |  \(
 2995: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 2996: \)  )*  @  (?: [\040\t] |  \(
 2997: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 2998: \)  )*    (?:
 2999: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3000: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3001: |   \[                         # [
 3002: (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 3003: \]                        #           ]
 3004: )                           # initial subdomain
 3005: (?:                                  #
 3006: (?: [\040\t] |  \(
 3007: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3008: \)  )*  \.                        # if led by a period...
 3009: (?: [\040\t] |  \(
 3010: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3011: \)  )*   (?:
 3012: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3013: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3014: |   \[                         # [
 3015: (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 3016: \]                        #           ]
 3017: )                     #   ...further okay
 3018: )*
 3019: # address
 3020: |                     #  or
 3021: (?:
 3022: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3023: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3024: |
 3025: " (?:                      # opening quote...
 3026: [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 3027: |                     #    or
 3028: \\ [^\x80-\xff]           #   Escaped something (something != CR)
 3029: )* "  # closing quote
 3030: )             # one word, optionally followed by....
 3031: (?:
 3032: [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
 3033: \(
 3034: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3035: \)       |  # comments, or...
 3036: 
 3037: " (?:                      # opening quote...
 3038: [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 3039: |                     #    or
 3040: \\ [^\x80-\xff]           #   Escaped something (something != CR)
 3041: )* "  # closing quote
 3042: # quoted strings
 3043: )*
 3044: <  (?: [\040\t] |  \(
 3045: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3046: \)  )*                     # leading <
 3047: (?:  @  (?: [\040\t] |  \(
 3048: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3049: \)  )*    (?:
 3050: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3051: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3052: |   \[                         # [
 3053: (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 3054: \]                        #           ]
 3055: )                           # initial subdomain
 3056: (?:                                  #
 3057: (?: [\040\t] |  \(
 3058: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3059: \)  )*  \.                        # if led by a period...
 3060: (?: [\040\t] |  \(
 3061: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3062: \)  )*   (?:
 3063: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3064: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3065: |   \[                         # [
 3066: (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 3067: \]                        #           ]
 3068: )                     #   ...further okay
 3069: )*
 3070: 
 3071: (?:  (?: [\040\t] |  \(
 3072: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3073: \)  )*  ,  (?: [\040\t] |  \(
 3074: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3075: \)  )*  @  (?: [\040\t] |  \(
 3076: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3077: \)  )*    (?:
 3078: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3079: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3080: |   \[                         # [
 3081: (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 3082: \]                        #           ]
 3083: )                           # initial subdomain
 3084: (?:                                  #
 3085: (?: [\040\t] |  \(
 3086: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3087: \)  )*  \.                        # if led by a period...
 3088: (?: [\040\t] |  \(
 3089: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3090: \)  )*   (?:
 3091: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3092: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3093: |   \[                         # [
 3094: (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 3095: \]                        #           ]
 3096: )                     #   ...further okay
 3097: )*
 3098: )* # further okay, if led by comma
 3099: :                                # closing colon
 3100: (?: [\040\t] |  \(
 3101: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3102: \)  )*  )? #       optional route
 3103: (?:
 3104: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3105: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3106: |
 3107: " (?:                      # opening quote...
 3108: [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 3109: |                     #    or
 3110: \\ [^\x80-\xff]           #   Escaped something (something != CR)
 3111: )* "  # closing quote
 3112: )                    # initial word
 3113: (?:  (?: [\040\t] |  \(
 3114: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3115: \)  )*  \.  (?: [\040\t] |  \(
 3116: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3117: \)  )*   (?:
 3118: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3119: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3120: |
 3121: " (?:                      # opening quote...
 3122: [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
 3123: |                     #    or
 3124: \\ [^\x80-\xff]           #   Escaped something (something != CR)
 3125: )* "  # closing quote
 3126: )  )* # further okay, if led by a period
 3127: (?: [\040\t] |  \(
 3128: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3129: \)  )*  @  (?: [\040\t] |  \(
 3130: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3131: \)  )*    (?:
 3132: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3133: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3134: |   \[                         # [
 3135: (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 3136: \]                        #           ]
 3137: )                           # initial subdomain
 3138: (?:                                  #
 3139: (?: [\040\t] |  \(
 3140: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3141: \)  )*  \.                        # if led by a period...
 3142: (?: [\040\t] |  \(
 3143: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3144: \)  )*   (?:
 3145: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
 3146: (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
 3147: |   \[                         # [
 3148: (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
 3149: \]                        #           ]
 3150: )                     #   ...further okay
 3151: )*
 3152: #       address spec
 3153: (?: [\040\t] |  \(
 3154: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3155: \)  )*  > #                  trailing >
 3156: # name and address
 3157: )  (?: [\040\t] |  \(
 3158: (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
 3159: \)  )*                       # optional trailing comment
 3160: /xSI
 3161: 
 3162: /<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
 3163: 
 3164: "(?>.*/)foo"SI
 3165: 
 3166: /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /xSI
 3167: 
 3168: /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
 3169: 
 3170: /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
 3171: 
 3172: /<a[\s]+href[\s]*=[\s]*          # find <a href=
 3173:  ([\"\'])?                       # find single or double quote
 3174:  (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
 3175:                                  # quote, otherwise match up to next space
 3176: /isxSI
 3177: 
 3178: /^(?!:)                       # colon disallowed at start
 3179:   (?:                         # start of item
 3180:     (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
 3181:     (?(1)0 | () ) )           # if null previously matched, fail; else null
 3182:     :                         # followed by colon
 3183:   ){1,7}                      # end item; 1-7 of them required               
 3184:   [0-9a-f]{1,4} $             # final hex number at end of string
 3185:   (?(1)|.)                    # check that there was an empty component
 3186:   /xiIS
 3187: 
 3188: /(?|(?<a>A)|(?<a>B))/I
 3189:     AB\Ca
 3190:     BA\Ca
 3191: 
 3192: /(?|(?<a>A)|(?<b>B))/ 
 3193: 
 3194: /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
 3195:     b(?<quote> (?<apostrophe>')|(?<realquote>")) ) 
 3196:     (?('quote')[a-z]+|[0-9]+)/JIx
 3197:     a"aaaaa
 3198:     b"aaaaa 
 3199:     ** Failers 
 3200:     b"11111
 3201:     a"11111 
 3202:     
 3203: /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
 3204:     abcdX
 3205:     eX
 3206:     ** Failers
 3207:     abcdY
 3208:     ey     
 3209:     
 3210: /(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
 3211:     abcdd
 3212:     ** Failers
 3213:     abcdde  
 3214: 
 3215: /abcd*/
 3216:     xxxxabcd\P
 3217:     xxxxabcd\P\P
 3218: 
 3219: /abcd*/i
 3220:     xxxxabcd\P
 3221:     xxxxabcd\P\P
 3222:     XXXXABCD\P
 3223:     XXXXABCD\P\P
 3224: 
 3225: /abc\d*/
 3226:     xxxxabc1\P
 3227:     xxxxabc1\P\P
 3228: 
 3229: /(a)bc\1*/
 3230:     xxxxabca\P
 3231:     xxxxabca\P\P
 3232: 
 3233: /abc[de]*/
 3234:     xxxxabcde\P
 3235:     xxxxabcde\P\P
 3236: 
 3237: /-- This is not in the Perl >= 5.10 test because Perl seems currently to be
 3238:     broken and not behaving as specified in that it *does* bumpalong after
 3239:     hitting (*COMMIT). --/
 3240: 
 3241: /(?1)(A(*COMMIT)|B)D/
 3242:     ABD
 3243:     XABD
 3244:     BAD
 3245:     ABXABD  
 3246:     ** Failers 
 3247:     ABX 
 3248:     BAXBAD  
 3249: 
 3250: /(\3)(\1)(a)/<JS>
 3251:     cat
 3252: 
 3253: /(\3)(\1)(a)/SI<JS>
 3254:     cat
 3255: 
 3256: /(\3)(\1)(a)/SI
 3257:     cat
 3258: 
 3259: /i(?(DEFINE)(?<s>a))/SI
 3260:     i
 3261:     
 3262: /()i(?(1)a)/SI 
 3263:     ia
 3264: 
 3265: /(?i)a(?-i)b|c/BZ
 3266:     XabX
 3267:     XAbX
 3268:     CcC 
 3269:     ** Failers
 3270:     XABX   
 3271: 
 3272: /(?i)a(?s)b|c/BZ
 3273: 
 3274: /(?i)a(?s-i)b|c/BZ
 3275: 
 3276: /^(ab(c\1)d|x){2}$/BZ
 3277:     xabcxd
 3278:     
 3279: /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
 3280: 
 3281: /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
 3282: 
 3283: / -- The first four of these are not in the Perl >= 5.10 test because Perl 
 3284:      documents that the use of \K in assertions is "not well defined". The
 3285:      last is here because Perl gives the match as "b" rather than "ab". I
 3286:      believe this to be a Perl bug. --/  
 3287:       
 3288: /(?=a\Kb)ab/
 3289:     ab 
 3290: 
 3291: /(?!a\Kb)ac/
 3292:     ac 
 3293:     
 3294: /^abc(?<=b\Kc)d/
 3295:     abcd
 3296: 
 3297: /^abc(?<!b\Kq)d/
 3298:     abcd
 3299: 
 3300: /(?>a\Kb)z|(ab)/
 3301:     ab 
 3302: 
 3303: /----------------------/
 3304: 
 3305: /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
 3306: 
 3307: /abc(*MARK:)pqr/
 3308: 
 3309: /abc(*:)pqr/
 3310: 
 3311: /abc(*FAIL:123)xyz/
 3312: 
 3313: /--- This should, and does, fail. In Perl, it does not, which I think is a 
 3314:      bug because replacing the B in the pattern by (B|D) does make it fail. ---/
 3315: 
 3316: /A(*COMMIT)B/+K
 3317:     ACABX
 3318: 
 3319: /--- These should be different, but in Perl 5.11 are not, which I think
 3320:      is a bug in Perl. ---/
 3321: 
 3322: /A(*THEN)B|A(*THEN)C/K
 3323:     AC
 3324: 
 3325: /A(*PRUNE)B|A(*PRUNE)C/K
 3326:     AC
 3327:     
 3328: /--- This should fail; the SKIP advances by one, but when we get to AC, the
 3329:      PRUNE kills it. Perl behaves differently. ---/ 
 3330:     
 3331: /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
 3332:     AAAC
 3333: 
 3334: /--- Mark names can be duplicated. Perl doesn't give a mark for this one,
 3335: though PCRE does. ---/
 3336: 
 3337: /^A(*:A)B|^X(*:A)Y/K
 3338:     ** Failers
 3339:     XAQQ
 3340:     
 3341: /--- COMMIT at the start of a pattern should be the same as an anchor. Perl 
 3342: optimizations defeat this. So does the PCRE optimization unless we disable it 
 3343: with \Y. ---/
 3344: 
 3345: /(*COMMIT)ABC/
 3346:     ABCDEFG
 3347:     ** Failers
 3348:     DEFGABC\Y  
 3349:     
 3350: /^(ab (c+(*THEN)cd) | xyz)/x
 3351:     abcccd  
 3352: 
 3353: /^(ab (c+(*PRUNE)cd) | xyz)/x
 3354:     abcccd  
 3355: 
 3356: /^(ab (c+(*FAIL)cd) | xyz)/x
 3357:     abcccd  
 3358:     
 3359: /--- Perl 5.11 gets some of these wrong ---/ 
 3360: 
 3361: /(?>.(*ACCEPT))*?5/
 3362:     abcde
 3363: 
 3364: /(.(*ACCEPT))*?5/
 3365:     abcde
 3366: 
 3367: /(.(*ACCEPT))5/
 3368:     abcde
 3369: 
 3370: /(.(*ACCEPT))*5/
 3371:     abcde
 3372: 
 3373: /A\NB./BZ
 3374:     ACBD
 3375:     *** Failers
 3376:     A\nB
 3377:     ACB\n   
 3378: 
 3379: /A\NB./sBZ
 3380:     ACBD
 3381:     ACB\n 
 3382:     *** Failers
 3383:     A\nB  
 3384:   
 3385: /A\NB/<crlf>
 3386:     A\nB
 3387:     A\rB
 3388:     ** Failers
 3389:     A\r\nB    
 3390: 
 3391: /\R+b/BZ
 3392: 
 3393: /\R+\n/BZ
 3394: 
 3395: /\R+\d/BZ
 3396: 
 3397: /\d*\R/BZ
 3398: 
 3399: /\s*\R/BZ
 3400: 
 3401: /-- Perl treats this one differently, not failing the second string. I believe
 3402:     that is a bug in Perl. --/
 3403: 
 3404: /^((abc|abcx)(*THEN)y|abcd)/
 3405:     abcd
 3406:     *** Failers 
 3407:     abcxy 
 3408: 
 3409: /(?<=abc)def/
 3410:     abc\P\P
 3411: 
 3412: /abc$/
 3413:     abc
 3414:     abc\P
 3415:     abc\P\P
 3416: 
 3417: /abc$/m
 3418:     abc
 3419:     abc\n
 3420:     abc\P\P
 3421:     abc\n\P\P 
 3422:     abc\P
 3423:     abc\n\P
 3424: 
 3425: /abc\z/
 3426:     abc
 3427:     abc\P
 3428:     abc\P\P
 3429: 
 3430: /abc\Z/
 3431:     abc
 3432:     abc\P
 3433:     abc\P\P
 3434: 
 3435: /abc\b/
 3436:     abc
 3437:     abc\P
 3438:     abc\P\P
 3439: 
 3440: /abc\B/
 3441:     abc
 3442:     abc\P
 3443:     abc\P\P
 3444: 
 3445: /.+/
 3446:     abc\>0
 3447:     abc\>1
 3448:     abc\>2
 3449:     abc\>3
 3450:     abc\>4
 3451:     abc\>-4 
 3452: 
 3453: /^\cģ/
 3454: 
 3455: /(?P<abn>(?P=abn)xxx)/BZ
 3456: 
 3457: /(a\1z)/BZ
 3458: 
 3459: /(?P<abn>(?P=abn)(?<badstufxxx)/BZ
 3460: 
 3461: /(?P<abn>(?P=axn)xxx)/BZ
 3462: 
 3463: /(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
 3464: 
 3465: /-- These tests are here because Perl gets the first one wrong. --/
 3466: 
 3467: /(\R*)(.)/s
 3468:     \r\n
 3469:     \r\r\n\n\r 
 3470:     \r\r\n\n\r\n 
 3471: 
 3472: /(\R)*(.)/s
 3473:     \r\n
 3474:     \r\r\n\n\r 
 3475:     \r\r\n\n\r\n 
 3476: 
 3477: /((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
 3478:     \r\n
 3479:     \r\r\n\n\r 
 3480:     \r\r\n\n\r\n 
 3481: 
 3482: /-- --/
 3483: 
 3484: /^abc$/BZ
 3485: 
 3486: /^abc$/BZm
 3487: 
 3488: /^(a)*+(\w)/S
 3489:     aaaaX
 3490:     ** Failers 
 3491:     aaaa
 3492: 
 3493: /^(?:a)*+(\w)/S
 3494:     aaaaX
 3495:     ** Failers 
 3496:     aaaa
 3497: 
 3498: /(a)++1234/SDZ
 3499: 
 3500: /([abc])++1234/SI
 3501: 
 3502: /(?<=(abc)+)X/
 3503: 
 3504: /(^ab)/I
 3505: 
 3506: /(^ab)++/I
 3507: 
 3508: /(^ab|^)+/I
 3509: 
 3510: /(^ab|^)++/I
 3511: 
 3512: /(?:^ab)/I
 3513: 
 3514: /(?:^ab)++/I
 3515: 
 3516: /(?:^ab|^)+/I
 3517: 
 3518: /(?:^ab|^)++/I
 3519: 
 3520: /(.*ab)/I
 3521: 
 3522: /(.*ab)++/I
 3523: 
 3524: /(.*ab|.*)+/I
 3525: 
 3526: /(.*ab|.*)++/I
 3527: 
 3528: /(?:.*ab)/I
 3529: 
 3530: /(?:.*ab)++/I
 3531: 
 3532: /(?:.*ab|.*)+/I
 3533: 
 3534: /(?:.*ab|.*)++/I
 3535: 
 3536: /(?=a)[bcd]/I
 3537: 
 3538: /((?=a))[bcd]/I
 3539: 
 3540: /((?=a))+[bcd]/I
 3541: 
 3542: /((?=a))++[bcd]/I
 3543: 
 3544: /(?=a+)[bcd]/iI
 3545: 
 3546: /(?=a+?)[bcd]/iI
 3547: 
 3548: /(?=a++)[bcd]/iI
 3549: 
 3550: /(?=a{3})[bcd]/iI
 3551: 
 3552: /(abc)\1+/S
 3553: 
 3554: /-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
 3555: 
 3556: /(?1)(?:(b(*ACCEPT))){0}/
 3557:     b
 3558: 
 3559: /(?1)(?:(b(*ACCEPT))){0}c/
 3560:     bc
 3561:     ** Failers 
 3562:     b 
 3563: 
 3564: /(?1)(?:((*ACCEPT))){0}c/
 3565:     c
 3566:     c\N 
 3567: 
 3568: /^.*?(?(?=a)a|b(*THEN)c)/
 3569:     ba
 3570: 
 3571: /^.*?(?(?=a)a|bc)/
 3572:     ba
 3573: 
 3574: /^.*?(?(?=a)a(*THEN)b|c)/
 3575:     ac
 3576: 
 3577: /^.*?(?(?=a)a(*THEN)b)c/
 3578:     ac
 3579: 
 3580: /^.*?(a(*THEN)b)c/
 3581:     aabc
 3582:     
 3583: /^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
 3584:     aabc
 3585: 
 3586: /^.*?(a(*THEN)b|z)c/
 3587:     aabc
 3588: 
 3589: /^.*?(z|a(*THEN)b)c/
 3590:     aabc
 3591: 
 3592: /-- --/
 3593: 
 3594: /-- These studied versions are here because they are not Perl-compatible; the
 3595:     studying means the mark is not seen. --/
 3596: 
 3597: /(*MARK:A)(*SKIP:B)(C|X)/KS
 3598:     C
 3599:     D
 3600:      
 3601: /(*:A)A+(*SKIP:A)(B|Z)/KS
 3602:     AAAC
 3603: 
 3604: /-- --/
 3605: 
 3606: "(?=a*(*ACCEPT)b)c"
 3607:     c
 3608:     c\N 
 3609:     
 3610: /(?1)c(?(DEFINE)((*ACCEPT)b))/
 3611:     c
 3612:     c\N  
 3613:     
 3614: /(?>(*ACCEPT)b)c/
 3615:     c
 3616:     c\N  
 3617: 
 3618: /(?:(?>(a)))+a%/++
 3619:     %aa%
 3620: 
 3621: /(a)b|ac/++SS
 3622:     ac\O3
 3623:     
 3624: /(a)(b)x|abc/++
 3625:      abc\O6
 3626: 
 3627: /(a)bc|(a)(b)\2/
 3628:     \O3abc
 3629:     \O4abc 
 3630: 
 3631: /(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
 3632: 
 3633: /(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
 3634: 
 3635: /(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
 3636: 
 3637: /(abc)(?1)/SI
 3638: 
 3639: /^(?>a)++/
 3640:     aa\M
 3641:     aaaaaaaaa\M 
 3642:     
 3643: /(a)(?1)++/
 3644:     aa\M
 3645:     aaaaaaaaa\M  
 3646: 
 3647: /(?:(foo)|(bar)|(baz))X/SS=
 3648:     bazfooX
 3649:     foobazbarX
 3650:     barfooX
 3651:     bazX
 3652:     foobarbazX    
 3653:     bazfooX\O0
 3654:     bazfooX\O2
 3655:     bazfooX\O4
 3656:     bazfooX\O6
 3657:     bazfooX\O8
 3658:     bazfooX\O10
 3659: 
 3660: /(?=abc){3}abc/BZ
 3661: 
 3662: /(?=abc)+abc/BZ
 3663: 
 3664: /(?=abc)++abc/BZ
 3665: 
 3666: /(?=abc){0}xyz/BZ
 3667: 
 3668: /(?=(a))?./BZ
 3669: 
 3670: /(?=(a))??./BZ
 3671: 
 3672: /^(?=(a)){0}b(?1)/BZ
 3673: 
 3674: /(?(DEFINE)(a))?b(?1)/BZ
 3675: 
 3676: /^(?=(?1))?[az]([abc])d/BZ
 3677: 
 3678: /^(?!a){0}\w+/BZ
 3679: 
 3680: /(?<=(abc))?xyz/BZ
 3681: 
 3682: /[:a[:abc]b:]/BZ
 3683: 
 3684: /((?2))((?1))/SS
 3685:     abc
 3686: 
 3687: /((?(R2)a+|(?1)b))/SS
 3688:     aaaabcde
 3689: 
 3690: /(?(R)a*(?1)|((?R))b)/SS
 3691:     aaaabcde
 3692: 
 3693: /(a+|(?R)b)/
 3694: 
 3695: /^(a(*:A)(d|e(*:B))z|aeq)/C
 3696:     adz
 3697:     aez
 3698:     aeqwerty
 3699: 
 3700: /.(*F)/
 3701:     \P\Pabc
 3702: 
 3703: /\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
 3704: 
 3705: /\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
 3706: 
 3707: /a(*SKIP)c|b(*ACCEPT)|/+SI
 3708:     a
 3709: 
 3710: /a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
 3711:     ax
 3712: 
 3713: 'a*(*ACCEPT)b'+
 3714:     \N\N
 3715:     abc\N\N
 3716:     bbb\N\N 
 3717: 
 3718: /(*ACCEPT)a/+I
 3719:     bax
 3720: 
 3721: /z(*ACCEPT)a/+I
 3722:     baxzbx
 3723: 
 3724: /a(?:.)*?a/ims                                                                  
 3725:     \Mabbbbbbbbbbbbbbbbbbbbba
 3726:     
 3727: /a(?:.(*THEN))*?a/ims
 3728:     \Mabbbbbbbbbbbbbbbbbbbbba
 3729: 
 3730: /a(?:.(*THEN:ABC))*?a/ims
 3731:     \Mabbbbbbbbbbbbbbbbbbbbba
 3732: 
 3733: /-- These tests are in agreement with development Perl 5.015, which has fixed
 3734:     some things, but they don't all work with 5.012, so they aren't in the
 3735:     Perl-compatible tests. Those after the first come from Perl's own test
 3736:     files. --/
 3737:     
 3738: /^((yes|no)(*THEN)(*F))?/
 3739:   yes
 3740: 
 3741: /(A (.*)   C? (*THEN)  | A D) (*FAIL)/x
 3742: AbcdCBefgBhiBqz
 3743: 
 3744: /(A (.*)   C? (*THEN)  | A D) z/x
 3745: AbcdCBefgBhiBqz
 3746: 
 3747: /(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x
 3748: AbcdCBefgBhiBqz
 3749: 
 3750: /(A (.*)   C? (*THEN)  | A D) \s* z/x
 3751: AbcdCBefgBhiBqz
 3752: 
 3753: /(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x
 3754: AbcdCBefgBhiBqz
 3755: 
 3756: /(A (.*)   (?:C|) (*THEN)  | A D) z/x
 3757: AbcdCBefgBhiBqz
 3758: 
 3759: /(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x
 3760: AbcdCBefgBhiBqz
 3761: 
 3762: /(A (.*)   C{0,6} (*THEN)  | A D) z/x
 3763: AbcdCBefgBhiBqz
 3764: 
 3765: /(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x
 3766: AbcdCEBefgBhiBqz
 3767: 
 3768: /(A (.*)   (CE){0,6} (*THEN)  | A D) z/x
 3769: AbcdCEBefgBhiBqz
 3770: 
 3771: /(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x
 3772: AbcdCBefgBhiBqz
 3773: 
 3774: /(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x
 3775: AbcdCBefgBhiBqz
 3776: 
 3777: /-----------------------------------------------/  
 3778: 
 3779: /^(?>a+)(?>(z+))\w/BZ
 3780:     aaaazzzzb
 3781:     ** Failers
 3782:     aazz  
 3783: 
 3784: /(.)(\1|a(?2))/
 3785:     bab
 3786:     
 3787: /\1|(.)(?R)\1/
 3788:     cbbbc
 3789:     
 3790: /(.)((?(1)c|a)|a(?2))/
 3791:     baa  
 3792: 
 3793: /(?P<abn>(?P=abn)xxx)/BZ
 3794: 
 3795: /(a\1z)/BZ
 3796: 
 3797: /^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
 3798:      \Maabbccddee
 3799: 
 3800: /^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
 3801:      \Maabbccddee
 3802: 
 3803: /^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
 3804:      \Maabbccddee
 3805: 
 3806: /^a\x41z/<JS>
 3807:     aAz
 3808:     *** Failers
 3809:     ax41z
 3810: 
 3811: /^a[m\x41]z/<JS>
 3812:     aAz
 3813: 
 3814: /^a\x1z/<JS>
 3815:     ax1z
 3816: 
 3817: /^a\u0041z/<JS>
 3818:     aAz
 3819:     *** Failers
 3820:     au0041z
 3821: 
 3822: /^a[m\u0041]z/<JS>
 3823:     aAz
 3824: 
 3825: /^a\u041z/<JS>
 3826:     au041z
 3827:     *** Failers
 3828:     aAz
 3829: 
 3830: /^a\U0041z/<JS>
 3831:     aU0041z
 3832:     *** Failers
 3833:     aAz
 3834: 
 3835: /(?(?=c)c|d)++Y/BZ
 3836: 
 3837: /(?(?=c)c|d)*+Y/BZ
 3838: 
 3839: /a[\NB]c/
 3840:     aNc
 3841:     
 3842: /a[B-\Nc]/ 
 3843: 
 3844: /(a)(?2){0,1999}?(b)/
 3845: 
 3846: /(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
 3847: 
 3848: /--- This test, with something more complicated than individual letters, causes
 3849: different behaviour in Perl. Perhaps it disables some optimization; no tag is
 3850: passed back for the failures, whereas in PCRE there is a tag. ---/
 3851:     
 3852: /(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
 3853:     AABC
 3854:     XXYZ 
 3855:     ** Failers
 3856:     XAQQ  
 3857:     XAQQXZZ  
 3858:     AXQQQ 
 3859:     AXXQQQ 
 3860: 
 3861: /-- Perl doesn't give marks for these, though it does if the alternatives are
 3862: replaced by single letters. --/
 3863:     
 3864: /(b|q)(*:m)f|a(*:n)w/K
 3865:     aw 
 3866:     ** Failers 
 3867:     abc
 3868: 
 3869: /(q|b)(*:m)f|a(*:n)w/K
 3870:     aw 
 3871:     ** Failers 
 3872:     abc
 3873: 
 3874: /-- After a partial match, the behaviour is as for a failure. --/
 3875: 
 3876: /^a(*:X)bcde/K
 3877:    abc\P
 3878: 
 3879: /-- End of testinput2 --/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>