Home | History | Annotate | Download | only in testdata
      1 /-- This set of tests check the DFA matching functionality of pcre_dfa_exec(),
      2     excluding UTF and Unicode property support. The -dfa flag must be used with
      3     pcretest when running it. --/
      4     
      5 < forbid 8W 
      6      
      7 /abc/
      8     abc
      9     
     10 /ab*c/
     11     abc
     12     abbbbc
     13     ac
     14     
     15 /ab+c/
     16     abc
     17     abbbbbbc
     18     *** Failers 
     19     ac
     20     ab
     21     
     22 /a*/O
     23     a
     24     aaaaaaaaaaaaaaaaa
     25     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
     26     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F 
     27     
     28 /(a|abcd|african)/
     29     a
     30     abcd
     31     african
     32     
     33 /^abc/
     34     abcdef
     35     *** Failers
     36     xyzabc
     37     xyz\nabc    
     38     
     39 /^abc/m
     40     abcdef
     41     xyz\nabc    
     42     *** Failers
     43     xyzabc
     44     
     45 /\Aabc/
     46     abcdef
     47     *** Failers
     48     xyzabc
     49     xyz\nabc    
     50     
     51 /\Aabc/m
     52     abcdef
     53     *** Failers
     54     xyzabc
     55     xyz\nabc    
     56     
     57 /\Gabc/
     58     abcdef
     59     xyzabc\>3
     60     *** Failers
     61     xyzabc    
     62     xyzabc\>2 
     63     
     64 /x\dy\Dz/
     65     x9yzz
     66     x0y+z
     67     *** Failers
     68     xyz
     69     xxy0z     
     70     
     71 /x\sy\Sz/
     72     x yzz
     73     x y+z
     74     *** Failers
     75     xyz
     76     xxyyz
     77     
     78 /x\wy\Wz/
     79     xxy+z
     80     *** Failers
     81     xxy0z
     82     x+y+z         
     83     
     84 /x.y/
     85     x+y
     86     x-y
     87     *** Failers
     88     x\ny
     89     
     90 /x.y/s
     91     x+y
     92     x-y
     93     x\ny
     94 
     95 /(a.b(?s)c.d|x.y)p.q/
     96     a+bc+dp+q
     97     a+bc\ndp+q
     98     x\nyp+q 
     99     *** Failers 
    100     a\nbc\ndp+q
    101     a+bc\ndp\nq
    102     x\nyp\nq 
    103 
    104 /a\d\z/
    105     ba0
    106     *** Failers
    107     ba0\n
    108     ba0\ncd   
    109 
    110 /a\d\z/m
    111     ba0
    112     *** Failers
    113     ba0\n
    114     ba0\ncd   
    115 
    116 /a\d\Z/
    117     ba0
    118     ba0\n
    119     *** Failers
    120     ba0\ncd   
    121 
    122 /a\d\Z/m
    123     ba0
    124     ba0\n
    125     *** Failers
    126     ba0\ncd   
    127 
    128 /a\d$/
    129     ba0
    130     ba0\n
    131     *** Failers
    132     ba0\ncd   
    133 
    134 /a\d$/m
    135     ba0
    136     ba0\n
    137     ba0\ncd   
    138     *** Failers
    139 
    140 /abc/i
    141     abc
    142     aBc
    143     ABC
    144     
    145 /[^a]/
    146     abcd
    147     
    148 /ab?\w/
    149     abz
    150     abbz
    151     azz  
    152 
    153 /x{0,3}yz/
    154     ayzq
    155     axyzq
    156     axxyz
    157     axxxyzq
    158     axxxxyzq
    159     *** Failers
    160     ax
    161     axx     
    162       
    163 /x{3}yz/
    164     axxxyzq
    165     axxxxyzq
    166     *** Failers
    167     ax
    168     axx     
    169     ayzq
    170     axyzq
    171     axxyz
    172       
    173 /x{2,3}yz/
    174     axxyz
    175     axxxyzq
    176     axxxxyzq
    177     *** Failers
    178     ax
    179     axx     
    180     ayzq
    181     axyzq
    182       
    183 /[^a]+/O
    184     bac
    185     bcdefax
    186     *** Failers
    187     aaaaa   
    188 
    189 /[^a]*/O
    190     bac
    191     bcdefax
    192     *** Failers
    193     aaaaa   
    194     
    195 /[^a]{3,5}/O
    196     xyz
    197     awxyza
    198     abcdefa
    199     abcdefghijk
    200     *** Failers
    201     axya
    202     axa
    203     aaaaa         
    204 
    205 /\d*/
    206     1234b567
    207     xyz
    208     
    209 /\D*/
    210     a1234b567
    211     xyz
    212      
    213 /\d+/
    214     ab1234c56
    215     *** Failers
    216     xyz
    217     
    218 /\D+/
    219     ab123c56
    220     *** Failers
    221     789
    222     
    223 /\d?A/
    224     045ABC
    225     ABC
    226     *** Failers
    227     XYZ
    228     
    229 /\D?A/
    230     ABC
    231     BAC
    232     9ABC             
    233     *** Failers
    234 
    235 /a+/
    236     aaaa
    237 
    238 /^.*xyz/
    239     xyz
    240     ggggggggxyz
    241     
    242 /^.+xyz/
    243     abcdxyz
    244     axyz
    245     *** Failers
    246     xyz
    247     
    248 /^.?xyz/
    249     xyz
    250     cxyz       
    251 
    252 /^\d{2,3}X/
    253     12X
    254     123X
    255     *** Failers
    256     X
    257     1X
    258     1234X     
    259 
    260 /^[abcd]\d/
    261     a45
    262     b93
    263     c99z
    264     d04
    265     *** Failers
    266     e45
    267     abcd      
    268     abcd1234
    269     1234  
    270 
    271 /^[abcd]*\d/
    272     a45
    273     b93
    274     c99z
    275     d04
    276     abcd1234
    277     1234  
    278     *** Failers
    279     e45
    280     abcd      
    281 
    282 /^[abcd]+\d/
    283     a45
    284     b93
    285     c99z
    286     d04
    287     abcd1234
    288     *** Failers
    289     1234  
    290     e45
    291     abcd      
    292 
    293 /^a+X/
    294     aX
    295     aaX 
    296 
    297 /^[abcd]?\d/
    298     a45
    299     b93
    300     c99z
    301     d04
    302     1234  
    303     *** Failers
    304     abcd1234
    305     e45
    306 
    307 /^[abcd]{2,3}\d/
    308     ab45
    309     bcd93
    310     *** Failers
    311     1234 
    312     a36 
    313     abcd1234
    314     ee45
    315 
    316 /^(abc)*\d/
    317     abc45
    318     abcabcabc45
    319     42xyz 
    320     *** Failers
    321 
    322 /^(abc)+\d/
    323     abc45
    324     abcabcabc45
    325     *** Failers
    326     42xyz 
    327 
    328 /^(abc)?\d/
    329     abc45
    330     42xyz 
    331     *** Failers
    332     abcabcabc45
    333 
    334 /^(abc){2,3}\d/
    335     abcabc45
    336     abcabcabc45
    337     *** Failers
    338     abcabcabcabc45
    339     abc45
    340     42xyz 
    341 
    342 /1(abc|xyz)2(?1)3/
    343     1abc2abc3456
    344     1abc2xyz3456 
    345 
    346 /^(a*\w|ab)=(a*\w|ab)/
    347     ab=ab
    348 
    349 /^(a*\w|ab)=(?1)/
    350     ab=ab
    351 
    352 /^([^()]|\((?1)*\))*$/
    353     abc
    354     a(b)c
    355     a(b(c))d  
    356     *** Failers)
    357     a(b(c)d  
    358 
    359 /^>abc>([^()]|\((?1)*\))*<xyz<$/
    360     >abc>123<xyz<
    361     >abc>1(2)3<xyz<
    362     >abc>(1(2)3)<xyz<
    363 
    364 /^(?>a*)\d/
    365     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
    366     *** Failers 
    367     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    368 
    369 /< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/x
    370     <>
    371     <abcd>
    372     <abc <123> hij>
    373     <abc <def> hij>
    374     <abc<>def> 
    375     <abc<>      
    376     *** Failers
    377     <abc
    378 
    379 /^(?(?=abc)\w{3}:|\d\d)$/        
    380     abc:                          
    381     12                             
    382     *** Failers                     
    383     123                       
    384     xyz                        
    385                                 
    386 /^(?(?!abc)\d\d|\w{3}:)$/      
    387     abc:                        
    388     12         
    389     *** Failers
    390     123
    391     xyz    
    392 
    393 /^(?=abc)\w{5}:$/        
    394     abcde:                          
    395     *** Failers                     
    396     abc.. 
    397     123                       
    398     vwxyz                        
    399                                 
    400 /^(?!abc)\d\d$/      
    401     12         
    402     *** Failers
    403     abcde:
    404     abc..  
    405     123
    406     vwxyz    
    407 
    408 /(?<=abc|xy)123/
    409     abc12345
    410     wxy123z
    411     *** Failers
    412     123abc
    413 
    414 /(?<!abc|xy)123/
    415     123abc
    416     mno123456 
    417     *** Failers
    418     abc12345
    419     wxy123z
    420 
    421 /abc(?C1)xyz/
    422     abcxyz
    423     123abcxyz999 
    424 
    425 /(ab|cd){3,4}/C
    426   ababab
    427   abcdabcd
    428   abcdcdcdcdcd  
    429 
    430 /^abc/
    431     abcdef
    432     *** Failers
    433     abcdef\B  
    434 
    435 /^(a*|xyz)/
    436     bcd
    437     aaabcd
    438     xyz
    439     xyz\N  
    440     *** Failers
    441     bcd\N   
    442     
    443 /xyz$/
    444     xyz
    445     xyz\n
    446     *** Failers
    447     xyz\Z
    448     xyz\n\Z    
    449     
    450 /xyz$/m
    451     xyz
    452     xyz\n 
    453     abcxyz\npqr 
    454     abcxyz\npqr\Z 
    455     xyz\n\Z    
    456     *** Failers
    457     xyz\Z
    458 
    459 /\Gabc/
    460     abcdef
    461     defabcxyz\>3 
    462     *** Failers 
    463     defabcxyz
    464 
    465 /^abcdef/
    466     ab\P
    467     abcde\P
    468     abcdef\P
    469     *** Failers
    470     abx\P    
    471 
    472 /^a{2,4}\d+z/
    473     a\P
    474     aa\P
    475     aa2\P 
    476     aaa\P
    477     aaa23\P 
    478     aaaa12345\P
    479     aa0z\P
    480     aaaa4444444444444z\P 
    481     *** Failers
    482     az\P 
    483     aaaaa\P 
    484     a56\P 
    485 
    486 /^abcdef/
    487    abc\P
    488    def\R 
    489    
    490 /(?<=foo)bar/
    491    xyzfo\P 
    492    foob\P\>2 
    493    foobar...\R\P\>4 
    494    xyzfo\P
    495    foobar\>2  
    496    *** Failers
    497    xyzfo\P
    498    obar\R   
    499 
    500 /(ab*(cd|ef))+X/
    501     adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
    502     lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
    503     cdabbbbbbbb\P\R\B\Z
    504     efabbbbbbbbbbbbbbbb\P\R\B\Z
    505     bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z    
    506 
    507 /(a|b)/SF>testsavedregex
    508 <testsavedregex
    509     abc
    510     ** Failers
    511     def  
    512     
    513 /the quick brown fox/
    514     the quick brown fox
    515     The quick brown FOX
    516     What do you know about the quick brown fox?
    517     What do you know about THE QUICK BROWN FOX?
    518 
    519 /The quick brown fox/i
    520     the quick brown fox
    521     The quick brown FOX
    522     What do you know about the quick brown fox?
    523     What do you know about THE QUICK BROWN FOX?
    524 
    525 /abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
    526     abcd\t\n\r\f\a\e9;\$\\?caxyz
    527 
    528 /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
    529     abxyzpqrrrabbxyyyypqAzz
    530     abxyzpqrrrabbxyyyypqAzz
    531     aabxyzpqrrrabbxyyyypqAzz
    532     aaabxyzpqrrrabbxyyyypqAzz
    533     aaaabxyzpqrrrabbxyyyypqAzz
    534     abcxyzpqrrrabbxyyyypqAzz
    535     aabcxyzpqrrrabbxyyyypqAzz
    536     aaabcxyzpqrrrabbxyyyypAzz
    537     aaabcxyzpqrrrabbxyyyypqAzz
    538     aaabcxyzpqrrrabbxyyyypqqAzz
    539     aaabcxyzpqrrrabbxyyyypqqqAzz
    540     aaabcxyzpqrrrabbxyyyypqqqqAzz
    541     aaabcxyzpqrrrabbxyyyypqqqqqAzz
    542     aaabcxyzpqrrrabbxyyyypqqqqqqAzz
    543     aaaabcxyzpqrrrabbxyyyypqAzz
    544     abxyzzpqrrrabbxyyyypqAzz
    545     aabxyzzzpqrrrabbxyyyypqAzz
    546     aaabxyzzzzpqrrrabbxyyyypqAzz
    547     aaaabxyzzzzpqrrrabbxyyyypqAzz
    548     abcxyzzpqrrrabbxyyyypqAzz
    549     aabcxyzzzpqrrrabbxyyyypqAzz
    550     aaabcxyzzzzpqrrrabbxyyyypqAzz
    551     aaaabcxyzzzzpqrrrabbxyyyypqAzz
    552     aaaabcxyzzzzpqrrrabbbxyyyypqAzz
    553     aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
    554     aaabcxyzpqrrrabbxyyyypABzz
    555     aaabcxyzpqrrrabbxyyyypABBzz
    556     >>>aaabxyzpqrrrabbxyyyypqAzz
    557     >aaaabxyzpqrrrabbxyyyypqAzz
    558     >>>>abcxyzpqrrrabbxyyyypqAzz
    559     *** Failers
    560     abxyzpqrrabbxyyyypqAzz
    561     abxyzpqrrrrabbxyyyypqAzz
    562     abxyzpqrrrabxyyyypqAzz
    563     aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
    564     aaaabcxyzzzzpqrrrabbbxyyypqAzz
    565     aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
    566 
    567 /^(abc){1,2}zz/
    568     abczz
    569     abcabczz
    570     *** Failers
    571     zz
    572     abcabcabczz
    573     >>abczz
    574 
    575 /^(b+?|a){1,2}?c/
    576     bc
    577     bbc
    578     bbbc
    579     bac
    580     bbac
    581     aac
    582     abbbbbbbbbbbc
    583     bbbbbbbbbbbac
    584     *** Failers
    585     aaac
    586     abbbbbbbbbbbac
    587 
    588 /^(b+|a){1,2}c/
    589     bc
    590     bbc
    591     bbbc
    592     bac
    593     bbac
    594     aac
    595     abbbbbbbbbbbc
    596     bbbbbbbbbbbac
    597     *** Failers
    598     aaac
    599     abbbbbbbbbbbac
    600 
    601 /^(b+|a){1,2}?bc/
    602     bbc
    603 
    604 /^(b*|ba){1,2}?bc/
    605     babc
    606     bbabc
    607     bababc
    608     *** Failers
    609     bababbc
    610     babababc
    611 
    612 /^(ba|b*){1,2}?bc/
    613     babc
    614     bbabc
    615     bababc
    616     *** Failers
    617     bababbc
    618     babababc
    619 
    620 /^\ca\cA\c[\c{\c:/
    621     \x01\x01\e;z
    622 
    623 /^[ab\]cde]/
    624     athing
    625     bthing
    626     ]thing
    627     cthing
    628     dthing
    629     ething
    630     *** Failers
    631     fthing
    632     [thing
    633     \\thing
    634 
    635 /^[]cde]/
    636     ]thing
    637     cthing
    638     dthing
    639     ething
    640     *** Failers
    641     athing
    642     fthing
    643 
    644 /^[^ab\]cde]/
    645     fthing
    646     [thing
    647     \\thing
    648     *** Failers
    649     athing
    650     bthing
    651     ]thing
    652     cthing
    653     dthing
    654     ething
    655 
    656 /^[^]cde]/
    657     athing
    658     fthing
    659     *** Failers
    660     ]thing
    661     cthing
    662     dthing
    663     ething
    664 
    665 /^\/
    666     
    667 
    668 /^/
    669     
    670 
    671 /^[0-9]+$/
    672     0
    673     1
    674     2
    675     3
    676     4
    677     5
    678     6
    679     7
    680     8
    681     9
    682     10
    683     100
    684     *** Failers
    685     abc
    686 
    687 /^.*nter/
    688     enter
    689     inter
    690     uponter
    691 
    692 /^xxx[0-9]+$/
    693     xxx0
    694     xxx1234
    695     *** Failers
    696     xxx
    697 
    698 /^.+[0-9][0-9][0-9]$/
    699     x123
    700     xx123
    701     123456
    702     *** Failers
    703     123
    704     x1234
    705 
    706 /^.+?[0-9][0-9][0-9]$/
    707     x123
    708     xx123
    709     123456
    710     *** Failers
    711     123
    712     x1234
    713 
    714 /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
    715     abc!pqr=apquxz.ixr.zzz.ac.uk
    716     *** Failers
    717     !pqr=apquxz.ixr.zzz.ac.uk
    718     abc!=apquxz.ixr.zzz.ac.uk
    719     abc!pqr=apquxz:ixr.zzz.ac.uk
    720     abc!pqr=apquxz.ixr.zzz.ac.ukk
    721 
    722 /:/
    723     Well, we need a colon: somewhere
    724     *** Fail if we don't
    725 
    726 /([\da-f:]+)$/i
    727     0abc
    728     abc
    729     fed
    730     E
    731     ::
    732     5f03:12C0::932e
    733     fed def
    734     Any old stuff
    735     *** Failers
    736     0zzz
    737     gzzz
    738     fed\x20
    739     Any old rubbish
    740 
    741 /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
    742     .1.2.3
    743     A.12.123.0
    744     *** Failers
    745     .1.2.3333
    746     1.2.3
    747     1234.2.3
    748 
    749 /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
    750     1 IN SOA non-sp1 non-sp2(
    751     1    IN    SOA    non-sp1    non-sp2   (
    752     *** Failers
    753     1IN SOA non-sp1 non-sp2(
    754 
    755 /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
    756     a.
    757     Z.
    758     2.
    759     ab-c.pq-r.
    760     sxk.zzz.ac.uk.
    761     x-.y-.
    762     *** Failers
    763     -abc.peq.
    764 
    765 /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
    766     *.a
    767     *.b0-a
    768     *.c3-b.c
    769     *.c-a.b-c
    770     *** Failers
    771     *.0
    772     *.a-
    773     *.a-b.c-
    774     *.c-a.0-c
    775 
    776 /^(?=ab(de))(abd)(e)/
    777     abde
    778 
    779 /^(?!(ab)de|x)(abd)(f)/
    780     abdf
    781 
    782 /^(?=(ab(cd)))(ab)/
    783     abcd
    784 
    785 /^[\da-f](\.[\da-f])*$/i
    786     a.b.c.d
    787     A.B.C.D
    788     a.b.c.1.2.3.C
    789 
    790 /^\".*\"\s*(;.*)?$/
    791     \"1234\"
    792     \"abcd\" ;
    793     \"\" ; rhubarb
    794     *** Failers
    795     \"1234\" : things
    796 
    797 /^$/
    798     \
    799     *** Failers
    800 
    801 /   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/x
    802     ab c
    803     *** Failers
    804     abc
    805     ab cde
    806 
    807 /(?x)   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/
    808     ab c
    809     *** Failers
    810     abc
    811     ab cde
    812 
    813 /^   a\ b[c ]d       $/x
    814     a bcd
    815     a b d
    816     *** Failers
    817     abcd
    818     ab d
    819 
    820 /^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
    821     abcdefhijklm
    822 
    823 /^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
    824     abcdefhijklm
    825 
    826 /^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
    827     a+ Z0+\x08\n\x1d\x12
    828 
    829 /^[.^$|()*+?{,}]+/
    830     .^\$(*+)|{?,?}
    831 
    832 /^a*\w/
    833     z
    834     az
    835     aaaz
    836     a
    837     aa
    838     aaaa
    839     a+
    840     aa+
    841 
    842 /^a*?\w/
    843     z
    844     az
    845     aaaz
    846     a
    847     aa
    848     aaaa
    849     a+
    850     aa+
    851 
    852 /^a+\w/
    853     az
    854     aaaz
    855     aa
    856     aaaa
    857     aa+
    858 
    859 /^a+?\w/
    860     az
    861     aaaz
    862     aa
    863     aaaa
    864     aa+
    865 
    866 /^\d{8}\w{2,}/
    867     1234567890
    868     12345678ab
    869     12345678__
    870     *** Failers
    871     1234567
    872 
    873 /^[aeiou\d]{4,5}$/
    874     uoie
    875     1234
    876     12345
    877     aaaaa
    878     *** Failers
    879     123456
    880 
    881 /^[aeiou\d]{4,5}?/
    882     uoie
    883     1234
    884     12345
    885     aaaaa
    886     123456
    887 
    888 /^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]/
    889     From abcd  Mon Sep 01 12:33:02 1997
    890 
    891 /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
    892     From abcd  Mon Sep 01 12:33:02 1997
    893     From abcd  Mon Sep  1 12:33:02 1997
    894     *** Failers
    895     From abcd  Sep 01 12:33:02 1997
    896 
    897 /^12.34/s
    898     12\n34
    899     12\r34
    900 
    901 /\w+(?=\t)/
    902     the quick brown\t fox
    903 
    904 /foo(?!bar)(.*)/
    905     foobar is foolish see?
    906 
    907 /(?:(?!foo)...|^.{0,2})bar(.*)/
    908     foobar crowbar etc
    909     barrel
    910     2barrel
    911     A barrel
    912 
    913 /^(\D*)(?=\d)(?!123)/
    914     abc456
    915     *** Failers
    916     abc123
    917 
    918 /^1234(?# test newlines
    919   inside)/
    920     1234
    921 
    922 /^1234 #comment in extended re
    923   /x
    924     1234
    925 
    926 /#rhubarb
    927   abcd/x
    928     abcd
    929 
    930 /^abcd#rhubarb/x
    931     abcd
    932 
    933 /(?!^)abc/
    934     the abc
    935     *** Failers
    936     abc
    937 
    938 /(?=^)abc/
    939     abc
    940     *** Failers
    941     the abc
    942 
    943 /^[ab]{1,3}(ab*|b)/O
    944     aabbbbb
    945 
    946 /^[ab]{1,3}?(ab*|b)/O
    947     aabbbbb
    948 
    949 /^[ab]{1,3}?(ab*?|b)/O
    950     aabbbbb
    951 
    952 /^[ab]{1,3}(ab*?|b)/O
    953     aabbbbb
    954 
    955 /  (?: [\040\t] |  \(
    956 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    957 \)  )*                          # optional leading comment
    958 (?:    (?:
    959 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
    960 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
    961 |
    962 " (?:                      # opening quote...
    963 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
    964 |                     #    or
    965 \\ [^\x80-\xff]           #   Escaped something (something != CR)
    966 )* "  # closing quote
    967 )                    # initial word
    968 (?:  (?: [\040\t] |  \(
    969 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    970 \)  )*  \.  (?: [\040\t] |  \(
    971 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    972 \)  )*   (?:
    973 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
    974 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
    975 |
    976 " (?:                      # opening quote...
    977 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
    978 |                     #    or
    979 \\ [^\x80-\xff]           #   Escaped something (something != CR)
    980 )* "  # closing quote
    981 )  )* # further okay, if led by a period
    982 (?: [\040\t] |  \(
    983 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    984 \)  )*  @  (?: [\040\t] |  \(
    985 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    986 \)  )*    (?:
    987 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
    988 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
    989 |   \[                         # [
    990 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
    991 \]                        #           ]
    992 )                           # initial subdomain
    993 (?:                                  #
    994 (?: [\040\t] |  \(
    995 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    996 \)  )*  \.                        # if led by a period...
    997 (?: [\040\t] |  \(
    998 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    999 \)  )*   (?:
   1000 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1001 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1002 |   \[                         # [
   1003 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1004 \]                        #           ]
   1005 )                     #   ...further okay
   1006 )*
   1007 # address
   1008 |                     #  or
   1009 (?:
   1010 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1011 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1012 |
   1013 " (?:                      # opening quote...
   1014 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
   1015 |                     #    or
   1016 \\ [^\x80-\xff]           #   Escaped something (something != CR)
   1017 )* "  # closing quote
   1018 )             # one word, optionally followed by....
   1019 (?:
   1020 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
   1021 \(
   1022 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1023 \)       |  # comments, or...
   1024 
   1025 " (?:                      # opening quote...
   1026 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
   1027 |                     #    or
   1028 \\ [^\x80-\xff]           #   Escaped something (something != CR)
   1029 )* "  # closing quote
   1030 # quoted strings
   1031 )*
   1032 <  (?: [\040\t] |  \(
   1033 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1034 \)  )*                     # leading <
   1035 (?:  @  (?: [\040\t] |  \(
   1036 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1037 \)  )*    (?:
   1038 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1039 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1040 |   \[                         # [
   1041 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1042 \]                        #           ]
   1043 )                           # initial subdomain
   1044 (?:                                  #
   1045 (?: [\040\t] |  \(
   1046 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1047 \)  )*  \.                        # if led by a period...
   1048 (?: [\040\t] |  \(
   1049 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1050 \)  )*   (?:
   1051 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1052 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1053 |   \[                         # [
   1054 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1055 \]                        #           ]
   1056 )                     #   ...further okay
   1057 )*
   1058 
   1059 (?:  (?: [\040\t] |  \(
   1060 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1061 \)  )*  ,  (?: [\040\t] |  \(
   1062 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1063 \)  )*  @  (?: [\040\t] |  \(
   1064 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1065 \)  )*    (?:
   1066 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1067 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1068 |   \[                         # [
   1069 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1070 \]                        #           ]
   1071 )                           # initial subdomain
   1072 (?:                                  #
   1073 (?: [\040\t] |  \(
   1074 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1075 \)  )*  \.                        # if led by a period...
   1076 (?: [\040\t] |  \(
   1077 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1078 \)  )*   (?:
   1079 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1080 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1081 |   \[                         # [
   1082 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1083 \]                        #           ]
   1084 )                     #   ...further okay
   1085 )*
   1086 )* # further okay, if led by comma
   1087 :                                # closing colon
   1088 (?: [\040\t] |  \(
   1089 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1090 \)  )*  )? #       optional route
   1091 (?:
   1092 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1093 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1094 |
   1095 " (?:                      # opening quote...
   1096 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
   1097 |                     #    or
   1098 \\ [^\x80-\xff]           #   Escaped something (something != CR)
   1099 )* "  # closing quote
   1100 )                    # initial word
   1101 (?:  (?: [\040\t] |  \(
   1102 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1103 \)  )*  \.  (?: [\040\t] |  \(
   1104 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1105 \)  )*   (?:
   1106 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1107 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1108 |
   1109 " (?:                      # opening quote...
   1110 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
   1111 |                     #    or
   1112 \\ [^\x80-\xff]           #   Escaped something (something != CR)
   1113 )* "  # closing quote
   1114 )  )* # further okay, if led by a period
   1115 (?: [\040\t] |  \(
   1116 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1117 \)  )*  @  (?: [\040\t] |  \(
   1118 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1119 \)  )*    (?:
   1120 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1121 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1122 |   \[                         # [
   1123 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1124 \]                        #           ]
   1125 )                           # initial subdomain
   1126 (?:                                  #
   1127 (?: [\040\t] |  \(
   1128 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1129 \)  )*  \.                        # if led by a period...
   1130 (?: [\040\t] |  \(
   1131 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1132 \)  )*   (?:
   1133 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1134 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1135 |   \[                         # [
   1136 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1137 \]                        #           ]
   1138 )                     #   ...further okay
   1139 )*
   1140 #       address spec
   1141 (?: [\040\t] |  \(
   1142 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1143 \)  )*  > #                  trailing >
   1144 # name and address
   1145 )  (?: [\040\t] |  \(
   1146 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1147 \)  )*                       # optional trailing comment
   1148 /x
   1149     Alan Other <user\@dom.ain>
   1150     <user\@dom.ain>
   1151     user\@dom.ain
   1152     \"A. Other\" <user.1234\@dom.ain> (a comment)
   1153     A. Other <user.1234\@dom.ain> (a comment)
   1154     \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
   1155     A missing angle <user\@some.where
   1156     *** Failers
   1157     The quick brown fox
   1158 
   1159 /[\040\t]*                    # Nab whitespace.
   1160 (?:
   1161 \(                              #  (
   1162 [^\\\x80-\xff\n\015()] *                             #     normal*
   1163 (?:                                 #       (
   1164 (?:  \\ [^\x80-\xff]  |
   1165 \(                            #  (
   1166 [^\\\x80-\xff\n\015()] *                            #     normal*
   1167 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1168 \)                           #                       )
   1169 )    #         special
   1170 [^\\\x80-\xff\n\015()] *                         #         normal*
   1171 )*                                  #            )*
   1172 \)                             #                )
   1173 [\040\t]* )*    # If comment found, allow more spaces.
   1174 # optional leading comment
   1175 (?:
   1176 (?:
   1177 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1178 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1179 # Atom
   1180 |                       #  or
   1181 "                                     # "
   1182 [^\\\x80-\xff\n\015"] *                            #   normal
   1183 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1184 "                                     #        "
   1185 # Quoted string
   1186 )
   1187 [\040\t]*                    # Nab whitespace.
   1188 (?:
   1189 \(                              #  (
   1190 [^\\\x80-\xff\n\015()] *                             #     normal*
   1191 (?:                                 #       (
   1192 (?:  \\ [^\x80-\xff]  |
   1193 \(                            #  (
   1194 [^\\\x80-\xff\n\015()] *                            #     normal*
   1195 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1196 \)                           #                       )
   1197 )    #         special
   1198 [^\\\x80-\xff\n\015()] *                         #         normal*
   1199 )*                                  #            )*
   1200 \)                             #                )
   1201 [\040\t]* )*    # If comment found, allow more spaces.
   1202 (?:
   1203 \.
   1204 [\040\t]*                    # Nab whitespace.
   1205 (?:
   1206 \(                              #  (
   1207 [^\\\x80-\xff\n\015()] *                             #     normal*
   1208 (?:                                 #       (
   1209 (?:  \\ [^\x80-\xff]  |
   1210 \(                            #  (
   1211 [^\\\x80-\xff\n\015()] *                            #     normal*
   1212 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1213 \)                           #                       )
   1214 )    #         special
   1215 [^\\\x80-\xff\n\015()] *                         #         normal*
   1216 )*                                  #            )*
   1217 \)                             #                )
   1218 [\040\t]* )*    # If comment found, allow more spaces.
   1219 (?:
   1220 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1221 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1222 # Atom
   1223 |                       #  or
   1224 "                                     # "
   1225 [^\\\x80-\xff\n\015"] *                            #   normal
   1226 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1227 "                                     #        "
   1228 # Quoted string
   1229 )
   1230 [\040\t]*                    # Nab whitespace.
   1231 (?:
   1232 \(                              #  (
   1233 [^\\\x80-\xff\n\015()] *                             #     normal*
   1234 (?:                                 #       (
   1235 (?:  \\ [^\x80-\xff]  |
   1236 \(                            #  (
   1237 [^\\\x80-\xff\n\015()] *                            #     normal*
   1238 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1239 \)                           #                       )
   1240 )    #         special
   1241 [^\\\x80-\xff\n\015()] *                         #         normal*
   1242 )*                                  #            )*
   1243 \)                             #                )
   1244 [\040\t]* )*    # If comment found, allow more spaces.
   1245 # additional words
   1246 )*
   1247 @
   1248 [\040\t]*                    # Nab whitespace.
   1249 (?:
   1250 \(                              #  (
   1251 [^\\\x80-\xff\n\015()] *                             #     normal*
   1252 (?:                                 #       (
   1253 (?:  \\ [^\x80-\xff]  |
   1254 \(                            #  (
   1255 [^\\\x80-\xff\n\015()] *                            #     normal*
   1256 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1257 \)                           #                       )
   1258 )    #         special
   1259 [^\\\x80-\xff\n\015()] *                         #         normal*
   1260 )*                                  #            )*
   1261 \)                             #                )
   1262 [\040\t]* )*    # If comment found, allow more spaces.
   1263 (?:
   1264 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1265 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1266 |
   1267 \[                            # [
   1268 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1269 \]                           #           ]
   1270 )
   1271 [\040\t]*                    # Nab whitespace.
   1272 (?:
   1273 \(                              #  (
   1274 [^\\\x80-\xff\n\015()] *                             #     normal*
   1275 (?:                                 #       (
   1276 (?:  \\ [^\x80-\xff]  |
   1277 \(                            #  (
   1278 [^\\\x80-\xff\n\015()] *                            #     normal*
   1279 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1280 \)                           #                       )
   1281 )    #         special
   1282 [^\\\x80-\xff\n\015()] *                         #         normal*
   1283 )*                                  #            )*
   1284 \)                             #                )
   1285 [\040\t]* )*    # If comment found, allow more spaces.
   1286 # optional trailing comments
   1287 (?:
   1288 \.
   1289 [\040\t]*                    # Nab whitespace.
   1290 (?:
   1291 \(                              #  (
   1292 [^\\\x80-\xff\n\015()] *                             #     normal*
   1293 (?:                                 #       (
   1294 (?:  \\ [^\x80-\xff]  |
   1295 \(                            #  (
   1296 [^\\\x80-\xff\n\015()] *                            #     normal*
   1297 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1298 \)                           #                       )
   1299 )    #         special
   1300 [^\\\x80-\xff\n\015()] *                         #         normal*
   1301 )*                                  #            )*
   1302 \)                             #                )
   1303 [\040\t]* )*    # If comment found, allow more spaces.
   1304 (?:
   1305 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1306 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1307 |
   1308 \[                            # [
   1309 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1310 \]                           #           ]
   1311 )
   1312 [\040\t]*                    # Nab whitespace.
   1313 (?:
   1314 \(                              #  (
   1315 [^\\\x80-\xff\n\015()] *                             #     normal*
   1316 (?:                                 #       (
   1317 (?:  \\ [^\x80-\xff]  |
   1318 \(                            #  (
   1319 [^\\\x80-\xff\n\015()] *                            #     normal*
   1320 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1321 \)                           #                       )
   1322 )    #         special
   1323 [^\\\x80-\xff\n\015()] *                         #         normal*
   1324 )*                                  #            )*
   1325 \)                             #                )
   1326 [\040\t]* )*    # If comment found, allow more spaces.
   1327 # optional trailing comments
   1328 )*
   1329 # address
   1330 |                             #  or
   1331 (?:
   1332 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1333 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1334 # Atom
   1335 |                       #  or
   1336 "                                     # "
   1337 [^\\\x80-\xff\n\015"] *                            #   normal
   1338 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1339 "                                     #        "
   1340 # Quoted string
   1341 )
   1342 # leading word
   1343 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *               # "normal" atoms and or spaces
   1344 (?:
   1345 (?:
   1346 \(                              #  (
   1347 [^\\\x80-\xff\n\015()] *                             #     normal*
   1348 (?:                                 #       (
   1349 (?:  \\ [^\x80-\xff]  |
   1350 \(                            #  (
   1351 [^\\\x80-\xff\n\015()] *                            #     normal*
   1352 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1353 \)                           #                       )
   1354 )    #         special
   1355 [^\\\x80-\xff\n\015()] *                         #         normal*
   1356 )*                                  #            )*
   1357 \)                             #                )
   1358 |
   1359 "                                     # "
   1360 [^\\\x80-\xff\n\015"] *                            #   normal
   1361 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1362 "                                     #        "
   1363 ) # "special" comment or quoted string
   1364 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *            #  more "normal"
   1365 )*
   1366 <
   1367 [\040\t]*                    # Nab whitespace.
   1368 (?:
   1369 \(                              #  (
   1370 [^\\\x80-\xff\n\015()] *                             #     normal*
   1371 (?:                                 #       (
   1372 (?:  \\ [^\x80-\xff]  |
   1373 \(                            #  (
   1374 [^\\\x80-\xff\n\015()] *                            #     normal*
   1375 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1376 \)                           #                       )
   1377 )    #         special
   1378 [^\\\x80-\xff\n\015()] *                         #         normal*
   1379 )*                                  #            )*
   1380 \)                             #                )
   1381 [\040\t]* )*    # If comment found, allow more spaces.
   1382 # <
   1383 (?:
   1384 @
   1385 [\040\t]*                    # Nab whitespace.
   1386 (?:
   1387 \(                              #  (
   1388 [^\\\x80-\xff\n\015()] *                             #     normal*
   1389 (?:                                 #       (
   1390 (?:  \\ [^\x80-\xff]  |
   1391 \(                            #  (
   1392 [^\\\x80-\xff\n\015()] *                            #     normal*
   1393 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1394 \)                           #                       )
   1395 )    #         special
   1396 [^\\\x80-\xff\n\015()] *                         #         normal*
   1397 )*                                  #            )*
   1398 \)                             #                )
   1399 [\040\t]* )*    # If comment found, allow more spaces.
   1400 (?:
   1401 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1402 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1403 |
   1404 \[                            # [
   1405 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1406 \]                           #           ]
   1407 )
   1408 [\040\t]*                    # Nab whitespace.
   1409 (?:
   1410 \(                              #  (
   1411 [^\\\x80-\xff\n\015()] *                             #     normal*
   1412 (?:                                 #       (
   1413 (?:  \\ [^\x80-\xff]  |
   1414 \(                            #  (
   1415 [^\\\x80-\xff\n\015()] *                            #     normal*
   1416 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1417 \)                           #                       )
   1418 )    #         special
   1419 [^\\\x80-\xff\n\015()] *                         #         normal*
   1420 )*                                  #            )*
   1421 \)                             #                )
   1422 [\040\t]* )*    # If comment found, allow more spaces.
   1423 # optional trailing comments
   1424 (?:
   1425 \.
   1426 [\040\t]*                    # Nab whitespace.
   1427 (?:
   1428 \(                              #  (
   1429 [^\\\x80-\xff\n\015()] *                             #     normal*
   1430 (?:                                 #       (
   1431 (?:  \\ [^\x80-\xff]  |
   1432 \(                            #  (
   1433 [^\\\x80-\xff\n\015()] *                            #     normal*
   1434 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1435 \)                           #                       )
   1436 )    #         special
   1437 [^\\\x80-\xff\n\015()] *                         #         normal*
   1438 )*                                  #            )*
   1439 \)                             #                )
   1440 [\040\t]* )*    # If comment found, allow more spaces.
   1441 (?:
   1442 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1443 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1444 |
   1445 \[                            # [
   1446 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1447 \]                           #           ]
   1448 )
   1449 [\040\t]*                    # Nab whitespace.
   1450 (?:
   1451 \(                              #  (
   1452 [^\\\x80-\xff\n\015()] *                             #     normal*
   1453 (?:                                 #       (
   1454 (?:  \\ [^\x80-\xff]  |
   1455 \(                            #  (
   1456 [^\\\x80-\xff\n\015()] *                            #     normal*
   1457 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1458 \)                           #                       )
   1459 )    #         special
   1460 [^\\\x80-\xff\n\015()] *                         #         normal*
   1461 )*                                  #            )*
   1462 \)                             #                )
   1463 [\040\t]* )*    # If comment found, allow more spaces.
   1464 # optional trailing comments
   1465 )*
   1466 (?: ,
   1467 [\040\t]*                    # Nab whitespace.
   1468 (?:
   1469 \(                              #  (
   1470 [^\\\x80-\xff\n\015()] *                             #     normal*
   1471 (?:                                 #       (
   1472 (?:  \\ [^\x80-\xff]  |
   1473 \(                            #  (
   1474 [^\\\x80-\xff\n\015()] *                            #     normal*
   1475 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1476 \)                           #                       )
   1477 )    #         special
   1478 [^\\\x80-\xff\n\015()] *                         #         normal*
   1479 )*                                  #            )*
   1480 \)                             #                )
   1481 [\040\t]* )*    # If comment found, allow more spaces.
   1482 @
   1483 [\040\t]*                    # Nab whitespace.
   1484 (?:
   1485 \(                              #  (
   1486 [^\\\x80-\xff\n\015()] *                             #     normal*
   1487 (?:                                 #       (
   1488 (?:  \\ [^\x80-\xff]  |
   1489 \(                            #  (
   1490 [^\\\x80-\xff\n\015()] *                            #     normal*
   1491 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1492 \)                           #                       )
   1493 )    #         special
   1494 [^\\\x80-\xff\n\015()] *                         #         normal*
   1495 )*                                  #            )*
   1496 \)                             #                )
   1497 [\040\t]* )*    # If comment found, allow more spaces.
   1498 (?:
   1499 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1500 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1501 |
   1502 \[                            # [
   1503 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1504 \]                           #           ]
   1505 )
   1506 [\040\t]*                    # Nab whitespace.
   1507 (?:
   1508 \(                              #  (
   1509 [^\\\x80-\xff\n\015()] *                             #     normal*
   1510 (?:                                 #       (
   1511 (?:  \\ [^\x80-\xff]  |
   1512 \(                            #  (
   1513 [^\\\x80-\xff\n\015()] *                            #     normal*
   1514 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1515 \)                           #                       )
   1516 )    #         special
   1517 [^\\\x80-\xff\n\015()] *                         #         normal*
   1518 )*                                  #            )*
   1519 \)                             #                )
   1520 [\040\t]* )*    # If comment found, allow more spaces.
   1521 # optional trailing comments
   1522 (?:
   1523 \.
   1524 [\040\t]*                    # Nab whitespace.
   1525 (?:
   1526 \(                              #  (
   1527 [^\\\x80-\xff\n\015()] *                             #     normal*
   1528 (?:                                 #       (
   1529 (?:  \\ [^\x80-\xff]  |
   1530 \(                            #  (
   1531 [^\\\x80-\xff\n\015()] *                            #     normal*
   1532 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1533 \)                           #                       )
   1534 )    #         special
   1535 [^\\\x80-\xff\n\015()] *                         #         normal*
   1536 )*                                  #            )*
   1537 \)                             #                )
   1538 [\040\t]* )*    # If comment found, allow more spaces.
   1539 (?:
   1540 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1541 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1542 |
   1543 \[                            # [
   1544 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1545 \]                           #           ]
   1546 )
   1547 [\040\t]*                    # Nab whitespace.
   1548 (?:
   1549 \(                              #  (
   1550 [^\\\x80-\xff\n\015()] *                             #     normal*
   1551 (?:                                 #       (
   1552 (?:  \\ [^\x80-\xff]  |
   1553 \(                            #  (
   1554 [^\\\x80-\xff\n\015()] *                            #     normal*
   1555 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1556 \)                           #                       )
   1557 )    #         special
   1558 [^\\\x80-\xff\n\015()] *                         #         normal*
   1559 )*                                  #            )*
   1560 \)                             #                )
   1561 [\040\t]* )*    # If comment found, allow more spaces.
   1562 # optional trailing comments
   1563 )*
   1564 )*  # additional domains
   1565 :
   1566 [\040\t]*                    # Nab whitespace.
   1567 (?:
   1568 \(                              #  (
   1569 [^\\\x80-\xff\n\015()] *                             #     normal*
   1570 (?:                                 #       (
   1571 (?:  \\ [^\x80-\xff]  |
   1572 \(                            #  (
   1573 [^\\\x80-\xff\n\015()] *                            #     normal*
   1574 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1575 \)                           #                       )
   1576 )    #         special
   1577 [^\\\x80-\xff\n\015()] *                         #         normal*
   1578 )*                                  #            )*
   1579 \)                             #                )
   1580 [\040\t]* )*    # If comment found, allow more spaces.
   1581 # optional trailing comments
   1582 )?     #       optional route
   1583 (?:
   1584 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1585 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1586 # Atom
   1587 |                       #  or
   1588 "                                     # "
   1589 [^\\\x80-\xff\n\015"] *                            #   normal
   1590 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1591 "                                     #        "
   1592 # Quoted string
   1593 )
   1594 [\040\t]*                    # Nab whitespace.
   1595 (?:
   1596 \(                              #  (
   1597 [^\\\x80-\xff\n\015()] *                             #     normal*
   1598 (?:                                 #       (
   1599 (?:  \\ [^\x80-\xff]  |
   1600 \(                            #  (
   1601 [^\\\x80-\xff\n\015()] *                            #     normal*
   1602 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1603 \)                           #                       )
   1604 )    #         special
   1605 [^\\\x80-\xff\n\015()] *                         #         normal*
   1606 )*                                  #            )*
   1607 \)                             #                )
   1608 [\040\t]* )*    # If comment found, allow more spaces.
   1609 (?:
   1610 \.
   1611 [\040\t]*                    # Nab whitespace.
   1612 (?:
   1613 \(                              #  (
   1614 [^\\\x80-\xff\n\015()] *                             #     normal*
   1615 (?:                                 #       (
   1616 (?:  \\ [^\x80-\xff]  |
   1617 \(                            #  (
   1618 [^\\\x80-\xff\n\015()] *                            #     normal*
   1619 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1620 \)                           #                       )
   1621 )    #         special
   1622 [^\\\x80-\xff\n\015()] *                         #         normal*
   1623 )*                                  #            )*
   1624 \)                             #                )
   1625 [\040\t]* )*    # If comment found, allow more spaces.
   1626 (?:
   1627 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1628 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1629 # Atom
   1630 |                       #  or
   1631 "                                     # "
   1632 [^\\\x80-\xff\n\015"] *                            #   normal
   1633 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1634 "                                     #        "
   1635 # Quoted string
   1636 )
   1637 [\040\t]*                    # Nab whitespace.
   1638 (?:
   1639 \(                              #  (
   1640 [^\\\x80-\xff\n\015()] *                             #     normal*
   1641 (?:                                 #       (
   1642 (?:  \\ [^\x80-\xff]  |
   1643 \(                            #  (
   1644 [^\\\x80-\xff\n\015()] *                            #     normal*
   1645 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1646 \)                           #                       )
   1647 )    #         special
   1648 [^\\\x80-\xff\n\015()] *                         #         normal*
   1649 )*                                  #            )*
   1650 \)                             #                )
   1651 [\040\t]* )*    # If comment found, allow more spaces.
   1652 # additional words
   1653 )*
   1654 @
   1655 [\040\t]*                    # Nab whitespace.
   1656 (?:
   1657 \(                              #  (
   1658 [^\\\x80-\xff\n\015()] *                             #     normal*
   1659 (?:                                 #       (
   1660 (?:  \\ [^\x80-\xff]  |
   1661 \(                            #  (
   1662 [^\\\x80-\xff\n\015()] *                            #     normal*
   1663 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1664 \)                           #                       )
   1665 )    #         special
   1666 [^\\\x80-\xff\n\015()] *                         #         normal*
   1667 )*                                  #            )*
   1668 \)                             #                )
   1669 [\040\t]* )*    # If comment found, allow more spaces.
   1670 (?:
   1671 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1672 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1673 |
   1674 \[                            # [
   1675 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1676 \]                           #           ]
   1677 )
   1678 [\040\t]*                    # Nab whitespace.
   1679 (?:
   1680 \(                              #  (
   1681 [^\\\x80-\xff\n\015()] *                             #     normal*
   1682 (?:                                 #       (
   1683 (?:  \\ [^\x80-\xff]  |
   1684 \(                            #  (
   1685 [^\\\x80-\xff\n\015()] *                            #     normal*
   1686 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1687 \)                           #                       )
   1688 )    #         special
   1689 [^\\\x80-\xff\n\015()] *                         #         normal*
   1690 )*                                  #            )*
   1691 \)                             #                )
   1692 [\040\t]* )*    # If comment found, allow more spaces.
   1693 # optional trailing comments
   1694 (?:
   1695 \.
   1696 [\040\t]*                    # Nab whitespace.
   1697 (?:
   1698 \(                              #  (
   1699 [^\\\x80-\xff\n\015()] *                             #     normal*
   1700 (?:                                 #       (
   1701 (?:  \\ [^\x80-\xff]  |
   1702 \(                            #  (
   1703 [^\\\x80-\xff\n\015()] *                            #     normal*
   1704 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1705 \)                           #                       )
   1706 )    #         special
   1707 [^\\\x80-\xff\n\015()] *                         #         normal*
   1708 )*                                  #            )*
   1709 \)                             #                )
   1710 [\040\t]* )*    # If comment found, allow more spaces.
   1711 (?:
   1712 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1713 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1714 |
   1715 \[                            # [
   1716 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1717 \]                           #           ]
   1718 )
   1719 [\040\t]*                    # Nab whitespace.
   1720 (?:
   1721 \(                              #  (
   1722 [^\\\x80-\xff\n\015()] *                             #     normal*
   1723 (?:                                 #       (
   1724 (?:  \\ [^\x80-\xff]  |
   1725 \(                            #  (
   1726 [^\\\x80-\xff\n\015()] *                            #     normal*
   1727 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1728 \)                           #                       )
   1729 )    #         special
   1730 [^\\\x80-\xff\n\015()] *                         #         normal*
   1731 )*                                  #            )*
   1732 \)                             #                )
   1733 [\040\t]* )*    # If comment found, allow more spaces.
   1734 # optional trailing comments
   1735 )*
   1736 #       address spec
   1737 >                    #                 >
   1738 # name and address
   1739 )
   1740 /x
   1741     Alan Other <user\@dom.ain>
   1742     <user\@dom.ain>
   1743     user\@dom.ain
   1744     \"A. Other\" <user.1234\@dom.ain> (a comment)
   1745     A. Other <user.1234\@dom.ain> (a comment)
   1746     \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
   1747     A missing angle <user\@some.where
   1748     *** Failers
   1749     The quick brown fox
   1750 
   1751 /abc\0def\00pqr\000xyz\0000AB/
   1752     abc\0def\00pqr\000xyz\0000AB
   1753     abc456 abc\0def\00pqr\000xyz\0000ABCDE
   1754 
   1755 /abc\x0def\x00pqr\x000xyz\x0000AB/
   1756     abc\x0def\x00pqr\x000xyz\x0000AB
   1757     abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
   1758 
   1759 /^[\000-\037]/
   1760     \0A
   1761     \01B
   1762     \037C
   1763 
   1764 /\0*/
   1765     \0\0\0\0
   1766 
   1767 /A\x0{2,3}Z/
   1768     The A\x0\x0Z
   1769     An A\0\x0\0Z
   1770     *** Failers
   1771     A\0Z
   1772     A\0\x0\0\x0Z
   1773 
   1774 /^\s/
   1775     \040abc
   1776     \x0cabc
   1777     \nabc
   1778     \rabc
   1779     \tabc
   1780     *** Failers
   1781     abc
   1782 
   1783 /^a	b
   1784       c/x
   1786     abc
   1787 
   1788 /ab{1,3}bc/
   1789     abbbbc
   1790     abbbc
   1791     abbc
   1792     *** Failers
   1793     abc
   1794     abbbbbc
   1795 
   1796 /([^.]*)\.([^:]*):[T ]+(.*)/
   1797     track1.title:TBlah blah blah
   1798 
   1799 /([^.]*)\.([^:]*):[T ]+(.*)/i
   1800     track1.title:TBlah blah blah
   1801 
   1802 /([^.]*)\.([^:]*):[t ]+(.*)/i
   1803     track1.title:TBlah blah blah
   1804 
   1805 /^[W-c]+$/
   1806     WXY_^abc
   1807     *** Failers
   1808     wxy
   1809 
   1810 /^[W-c]+$/i
   1811     WXY_^abc
   1812     wxy_^ABC
   1813 
   1814 /^[\x3f-\x5F]+$/i
   1815     WXY_^abc
   1816     wxy_^ABC
   1817 
   1818 /^abc$/m
   1819     abc
   1820     qqq\nabc
   1821     abc\nzzz
   1822     qqq\nabc\nzzz
   1823 
   1824 /^abc$/
   1825     abc
   1826     *** Failers
   1827     qqq\nabc
   1828     abc\nzzz
   1829     qqq\nabc\nzzz
   1830 
   1831 /\Aabc\Z/m
   1832     abc
   1833     abc\n 
   1834     *** Failers
   1835     qqq\nabc
   1836     abc\nzzz
   1837     qqq\nabc\nzzz
   1838     
   1839 /\A(.)*\Z/s
   1840     abc\ndef
   1841 
   1842 /\A(.)*\Z/m
   1843     *** Failers
   1844     abc\ndef
   1845 
   1846 /(?:b)|(?::+)/
   1847     b::c
   1848     c::b
   1849 
   1850 /[-az]+/
   1851     az-
   1852     *** Failers
   1853     b
   1854 
   1855 /[az-]+/
   1856     za-
   1857     *** Failers
   1858     b
   1859 
   1860 /[a\-z]+/
   1861     a-z
   1862     *** Failers
   1863     b
   1864 
   1865 /[a-z]+/
   1866     abcdxyz
   1867 
   1868 /[\d-]+/
   1869     12-34
   1870     *** Failers
   1871     aaa
   1872 
   1873 /[\d-z]+/
   1874     12-34z
   1875     *** Failers
   1876     aaa
   1877 
   1878 /\x5c/
   1879     \\
   1880 
   1881 /\x20Z/
   1882     the Zoo
   1883     *** Failers
   1884     Zulu
   1885 
   1886 /ab{3cd/
   1887     ab{3cd
   1888 
   1889 /ab{3,cd/
   1890     ab{3,cd
   1891 
   1892 /ab{3,4a}cd/
   1893     ab{3,4a}cd
   1894 
   1895 /{4,5a}bc/
   1896     {4,5a}bc
   1897 
   1898 /^a.b/<lf>
   1899     a\rb
   1900     *** Failers
   1901     a\nb
   1902 
   1903 /abc$/
   1904     abc
   1905     abc\n
   1906     *** Failers
   1907     abc\ndef
   1908 
   1909 /(abc)\123/
   1910     abc\x53
   1911 
   1912 /(abc)\223/
   1913     abc\x93
   1914 
   1915 /(abc)\323/
   1916     abc\xd3
   1917 
   1918 /(abc)\100/
   1919     abc\x40
   1920     abc\100
   1921 
   1922 /(abc)\1000/
   1923     abc\x400
   1924     abc\x40\x30
   1925     abc\1000
   1926     abc\100\x30
   1927     abc\100\060
   1928     abc\100\60
   1929 
   1930 /^A\8B\9C$/
   1931     A8B9C
   1932     *** Failers
   1933     A\08B\09C  
   1934     
   1935 /^[A\8B\9C]+$/
   1936     A8B9C
   1937     *** Failers 
   1938     A8B9C\x00
   1939     
   1940 /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
   1941     abcdefghijk\12S
   1942 
   1943 /ab\idef/
   1944     abidef
   1945 
   1946 /a{0}bc/
   1947     bc
   1948 
   1949 /(a|(bc)){0,0}?xyz/
   1950     xyz
   1951 
   1952 /abc[\10]de/
   1953     abc\010de
   1954 
   1955 /abc[\1]de/
   1956     abc\1de
   1957 
   1958 /(abc)[\1]de/
   1959     abc\1de
   1960 
   1961 /(?s)a.b/
   1962     a\nb
   1963 
   1964 /^([^a])([^\b])([^c]*)([^d]{3,4})/
   1965     baNOTccccd
   1966     baNOTcccd
   1967     baNOTccd
   1968     bacccd
   1969     *** Failers
   1970     anything
   1971     b\bc   
   1972     baccd
   1973 
   1974 /[^a]/
   1975     Abc
   1976   
   1977 /[^a]/i
   1978     Abc 
   1979 
   1980 /[^a]+/
   1981     AAAaAbc
   1982   
   1983 /[^a]+/i
   1984     AAAaAbc 
   1985 
   1986 /[^a]+/
   1987     bbb\nccc
   1988    
   1989 /[^k]$/
   1990     abc
   1991     *** Failers
   1992     abk   
   1993    
   1994 /[^k]{2,3}$/
   1995     abc
   1996     kbc
   1997     kabc 
   1998     *** Failers
   1999     abk
   2000     akb
   2001     akk 
   2002 
   2003 /^\d{8,}\@.+[^k]$/
   2004     12345678\@a.b.c.d
   2005     123456789\@x.y.z
   2006     *** Failers
   2007     12345678\@x.y.uk
   2008     1234567\@a.b.c.d       
   2009 
   2010 /[^a]/
   2011     aaaabcd
   2012     aaAabcd 
   2013 
   2014 /[^a]/i
   2015     aaaabcd
   2016     aaAabcd 
   2017 
   2018 /[^az]/
   2019     aaaabcd
   2020     aaAabcd 
   2021 
   2022 /[^az]/i
   2023     aaaabcd
   2024     aaAabcd 
   2025 
   2026 /\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
   2027  \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
   2028 
   2029 /P[^*]TAIRE[^*]{1,6}?LL/
   2030     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
   2031 
   2032 /P[^*]TAIRE[^*]{1,}?LL/
   2033     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
   2034 
   2035 /(\.\d\d[1-9]?)\d+/
   2036     1.230003938
   2037     1.875000282   
   2038     1.235  
   2039                   
   2040 /(\.\d\d((?=0)|\d(?=\d)))/
   2041     1.230003938      
   2042     1.875000282
   2043     *** Failers 
   2044     1.235 
   2045     
   2046 /a(?)b/
   2047     ab 
   2048  
   2049 /\b(foo)\s+(\w+)/i
   2050     Food is on the foo table
   2051     
   2052 /foo(.*)bar/
   2053     The food is under the bar in the barn.
   2054     
   2055 /foo(.*?)bar/  
   2056     The food is under the bar in the barn.
   2057 
   2058 /(.*)(\d*)/O
   2059     I have 2 numbers: 53147
   2060     
   2061 /(.*)(\d+)/
   2062     I have 2 numbers: 53147
   2063  
   2064 /(.*?)(\d*)/O
   2065     I have 2 numbers: 53147
   2066 
   2067 /(.*?)(\d+)/
   2068     I have 2 numbers: 53147
   2069 
   2070 /(.*)(\d+)$/
   2071     I have 2 numbers: 53147
   2072 
   2073 /(.*?)(\d+)$/
   2074     I have 2 numbers: 53147
   2075 
   2076 /(.*)\b(\d+)$/
   2077     I have 2 numbers: 53147
   2078 
   2079 /(.*\D)(\d+)$/
   2080     I have 2 numbers: 53147
   2081 
   2082 /^\D*(?!123)/
   2083     ABC123
   2084      
   2085 /^(\D*)(?=\d)(?!123)/
   2086     ABC445
   2087     *** Failers
   2088     ABC123
   2089     
   2090 /^[W-]46]/
   2091     W46]789 
   2092     -46]789
   2093     *** Failers
   2094     Wall
   2095     Zebra
   2096     42
   2097     [abcd] 
   2098     ]abcd[
   2099        
   2100 /^[W-\]46]/
   2101     W46]789 
   2102     Wall
   2103     Zebra
   2104     Xylophone  
   2105     42
   2106     [abcd] 
   2107     ]abcd[
   2108     \\backslash 
   2109     *** Failers
   2110     -46]789
   2111     well
   2112     
   2113 /\d\d\/\d\d\/\d\d\d\d/
   2114     01/01/2000
   2115 
   2116 /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
   2117   word cat dog elephant mussel cow horse canary baboon snake shark otherword
   2118   word cat dog elephant mussel cow horse canary baboon snake shark
   2119 
   2120 /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
   2121   word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
   2122 
   2123 /^(a){0,0}/
   2124     bcd
   2125     abc
   2126     aab     
   2127 
   2128 /^(a){0,1}/
   2129     bcd
   2130     abc
   2131     aab  
   2132 
   2133 /^(a){0,2}/
   2134     bcd
   2135     abc
   2136     aab  
   2137 
   2138 /^(a){0,3}/
   2139     bcd
   2140     abc
   2141     aab
   2142     aaa   
   2143 
   2144 /^(a){0,}/
   2145     bcd
   2146     abc
   2147     aab
   2148     aaa
   2149     aaaaaaaa    
   2150 
   2151 /^(a){1,1}/
   2152     bcd
   2153     abc
   2154     aab  
   2155 
   2156 /^(a){1,2}/
   2157     bcd
   2158     abc
   2159     aab  
   2160 
   2161 /^(a){1,3}/
   2162     bcd
   2163     abc
   2164     aab
   2165     aaa   
   2166 
   2167 /^(a){1,}/
   2168     bcd
   2169     abc
   2170     aab
   2171     aaa
   2172     aaaaaaaa    
   2173 
   2174 /.*\.gif/
   2175     borfle\nbib.gif\nno
   2176 
   2177 /.{0,}\.gif/
   2178     borfle\nbib.gif\nno
   2179 
   2180 /.*\.gif/m
   2181     borfle\nbib.gif\nno
   2182 
   2183 /.*\.gif/s
   2184     borfle\nbib.gif\nno
   2185 
   2186 /.*\.gif/ms
   2187     borfle\nbib.gif\nno
   2188     
   2189 /.*$/
   2190     borfle\nbib.gif\nno
   2191 
   2192 /.*$/m
   2193     borfle\nbib.gif\nno
   2194 
   2195 /.*$/s
   2196     borfle\nbib.gif\nno
   2197 
   2198 /.*$/ms
   2199     borfle\nbib.gif\nno
   2200     
   2201 /.*$/
   2202     borfle\nbib.gif\nno\n
   2203 
   2204 /.*$/m
   2205     borfle\nbib.gif\nno\n
   2206 
   2207 /.*$/s
   2208     borfle\nbib.gif\nno\n
   2209 
   2210 /.*$/ms
   2211     borfle\nbib.gif\nno\n
   2212     
   2213 /(.*X|^B)/
   2214     abcde\n1234Xyz
   2215     BarFoo 
   2216     *** Failers
   2217     abcde\nBar  
   2218 
   2219 /(.*X|^B)/m
   2220     abcde\n1234Xyz
   2221     BarFoo 
   2222     abcde\nBar  
   2223 
   2224 /(.*X|^B)/s
   2225     abcde\n1234Xyz
   2226     BarFoo 
   2227     *** Failers
   2228     abcde\nBar  
   2229 
   2230 /(.*X|^B)/ms
   2231     abcde\n1234Xyz
   2232     BarFoo 
   2233     abcde\nBar  
   2234 
   2235 /(?s)(.*X|^B)/
   2236     abcde\n1234Xyz
   2237     BarFoo 
   2238     *** Failers 
   2239     abcde\nBar  
   2240 
   2241 /(?s:.*X|^B)/
   2242     abcde\n1234Xyz
   2243     BarFoo 
   2244     *** Failers 
   2245     abcde\nBar  
   2246 
   2247 /^.*B/
   2248     **** Failers
   2249     abc\nB
   2250      
   2251 /(?s)^.*B/
   2252     abc\nB
   2253 
   2254 /(?m)^.*B/
   2255     abc\nB
   2256      
   2257 /(?ms)^.*B/
   2258     abc\nB
   2259 
   2260 /(?ms)^B/
   2261     abc\nB
   2262 
   2263 /(?s)B$/
   2264     B\n
   2265 
   2266 /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
   2267     123456654321
   2268   
   2269 /^\d\d\d\d\d\d\d\d\d\d\d\d/
   2270     123456654321 
   2271 
   2272 /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
   2273     123456654321
   2274   
   2275 /^[abc]{12}/
   2276     abcabcabcabc
   2277     
   2278 /^[a-c]{12}/
   2279     abcabcabcabc
   2280     
   2281 /^(a|b|c){12}/
   2282     abcabcabcabc 
   2283 
   2284 /^[abcdefghijklmnopqrstuvwxy0123456789]/
   2285     n
   2286     *** Failers 
   2287     z 
   2288 
   2289 /abcde{0,0}/
   2290     abcd
   2291     *** Failers
   2292     abce  
   2293 
   2294 /ab[cd]{0,0}e/
   2295     abe
   2296     *** Failers
   2297     abcde 
   2298     
   2299 /ab(c){0,0}d/
   2300     abd
   2301     *** Failers
   2302     abcd   
   2303 
   2304 /a(b*)/
   2305     a
   2306     ab
   2307     abbbb
   2308     *** Failers
   2309     bbbbb    
   2310     
   2311 /ab\d{0}e/
   2312     abe
   2313     *** Failers
   2314     ab1e   
   2315     
   2316 /"([^\\"]+|\\.)*"/
   2317     the \"quick\" brown fox
   2318     \"the \\\"quick\\\" brown fox\" 
   2319 
   2320 /.*?/g+
   2321     abc
   2322   
   2323 /\b/g+
   2324     abc 
   2325 
   2326 /\b/+g
   2327     abc 
   2328 
   2329 //g
   2330     abc
   2331 
   2332 /<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>/is
   2333   <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
   2334 
   2335 /a[^a]b/
   2336     acb
   2337     a\nb
   2338     
   2339 /a.b/
   2340     acb
   2341     *** Failers 
   2342     a\nb   
   2343     
   2344 /a[^a]b/s
   2345     acb
   2346     a\nb  
   2347     
   2348 /a.b/s
   2349     acb
   2350     a\nb  
   2351 
   2352 /^(b+?|a){1,2}?c/
   2353     bac
   2354     bbac
   2355     bbbac
   2356     bbbbac
   2357     bbbbbac 
   2358 
   2359 /^(b+|a){1,2}?c/
   2360     bac
   2361     bbac
   2362     bbbac
   2363     bbbbac
   2364     bbbbbac 
   2365     
   2366 /(?!\A)x/m
   2367     x\nb\n
   2368     a\bx\n  
   2369     
   2370 /\x0{ab}/
   2371     \0{ab} 
   2372 
   2373 /(A|B)*?CD/
   2374     CD 
   2375     
   2376 /(A|B)*CD/
   2377     CD 
   2378 
   2379 /(?<!bar)foo/
   2380     foo
   2381     catfood
   2382     arfootle
   2383     rfoosh
   2384     *** Failers
   2385     barfoo
   2386     towbarfoo
   2387 
   2388 /\w{3}(?<!bar)foo/
   2389     catfood
   2390     *** Failers
   2391     foo
   2392     barfoo
   2393     towbarfoo
   2394 
   2395 /(?<=(foo)a)bar/
   2396     fooabar
   2397     *** Failers
   2398     bar
   2399     foobbar
   2400       
   2401 /\Aabc\z/m
   2402     abc
   2403     *** Failers
   2404     abc\n   
   2405     qqq\nabc
   2406     abc\nzzz
   2407     qqq\nabc\nzzz
   2408 
   2409 "(?>.*/)foo"
   2410     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
   2411 
   2412 "(?>.*/)foo"
   2413     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
   2414 
   2415 /(?>(\.\d\d[1-9]?))\d+/
   2416     1.230003938
   2417     1.875000282
   2418     *** Failers 
   2419     1.235 
   2420 
   2421 /^((?>\w+)|(?>\s+))*$/
   2422     now is the time for all good men to come to the aid of the party
   2423     *** Failers
   2424     this is not a line with only words and spaces!
   2425     
   2426 /(\d+)(\w)/
   2427     12345a
   2428     12345+ 
   2429 
   2430 /((?>\d+))(\w)/
   2431     12345a
   2432     *** Failers
   2433     12345+ 
   2434 
   2435 /(?>a+)b/
   2436     aaab
   2437 
   2438 /((?>a+)b)/
   2439     aaab
   2440 
   2441 /(?>(a+))b/
   2442     aaab
   2443 
   2444 /(?>b)+/
   2445     aaabbbccc
   2446 
   2447 /(?>a+|b+|c+)*c/
   2448     aaabbbbccccd
   2449     
   2450 /(a+|b+|c+)*c/
   2451     aaabbbbccccd
   2452 
   2453 /((?>[^()]+)|\([^()]*\))+/
   2454     ((abc(ade)ufh()()x
   2455     
   2456 /\(((?>[^()]+)|\([^()]+\))+\)/ 
   2457     (abc)
   2458     (abc(def)xyz)
   2459     *** Failers
   2460     ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa   
   2461 
   2462 /a(?-i)b/i
   2463     ab
   2464     Ab
   2465     *** Failers 
   2466     aB
   2467     AB
   2468         
   2469 /(a (?x)b c)d e/
   2470     a bcd e
   2471     *** Failers
   2472     a b cd e
   2473     abcd e   
   2474     a bcde 
   2475  
   2476 /(a b(?x)c d (?-x)e f)/
   2477     a bcde f
   2478     *** Failers
   2479     abcdef  
   2480 
   2481 /(a(?i)b)c/
   2482     abc
   2483     aBc
   2484     *** Failers
   2485     abC
   2486     aBC  
   2487     Abc
   2488     ABc
   2489     ABC
   2490     AbC
   2491     
   2492 /a(?i:b)c/
   2493     abc
   2494     aBc
   2495     *** Failers 
   2496     ABC
   2497     abC
   2498     aBC
   2499     
   2500 /a(?i:b)*c/
   2501     aBc
   2502     aBBc
   2503     *** Failers 
   2504     aBC
   2505     aBBC
   2506     
   2507 /a(?=b(?i)c)\w\wd/
   2508     abcd
   2509     abCd
   2510     *** Failers
   2511     aBCd
   2512     abcD     
   2513     
   2514 /(?s-i:more.*than).*million/i
   2515     more than million
   2516     more than MILLION
   2517     more \n than Million 
   2518     *** Failers
   2519     MORE THAN MILLION    
   2520     more \n than \n million 
   2521 
   2522 /(?:(?s-i)more.*than).*million/i
   2523     more than million
   2524     more than MILLION
   2525     more \n than Million 
   2526     *** Failers
   2527     MORE THAN MILLION    
   2528     more \n than \n million 
   2529     
   2530 /(?>a(?i)b+)+c/ 
   2531     abc
   2532     aBbc
   2533     aBBc 
   2534     *** Failers
   2535     Abc
   2536     abAb    
   2537     abbC 
   2538     
   2539 /(?=a(?i)b)\w\wc/
   2540     abc
   2541     aBc
   2542     *** Failers
   2543     Ab 
   2544     abC
   2545     aBC     
   2546     
   2547 /(?<=a(?i)b)(\w\w)c/
   2548     abxxc
   2549     aBxxc
   2550     *** Failers
   2551     Abxxc
   2552     ABxxc
   2553     abxxC      
   2554 
   2555 /^(?(?=abc)\w{3}:|\d\d)$/
   2556     abc:
   2557     12
   2558     *** Failers
   2559     123
   2560     xyz    
   2561 
   2562 /^(?(?!abc)\d\d|\w{3}:)$/
   2563     abc:
   2564     12
   2565     *** Failers
   2566     123
   2567     xyz    
   2568     
   2569 /(?(?<=foo)bar|cat)/
   2570     foobar
   2571     cat
   2572     fcat
   2573     focat   
   2574     *** Failers
   2575     foocat  
   2576 
   2577 /(?(?<!foo)cat|bar)/
   2578     foobar
   2579     cat
   2580     fcat
   2581     focat   
   2582     *** Failers
   2583     foocat  
   2584 
   2585 /(?>a*)*/
   2586     a
   2587     aa
   2588     aaaa
   2589     
   2590 /(abc|)+/
   2591     abc
   2592     abcabc
   2593     abcabcabc
   2594     xyz      
   2595 
   2596 /([a]*)*/
   2597     a
   2598     aaaaa 
   2599  
   2600 /([ab]*)*/
   2601     a
   2602     b
   2603     ababab
   2604     aaaabcde
   2605     bbbb    
   2606  
   2607 /([^a]*)*/
   2608     b
   2609     bbbb
   2610     aaa   
   2611  
   2612 /([^ab]*)*/
   2613     cccc
   2614     abab  
   2615  
   2616 /([a]*?)*/
   2617     a
   2618     aaaa 
   2619  
   2620 /([ab]*?)*/
   2621     a
   2622     b
   2623     abab
   2624     baba   
   2625  
   2626 /([^a]*?)*/
   2627     b
   2628     bbbb
   2629     aaa   
   2630  
   2631 /([^ab]*?)*/
   2632     c
   2633     cccc
   2634     baba   
   2635  
   2636 /(?>a*)*/
   2637     a
   2638     aaabcde 
   2639  
   2640 /((?>a*))*/
   2641     aaaaa
   2642     aabbaa 
   2643  
   2644 /((?>a*?))*/
   2645     aaaaa
   2646     aabbaa 
   2647 
   2648 /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /x
   2649     12-sep-98
   2650     12-09-98
   2651     *** Failers
   2652     sep-12-98
   2653         
   2654 /(?i:saturday|sunday)/
   2655     saturday
   2656     sunday
   2657     Saturday
   2658     Sunday
   2659     SATURDAY
   2660     SUNDAY
   2661     SunDay
   2662     
   2663 /(a(?i)bc|BB)x/
   2664     abcx
   2665     aBCx
   2666     bbx
   2667     BBx
   2668     *** Failers
   2669     abcX
   2670     aBCX
   2671     bbX
   2672     BBX               
   2673 
   2674 /^([ab](?i)[cd]|[ef])/
   2675     ac
   2676     aC
   2677     bD
   2678     elephant
   2679     Europe 
   2680     frog
   2681     France
   2682     *** Failers
   2683     Africa     
   2684 
   2685 /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
   2686     ab
   2687     aBd
   2688     xy
   2689     xY
   2690     zebra
   2691     Zambesi
   2692     *** Failers
   2693     aCD  
   2694     XY  
   2695 
   2696 /(?<=foo\n)^bar/m
   2697     foo\nbar
   2698     *** Failers
   2699     bar
   2700     baz\nbar   
   2701 
   2702 /(?<=(?<!foo)bar)baz/
   2703     barbaz
   2704     barbarbaz 
   2705     koobarbaz 
   2706     *** Failers
   2707     baz
   2708     foobarbaz 
   2709 
   2710 /The following tests are taken from the Perl 5.005 test suite; some of them/
   2711 /are compatible with 5.004, but I'd rather not have to sort them out./
   2712 
   2713 /abc/
   2714     abc
   2715     xabcy
   2716     ababc
   2717     *** Failers
   2718     xbc
   2719     axc
   2720     abx
   2721 
   2722 /ab*c/
   2723     abc
   2724 
   2725 /ab*bc/
   2726     abc
   2727     abbc
   2728     abbbbc
   2729 
   2730 /.{1}/
   2731     abbbbc
   2732 
   2733 /.{3,4}/
   2734     abbbbc
   2735 
   2736 /ab{0,}bc/
   2737     abbbbc
   2738 
   2739 /ab+bc/
   2740     abbc
   2741     *** Failers
   2742     abc
   2743     abq
   2744 
   2745 /ab+bc/
   2746     abbbbc
   2747 
   2748 /ab{1,}bc/
   2749     abbbbc
   2750 
   2751 /ab{1,3}bc/
   2752     abbbbc
   2753 
   2754 /ab{3,4}bc/
   2755     abbbbc
   2756 
   2757 /ab{4,5}bc/
   2758     *** Failers
   2759     abq
   2760     abbbbc
   2761 
   2762 /ab?bc/
   2763     abbc
   2764     abc
   2765 
   2766 /ab{0,1}bc/
   2767     abc
   2768 
   2769 /ab?bc/
   2770 
   2771 /ab?c/
   2772     abc
   2773 
   2774 /ab{0,1}c/
   2775     abc
   2776 
   2777 /^abc$/
   2778     abc
   2779     *** Failers
   2780     abbbbc
   2781     abcc
   2782 
   2783 /^abc/
   2784     abcc
   2785 
   2786 /^abc$/
   2787 
   2788 /abc$/
   2789     aabc
   2790     *** Failers
   2791     aabc
   2792     aabcd
   2793 
   2794 /^/
   2795     abc
   2796 
   2797 /$/
   2798     abc
   2799 
   2800 /a.c/
   2801     abc
   2802     axc
   2803 
   2804 /a.*c/
   2805     axyzc
   2806 
   2807 /a[bc]d/
   2808     abd
   2809     *** Failers
   2810     axyzd
   2811     abc
   2812 
   2813 /a[b-d]e/
   2814     ace
   2815 
   2816 /a[b-d]/
   2817     aac
   2818 
   2819 /a[-b]/
   2820     a-
   2821 
   2822 /a[b-]/
   2823     a-
   2824 
   2825 /a]/
   2826     a]
   2827 
   2828 /a[]]b/
   2829     a]b
   2830 
   2831 /a[^bc]d/
   2832     aed
   2833     *** Failers
   2834     abd
   2835     abd
   2836 
   2837 /a[^-b]c/
   2838     adc
   2839 
   2840 /a[^]b]c/
   2841     adc
   2842     *** Failers
   2843     a-c
   2844     a]c
   2845 
   2846 /\ba\b/
   2847     a-
   2848     -a
   2849     -a-
   2850 
   2851 /\by\b/
   2852     *** Failers
   2853     xy
   2854     yz
   2855     xyz
   2856 
   2857 /\Ba\B/
   2858     *** Failers
   2859     a-
   2860     -a
   2861     -a-
   2862 
   2863 /\By\b/
   2864     xy
   2865 
   2866 /\by\B/
   2867     yz
   2868 
   2869 /\By\B/
   2870     xyz
   2871 
   2872 /\w/
   2873     a
   2874 
   2875 /\W/
   2876     -
   2877     *** Failers
   2878     -
   2879     a
   2880 
   2881 /a\sb/
   2882     a b
   2883 
   2884 /a\Sb/
   2885     a-b
   2886     *** Failers
   2887     a-b
   2888     a b
   2889 
   2890 /\d/
   2891     1
   2892 
   2893 /\D/
   2894     -
   2895     *** Failers
   2896     -
   2897     1
   2898 
   2899 /[\w]/
   2900     a
   2901 
   2902 /[\W]/
   2903     -
   2904     *** Failers
   2905     -
   2906     a
   2907 
   2908 /a[\s]b/
   2909     a b
   2910 
   2911 /a[\S]b/
   2912     a-b
   2913     *** Failers
   2914     a-b
   2915     a b
   2916 
   2917 /[\d]/
   2918     1
   2919 
   2920 /[\D]/
   2921     -
   2922     *** Failers
   2923     -
   2924     1
   2925 
   2926 /ab|cd/
   2927     abc
   2928     abcd
   2929 
   2930 /()ef/
   2931     def
   2932 
   2933 /$b/
   2934 
   2935 /a\(b/
   2936     a(b
   2937 
   2938 /a\(*b/
   2939     ab
   2940     a((b
   2941 
   2942 /a\\b/
   2943     a\b
   2944 
   2945 /((a))/
   2946     abc
   2947 
   2948 /(a)b(c)/
   2949     abc
   2950 
   2951 /a+b+c/
   2952     aabbabc
   2953 
   2954 /a{1,}b{1,}c/
   2955     aabbabc
   2956 
   2957 /a.+?c/
   2958     abcabc
   2959 
   2960 /(a+|b)*/
   2961     ab
   2962 
   2963 /(a+|b){0,}/
   2964     ab
   2965 
   2966 /(a+|b)+/
   2967     ab
   2968 
   2969 /(a+|b){1,}/
   2970     ab
   2971 
   2972 /(a+|b)?/
   2973     ab
   2974 
   2975 /(a+|b){0,1}/
   2976     ab
   2977 
   2978 /[^ab]*/
   2979     cde
   2980 
   2981 /abc/
   2982     *** Failers
   2983     b
   2984     
   2985 
   2986 /a*/
   2987     
   2988 
   2989 /([abc])*d/
   2990     abbbcd
   2991 
   2992 /([abc])*bcd/
   2993     abcd
   2994 
   2995 /a|b|c|d|e/
   2996     e
   2997 
   2998 /(a|b|c|d|e)f/
   2999     ef
   3000 
   3001 /abcd*efg/
   3002     abcdefg
   3003 
   3004 /ab*/
   3005     xabyabbbz
   3006     xayabbbz
   3007 
   3008 /(ab|cd)e/
   3009     abcde
   3010 
   3011 /[abhgefdc]ij/
   3012     hij
   3013 
   3014 /^(ab|cd)e/
   3015 
   3016 /(abc|)ef/
   3017     abcdef
   3018 
   3019 /(a|b)c*d/
   3020     abcd
   3021 
   3022 /(ab|ab*)bc/
   3023     abc
   3024 
   3025 /a([bc]*)c*/
   3026     abc
   3027 
   3028 /a([bc]*)(c*d)/
   3029     abcd
   3030 
   3031 /a([bc]+)(c*d)/
   3032     abcd
   3033 
   3034 /a([bc]*)(c+d)/
   3035     abcd
   3036 
   3037 /a[bcd]*dcdcde/
   3038     adcdcde
   3039 
   3040 /a[bcd]+dcdcde/
   3041     *** Failers
   3042     abcde
   3043     adcdcde
   3044 
   3045 /(ab|a)b*c/
   3046     abc
   3047 
   3048 /((a)(b)c)(d)/
   3049     abcd
   3050 
   3051 /[a-zA-Z_][a-zA-Z0-9_]*/
   3052     alpha
   3053 
   3054 /^a(bc+|b[eh])g|.h$/
   3055     abh
   3056 
   3057 /(bc+d$|ef*g.|h?i(j|k))/
   3058     effgz
   3059     ij
   3060     reffgz
   3061     *** Failers
   3062     effg
   3063     bcdd
   3064 
   3065 /((((((((((a))))))))))/
   3066     a
   3067 
   3068 /(((((((((a)))))))))/
   3069     a
   3070 
   3071 /multiple words of text/
   3072     *** Failers
   3073     aa
   3074     uh-uh
   3075 
   3076 /multiple words/
   3077     multiple words, yeah
   3078 
   3079 /(.*)c(.*)/
   3080     abcde
   3081 
   3082 /\((.*), (.*)\)/
   3083     (a, b)
   3084 
   3085 /[k]/
   3086 
   3087 /abcd/
   3088     abcd
   3089 
   3090 /a(bc)d/
   3091     abcd
   3092 
   3093 /a[-]?c/
   3094     ac
   3095 
   3096 /abc/i
   3097     ABC
   3098     XABCY
   3099     ABABC
   3100     *** Failers
   3101     aaxabxbaxbbx
   3102     XBC
   3103     AXC
   3104     ABX
   3105 
   3106 /ab*c/i
   3107     ABC
   3108 
   3109 /ab*bc/i
   3110     ABC
   3111     ABBC
   3112 
   3113 /ab*?bc/i
   3114     ABBBBC
   3115 
   3116 /ab{0,}?bc/i
   3117     ABBBBC
   3118 
   3119 /ab+?bc/i
   3120     ABBC
   3121 
   3122 /ab+bc/i
   3123     *** Failers
   3124     ABC
   3125     ABQ
   3126 
   3127 /ab{1,}bc/i
   3128 
   3129 /ab+bc/i
   3130     ABBBBC
   3131 
   3132 /ab{1,}?bc/i
   3133     ABBBBC
   3134 
   3135 /ab{1,3}?bc/i
   3136     ABBBBC
   3137 
   3138 /ab{3,4}?bc/i
   3139     ABBBBC
   3140 
   3141 /ab{4,5}?bc/i
   3142     *** Failers
   3143     ABQ
   3144     ABBBBC
   3145 
   3146 /ab??bc/i
   3147     ABBC
   3148     ABC
   3149 
   3150 /ab{0,1}?bc/i
   3151     ABC
   3152 
   3153 /ab??bc/i
   3154 
   3155 /ab??c/i
   3156     ABC
   3157 
   3158 /ab{0,1}?c/i
   3159     ABC
   3160 
   3161 /^abc$/i
   3162     ABC
   3163     *** Failers
   3164     ABBBBC
   3165     ABCC
   3166 
   3167 /^abc/i
   3168     ABCC
   3169 
   3170 /^abc$/i
   3171 
   3172 /abc$/i
   3173     AABC
   3174 
   3175 /^/i
   3176     ABC
   3177 
   3178 /$/i
   3179     ABC
   3180 
   3181 /a.c/i
   3182     ABC
   3183     AXC
   3184 
   3185 /a.*?c/i
   3186     AXYZC
   3187 
   3188 /a.*c/i
   3189     *** Failers
   3190     AABC
   3191     AXYZD
   3192 
   3193 /a[bc]d/i
   3194     ABD
   3195 
   3196 /a[b-d]e/i
   3197     ACE
   3198     *** Failers
   3199     ABC
   3200     ABD
   3201 
   3202 /a[b-d]/i
   3203     AAC
   3204 
   3205 /a[-b]/i
   3206     A-
   3207 
   3208 /a[b-]/i
   3209     A-
   3210 
   3211 /a]/i
   3212     A]
   3213 
   3214 /a[]]b/i
   3215     A]B
   3216 
   3217 /a[^bc]d/i
   3218     AED
   3219 
   3220 /a[^-b]c/i
   3221     ADC
   3222     *** Failers
   3223     ABD
   3224     A-C
   3225 
   3226 /a[^]b]c/i
   3227     ADC
   3228 
   3229 /ab|cd/i
   3230     ABC
   3231     ABCD
   3232 
   3233 /()ef/i
   3234     DEF
   3235 
   3236 /$b/i
   3237     *** Failers
   3238     A]C
   3239     B
   3240 
   3241 /a\(b/i
   3242     A(B
   3243 
   3244 /a\(*b/i
   3245     AB
   3246     A((B
   3247 
   3248 /a\\b/i
   3249     A\B
   3250 
   3251 /((a))/i
   3252     ABC
   3253 
   3254 /(a)b(c)/i
   3255     ABC
   3256 
   3257 /a+b+c/i
   3258     AABBABC
   3259 
   3260 /a{1,}b{1,}c/i
   3261     AABBABC
   3262 
   3263 /a.+?c/i
   3264     ABCABC
   3265 
   3266 /a.*?c/i
   3267     ABCABC
   3268 
   3269 /a.{0,5}?c/i
   3270     ABCABC
   3271 
   3272 /(a+|b)*/i
   3273     AB
   3274 
   3275 /(a+|b){0,}/i
   3276     AB
   3277 
   3278 /(a+|b)+/i
   3279     AB
   3280 
   3281 /(a+|b){1,}/i
   3282     AB
   3283 
   3284 /(a+|b)?/i
   3285     AB
   3286 
   3287 /(a+|b){0,1}/i
   3288     AB
   3289 
   3290 /(a+|b){0,1}?/i
   3291     AB
   3292 
   3293 /[^ab]*/i
   3294     CDE
   3295 
   3296 /abc/i
   3297 
   3298 /a*/i
   3299     
   3300 
   3301 /([abc])*d/i
   3302     ABBBCD
   3303 
   3304 /([abc])*bcd/i
   3305     ABCD
   3306 
   3307 /a|b|c|d|e/i
   3308     E
   3309 
   3310 /(a|b|c|d|e)f/i
   3311     EF
   3312 
   3313 /abcd*efg/i
   3314     ABCDEFG
   3315 
   3316 /ab*/i
   3317     XABYABBBZ
   3318     XAYABBBZ
   3319 
   3320 /(ab|cd)e/i
   3321     ABCDE
   3322 
   3323 /[abhgefdc]ij/i
   3324     HIJ
   3325 
   3326 /^(ab|cd)e/i
   3327     ABCDE
   3328 
   3329 /(abc|)ef/i
   3330     ABCDEF
   3331 
   3332 /(a|b)c*d/i
   3333     ABCD
   3334 
   3335 /(ab|ab*)bc/i
   3336     ABC
   3337 
   3338 /a([bc]*)c*/i
   3339     ABC
   3340 
   3341 /a([bc]*)(c*d)/i
   3342     ABCD
   3343 
   3344 /a([bc]+)(c*d)/i
   3345     ABCD
   3346 
   3347 /a([bc]*)(c+d)/i
   3348     ABCD
   3349 
   3350 /a[bcd]*dcdcde/i
   3351     ADCDCDE
   3352 
   3353 /a[bcd]+dcdcde/i
   3354 
   3355 /(ab|a)b*c/i
   3356     ABC
   3357 
   3358 /((a)(b)c)(d)/i
   3359     ABCD
   3360 
   3361 /[a-zA-Z_][a-zA-Z0-9_]*/i
   3362     ALPHA
   3363 
   3364 /^a(bc+|b[eh])g|.h$/i
   3365     ABH
   3366 
   3367 /(bc+d$|ef*g.|h?i(j|k))/i
   3368     EFFGZ
   3369     IJ
   3370     REFFGZ
   3371     *** Failers
   3372     ADCDCDE
   3373     EFFG
   3374     BCDD
   3375 
   3376 /((((((((((a))))))))))/i
   3377     A
   3378 
   3379 /(((((((((a)))))))))/i
   3380     A
   3381 
   3382 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
   3383     A
   3384 
   3385 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
   3386     C
   3387 
   3388 /multiple words of text/i
   3389     *** Failers
   3390     AA
   3391     UH-UH
   3392 
   3393 /multiple words/i
   3394     MULTIPLE WORDS, YEAH
   3395 
   3396 /(.*)c(.*)/i
   3397     ABCDE
   3398 
   3399 /\((.*), (.*)\)/i
   3400     (A, B)
   3401 
   3402 /[k]/i
   3403 
   3404 /abcd/i
   3405     ABCD
   3406 
   3407 /a(bc)d/i
   3408     ABCD
   3409 
   3410 /a[-]?c/i
   3411     AC
   3412 
   3413 /a(?!b)./
   3414     abad
   3415 
   3416 /a(?=d)./
   3417     abad
   3418 
   3419 /a(?=c|d)./
   3420     abad
   3421 
   3422 /a(?:b|c|d)(.)/
   3423     ace
   3424 
   3425 /a(?:b|c|d)*(.)/
   3426     ace
   3427 
   3428 /a(?:b|c|d)+?(.)/
   3429     ace
   3430     acdbcdbe
   3431 
   3432 /a(?:b|c|d)+(.)/
   3433     acdbcdbe
   3434 
   3435 /a(?:b|c|d){2}(.)/
   3436     acdbcdbe
   3437 
   3438 /a(?:b|c|d){4,5}(.)/
   3439     acdbcdbe
   3440 
   3441 /a(?:b|c|d){4,5}?(.)/
   3442     acdbcdbe
   3443 
   3444 /((foo)|(bar))*/
   3445     foobar
   3446 
   3447 /a(?:b|c|d){6,7}(.)/
   3448     acdbcdbe
   3449 
   3450 /a(?:b|c|d){6,7}?(.)/
   3451     acdbcdbe
   3452 
   3453 /a(?:b|c|d){5,6}(.)/
   3454     acdbcdbe
   3455 
   3456 /a(?:b|c|d){5,6}?(.)/
   3457     acdbcdbe
   3458 
   3459 /a(?:b|c|d){5,7}(.)/
   3460     acdbcdbe
   3461 
   3462 /a(?:b|c|d){5,7}?(.)/
   3463     acdbcdbe
   3464 
   3465 /a(?:b|(c|e){1,2}?|d)+?(.)/
   3466     ace
   3467 
   3468 /^(.+)?B/
   3469     AB
   3470 
   3471 /^([^a-z])|(\^)$/
   3472     .
   3473 
   3474 /^[<>]&/
   3475     <&OUT
   3476 
   3477 /(?:(f)(o)(o)|(b)(a)(r))*/
   3478     foobar
   3479 
   3480 /(?<=a)b/
   3481     ab
   3482     *** Failers
   3483     cb
   3484     b
   3485 
   3486 /(?<!c)b/
   3487     ab
   3488     b
   3489     b
   3490 
   3491 /(?:..)*a/
   3492     aba
   3493 
   3494 /(?:..)*?a/
   3495     aba
   3496 
   3497 /^(){3,5}/
   3498     abc
   3499 
   3500 /^(a+)*ax/
   3501     aax
   3502 
   3503 /^((a|b)+)*ax/
   3504     aax
   3505 
   3506 /^((a|bc)+)*ax/
   3507     aax
   3508 
   3509 /(a|x)*ab/
   3510     cab
   3511 
   3512 /(a)*ab/
   3513     cab
   3514 
   3515 /(?:(?i)a)b/
   3516     ab
   3517 
   3518 /((?i)a)b/
   3519     ab
   3520 
   3521 /(?:(?i)a)b/
   3522     Ab
   3523 
   3524 /((?i)a)b/
   3525     Ab
   3526 
   3527 /(?:(?i)a)b/
   3528     *** Failers
   3529     cb
   3530     aB
   3531 
   3532 /((?i)a)b/
   3533 
   3534 /(?i:a)b/
   3535     ab
   3536 
   3537 /((?i:a))b/
   3538     ab
   3539 
   3540 /(?i:a)b/
   3541     Ab
   3542 
   3543 /((?i:a))b/
   3544     Ab
   3545 
   3546 /(?i:a)b/
   3547     *** Failers
   3548     aB
   3549     aB
   3550 
   3551 /((?i:a))b/
   3552 
   3553 /(?:(?-i)a)b/i
   3554     ab
   3555 
   3556 /((?-i)a)b/i
   3557     ab
   3558 
   3559 /(?:(?-i)a)b/i
   3560     aB
   3561 
   3562 /((?-i)a)b/i
   3563     aB
   3564 
   3565 /(?:(?-i)a)b/i
   3566     *** Failers
   3567     aB
   3568     Ab
   3569 
   3570 /((?-i)a)b/i
   3571 
   3572 /(?:(?-i)a)b/i
   3573     aB
   3574 
   3575 /((?-i)a)b/i
   3576     aB
   3577 
   3578 /(?:(?-i)a)b/i
   3579     *** Failers
   3580     Ab
   3581     AB
   3582 
   3583 /((?-i)a)b/i
   3584 
   3585 /(?-i:a)b/i
   3586     ab
   3587 
   3588 /((?-i:a))b/i
   3589     ab
   3590 
   3591 /(?-i:a)b/i
   3592     aB
   3593 
   3594 /((?-i:a))b/i
   3595     aB
   3596 
   3597 /(?-i:a)b/i
   3598     *** Failers
   3599     AB
   3600     Ab
   3601 
   3602 /((?-i:a))b/i
   3603 
   3604 /(?-i:a)b/i
   3605     aB
   3606 
   3607 /((?-i:a))b/i
   3608     aB
   3609 
   3610 /(?-i:a)b/i
   3611     *** Failers
   3612     Ab
   3613     AB
   3614 
   3615 /((?-i:a))b/i
   3616 
   3617 /((?-i:a.))b/i
   3618     *** Failers
   3619     AB
   3620     a\nB
   3621 
   3622 /((?s-i:a.))b/i
   3623     a\nB
   3624 
   3625 /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
   3626     cabbbb
   3627 
   3628 /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
   3629     caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
   3630 
   3631 /foo\w*\d{4}baz/
   3632     foobar1234baz
   3633 
   3634 /x(~~)*(?:(?:F)?)?/
   3635     x~~
   3636 
   3637 /^a(?#xxx){3}c/
   3638     aaac
   3639 
   3640 /^a (?#xxx) (?#yyy) {3}c/x
   3641     aaac
   3642 
   3643 /(?<![cd])b/
   3644     *** Failers
   3645     B\nB
   3646     dbcb
   3647 
   3648 /(?<![cd])[ab]/
   3649     dbaacb
   3650 
   3651 /(?<!(c|d))b/
   3652 
   3653 /(?<!(c|d))[ab]/
   3654     dbaacb
   3655 
   3656 /(?<!cd)[ab]/
   3657     cdaccb
   3658 
   3659 /^(?:a?b?)*$/
   3660     *** Failers
   3661     dbcb
   3662     a--
   3663 
   3664 /((?s)^a(.))((?m)^b$)/
   3665     a\nb\nc\n
   3666 
   3667 /((?m)^b$)/
   3668     a\nb\nc\n
   3669 
   3670 /(?m)^b/
   3671     a\nb\n
   3672 
   3673 /(?m)^(b)/
   3674     a\nb\n
   3675 
   3676 /((?m)^b)/
   3677     a\nb\n
   3678 
   3679 /\n((?m)^b)/
   3680     a\nb\n
   3681 
   3682 /((?s).)c(?!.)/
   3683     a\nb\nc\n
   3684     a\nb\nc\n
   3685 
   3686 /((?s)b.)c(?!.)/
   3687     a\nb\nc\n
   3688     a\nb\nc\n
   3689 
   3690 /^b/
   3691 
   3692 /()^b/
   3693     *** Failers
   3694     a\nb\nc\n
   3695     a\nb\nc\n
   3696 
   3697 /((?m)^b)/
   3698     a\nb\nc\n
   3699 
   3700 /(?(?!a)a|b)/
   3701 
   3702 /(?(?!a)b|a)/
   3703     a
   3704 
   3705 /(?(?=a)b|a)/
   3706     *** Failers
   3707     a
   3708     a
   3709 
   3710 /(?(?=a)a|b)/
   3711     a
   3712 
   3713 /(\w+:)+/
   3714     one:
   3715 
   3716 /$(?<=^(a))/
   3717     a
   3718 
   3719 /([\w:]+::)?(\w+)$/
   3720     abcd
   3721     xy:z:::abcd
   3722 
   3723 /^[^bcd]*(c+)/
   3724     aexycd
   3725 
   3726 /(a*)b+/
   3727     caab
   3728 
   3729 /([\w:]+::)?(\w+)$/
   3730     abcd
   3731     xy:z:::abcd
   3732     *** Failers
   3733     abcd:
   3734     abcd:
   3735 
   3736 /^[^bcd]*(c+)/
   3737     aexycd
   3738 
   3739 /(>a+)ab/
   3740 
   3741 /(?>a+)b/
   3742     aaab
   3743 
   3744 /([[:]+)/
   3745     a:[b]:
   3746 
   3747 /([[=]+)/
   3748     a=[b]=
   3749 
   3750 /([[.]+)/
   3751     a.[b].
   3752 
   3753 /((?>a+)b)/
   3754     aaab
   3755 
   3756 /(?>(a+))b/
   3757     aaab
   3758 
   3759 /((?>[^()]+)|\([^()]*\))+/
   3760     ((abc(ade)ufh()()x
   3761 
   3762 /a\Z/
   3763     *** Failers
   3764     aaab
   3765     a\nb\n
   3766 
   3767 /b\Z/
   3768     a\nb\n
   3769 
   3770 /b\z/
   3771 
   3772 /b\Z/
   3773     a\nb
   3774 
   3775 /b\z/
   3776     a\nb
   3777     *** Failers
   3778     
   3779 /(?>.*)(?<=(abcd|wxyz))/
   3780     alphabetabcd
   3781     endingwxyz
   3782     *** Failers
   3783     a rather long string that doesn't end with one of them
   3784 
   3785 /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
   3786     word cat dog elephant mussel cow horse canary baboon snake shark otherword
   3787     word cat dog elephant mussel cow horse canary baboon snake shark
   3788   
   3789 /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
   3790     word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
   3791 
   3792 /(?<=\d{3}(?!999))foo/
   3793     999foo
   3794     123999foo 
   3795     *** Failers
   3796     123abcfoo
   3797     
   3798 /(?<=(?!...999)\d{3})foo/
   3799     999foo
   3800     123999foo 
   3801     *** Failers
   3802     123abcfoo
   3803 
   3804 /(?<=\d{3}(?!999)...)foo/
   3805     123abcfoo
   3806     123456foo 
   3807     *** Failers
   3808     123999foo  
   3809     
   3810 /(?<=\d{3}...)(?<!999)foo/
   3811     123abcfoo   
   3812     123456foo 
   3813     *** Failers
   3814     123999foo  
   3815 
   3816 /((Z)+|A)*/
   3817     ZABCDEFG
   3818 
   3819 /(Z()|A)*/
   3820     ZABCDEFG
   3821 
   3822 /(Z(())|A)*/
   3823     ZABCDEFG
   3824 
   3825 /((?>Z)+|A)*/
   3826     ZABCDEFG
   3827 
   3828 /((?>)+|A)*/
   3829     ZABCDEFG
   3830 
   3831 /a*/g
   3832     abbab
   3833 
   3834 /^[\d-a]/
   3835     abcde
   3836     -things
   3837     0digit
   3838     *** Failers
   3839     bcdef    
   3840     
   3841 /[[:space:]]+/
   3842     > \x09\x0a\x0c\x0d\x0b<
   3843      
   3844 /[[:blank:]]+/
   3845     > \x09\x0a\x0c\x0d\x0b<
   3846      
   3847 /[\s]+/
   3848     > \x09\x0a\x0c\x0d\x0b<
   3849      
   3850 /\s+/
   3851     > \x09\x0a\x0c\x0d\x0b<
   3852      
   3853 /ab/x
   3855     ab
   3856 
   3857 /(?!\A)x/m
   3858   a\nxb\n
   3859 
   3860 /(?!^)x/m
   3861   a\nxb\n
   3862 
   3863 /abc\Qabc\Eabc/
   3864     abcabcabc
   3865     
   3866 /abc\Q(*+|\Eabc/
   3867     abc(*+|abc 
   3868 
   3869 /   abc\Q abc\Eabc/x
   3870     abc abcabc
   3871     *** Failers
   3872     abcabcabc  
   3873     
   3874 /abc#comment
   3875     \Q#not comment
   3876     literal\E/x
   3877     abc#not comment\n    literal     
   3878 
   3879 /abc#comment
   3880     \Q#not comment
   3881     literal/x
   3882     abc#not comment\n    literal     
   3883 
   3884 /abc#comment
   3885     \Q#not comment
   3886     literal\E #more comment
   3887     /x
   3888     abc#not comment\n    literal     
   3889 
   3890 /abc#comment
   3891     \Q#not comment
   3892     literal\E #more comment/x
   3893     abc#not comment\n    literal     
   3894 
   3895 /\Qabc\$xyz\E/
   3896     abc\\\$xyz
   3897 
   3898 /\Qabc\E\$\Qxyz\E/
   3899     abc\$xyz
   3900 
   3901 /\Gabc/
   3902     abc
   3903     *** Failers
   3904     xyzabc  
   3905 
   3906 /\Gabc./g
   3907     abc1abc2xyzabc3
   3908 
   3909 /abc./g
   3910     abc1abc2xyzabc3 
   3911 
   3912 /a(?x: b c )d/
   3913     XabcdY
   3914     *** Failers 
   3915     Xa b c d Y 
   3916 
   3917 /((?x)x y z | a b c)/
   3918     XabcY
   3919     AxyzB 
   3920 
   3921 /(?i)AB(?-i)C/
   3922     XabCY
   3923     *** Failers
   3924     XabcY  
   3925 
   3926 /((?i)AB(?-i)C|D)E/
   3927     abCE
   3928     DE
   3929     *** Failers
   3930     abcE
   3931     abCe  
   3932     dE
   3933     De    
   3934 
   3935 /[z\Qa-d]\E]/
   3936     z
   3937     a
   3938     -
   3939     d
   3940     ] 
   3941     *** Failers
   3942     b     
   3943 
   3944 /[\z\C]/
   3945     z
   3946     C 
   3947     
   3948 /\M/
   3949     M 
   3950     
   3951 /(a+)*b/
   3952     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
   3953     
   3954 /(?i)reg(?:ul(?:[a]|ae)r|ex)/
   3955     REGular
   3956     regulaer
   3957     Regex  
   3958     regulr 
   3959 
   3960 /[--]+/
   3961     
   3962     
   3963     
   3964     
   3965 
   3966 /(?<=Z)X./
   3967     \x84XAZXB
   3968 
   3969 /^(?(2)a|(1)(2))+$/
   3970     123a
   3971 
   3972 /(?<=a|bbbb)c/
   3973     ac
   3974     bbbbc
   3975 
   3976 /abc/SS>testsavedregex
   3977 <testsavedregex
   3978     abc
   3979     *** Failers
   3980     bca
   3981     
   3982 /abc/FSS>testsavedregex
   3983 <testsavedregex
   3984     abc
   3985     *** Failers
   3986     bca
   3987 
   3988 /(a|b)/S>testsavedregex
   3989 <testsavedregex
   3990     abc
   3991     *** Failers
   3992     def  
   3993     
   3994 /(a|b)/SF>testsavedregex
   3995 <testsavedregex
   3996     abc
   3997     *** Failers
   3998     def  
   3999     
   4000 /line\nbreak/
   4001     this is a line\nbreak
   4002     line one\nthis is a line\nbreak in the second line 
   4003 
   4004 /line\nbreak/f
   4005     this is a line\nbreak
   4006     ** Failers 
   4007     line one\nthis is a line\nbreak in the second line 
   4008 
   4009 /line\nbreak/mf
   4010     this is a line\nbreak
   4011     ** Failers 
   4012     line one\nthis is a line\nbreak in the second line 
   4013 
   4014 /1234/
   4015     123\P
   4016     a4\P\R
   4017 
   4018 /1234/
   4019     123\P
   4020     4\P\R
   4021 
   4022 /^/mg
   4023     a\nb\nc\n
   4024     \ 
   4025     
   4026 /(?<=C\n)^/mg
   4027     A\nC\nC\n 
   4028 
   4029 /(?s)A?B/
   4030     AB
   4031     aB  
   4032 
   4033 /(?s)A*B/
   4034     AB
   4035     aB  
   4036 
   4037 /(?m)A?B/
   4038     AB
   4039     aB  
   4040 
   4041 /(?m)A*B/
   4042     AB
   4043     aB  
   4044 
   4045 /Content-Type\x3A[^\r\n]{6,}/
   4046     Content-Type:xxxxxyyy 
   4047 
   4048 /Content-Type\x3A[^\r\n]{6,}z/
   4049     Content-Type:xxxxxyyyz
   4050 
   4051 /Content-Type\x3A[^a]{6,}/
   4052     Content-Type:xxxyyy 
   4053 
   4054 /Content-Type\x3A[^a]{6,}z/
   4055     Content-Type:xxxyyyz
   4056 
   4057 /^abc/m
   4058     xyz\nabc
   4059     xyz\nabc\<lf>
   4060     xyz\r\nabc\<lf>
   4061     xyz\rabc\<cr>
   4062     xyz\r\nabc\<crlf>
   4063     ** Failers 
   4064     xyz\nabc\<cr>
   4065     xyz\r\nabc\<cr>
   4066     xyz\nabc\<crlf>
   4067     xyz\rabc\<crlf>
   4068     xyz\rabc\<lf>
   4069     
   4070 /abc$/m<lf>
   4071     xyzabc
   4072     xyzabc\n 
   4073     xyzabc\npqr 
   4074     xyzabc\r\<cr> 
   4075     xyzabc\rpqr\<cr> 
   4076     xyzabc\r\n\<crlf> 
   4077     xyzabc\r\npqr\<crlf> 
   4078     ** Failers
   4079     xyzabc\r 
   4080     xyzabc\rpqr 
   4081     xyzabc\r\n 
   4082     xyzabc\r\npqr 
   4083     
   4084 /^abc/m<cr>
   4085     xyz\rabcdef
   4086     xyz\nabcdef\<lf>
   4087     ** Failers  
   4088     xyz\nabcdef
   4089        
   4090 /^abc/m<lf>
   4091     xyz\nabcdef
   4092     xyz\rabcdef\<cr>
   4093     ** Failers  
   4094     xyz\rabcdef
   4095        
   4096 /^abc/m<crlf>
   4097     xyz\r\nabcdef
   4098     xyz\rabcdef\<cr>
   4099     ** Failers  
   4100     xyz\rabcdef
   4101     
   4102 /.*/<lf>
   4103     abc\ndef
   4104     abc\rdef
   4105     abc\r\ndef
   4106     \<cr>abc\ndef
   4107     \<cr>abc\rdef
   4108     \<cr>abc\r\ndef
   4109     \<crlf>abc\ndef
   4110     \<crlf>abc\rdef
   4111     \<crlf>abc\r\ndef
   4112 
   4113 /\w+(.)(.)?def/s
   4114     abc\ndef
   4115     abc\rdef
   4116     abc\r\ndef
   4117 
   4118 /^\w+=.*(\\\n.*)*/
   4119     abc=xyz\\\npqr
   4120 
   4121 /^(a()*)*/
   4122     aaaa
   4123 
   4124 /^(?:a(?:(?:))*)*/
   4125     aaaa
   4126 
   4127 /^(a()+)+/
   4128     aaaa
   4129 
   4130 /^(?:a(?:(?:))+)+/
   4131     aaaa
   4132 
   4133 /(a|)*\d/
   4134   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
   4135   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
   4136 
   4137 /(?>a|)*\d/
   4138   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
   4139   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
   4140 
   4141 /(?:a|)*\d/
   4142   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
   4143   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
   4144 
   4145 /^a.b/<lf>
   4146     a\rb
   4147     a\nb\<cr> 
   4148     ** Failers
   4149     a\nb
   4150     a\nb\<any>
   4151     a\rb\<cr>   
   4152     a\rb\<any>   
   4153 
   4154 /^abc./mgx<any>
   4155     abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
   4156 
   4157 /abc.$/mgx<any>
   4158     abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
   4159 
   4160 /^a\Rb/<bsr_unicode>
   4161     a\nb
   4162     a\rb
   4163     a\r\nb
   4164     a\x0bb
   4165     a\x0cb
   4166     a\x85b   
   4167     ** Failers
   4168     a\n\rb    
   4169 
   4170 /^a\R*b/<bsr_unicode>
   4171     ab
   4172     a\nb
   4173     a\rb
   4174     a\r\nb
   4175     a\x0bb
   4176     a\x0cb
   4177     a\x85b   
   4178     a\n\rb    
   4179     a\n\r\x85\x0cb 
   4180 
   4181 /^a\R+b/<bsr_unicode>
   4182     a\nb
   4183     a\rb
   4184     a\r\nb
   4185     a\x0bb
   4186     a\x0cb
   4187     a\x85b   
   4188     a\n\rb    
   4189     a\n\r\x85\x0cb 
   4190     ** Failers
   4191     ab  
   4192     
   4193 /^a\R{1,3}b/<bsr_unicode>
   4194     a\nb
   4195     a\n\rb
   4196     a\n\r\x85b
   4197     a\r\n\r\nb 
   4198     a\r\n\r\n\r\nb 
   4199     a\n\r\n\rb
   4200     a\n\n\r\nb 
   4201     ** Failers
   4202     a\n\n\n\rb
   4203     a\r
   4204 
   4205 /^a[\R]b/<bsr_unicode>
   4206     aRb
   4207     ** Failers
   4208     a\nb  
   4209 
   4210 /.+foo/
   4211     afoo
   4212     ** Failers 
   4213     \r\nfoo 
   4214     \nfoo 
   4215 
   4216 /.+foo/<crlf>
   4217     afoo
   4218     \nfoo 
   4219     ** Failers 
   4220     \r\nfoo 
   4221 
   4222 /.+foo/<any>
   4223     afoo
   4224     ** Failers 
   4225     \nfoo 
   4226     \r\nfoo 
   4227 
   4228 /.+foo/s
   4229     afoo
   4230     \r\nfoo 
   4231     \nfoo 
   4232 
   4233 /^$/mg<any>
   4234     abc\r\rxyz
   4235     abc\n\rxyz  
   4236     ** Failers 
   4237     abc\r\nxyz
   4238 
   4239 /^X/m
   4240     XABC
   4241     ** Failers 
   4242     XABC\B
   4243 
   4244 /(?m)^$/<any>g+
   4245     abc\r\n\r\n
   4246 
   4247 /(?m)^$|^\r\n/<any>g+ 
   4248     abc\r\n\r\n
   4249     
   4250 /(?m)$/<any>g+ 
   4251     abc\r\n\r\n
   4252 
   4253 /(?|(abc)|(xyz))/
   4254    >abc<
   4255    >xyz< 
   4256 
   4257 /(x)(?|(abc)|(xyz))(x)/
   4258     xabcx
   4259     xxyzx 
   4260 
   4261 /(x)(?|(abc)(pqr)|(xyz))(x)/
   4262     xabcpqrx
   4263     xxyzx 
   4264 
   4265 /(?|(abc)|(xyz))(?1)/
   4266     abcabc
   4267     xyzabc 
   4268     ** Failers 
   4269     xyzxyz 
   4270  
   4271 /\H\h\V\v/
   4272     X X\x0a
   4273     X\x09X\x0b
   4274     ** Failers
   4275     \xa0 X\x0a   
   4276     
   4277 /\H*\h+\V?\v{3,4}/ 
   4278     \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
   4279     \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
   4280     \x09\x20\xa0\x0a\x0b\x0c
   4281     ** Failers 
   4282     \x09\x20\xa0\x0a\x0b
   4283      
   4284 /\H{3,4}/
   4285     XY  ABCDE
   4286     XY  PQR ST 
   4287     
   4288 /.\h{3,4}./
   4289     XY  AB    PQRS
   4290 
   4291 /\h*X\h?\H+Y\H?Z/
   4292     >XNNNYZ
   4293     >  X NYQZ
   4294     ** Failers
   4295     >XYZ   
   4296     >  X NY Z
   4297 
   4298 /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
   4299     >XY\x0aZ\x0aA\x0bNN\x0c
   4300     >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
   4301 
   4302 /.+A/<crlf>
   4303     \r\nA
   4304     
   4305 /\nA/<crlf>
   4306     \r\nA 
   4307 
   4308 /[\r\n]A/<crlf>
   4309     \r\nA 
   4310 
   4311 /(\r|\n)A/<crlf>
   4312     \r\nA 
   4313 
   4314 /a\Rb/I<bsr_anycrlf>
   4315     a\rb
   4316     a\nb
   4317     a\r\nb
   4318     ** Failers
   4319     a\x85b
   4320     a\x0bb     
   4321 
   4322 /a\Rb/I<bsr_unicode>
   4323     a\rb
   4324     a\nb
   4325     a\r\nb
   4326     a\x85b
   4327     a\x0bb     
   4328     ** Failers 
   4329     a\x85b\<bsr_anycrlf>
   4330     a\x0bb\<bsr_anycrlf>
   4331     
   4332 /a\R?b/I<bsr_anycrlf>
   4333     a\rb
   4334     a\nb
   4335     a\r\nb
   4336     ** Failers
   4337     a\x85b
   4338     a\x0bb     
   4339 
   4340 /a\R?b/I<bsr_unicode>
   4341     a\rb
   4342     a\nb
   4343     a\r\nb
   4344     a\x85b
   4345     a\x0bb     
   4346     ** Failers 
   4347     a\x85b\<bsr_anycrlf>
   4348     a\x0bb\<bsr_anycrlf>
   4349     
   4350 /a\R{2,4}b/I<bsr_anycrlf>
   4351     a\r\n\nb
   4352     a\n\r\rb
   4353     a\r\n\r\n\r\n\r\nb
   4354     ** Failers
   4355     a\x85\85b
   4356     a\x0b\0bb     
   4357 
   4358 /a\R{2,4}b/I<bsr_unicode>
   4359     a\r\rb
   4360     a\n\n\nb
   4361     a\r\n\n\r\rb
   4362     a\x85\85b
   4363     a\x0b\0bb     
   4364     ** Failers 
   4365     a\r\r\r\r\rb 
   4366     a\x85\85b\<bsr_anycrlf>
   4367     a\x0b\0bb\<bsr_anycrlf>
   4368     
   4369 /a(?!)|\wbc/
   4370     abc 
   4371 
   4372 /a[]b/<JS>
   4373     ** Failers
   4374     ab
   4375 
   4376 /a[]+b/<JS>
   4377     ** Failers
   4378     ab 
   4379 
   4380 /a[]*+b/<JS>
   4381     ** Failers
   4382     ab 
   4383 
   4384 /a[^]b/<JS>
   4385     aXb
   4386     a\nb 
   4387     ** Failers
   4388     ab  
   4389     
   4390 /a[^]+b/<JS> 
   4391     aXb
   4392     a\nX\nXb 
   4393     ** Failers
   4394     ab  
   4395 
   4396 /X$/E
   4397     X
   4398     ** Failers 
   4399     X\n 
   4400 
   4401 /X$/
   4402     X
   4403     X\n 
   4404 
   4405 /xyz/C
   4406   xyz 
   4407   abcxyz 
   4408   abcxyz\Y
   4409   ** Failers 
   4410   abc
   4411   abc\Y
   4412   abcxypqr  
   4413   abcxypqr\Y  
   4414 
   4415 /(*NO_START_OPT)xyz/C
   4416   abcxyz 
   4417   
   4418 /(?C)ab/
   4419   ab
   4420   \C-ab
   4421   
   4422 /ab/C
   4423   ab
   4424   \C-ab    
   4425 
   4426 /^"((?(?=[a])[^"])|b)*"$/C
   4427     "ab"
   4428     \C-"ab"
   4429 
   4430 /\d+X|9+Y/
   4431     ++++123999\P
   4432     ++++123999Y\P
   4433 
   4434 /Z(*F)/
   4435     Z\P
   4436     ZA\P 
   4437     
   4438 /Z(?!)/
   4439     Z\P 
   4440     ZA\P 
   4441 
   4442 /dog(sbody)?/
   4443     dogs\P
   4444     dogs\P\P 
   4445     
   4446 /dog(sbody)??/
   4447     dogs\P
   4448     dogs\P\P 
   4449 
   4450 /dog|dogsbody/
   4451     dogs\P
   4452     dogs\P\P 
   4453  
   4454 /dogsbody|dog/
   4455     dogs\P
   4456     dogs\P\P 
   4457 
   4458 /Z(*F)Q|ZXY/
   4459     Z\P
   4460     ZA\P 
   4461     X\P 
   4462 
   4463 /\bthe cat\b/
   4464     the cat\P
   4465     the cat\P\P
   4466 
   4467 /dog(sbody)?/
   4468     dogs\D\P
   4469     body\D\R
   4470 
   4471 /dog(sbody)?/
   4472     dogs\D\P\P
   4473     body\D\R
   4474 
   4475 /abc/
   4476    abc\P
   4477    abc\P\P
   4478 
   4479 /abc\K123/
   4480     xyzabc123pqr
   4481     
   4482 /(?<=abc)123/
   4483     xyzabc123pqr 
   4484     xyzabc12\P
   4485     xyzabc12\P\P
   4486 
   4487 /\babc\b/
   4488     +++abc+++
   4489     +++ab\P
   4490     +++ab\P\P  
   4491 
   4492 /(?=C)/g+
   4493     ABCDECBA
   4494 
   4495 /(abc|def|xyz)/I
   4496     terhjk;abcdaadsfe
   4497     the quick xyz brown fox 
   4498     \Yterhjk;abcdaadsfe
   4499     \Ythe quick xyz brown fox 
   4500     ** Failers
   4501     thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
   4502     \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
   4503 
   4504 /(abc|def|xyz)/SI
   4505     terhjk;abcdaadsfe
   4506     the quick xyz brown fox 
   4507     \Yterhjk;abcdaadsfe
   4508     \Ythe quick xyz brown fox 
   4509     ** Failers
   4510     thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
   4511     \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
   4512 
   4513 /abcd*/+
   4514     xxxxabcd\P
   4515     xxxxabcd\P\P
   4516     dddxxx\R 
   4517     xxxxabcd\P\P
   4518     xxx\R 
   4519 
   4520 /abcd*/i
   4521     xxxxabcd\P
   4522     xxxxabcd\P\P
   4523     XXXXABCD\P
   4524     XXXXABCD\P\P
   4525 
   4526 /abc\d*/
   4527     xxxxabc1\P
   4528     xxxxabc1\P\P
   4529 
   4530 /abc[de]*/
   4531     xxxxabcde\P
   4532     xxxxabcde\P\P
   4533 
   4534 /(?:(?1)|B)(A(*F)|C)/
   4535     ABCD
   4536     CCD
   4537     ** Failers
   4538     CAD   
   4539 
   4540 /^(?:(?1)|B)(A(*F)|C)/
   4541     CCD
   4542     BCD 
   4543     ** Failers
   4544     ABCD
   4545     CAD
   4546     BAD    
   4547 
   4548 /^(?!a(*SKIP)b)/
   4549     ac
   4550     
   4551 /^(?=a(*SKIP)b|ac)/
   4552     ** Failers
   4553     ac
   4554     
   4555 /^(?=a(*THEN)b|ac)/
   4556     ac
   4557     
   4558 /^(?=a(*PRUNE)b)/
   4559     ab  
   4560     ** Failers 
   4561     ac
   4562 
   4563 /^(?(?!a(*SKIP)b))/
   4564     ac
   4565 
   4566 /(?<=abc)def/
   4567     abc\P\P
   4568 
   4569 /abc$/
   4570     abc
   4571     abc\P
   4572     abc\P\P
   4573 
   4574 /abc$/m
   4575     abc
   4576     abc\n
   4577     abc\P\P
   4578     abc\n\P\P 
   4579     abc\P
   4580     abc\n\P
   4581 
   4582 /abc\z/
   4583     abc
   4584     abc\P
   4585     abc\P\P
   4586 
   4587 /abc\Z/
   4588     abc
   4589     abc\P
   4590     abc\P\P
   4591 
   4592 /abc\b/
   4593     abc
   4594     abc\P
   4595     abc\P\P
   4596 
   4597 /abc\B/
   4598     abc
   4599     abc\P
   4600     abc\P\P
   4601 
   4602 /.+/
   4603     abc\>0
   4604     abc\>1
   4605     abc\>2
   4606     abc\>3
   4607     abc\>4
   4608     abc\>-4 
   4609 
   4610 /^(?:a)++\w/
   4611      aaaab
   4612      ** Failers 
   4613      aaaa 
   4614      bbb 
   4615 
   4616 /^(?:aa|(?:a)++\w)/
   4617      aaaab
   4618      aaaa 
   4619      ** Failers 
   4620      bbb 
   4621 
   4622 /^(?:a)*+\w/
   4623      aaaab
   4624      bbb 
   4625      ** Failers 
   4626      aaaa 
   4627 
   4628 /^(a)++\w/
   4629      aaaab
   4630      ** Failers 
   4631      aaaa 
   4632      bbb 
   4633 
   4634 /^(a|)++\w/
   4635      aaaab
   4636      ** Failers 
   4637      aaaa 
   4638      bbb 
   4639 
   4640 /(?=abc){3}abc/+
   4641     abcabcabc
   4642     ** Failers
   4643     xyz  
   4644     
   4645 /(?=abc)+abc/+
   4646     abcabcabc
   4647     ** Failers
   4648     xyz  
   4649     
   4650 /(?=abc)++abc/+
   4651     abcabcabc
   4652     ** Failers
   4653     xyz  
   4654     
   4655 /(?=abc){0}xyz/
   4656     xyz 
   4657 
   4658 /(?=abc){1}xyz/
   4659     ** Failers
   4660     xyz 
   4661     
   4662 /(?=(a))?./
   4663     ab
   4664     bc
   4665       
   4666 /(?=(a))??./
   4667     ab
   4668     bc
   4669 
   4670 /^(?=(a)){0}b(?1)/
   4671     backgammon
   4672 
   4673 /^(?=(?1))?[az]([abc])d/
   4674     abd 
   4675     zcdxx 
   4676 
   4677 /^(?!a){0}\w+/
   4678     aaaaa
   4679 
   4680 /(?<=(abc))?xyz/
   4681     abcxyz
   4682     pqrxyz 
   4683 
   4684 /((?2))((?1))/
   4685     abc
   4686 
   4687 /(?(R)a+|(?R)b)/
   4688     aaaabcde
   4689 
   4690 /(?(R)a+|((?R))b)/
   4691     aaaabcde
   4692 
   4693 /((?(R)a+|(?1)b))/
   4694     aaaabcde
   4695 
   4696 /((?(R2)a+|(?1)b))/
   4697     aaaabcde
   4698 
   4699 /(?(R)a*(?1)|((?R))b)/
   4700     aaaabcde
   4701 
   4702 /(a+)/O
   4703     \O6aaaa
   4704     \O8aaaa
   4705 
   4706 /ab\Cde/
   4707     abXde
   4708     
   4709 /(?<=ab\Cde)X/
   4710     abZdeX
   4711 
   4712 /^\R/
   4713     \r\P
   4714     \r\P\P
   4715     
   4716 /^\R{2,3}x/
   4717     \r\P
   4718     \r\P\P
   4719     \r\r\P 
   4720     \r\r\P\P
   4721     \r\r\r\P  
   4722     \r\r\r\P\P
   4723     \r\rx
   4724     \r\r\rx    
   4725 
   4726 /^\R{2,3}?x/
   4727     \r\P
   4728     \r\P\P
   4729     \r\r\P 
   4730     \r\r\P\P
   4731     \r\r\r\P  
   4732     \r\r\r\P\P
   4733     \r\rx
   4734     \r\r\rx    
   4735     
   4736 /^\R?x/
   4737     \r\P
   4738     \r\P\P 
   4739     x
   4740     \rx  
   4741 
   4742 /^\R+x/
   4743     \r\P
   4744     \r\P\P 
   4745     \r\n\P
   4746     \r\n\P\P  
   4747     \rx  
   4748 
   4749 /^a$/<CRLF>
   4750     a\r\P
   4751     a\r\P\P 
   4752 
   4753 /^a$/m<CRLF>
   4754     a\r\P
   4755     a\r\P\P 
   4756 
   4757 /^(a$|a\r)/<CRLF>
   4758     a\r\P
   4759     a\r\P\P 
   4760 
   4761 /^(a$|a\r)/m<CRLF>
   4762     a\r\P
   4763     a\r\P\P 
   4764 
   4765 /./<CRLF>
   4766     \r\P
   4767     \r\P\P 
   4768   
   4769 /.{2,3}/<CRLF>
   4770     \r\P 
   4771     \r\P\P
   4772     \r\r\P
   4773     \r\r\P\P
   4774     \r\r\r\P
   4775     \r\r\r\P\P     
   4776 
   4777 /.{2,3}?/<CRLF>
   4778     \r\P 
   4779     \r\P\P
   4780     \r\r\P
   4781     \r\r\P\P
   4782     \r\r\r\P
   4783     \r\r\r\P\P     
   4784 
   4785 /-- Test simple validity check for restarts --/
   4786 
   4787 /abcdef/
   4788    abc\R
   4789 
   4790 /<H((?(?!<H|F>)(.)|(?R))++)*F>/
   4791     text <H more text <H texting more  hexA0-"\xA0"    hex above 7F-"\xBC" F> text xxxxx <H text F> text F> text2 <H text sample F> more text.
   4792 
   4793 /^(?>.{4})abc|^\w\w.xabcd/
   4794     xxxxabcd
   4795     xx\xa0xabcd 
   4796 
   4797 /^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/
   4798     xxxxxxxxabcd
   4799     xx\xa0xxxxxabcd 
   4800 
   4801 /abcd/
   4802     abcd\O0
   4803 
   4804 /-- These tests show up auto-possessification --/
   4805 
   4806 /[ab]*/
   4807     aaaa
   4808     
   4809 /[ab]*?/
   4810     aaaa
   4811     
   4812 /[ab]?/
   4813     aaaa
   4814     
   4815 /[ab]??/
   4816     aaaa
   4817     
   4818 /[ab]+/
   4819     aaaa
   4820     
   4821 /[ab]+?/
   4822     aaaa
   4823     
   4824 /[ab]{2,3}/
   4825     aaaa
   4826     
   4827 /[ab]{2,3}?/
   4828     aaaa
   4829     
   4830 /[ab]{2,}/
   4831     aaaa    
   4832 
   4833 /[ab]{2,}?/
   4834     aaaa    
   4835 
   4836 '\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++'
   4837     NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
   4838 
   4839 '\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++'
   4840     NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
   4841 
   4842 /-- End of testinput8 --/
   4843