"Fossies" - the Fresh Open Source Software Archive

Member "vfu-4.18/vslib/pcre2/pcre2-10.20/testdata/testinput6" (22 Apr 2015, 86208 Bytes) of package /linux/privat/vfu-4.18.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

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