Home | History | Annotate | Download | only in testdata
      1 /-- This set of tests is for features that are compatible with all versions of
      2     Perl >= 5.10, in non-UTF-8 mode. It should run clean for the 8-bit, 16-bit,
      3     and 32-bit PCRE libraries. --/
      4     
      5 < forbid 89?=ABCDEFfGILMNPTUWXZ<
      6 
      7 /the quick brown fox/
      8     the quick brown fox
      9  0: the quick brown fox
     10     The quick brown FOX
     11 No match
     12     What do you know about the quick brown fox?
     13  0: the quick brown fox
     14     What do you know about THE QUICK BROWN FOX?
     15 No match
     16 
     17 /The quick brown fox/i
     18     the quick brown fox
     19  0: the quick brown fox
     20     The quick brown FOX
     21  0: The quick brown FOX
     22     What do you know about the quick brown fox?
     23  0: the quick brown fox
     24     What do you know about THE QUICK BROWN FOX?
     25  0: THE QUICK BROWN FOX
     26 
     27 /abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
     28     abcd\t\n\r\f\a\e9;\$\\?caxyz
     29  0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
     30 
     31 /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
     32     abxyzpqrrrabbxyyyypqAzz
     33  0: abxyzpqrrrabbxyyyypqAzz
     34     abxyzpqrrrabbxyyyypqAzz
     35  0: abxyzpqrrrabbxyyyypqAzz
     36     aabxyzpqrrrabbxyyyypqAzz
     37  0: aabxyzpqrrrabbxyyyypqAzz
     38     aaabxyzpqrrrabbxyyyypqAzz
     39  0: aaabxyzpqrrrabbxyyyypqAzz
     40     aaaabxyzpqrrrabbxyyyypqAzz
     41  0: aaaabxyzpqrrrabbxyyyypqAzz
     42     abcxyzpqrrrabbxyyyypqAzz
     43  0: abcxyzpqrrrabbxyyyypqAzz
     44     aabcxyzpqrrrabbxyyyypqAzz
     45  0: aabcxyzpqrrrabbxyyyypqAzz
     46     aaabcxyzpqrrrabbxyyyypAzz
     47  0: aaabcxyzpqrrrabbxyyyypAzz
     48     aaabcxyzpqrrrabbxyyyypqAzz
     49  0: aaabcxyzpqrrrabbxyyyypqAzz
     50     aaabcxyzpqrrrabbxyyyypqqAzz
     51  0: aaabcxyzpqrrrabbxyyyypqqAzz
     52     aaabcxyzpqrrrabbxyyyypqqqAzz
     53  0: aaabcxyzpqrrrabbxyyyypqqqAzz
     54     aaabcxyzpqrrrabbxyyyypqqqqAzz
     55  0: aaabcxyzpqrrrabbxyyyypqqqqAzz
     56     aaabcxyzpqrrrabbxyyyypqqqqqAzz
     57  0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
     58     aaabcxyzpqrrrabbxyyyypqqqqqqAzz
     59  0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
     60     aaaabcxyzpqrrrabbxyyyypqAzz
     61  0: aaaabcxyzpqrrrabbxyyyypqAzz
     62     abxyzzpqrrrabbxyyyypqAzz
     63  0: abxyzzpqrrrabbxyyyypqAzz
     64     aabxyzzzpqrrrabbxyyyypqAzz
     65  0: aabxyzzzpqrrrabbxyyyypqAzz
     66     aaabxyzzzzpqrrrabbxyyyypqAzz
     67  0: aaabxyzzzzpqrrrabbxyyyypqAzz
     68     aaaabxyzzzzpqrrrabbxyyyypqAzz
     69  0: aaaabxyzzzzpqrrrabbxyyyypqAzz
     70     abcxyzzpqrrrabbxyyyypqAzz
     71  0: abcxyzzpqrrrabbxyyyypqAzz
     72     aabcxyzzzpqrrrabbxyyyypqAzz
     73  0: aabcxyzzzpqrrrabbxyyyypqAzz
     74     aaabcxyzzzzpqrrrabbxyyyypqAzz
     75  0: aaabcxyzzzzpqrrrabbxyyyypqAzz
     76     aaaabcxyzzzzpqrrrabbxyyyypqAzz
     77  0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
     78     aaaabcxyzzzzpqrrrabbbxyyyypqAzz
     79  0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
     80     aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
     81  0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
     82     aaabcxyzpqrrrabbxyyyypABzz
     83  0: aaabcxyzpqrrrabbxyyyypABzz
     84     aaabcxyzpqrrrabbxyyyypABBzz
     85  0: aaabcxyzpqrrrabbxyyyypABBzz
     86     >>>aaabxyzpqrrrabbxyyyypqAzz
     87  0: aaabxyzpqrrrabbxyyyypqAzz
     88     >aaaabxyzpqrrrabbxyyyypqAzz
     89  0: aaaabxyzpqrrrabbxyyyypqAzz
     90     >>>>abcxyzpqrrrabbxyyyypqAzz
     91  0: abcxyzpqrrrabbxyyyypqAzz
     92     *** Failers
     93 No match
     94     abxyzpqrrabbxyyyypqAzz
     95 No match
     96     abxyzpqrrrrabbxyyyypqAzz
     97 No match
     98     abxyzpqrrrabxyyyypqAzz
     99 No match
    100     aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
    101 No match
    102     aaaabcxyzzzzpqrrrabbbxyyypqAzz
    103 No match
    104     aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
    105 No match
    106 
    107 /^(abc){1,2}zz/
    108     abczz
    109  0: abczz
    110  1: abc
    111     abcabczz
    112  0: abcabczz
    113  1: abc
    114     *** Failers
    115 No match
    116     zz
    117 No match
    118     abcabcabczz
    119 No match
    120     >>abczz
    121 No match
    122 
    123 /^(b+?|a){1,2}?c/
    124     bc
    125  0: bc
    126  1: b
    127     bbc
    128  0: bbc
    129  1: b
    130     bbbc
    131  0: bbbc
    132  1: bb
    133     bac
    134  0: bac
    135  1: a
    136     bbac
    137  0: bbac
    138  1: a
    139     aac
    140  0: aac
    141  1: a
    142     abbbbbbbbbbbc
    143  0: abbbbbbbbbbbc
    144  1: bbbbbbbbbbb
    145     bbbbbbbbbbbac
    146  0: bbbbbbbbbbbac
    147  1: a
    148     *** Failers
    149 No match
    150     aaac
    151 No match
    152     abbbbbbbbbbbac
    153 No match
    154 
    155 /^(b+|a){1,2}c/
    156     bc
    157  0: bc
    158  1: b
    159     bbc
    160  0: bbc
    161  1: bb
    162     bbbc
    163  0: bbbc
    164  1: bbb
    165     bac
    166  0: bac
    167  1: a
    168     bbac
    169  0: bbac
    170  1: a
    171     aac
    172  0: aac
    173  1: a
    174     abbbbbbbbbbbc
    175  0: abbbbbbbbbbbc
    176  1: bbbbbbbbbbb
    177     bbbbbbbbbbbac
    178  0: bbbbbbbbbbbac
    179  1: a
    180     *** Failers
    181 No match
    182     aaac
    183 No match
    184     abbbbbbbbbbbac
    185 No match
    186 
    187 /^(b+|a){1,2}?bc/
    188     bbc
    189  0: bbc
    190  1: b
    191 
    192 /^(b*|ba){1,2}?bc/
    193     babc
    194  0: babc
    195  1: ba
    196     bbabc
    197  0: bbabc
    198  1: ba
    199     bababc
    200  0: bababc
    201  1: ba
    202     *** Failers
    203 No match
    204     bababbc
    205 No match
    206     babababc
    207 No match
    208 
    209 /^(ba|b*){1,2}?bc/
    210     babc
    211  0: babc
    212  1: ba
    213     bbabc
    214  0: bbabc
    215  1: ba
    216     bababc
    217  0: bababc
    218  1: ba
    219     *** Failers
    220 No match
    221     bababbc
    222 No match
    223     babababc
    224 No match
    225 
    226 /^\ca\cA\c[;\c:/
    227     \x01\x01\e;z
    228  0: \x01\x01\x1b;z
    229 
    230 /^[ab\]cde]/
    231     athing
    232  0: a
    233     bthing
    234  0: b
    235     ]thing
    236  0: ]
    237     cthing
    238  0: c
    239     dthing
    240  0: d
    241     ething
    242  0: e
    243     *** Failers
    244 No match
    245     fthing
    246 No match
    247     [thing
    248 No match
    249     \\thing
    250 No match
    251 
    252 /^[]cde]/
    253     ]thing
    254  0: ]
    255     cthing
    256  0: c
    257     dthing
    258  0: d
    259     ething
    260  0: e
    261     *** Failers
    262 No match
    263     athing
    264 No match
    265     fthing
    266 No match
    267 
    268 /^[^ab\]cde]/
    269     fthing
    270  0: f
    271     [thing
    272  0: [
    273     \\thing
    274  0: \
    275     *** Failers
    276  0: *
    277     athing
    278 No match
    279     bthing
    280 No match
    281     ]thing
    282 No match
    283     cthing
    284 No match
    285     dthing
    286 No match
    287     ething
    288 No match
    289 
    290 /^[^]cde]/
    291     athing
    292  0: a
    293     fthing
    294  0: f
    295     *** Failers
    296  0: *
    297     ]thing
    298 No match
    299     cthing
    300 No match
    301     dthing
    302 No match
    303     ething
    304 No match
    305 
    306 /^\/
    307     
    308  0: \x81
    309 
    310 /^/
    311     
    312  0: \xff
    313 
    314 /^[0-9]+$/
    315     0
    316  0: 0
    317     1
    318  0: 1
    319     2
    320  0: 2
    321     3
    322  0: 3
    323     4
    324  0: 4
    325     5
    326  0: 5
    327     6
    328  0: 6
    329     7
    330  0: 7
    331     8
    332  0: 8
    333     9
    334  0: 9
    335     10
    336  0: 10
    337     100
    338  0: 100
    339     *** Failers
    340 No match
    341     abc
    342 No match
    343 
    344 /^.*nter/
    345     enter
    346  0: enter
    347     inter
    348  0: inter
    349     uponter
    350  0: uponter
    351 
    352 /^xxx[0-9]+$/
    353     xxx0
    354  0: xxx0
    355     xxx1234
    356  0: xxx1234
    357     *** Failers
    358 No match
    359     xxx
    360 No match
    361 
    362 /^.+[0-9][0-9][0-9]$/
    363     x123
    364  0: x123
    365     xx123
    366  0: xx123
    367     123456
    368  0: 123456
    369     *** Failers
    370 No match
    371     123
    372 No match
    373     x1234
    374  0: x1234
    375 
    376 /^.+?[0-9][0-9][0-9]$/
    377     x123
    378  0: x123
    379     xx123
    380  0: xx123
    381     123456
    382  0: 123456
    383     *** Failers
    384 No match
    385     123
    386 No match
    387     x1234
    388  0: x1234
    389 
    390 /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
    391     abc!pqr=apquxz.ixr.zzz.ac.uk
    392  0: abc!pqr=apquxz.ixr.zzz.ac.uk
    393  1: abc
    394  2: pqr
    395     *** Failers
    396 No match
    397     !pqr=apquxz.ixr.zzz.ac.uk
    398 No match
    399     abc!=apquxz.ixr.zzz.ac.uk
    400 No match
    401     abc!pqr=apquxz:ixr.zzz.ac.uk
    402 No match
    403     abc!pqr=apquxz.ixr.zzz.ac.ukk
    404 No match
    405 
    406 /:/
    407     Well, we need a colon: somewhere
    408  0: :
    409     *** Fail if we don't
    410 No match
    411 
    412 /([\da-f:]+)$/i
    413     0abc
    414  0: 0abc
    415  1: 0abc
    416     abc
    417  0: abc
    418  1: abc
    419     fed
    420  0: fed
    421  1: fed
    422     E
    423  0: E
    424  1: E
    425     ::
    426  0: ::
    427  1: ::
    428     5f03:12C0::932e
    429  0: 5f03:12C0::932e
    430  1: 5f03:12C0::932e
    431     fed def
    432  0: def
    433  1: def
    434     Any old stuff
    435  0: ff
    436  1: ff
    437     *** Failers
    438 No match
    439     0zzz
    440 No match
    441     gzzz
    442 No match
    443     fed\x20
    444 No match
    445     Any old rubbish
    446 No match
    447 
    448 /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
    449     .1.2.3
    450  0: .1.2.3
    451  1: 1
    452  2: 2
    453  3: 3
    454     A.12.123.0
    455  0: A.12.123.0
    456  1: 12
    457  2: 123
    458  3: 0
    459     *** Failers
    460 No match
    461     .1.2.3333
    462 No match
    463     1.2.3
    464 No match
    465     1234.2.3
    466 No match
    467 
    468 /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
    469     1 IN SOA non-sp1 non-sp2(
    470  0: 1 IN SOA non-sp1 non-sp2(
    471  1: 1
    472  2: non-sp1
    473  3: non-sp2
    474     1    IN    SOA    non-sp1    non-sp2   (
    475  0: 1    IN    SOA    non-sp1    non-sp2   (
    476  1: 1
    477  2: non-sp1
    478  3: non-sp2
    479     *** Failers
    480 No match
    481     1IN SOA non-sp1 non-sp2(
    482 No match
    483 
    484 /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
    485     a.
    486  0: a.
    487     Z.
    488  0: Z.
    489     2.
    490  0: 2.
    491     ab-c.pq-r.
    492  0: ab-c.pq-r.
    493  1: .pq-r
    494     sxk.zzz.ac.uk.
    495  0: sxk.zzz.ac.uk.
    496  1: .uk
    497     x-.y-.
    498  0: x-.y-.
    499  1: .y-
    500     *** Failers
    501 No match
    502     -abc.peq.
    503 No match
    504 
    505 /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
    506     *.a
    507  0: *.a
    508     *.b0-a
    509  0: *.b0-a
    510  1: 0-a
    511     *.c3-b.c
    512  0: *.c3-b.c
    513  1: 3-b
    514  2: .c
    515     *.c-a.b-c
    516  0: *.c-a.b-c
    517  1: -a
    518  2: .b-c
    519  3: -c
    520     *** Failers
    521 No match
    522     *.0
    523 No match
    524     *.a-
    525 No match
    526     *.a-b.c-
    527 No match
    528     *.c-a.0-c
    529 No match
    530 
    531 /^(?=ab(de))(abd)(e)/
    532     abde
    533  0: abde
    534  1: de
    535  2: abd
    536  3: e
    537 
    538 /^(?!(ab)de|x)(abd)(f)/
    539     abdf
    540  0: abdf
    541  1: <unset>
    542  2: abd
    543  3: f
    544 
    545 /^(?=(ab(cd)))(ab)/
    546     abcd
    547  0: ab
    548  1: abcd
    549  2: cd
    550  3: ab
    551 
    552 /^[\da-f](\.[\da-f])*$/i
    553     a.b.c.d
    554  0: a.b.c.d
    555  1: .d
    556     A.B.C.D
    557  0: A.B.C.D
    558  1: .D
    559     a.b.c.1.2.3.C
    560  0: a.b.c.1.2.3.C
    561  1: .C
    562 
    563 /^\".*\"\s*(;.*)?$/
    564     \"1234\"
    565  0: "1234"
    566     \"abcd\" ;
    567  0: "abcd" ;
    568  1: ;
    569     \"\" ; rhubarb
    570  0: "" ; rhubarb
    571  1: ; rhubarb
    572     *** Failers
    573 No match
    574     \"1234\" : things
    575 No match
    576 
    577 /^$/
    578     \
    579  0: 
    580     *** Failers
    581 No match
    582 
    583 /   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/x
    584     ab c
    585  0: ab c
    586     *** Failers
    587 No match
    588     abc
    589 No match
    590     ab cde
    591 No match
    592 
    593 /(?x)   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/
    594     ab c
    595  0: ab c
    596     *** Failers
    597 No match
    598     abc
    599 No match
    600     ab cde
    601 No match
    602 
    603 /^   a\ b[c ]d       $/x
    604     a bcd
    605  0: a bcd
    606     a b d
    607  0: a b d
    608     *** Failers
    609 No match
    610     abcd
    611 No match
    612     ab d
    613 No match
    614 
    615 /^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
    616     abcdefhijklm
    617  0: abcdefhijklm
    618  1: abc
    619  2: bc
    620  3: c
    621  4: def
    622  5: ef
    623  6: f
    624  7: hij
    625  8: ij
    626  9: j
    627 10: klm
    628 11: lm
    629 12: m
    630 
    631 /^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
    632     abcdefhijklm
    633  0: abcdefhijklm
    634  1: bc
    635  2: c
    636  3: ef
    637  4: f
    638  5: ij
    639  6: j
    640  7: lm
    641  8: m
    642 
    643 /^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
    644     a+ Z0+\x08\n\x1d\x12
    645  0: a+ Z0+\x08\x0a\x1d\x12
    646 
    647 /^[.^$|()*+?{,}]+/
    648     .^\$(*+)|{?,?}
    649  0: .^$(*+)|{?,?}
    650 
    651 /^a*\w/
    652     z
    653  0: z
    654     az
    655  0: az
    656     aaaz
    657  0: aaaz
    658     a
    659  0: a
    660     aa
    661  0: aa
    662     aaaa
    663  0: aaaa
    664     a+
    665  0: a
    666     aa+
    667  0: aa
    668 
    669 /^a*?\w/
    670     z
    671  0: z
    672     az
    673  0: a
    674     aaaz
    675  0: a
    676     a
    677  0: a
    678     aa
    679  0: a
    680     aaaa
    681  0: a
    682     a+
    683  0: a
    684     aa+
    685  0: a
    686 
    687 /^a+\w/
    688     az
    689  0: az
    690     aaaz
    691  0: aaaz
    692     aa
    693  0: aa
    694     aaaa
    695  0: aaaa
    696     aa+
    697  0: aa
    698 
    699 /^a+?\w/
    700     az
    701  0: az
    702     aaaz
    703  0: aa
    704     aa
    705  0: aa
    706     aaaa
    707  0: aa
    708     aa+
    709  0: aa
    710 
    711 /^\d{8}\w{2,}/
    712     1234567890
    713  0: 1234567890
    714     12345678ab
    715  0: 12345678ab
    716     12345678__
    717  0: 12345678__
    718     *** Failers
    719 No match
    720     1234567
    721 No match
    722 
    723 /^[aeiou\d]{4,5}$/
    724     uoie
    725  0: uoie
    726     1234
    727  0: 1234
    728     12345
    729  0: 12345
    730     aaaaa
    731  0: aaaaa
    732     *** Failers
    733 No match
    734     123456
    735 No match
    736 
    737 /^[aeiou\d]{4,5}?/
    738     uoie
    739  0: uoie
    740     1234
    741  0: 1234
    742     12345
    743  0: 1234
    744     aaaaa
    745  0: aaaa
    746     123456
    747  0: 1234
    748 
    749 /\A(abc|def)=(\1){2,3}\Z/
    750     abc=abcabc
    751  0: abc=abcabc
    752  1: abc
    753  2: abc
    754     def=defdefdef
    755  0: def=defdefdef
    756  1: def
    757  2: def
    758     *** Failers
    759 No match
    760     abc=defdef
    761 No match
    762 
    763 /^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/
    764     abcdefghijkcda2
    765  0: abcdefghijkcda2
    766  1: a
    767  2: b
    768  3: c
    769  4: d
    770  5: e
    771  6: f
    772  7: g
    773  8: h
    774  9: i
    775 10: j
    776 11: k
    777 12: cd
    778     abcdefghijkkkkcda2
    779  0: abcdefghijkkkkcda2
    780  1: a
    781  2: b
    782  3: c
    783  4: d
    784  5: e
    785  6: f
    786  7: g
    787  8: h
    788  9: i
    789 10: j
    790 11: k
    791 12: cd
    792 
    793 /(cat(a(ract|tonic)|erpillar)) \1()2(3)/
    794     cataract cataract23
    795  0: cataract cataract23
    796  1: cataract
    797  2: aract
    798  3: ract
    799  4: 
    800  5: 3
    801     catatonic catatonic23
    802  0: catatonic catatonic23
    803  1: catatonic
    804  2: atonic
    805  3: tonic
    806  4: 
    807  5: 3
    808     caterpillar caterpillar23
    809  0: caterpillar caterpillar23
    810  1: caterpillar
    811  2: erpillar
    812  3: <unset>
    813  4: 
    814  5: 3
    815 
    816 
    817 /^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]/
    818     From abcd  Mon Sep 01 12:33:02 1997
    819  0: From abcd  Mon Sep 01 12:33
    820  1: abcd
    821 
    822 /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
    823     From abcd  Mon Sep 01 12:33:02 1997
    824  0: From abcd  Mon Sep 01 12:33
    825  1: Sep 
    826     From abcd  Mon Sep  1 12:33:02 1997
    827  0: From abcd  Mon Sep  1 12:33
    828  1: Sep  
    829     *** Failers
    830 No match
    831     From abcd  Sep 01 12:33:02 1997
    832 No match
    833 
    834 /^12.34/s
    835     12\n34
    836  0: 12\x0a34
    837     12\r34
    838  0: 12\x0d34
    839 
    840 /\w+(?=\t)/
    841     the quick brown\t fox
    842  0: brown
    843 
    844 /foo(?!bar)(.*)/
    845     foobar is foolish see?
    846  0: foolish see?
    847  1: lish see?
    848 
    849 /(?:(?!foo)...|^.{0,2})bar(.*)/
    850     foobar crowbar etc
    851  0: rowbar etc
    852  1:  etc
    853     barrel
    854  0: barrel
    855  1: rel
    856     2barrel
    857  0: 2barrel
    858  1: rel
    859     A barrel
    860  0: A barrel
    861  1: rel
    862 
    863 /^(\D*)(?=\d)(?!123)/
    864     abc456
    865  0: abc
    866  1: abc
    867     *** Failers
    868 No match
    869     abc123
    870 No match
    871 
    872 /^1234(?# test newlines
    873   inside)/
    874     1234
    875  0: 1234
    876 
    877 /^1234 #comment in extended re
    878   /x
    879     1234
    880  0: 1234
    881 
    882 /#rhubarb
    883   abcd/x
    884     abcd
    885  0: abcd
    886 
    887 /^abcd#rhubarb/x
    888     abcd
    889  0: abcd
    890 
    891 /^(a)\1{2,3}(.)/
    892     aaab
    893  0: aaab
    894  1: a
    895  2: b
    896     aaaab
    897  0: aaaab
    898  1: a
    899  2: b
    900     aaaaab
    901  0: aaaaa
    902  1: a
    903  2: a
    904     aaaaaab
    905  0: aaaaa
    906  1: a
    907  2: a
    908 
    909 /(?!^)abc/
    910     the abc
    911  0: abc
    912     *** Failers
    913 No match
    914     abc
    915 No match
    916 
    917 /(?=^)abc/
    918     abc
    919  0: abc
    920     *** Failers
    921 No match
    922     the abc
    923 No match
    924 
    925 /^[ab]{1,3}(ab*|b)/
    926     aabbbbb
    927  0: aabb
    928  1: b
    929 
    930 /^[ab]{1,3}?(ab*|b)/
    931     aabbbbb
    932  0: aabbbbb
    933  1: abbbbb
    934 
    935 /^[ab]{1,3}?(ab*?|b)/
    936     aabbbbb
    937  0: aa
    938  1: a
    939 
    940 /^[ab]{1,3}(ab*?|b)/
    941     aabbbbb
    942  0: aabb
    943  1: b
    944 
    945 /  (?: [\040\t] |  \(
    946 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    947 \)  )*                          # optional leading comment
    948 (?:    (?:
    949 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
    950 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
    951 |
    952 " (?:                      # opening quote...
    953 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
    954 |                     #    or
    955 \\ [^\x80-\xff]           #   Escaped something (something != CR)
    956 )* "  # closing quote
    957 )                    # initial word
    958 (?:  (?: [\040\t] |  \(
    959 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    960 \)  )*  \.  (?: [\040\t] |  \(
    961 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    962 \)  )*   (?:
    963 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
    964 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
    965 |
    966 " (?:                      # opening quote...
    967 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
    968 |                     #    or
    969 \\ [^\x80-\xff]           #   Escaped something (something != CR)
    970 )* "  # closing quote
    971 )  )* # further okay, if led by a period
    972 (?: [\040\t] |  \(
    973 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    974 \)  )*  @  (?: [\040\t] |  \(
    975 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    976 \)  )*    (?:
    977 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
    978 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
    979 |   \[                         # [
    980 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
    981 \]                        #           ]
    982 )                           # initial subdomain
    983 (?:                                  #
    984 (?: [\040\t] |  \(
    985 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    986 \)  )*  \.                        # if led by a period...
    987 (?: [\040\t] |  \(
    988 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
    989 \)  )*   (?:
    990 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
    991 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
    992 |   \[                         # [
    993 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
    994 \]                        #           ]
    995 )                     #   ...further okay
    996 )*
    997 # address
    998 |                     #  or
    999 (?:
   1000 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1001 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1002 |
   1003 " (?:                      # opening quote...
   1004 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
   1005 |                     #    or
   1006 \\ [^\x80-\xff]           #   Escaped something (something != CR)
   1007 )* "  # closing quote
   1008 )             # one word, optionally followed by....
   1009 (?:
   1010 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
   1011 \(
   1012 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1013 \)       |  # comments, or...
   1014 
   1015 " (?:                      # opening quote...
   1016 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
   1017 |                     #    or
   1018 \\ [^\x80-\xff]           #   Escaped something (something != CR)
   1019 )* "  # closing quote
   1020 # quoted strings
   1021 )*
   1022 <  (?: [\040\t] |  \(
   1023 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1024 \)  )*                     # leading <
   1025 (?:  @  (?: [\040\t] |  \(
   1026 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1027 \)  )*    (?:
   1028 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1029 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1030 |   \[                         # [
   1031 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1032 \]                        #           ]
   1033 )                           # initial subdomain
   1034 (?:                                  #
   1035 (?: [\040\t] |  \(
   1036 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1037 \)  )*  \.                        # if led by a period...
   1038 (?: [\040\t] |  \(
   1039 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1040 \)  )*   (?:
   1041 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1042 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1043 |   \[                         # [
   1044 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1045 \]                        #           ]
   1046 )                     #   ...further okay
   1047 )*
   1048 
   1049 (?:  (?: [\040\t] |  \(
   1050 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1051 \)  )*  ,  (?: [\040\t] |  \(
   1052 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1053 \)  )*  @  (?: [\040\t] |  \(
   1054 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1055 \)  )*    (?:
   1056 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1057 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1058 |   \[                         # [
   1059 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1060 \]                        #           ]
   1061 )                           # initial subdomain
   1062 (?:                                  #
   1063 (?: [\040\t] |  \(
   1064 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1065 \)  )*  \.                        # if led by a period...
   1066 (?: [\040\t] |  \(
   1067 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1068 \)  )*   (?:
   1069 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1070 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1071 |   \[                         # [
   1072 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1073 \]                        #           ]
   1074 )                     #   ...further okay
   1075 )*
   1076 )* # further okay, if led by comma
   1077 :                                # closing colon
   1078 (?: [\040\t] |  \(
   1079 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1080 \)  )*  )? #       optional route
   1081 (?:
   1082 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1083 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1084 |
   1085 " (?:                      # opening quote...
   1086 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
   1087 |                     #    or
   1088 \\ [^\x80-\xff]           #   Escaped something (something != CR)
   1089 )* "  # closing quote
   1090 )                    # initial word
   1091 (?:  (?: [\040\t] |  \(
   1092 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1093 \)  )*  \.  (?: [\040\t] |  \(
   1094 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1095 \)  )*   (?:
   1096 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1097 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1098 |
   1099 " (?:                      # opening quote...
   1100 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
   1101 |                     #    or
   1102 \\ [^\x80-\xff]           #   Escaped something (something != CR)
   1103 )* "  # closing quote
   1104 )  )* # further okay, if led by a period
   1105 (?: [\040\t] |  \(
   1106 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1107 \)  )*  @  (?: [\040\t] |  \(
   1108 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1109 \)  )*    (?:
   1110 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1111 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1112 |   \[                         # [
   1113 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1114 \]                        #           ]
   1115 )                           # initial subdomain
   1116 (?:                                  #
   1117 (?: [\040\t] |  \(
   1118 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1119 \)  )*  \.                        # if led by a period...
   1120 (?: [\040\t] |  \(
   1121 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1122 \)  )*   (?:
   1123 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1124 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1125 |   \[                         # [
   1126 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
   1127 \]                        #           ]
   1128 )                     #   ...further okay
   1129 )*
   1130 #       address spec
   1131 (?: [\040\t] |  \(
   1132 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1133 \)  )*  > #                  trailing >
   1134 # name and address
   1135 )  (?: [\040\t] |  \(
   1136 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
   1137 \)  )*                       # optional trailing comment
   1138 /x
   1139     Alan Other <user\@dom.ain>
   1140  0: Alan Other <user (a] dom.ain>
   1141     <user\@dom.ain>
   1142  0: user (a] dom.ain
   1143     user\@dom.ain
   1144  0: user (a] dom.ain
   1145     \"A. Other\" <user.1234\@dom.ain> (a comment)
   1146  0: "A. Other" <user.1234 (a] dom.ain> (a comment)
   1147     A. Other <user.1234\@dom.ain> (a comment)
   1148  0:  Other <user.1234 (a] dom.ain> (a comment)
   1149     \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
   1150  0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
   1151     A missing angle <user\@some.where
   1152  0: user (a] some.where
   1153     *** Failers
   1154 No match
   1155     The quick brown fox
   1156 No match
   1157 
   1158 /[\040\t]*                    # Nab whitespace.
   1159 (?:
   1160 \(                              #  (
   1161 [^\\\x80-\xff\n\015()] *                             #     normal*
   1162 (?:                                 #       (
   1163 (?:  \\ [^\x80-\xff]  |
   1164 \(                            #  (
   1165 [^\\\x80-\xff\n\015()] *                            #     normal*
   1166 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1167 \)                           #                       )
   1168 )    #         special
   1169 [^\\\x80-\xff\n\015()] *                         #         normal*
   1170 )*                                  #            )*
   1171 \)                             #                )
   1172 [\040\t]* )*    # If comment found, allow more spaces.
   1173 # optional leading comment
   1174 (?:
   1175 (?:
   1176 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1177 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1178 # Atom
   1179 |                       #  or
   1180 "                                     # "
   1181 [^\\\x80-\xff\n\015"] *                            #   normal
   1182 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1183 "                                     #        "
   1184 # Quoted string
   1185 )
   1186 [\040\t]*                    # Nab whitespace.
   1187 (?:
   1188 \(                              #  (
   1189 [^\\\x80-\xff\n\015()] *                             #     normal*
   1190 (?:                                 #       (
   1191 (?:  \\ [^\x80-\xff]  |
   1192 \(                            #  (
   1193 [^\\\x80-\xff\n\015()] *                            #     normal*
   1194 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1195 \)                           #                       )
   1196 )    #         special
   1197 [^\\\x80-\xff\n\015()] *                         #         normal*
   1198 )*                                  #            )*
   1199 \)                             #                )
   1200 [\040\t]* )*    # If comment found, allow more spaces.
   1201 (?:
   1202 \.
   1203 [\040\t]*                    # Nab whitespace.
   1204 (?:
   1205 \(                              #  (
   1206 [^\\\x80-\xff\n\015()] *                             #     normal*
   1207 (?:                                 #       (
   1208 (?:  \\ [^\x80-\xff]  |
   1209 \(                            #  (
   1210 [^\\\x80-\xff\n\015()] *                            #     normal*
   1211 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1212 \)                           #                       )
   1213 )    #         special
   1214 [^\\\x80-\xff\n\015()] *                         #         normal*
   1215 )*                                  #            )*
   1216 \)                             #                )
   1217 [\040\t]* )*    # If comment found, allow more spaces.
   1218 (?:
   1219 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1220 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1221 # Atom
   1222 |                       #  or
   1223 "                                     # "
   1224 [^\\\x80-\xff\n\015"] *                            #   normal
   1225 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1226 "                                     #        "
   1227 # Quoted string
   1228 )
   1229 [\040\t]*                    # Nab whitespace.
   1230 (?:
   1231 \(                              #  (
   1232 [^\\\x80-\xff\n\015()] *                             #     normal*
   1233 (?:                                 #       (
   1234 (?:  \\ [^\x80-\xff]  |
   1235 \(                            #  (
   1236 [^\\\x80-\xff\n\015()] *                            #     normal*
   1237 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1238 \)                           #                       )
   1239 )    #         special
   1240 [^\\\x80-\xff\n\015()] *                         #         normal*
   1241 )*                                  #            )*
   1242 \)                             #                )
   1243 [\040\t]* )*    # If comment found, allow more spaces.
   1244 # additional words
   1245 )*
   1246 @
   1247 [\040\t]*                    # Nab whitespace.
   1248 (?:
   1249 \(                              #  (
   1250 [^\\\x80-\xff\n\015()] *                             #     normal*
   1251 (?:                                 #       (
   1252 (?:  \\ [^\x80-\xff]  |
   1253 \(                            #  (
   1254 [^\\\x80-\xff\n\015()] *                            #     normal*
   1255 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1256 \)                           #                       )
   1257 )    #         special
   1258 [^\\\x80-\xff\n\015()] *                         #         normal*
   1259 )*                                  #            )*
   1260 \)                             #                )
   1261 [\040\t]* )*    # If comment found, allow more spaces.
   1262 (?:
   1263 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1264 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1265 |
   1266 \[                            # [
   1267 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1268 \]                           #           ]
   1269 )
   1270 [\040\t]*                    # Nab whitespace.
   1271 (?:
   1272 \(                              #  (
   1273 [^\\\x80-\xff\n\015()] *                             #     normal*
   1274 (?:                                 #       (
   1275 (?:  \\ [^\x80-\xff]  |
   1276 \(                            #  (
   1277 [^\\\x80-\xff\n\015()] *                            #     normal*
   1278 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1279 \)                           #                       )
   1280 )    #         special
   1281 [^\\\x80-\xff\n\015()] *                         #         normal*
   1282 )*                                  #            )*
   1283 \)                             #                )
   1284 [\040\t]* )*    # If comment found, allow more spaces.
   1285 # optional trailing comments
   1286 (?:
   1287 \.
   1288 [\040\t]*                    # Nab whitespace.
   1289 (?:
   1290 \(                              #  (
   1291 [^\\\x80-\xff\n\015()] *                             #     normal*
   1292 (?:                                 #       (
   1293 (?:  \\ [^\x80-\xff]  |
   1294 \(                            #  (
   1295 [^\\\x80-\xff\n\015()] *                            #     normal*
   1296 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1297 \)                           #                       )
   1298 )    #         special
   1299 [^\\\x80-\xff\n\015()] *                         #         normal*
   1300 )*                                  #            )*
   1301 \)                             #                )
   1302 [\040\t]* )*    # If comment found, allow more spaces.
   1303 (?:
   1304 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1305 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1306 |
   1307 \[                            # [
   1308 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1309 \]                           #           ]
   1310 )
   1311 [\040\t]*                    # Nab whitespace.
   1312 (?:
   1313 \(                              #  (
   1314 [^\\\x80-\xff\n\015()] *                             #     normal*
   1315 (?:                                 #       (
   1316 (?:  \\ [^\x80-\xff]  |
   1317 \(                            #  (
   1318 [^\\\x80-\xff\n\015()] *                            #     normal*
   1319 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1320 \)                           #                       )
   1321 )    #         special
   1322 [^\\\x80-\xff\n\015()] *                         #         normal*
   1323 )*                                  #            )*
   1324 \)                             #                )
   1325 [\040\t]* )*    # If comment found, allow more spaces.
   1326 # optional trailing comments
   1327 )*
   1328 # address
   1329 |                             #  or
   1330 (?:
   1331 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1332 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1333 # Atom
   1334 |                       #  or
   1335 "                                     # "
   1336 [^\\\x80-\xff\n\015"] *                            #   normal
   1337 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1338 "                                     #        "
   1339 # Quoted string
   1340 )
   1341 # leading word
   1342 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *               # "normal" atoms and or spaces
   1343 (?:
   1344 (?:
   1345 \(                              #  (
   1346 [^\\\x80-\xff\n\015()] *                             #     normal*
   1347 (?:                                 #       (
   1348 (?:  \\ [^\x80-\xff]  |
   1349 \(                            #  (
   1350 [^\\\x80-\xff\n\015()] *                            #     normal*
   1351 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1352 \)                           #                       )
   1353 )    #         special
   1354 [^\\\x80-\xff\n\015()] *                         #         normal*
   1355 )*                                  #            )*
   1356 \)                             #                )
   1357 |
   1358 "                                     # "
   1359 [^\\\x80-\xff\n\015"] *                            #   normal
   1360 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1361 "                                     #        "
   1362 ) # "special" comment or quoted string
   1363 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *            #  more "normal"
   1364 )*
   1365 <
   1366 [\040\t]*                    # Nab whitespace.
   1367 (?:
   1368 \(                              #  (
   1369 [^\\\x80-\xff\n\015()] *                             #     normal*
   1370 (?:                                 #       (
   1371 (?:  \\ [^\x80-\xff]  |
   1372 \(                            #  (
   1373 [^\\\x80-\xff\n\015()] *                            #     normal*
   1374 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1375 \)                           #                       )
   1376 )    #         special
   1377 [^\\\x80-\xff\n\015()] *                         #         normal*
   1378 )*                                  #            )*
   1379 \)                             #                )
   1380 [\040\t]* )*    # If comment found, allow more spaces.
   1381 # <
   1382 (?:
   1383 @
   1384 [\040\t]*                    # Nab whitespace.
   1385 (?:
   1386 \(                              #  (
   1387 [^\\\x80-\xff\n\015()] *                             #     normal*
   1388 (?:                                 #       (
   1389 (?:  \\ [^\x80-\xff]  |
   1390 \(                            #  (
   1391 [^\\\x80-\xff\n\015()] *                            #     normal*
   1392 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1393 \)                           #                       )
   1394 )    #         special
   1395 [^\\\x80-\xff\n\015()] *                         #         normal*
   1396 )*                                  #            )*
   1397 \)                             #                )
   1398 [\040\t]* )*    # If comment found, allow more spaces.
   1399 (?:
   1400 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1401 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1402 |
   1403 \[                            # [
   1404 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1405 \]                           #           ]
   1406 )
   1407 [\040\t]*                    # Nab whitespace.
   1408 (?:
   1409 \(                              #  (
   1410 [^\\\x80-\xff\n\015()] *                             #     normal*
   1411 (?:                                 #       (
   1412 (?:  \\ [^\x80-\xff]  |
   1413 \(                            #  (
   1414 [^\\\x80-\xff\n\015()] *                            #     normal*
   1415 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1416 \)                           #                       )
   1417 )    #         special
   1418 [^\\\x80-\xff\n\015()] *                         #         normal*
   1419 )*                                  #            )*
   1420 \)                             #                )
   1421 [\040\t]* )*    # If comment found, allow more spaces.
   1422 # optional trailing comments
   1423 (?:
   1424 \.
   1425 [\040\t]*                    # Nab whitespace.
   1426 (?:
   1427 \(                              #  (
   1428 [^\\\x80-\xff\n\015()] *                             #     normal*
   1429 (?:                                 #       (
   1430 (?:  \\ [^\x80-\xff]  |
   1431 \(                            #  (
   1432 [^\\\x80-\xff\n\015()] *                            #     normal*
   1433 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1434 \)                           #                       )
   1435 )    #         special
   1436 [^\\\x80-\xff\n\015()] *                         #         normal*
   1437 )*                                  #            )*
   1438 \)                             #                )
   1439 [\040\t]* )*    # If comment found, allow more spaces.
   1440 (?:
   1441 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1442 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1443 |
   1444 \[                            # [
   1445 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1446 \]                           #           ]
   1447 )
   1448 [\040\t]*                    # Nab whitespace.
   1449 (?:
   1450 \(                              #  (
   1451 [^\\\x80-\xff\n\015()] *                             #     normal*
   1452 (?:                                 #       (
   1453 (?:  \\ [^\x80-\xff]  |
   1454 \(                            #  (
   1455 [^\\\x80-\xff\n\015()] *                            #     normal*
   1456 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1457 \)                           #                       )
   1458 )    #         special
   1459 [^\\\x80-\xff\n\015()] *                         #         normal*
   1460 )*                                  #            )*
   1461 \)                             #                )
   1462 [\040\t]* )*    # If comment found, allow more spaces.
   1463 # optional trailing comments
   1464 )*
   1465 (?: ,
   1466 [\040\t]*                    # Nab whitespace.
   1467 (?:
   1468 \(                              #  (
   1469 [^\\\x80-\xff\n\015()] *                             #     normal*
   1470 (?:                                 #       (
   1471 (?:  \\ [^\x80-\xff]  |
   1472 \(                            #  (
   1473 [^\\\x80-\xff\n\015()] *                            #     normal*
   1474 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1475 \)                           #                       )
   1476 )    #         special
   1477 [^\\\x80-\xff\n\015()] *                         #         normal*
   1478 )*                                  #            )*
   1479 \)                             #                )
   1480 [\040\t]* )*    # If comment found, allow more spaces.
   1481 @
   1482 [\040\t]*                    # Nab whitespace.
   1483 (?:
   1484 \(                              #  (
   1485 [^\\\x80-\xff\n\015()] *                             #     normal*
   1486 (?:                                 #       (
   1487 (?:  \\ [^\x80-\xff]  |
   1488 \(                            #  (
   1489 [^\\\x80-\xff\n\015()] *                            #     normal*
   1490 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1491 \)                           #                       )
   1492 )    #         special
   1493 [^\\\x80-\xff\n\015()] *                         #         normal*
   1494 )*                                  #            )*
   1495 \)                             #                )
   1496 [\040\t]* )*    # If comment found, allow more spaces.
   1497 (?:
   1498 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1499 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1500 |
   1501 \[                            # [
   1502 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1503 \]                           #           ]
   1504 )
   1505 [\040\t]*                    # Nab whitespace.
   1506 (?:
   1507 \(                              #  (
   1508 [^\\\x80-\xff\n\015()] *                             #     normal*
   1509 (?:                                 #       (
   1510 (?:  \\ [^\x80-\xff]  |
   1511 \(                            #  (
   1512 [^\\\x80-\xff\n\015()] *                            #     normal*
   1513 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1514 \)                           #                       )
   1515 )    #         special
   1516 [^\\\x80-\xff\n\015()] *                         #         normal*
   1517 )*                                  #            )*
   1518 \)                             #                )
   1519 [\040\t]* )*    # If comment found, allow more spaces.
   1520 # optional trailing comments
   1521 (?:
   1522 \.
   1523 [\040\t]*                    # Nab whitespace.
   1524 (?:
   1525 \(                              #  (
   1526 [^\\\x80-\xff\n\015()] *                             #     normal*
   1527 (?:                                 #       (
   1528 (?:  \\ [^\x80-\xff]  |
   1529 \(                            #  (
   1530 [^\\\x80-\xff\n\015()] *                            #     normal*
   1531 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1532 \)                           #                       )
   1533 )    #         special
   1534 [^\\\x80-\xff\n\015()] *                         #         normal*
   1535 )*                                  #            )*
   1536 \)                             #                )
   1537 [\040\t]* )*    # If comment found, allow more spaces.
   1538 (?:
   1539 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1540 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1541 |
   1542 \[                            # [
   1543 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1544 \]                           #           ]
   1545 )
   1546 [\040\t]*                    # Nab whitespace.
   1547 (?:
   1548 \(                              #  (
   1549 [^\\\x80-\xff\n\015()] *                             #     normal*
   1550 (?:                                 #       (
   1551 (?:  \\ [^\x80-\xff]  |
   1552 \(                            #  (
   1553 [^\\\x80-\xff\n\015()] *                            #     normal*
   1554 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1555 \)                           #                       )
   1556 )    #         special
   1557 [^\\\x80-\xff\n\015()] *                         #         normal*
   1558 )*                                  #            )*
   1559 \)                             #                )
   1560 [\040\t]* )*    # If comment found, allow more spaces.
   1561 # optional trailing comments
   1562 )*
   1563 )*  # additional domains
   1564 :
   1565 [\040\t]*                    # Nab whitespace.
   1566 (?:
   1567 \(                              #  (
   1568 [^\\\x80-\xff\n\015()] *                             #     normal*
   1569 (?:                                 #       (
   1570 (?:  \\ [^\x80-\xff]  |
   1571 \(                            #  (
   1572 [^\\\x80-\xff\n\015()] *                            #     normal*
   1573 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1574 \)                           #                       )
   1575 )    #         special
   1576 [^\\\x80-\xff\n\015()] *                         #         normal*
   1577 )*                                  #            )*
   1578 \)                             #                )
   1579 [\040\t]* )*    # If comment found, allow more spaces.
   1580 # optional trailing comments
   1581 )?     #       optional route
   1582 (?:
   1583 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1584 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1585 # Atom
   1586 |                       #  or
   1587 "                                     # "
   1588 [^\\\x80-\xff\n\015"] *                            #   normal
   1589 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1590 "                                     #        "
   1591 # Quoted string
   1592 )
   1593 [\040\t]*                    # Nab whitespace.
   1594 (?:
   1595 \(                              #  (
   1596 [^\\\x80-\xff\n\015()] *                             #     normal*
   1597 (?:                                 #       (
   1598 (?:  \\ [^\x80-\xff]  |
   1599 \(                            #  (
   1600 [^\\\x80-\xff\n\015()] *                            #     normal*
   1601 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1602 \)                           #                       )
   1603 )    #         special
   1604 [^\\\x80-\xff\n\015()] *                         #         normal*
   1605 )*                                  #            )*
   1606 \)                             #                )
   1607 [\040\t]* )*    # If comment found, allow more spaces.
   1608 (?:
   1609 \.
   1610 [\040\t]*                    # Nab whitespace.
   1611 (?:
   1612 \(                              #  (
   1613 [^\\\x80-\xff\n\015()] *                             #     normal*
   1614 (?:                                 #       (
   1615 (?:  \\ [^\x80-\xff]  |
   1616 \(                            #  (
   1617 [^\\\x80-\xff\n\015()] *                            #     normal*
   1618 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1619 \)                           #                       )
   1620 )    #         special
   1621 [^\\\x80-\xff\n\015()] *                         #         normal*
   1622 )*                                  #            )*
   1623 \)                             #                )
   1624 [\040\t]* )*    # If comment found, allow more spaces.
   1625 (?:
   1626 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1627 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1628 # Atom
   1629 |                       #  or
   1630 "                                     # "
   1631 [^\\\x80-\xff\n\015"] *                            #   normal
   1632 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
   1633 "                                     #        "
   1634 # Quoted string
   1635 )
   1636 [\040\t]*                    # Nab whitespace.
   1637 (?:
   1638 \(                              #  (
   1639 [^\\\x80-\xff\n\015()] *                             #     normal*
   1640 (?:                                 #       (
   1641 (?:  \\ [^\x80-\xff]  |
   1642 \(                            #  (
   1643 [^\\\x80-\xff\n\015()] *                            #     normal*
   1644 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1645 \)                           #                       )
   1646 )    #         special
   1647 [^\\\x80-\xff\n\015()] *                         #         normal*
   1648 )*                                  #            )*
   1649 \)                             #                )
   1650 [\040\t]* )*    # If comment found, allow more spaces.
   1651 # additional words
   1652 )*
   1653 @
   1654 [\040\t]*                    # Nab whitespace.
   1655 (?:
   1656 \(                              #  (
   1657 [^\\\x80-\xff\n\015()] *                             #     normal*
   1658 (?:                                 #       (
   1659 (?:  \\ [^\x80-\xff]  |
   1660 \(                            #  (
   1661 [^\\\x80-\xff\n\015()] *                            #     normal*
   1662 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1663 \)                           #                       )
   1664 )    #         special
   1665 [^\\\x80-\xff\n\015()] *                         #         normal*
   1666 )*                                  #            )*
   1667 \)                             #                )
   1668 [\040\t]* )*    # If comment found, allow more spaces.
   1669 (?:
   1670 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1671 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1672 |
   1673 \[                            # [
   1674 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1675 \]                           #           ]
   1676 )
   1677 [\040\t]*                    # Nab whitespace.
   1678 (?:
   1679 \(                              #  (
   1680 [^\\\x80-\xff\n\015()] *                             #     normal*
   1681 (?:                                 #       (
   1682 (?:  \\ [^\x80-\xff]  |
   1683 \(                            #  (
   1684 [^\\\x80-\xff\n\015()] *                            #     normal*
   1685 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1686 \)                           #                       )
   1687 )    #         special
   1688 [^\\\x80-\xff\n\015()] *                         #         normal*
   1689 )*                                  #            )*
   1690 \)                             #                )
   1691 [\040\t]* )*    # If comment found, allow more spaces.
   1692 # optional trailing comments
   1693 (?:
   1694 \.
   1695 [\040\t]*                    # Nab whitespace.
   1696 (?:
   1697 \(                              #  (
   1698 [^\\\x80-\xff\n\015()] *                             #     normal*
   1699 (?:                                 #       (
   1700 (?:  \\ [^\x80-\xff]  |
   1701 \(                            #  (
   1702 [^\\\x80-\xff\n\015()] *                            #     normal*
   1703 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1704 \)                           #                       )
   1705 )    #         special
   1706 [^\\\x80-\xff\n\015()] *                         #         normal*
   1707 )*                                  #            )*
   1708 \)                             #                )
   1709 [\040\t]* )*    # If comment found, allow more spaces.
   1710 (?:
   1711 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
   1712 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
   1713 |
   1714 \[                            # [
   1715 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
   1716 \]                           #           ]
   1717 )
   1718 [\040\t]*                    # Nab whitespace.
   1719 (?:
   1720 \(                              #  (
   1721 [^\\\x80-\xff\n\015()] *                             #     normal*
   1722 (?:                                 #       (
   1723 (?:  \\ [^\x80-\xff]  |
   1724 \(                            #  (
   1725 [^\\\x80-\xff\n\015()] *                            #     normal*
   1726 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
   1727 \)                           #                       )
   1728 )    #         special
   1729 [^\\\x80-\xff\n\015()] *                         #         normal*
   1730 )*                                  #            )*
   1731 \)                             #                )
   1732 [\040\t]* )*    # If comment found, allow more spaces.
   1733 # optional trailing comments
   1734 )*
   1735 #       address spec
   1736 >                    #                 >
   1737 # name and address
   1738 )
   1739 /x
   1740     Alan Other <user\@dom.ain>
   1741  0: Alan Other <user (a] dom.ain>
   1742     <user\@dom.ain>
   1743  0: user (a] dom.ain
   1744     user\@dom.ain
   1745  0: user (a] dom.ain
   1746     \"A. Other\" <user.1234\@dom.ain> (a comment)
   1747  0: "A. Other" <user.1234 (a] dom.ain>
   1748     A. Other <user.1234\@dom.ain> (a comment)
   1749  0:  Other <user.1234 (a] dom.ain>
   1750     \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
   1751  0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
   1752     A missing angle <user\@some.where
   1753  0: user (a] some.where
   1754     *** Failers
   1755 No match
   1756     The quick brown fox
   1757 No match
   1758 
   1759 /abc\0def\00pqr\000xyz\0000AB/
   1760     abc\0def\00pqr\000xyz\0000AB
   1761  0: abc\x00def\x00pqr\x00xyz\x000AB
   1762     abc456 abc\0def\00pqr\000xyz\0000ABCDE
   1763  0: abc\x00def\x00pqr\x00xyz\x000AB
   1764 
   1765 /abc\x0def\x00pqr\x000xyz\x0000AB/
   1766     abc\x0def\x00pqr\x000xyz\x0000AB
   1767  0: abc\x0def\x00pqr\x000xyz\x0000AB
   1768     abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
   1769  0: abc\x0def\x00pqr\x000xyz\x0000AB
   1770 
   1771 /^[\000-\037]/
   1772     \0A
   1773  0: \x00
   1774     \01B
   1775  0: \x01
   1776     \037C
   1777  0: \x1f
   1778 
   1779 /\0*/
   1780     \0\0\0\0
   1781  0: \x00\x00\x00\x00
   1782 
   1783 /A\x0{2,3}Z/
   1784     The A\x0\x0Z
   1785  0: A\x00\x00Z
   1786     An A\0\x0\0Z
   1787  0: A\x00\x00\x00Z
   1788     *** Failers
   1789 No match
   1790     A\0Z
   1791 No match
   1792     A\0\x0\0\x0Z
   1793 No match
   1794 
   1795 /^(cow|)\1(bell)/
   1796     cowcowbell
   1797  0: cowcowbell
   1798  1: cow
   1799  2: bell
   1800     bell
   1801  0: bell
   1802  1: 
   1803  2: bell
   1804     *** Failers
   1805 No match
   1806     cowbell
   1807 No match
   1808 
   1809 /^\s/
   1810     \040abc
   1811  0:  
   1812     \x0cabc
   1813  0: \x0c
   1814     \nabc
   1815  0: \x0a
   1816     \rabc
   1817  0: \x0d
   1818     \tabc
   1819  0: \x09
   1820     *** Failers
   1821 No match
   1822     abc
   1823 No match
   1824 
   1825 /^a	b
   1826       c/x
   1828     abc
   1829  0: abc
   1830 
   1831 /^(a|)\1*b/
   1832     ab
   1833  0: ab
   1834  1: a
   1835     aaaab
   1836  0: aaaab
   1837  1: a
   1838     b
   1839  0: b
   1840  1: 
   1841     *** Failers
   1842 No match
   1843     acb
   1844 No match
   1845 
   1846 /^(a|)\1+b/
   1847     aab
   1848  0: aab
   1849  1: a
   1850     aaaab
   1851  0: aaaab
   1852  1: a
   1853     b
   1854  0: b
   1855  1: 
   1856     *** Failers
   1857 No match
   1858     ab
   1859 No match
   1860 
   1861 /^(a|)\1?b/
   1862     ab
   1863  0: ab
   1864  1: a
   1865     aab
   1866  0: aab
   1867  1: a
   1868     b
   1869  0: b
   1870  1: 
   1871     *** Failers
   1872 No match
   1873     acb
   1874 No match
   1875 
   1876 /^(a|)\1{2}b/
   1877     aaab
   1878  0: aaab
   1879  1: a
   1880     b
   1881  0: b
   1882  1: 
   1883     *** Failers
   1884 No match
   1885     ab
   1886 No match
   1887     aab
   1888 No match
   1889     aaaab
   1890 No match
   1891 
   1892 /^(a|)\1{2,3}b/
   1893     aaab
   1894  0: aaab
   1895  1: a
   1896     aaaab
   1897  0: aaaab
   1898  1: a
   1899     b
   1900  0: b
   1901  1: 
   1902     *** Failers
   1903 No match
   1904     ab
   1905 No match
   1906     aab
   1907 No match
   1908     aaaaab
   1909 No match
   1910 
   1911 /ab{1,3}bc/
   1912     abbbbc
   1913  0: abbbbc
   1914     abbbc
   1915  0: abbbc
   1916     abbc
   1917  0: abbc
   1918     *** Failers
   1919 No match
   1920     abc
   1921 No match
   1922     abbbbbc
   1923 No match
   1924 
   1925 /([^.]*)\.([^:]*):[T ]+(.*)/
   1926     track1.title:TBlah blah blah
   1927  0: track1.title:TBlah blah blah
   1928  1: track1
   1929  2: title
   1930  3: Blah blah blah
   1931 
   1932 /([^.]*)\.([^:]*):[T ]+(.*)/i
   1933     track1.title:TBlah blah blah
   1934  0: track1.title:TBlah blah blah
   1935  1: track1
   1936  2: title
   1937  3: Blah blah blah
   1938 
   1939 /([^.]*)\.([^:]*):[t ]+(.*)/i
   1940     track1.title:TBlah blah blah
   1941  0: track1.title:TBlah blah blah
   1942  1: track1
   1943  2: title
   1944  3: Blah blah blah
   1945 
   1946 /^[W-c]+$/
   1947     WXY_^abc
   1948  0: WXY_^abc
   1949     *** Failers
   1950 No match
   1951     wxy
   1952 No match
   1953 
   1954 /^[W-c]+$/i
   1955     WXY_^abc
   1956  0: WXY_^abc
   1957     wxy_^ABC
   1958  0: wxy_^ABC
   1959 
   1960 /^[\x3f-\x5F]+$/i
   1961     WXY_^abc
   1962  0: WXY_^abc
   1963     wxy_^ABC
   1964  0: wxy_^ABC
   1965 
   1966 /^abc$/m
   1967     abc
   1968  0: abc
   1969     qqq\nabc
   1970  0: abc
   1971     abc\nzzz
   1972  0: abc
   1973     qqq\nabc\nzzz
   1974  0: abc
   1975 
   1976 /^abc$/
   1977     abc
   1978  0: abc
   1979     *** Failers
   1980 No match
   1981     qqq\nabc
   1982 No match
   1983     abc\nzzz
   1984 No match
   1985     qqq\nabc\nzzz
   1986 No match
   1987 
   1988 /\Aabc\Z/m
   1989     abc
   1990  0: abc
   1991     abc\n 
   1992  0: abc
   1993     *** Failers
   1994 No match
   1995     qqq\nabc
   1996 No match
   1997     abc\nzzz
   1998 No match
   1999     qqq\nabc\nzzz
   2000 No match
   2001     
   2002 /\A(.)*\Z/s
   2003     abc\ndef
   2004  0: abc\x0adef
   2005  1: f
   2006 
   2007 /\A(.)*\Z/m
   2008     *** Failers
   2009  0: *** Failers
   2010  1: s
   2011     abc\ndef
   2012 No match
   2013 
   2014 /(?:b)|(?::+)/
   2015     b::c
   2016  0: b
   2017     c::b
   2018  0: ::
   2019 
   2020 /[-az]+/
   2021     az-
   2022  0: az-
   2023     *** Failers
   2024  0: a
   2025     b
   2026 No match
   2027 
   2028 /[az-]+/
   2029     za-
   2030  0: za-
   2031     *** Failers
   2032  0: a
   2033     b
   2034 No match
   2035 
   2036 /[a\-z]+/
   2037     a-z
   2038  0: a-z
   2039     *** Failers
   2040  0: a
   2041     b
   2042 No match
   2043 
   2044 /[a-z]+/
   2045     abcdxyz
   2046  0: abcdxyz
   2047 
   2048 /[\d-]+/
   2049     12-34
   2050  0: 12-34
   2051     *** Failers
   2052 No match
   2053     aaa
   2054 No match
   2055 
   2056 /[\d-z]+/
   2057     12-34z
   2058  0: 12-34z
   2059     *** Failers
   2060 No match
   2061     aaa
   2062 No match
   2063 
   2064 /\x5c/
   2065     \\
   2066  0: \
   2067 
   2068 /\x20Z/
   2069     the Zoo
   2070  0:  Z
   2071     *** Failers
   2072 No match
   2073     Zulu
   2074 No match
   2075 
   2076 /(abc)\1/i
   2077     abcabc
   2078  0: abcabc
   2079  1: abc
   2080     ABCabc
   2081  0: ABCabc
   2082  1: ABC
   2083     abcABC
   2084  0: abcABC
   2085  1: abc
   2086 
   2087 /ab{3cd/
   2088     ab{3cd
   2089  0: ab{3cd
   2090 
   2091 /ab{3,cd/
   2092     ab{3,cd
   2093  0: ab{3,cd
   2094 
   2095 /ab{3,4a}cd/
   2096     ab{3,4a}cd
   2097  0: ab{3,4a}cd
   2098 
   2099 /{4,5a}bc/
   2100     {4,5a}bc
   2101  0: {4,5a}bc
   2102 
   2103 /abc$/
   2104     abc
   2105  0: abc
   2106     abc\n
   2107  0: abc
   2108     *** Failers
   2109 No match
   2110     abc\ndef
   2111 No match
   2112 
   2113 /(abc)\123/
   2114     abc\x53
   2115  0: abcS
   2116  1: abc
   2117 
   2118 /(abc)\223/
   2119     abc\x93
   2120  0: abc\x93
   2121  1: abc
   2122 
   2123 /(abc)\323/
   2124     abc\xd3
   2125  0: abc\xd3
   2126  1: abc
   2127 
   2128 /(abc)\100/
   2129     abc\x40
   2130  0: abc@
   2131  1: abc
   2132     abc\100
   2133  0: abc@
   2134  1: abc
   2135 
   2136 /(abc)\1000/
   2137     abc\x400
   2138  0: abc@0
   2139  1: abc
   2140     abc\x40\x30
   2141  0: abc@0
   2142  1: abc
   2143     abc\1000
   2144  0: abc@0
   2145  1: abc
   2146     abc\100\x30
   2147  0: abc@0
   2148  1: abc
   2149     abc\100\060
   2150  0: abc@0
   2151  1: abc
   2152     abc\100\60
   2153  0: abc@0
   2154  1: abc
   2155     
   2156 /^A\8B\9C$/
   2157     A8B9C
   2158  0: A8B9C
   2159     *** Failers
   2160 No match
   2161     A\08B\09C  
   2162 No match
   2163     
   2164 /^(A)(B)(C)(D)(E)(F)(G)(H)(I)\8\9$/
   2165     ABCDEFGHIHI 
   2166  0: ABCDEFGHIHI
   2167  1: A
   2168  2: B
   2169  3: C
   2170  4: D
   2171  5: E
   2172  6: F
   2173  7: G
   2174  8: H
   2175  9: I
   2176 
   2177 /^[A\8B\9C]+$/
   2178     A8B9C
   2179  0: A8B9C
   2180     *** Failers 
   2181 No match
   2182     A8B9C\x00
   2183 No match
   2184 
   2185 /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/
   2186     abcdefghijkllS
   2187  0: abcdefghijkllS
   2188  1: a
   2189  2: b
   2190  3: c
   2191  4: d
   2192  5: e
   2193  6: f
   2194  7: g
   2195  8: h
   2196  9: i
   2197 10: j
   2198 11: k
   2199 12: l
   2200 
   2201 /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
   2202     abcdefghijk\12S
   2203  0: abcdefghijk\x0aS
   2204  1: a
   2205  2: b
   2206  3: c
   2207  4: d
   2208  5: e
   2209  6: f
   2210  7: g
   2211  8: h
   2212  9: i
   2213 10: j
   2214 11: k
   2215 
   2216 /ab\idef/
   2217     abidef
   2218  0: abidef
   2219 
   2220 /a{0}bc/
   2221     bc
   2222  0: bc
   2223 
   2224 /(a|(bc)){0,0}?xyz/
   2225     xyz
   2226  0: xyz
   2227 
   2228 /abc[\10]de/
   2229     abc\010de
   2230  0: abc\x08de
   2231 
   2232 /abc[\1]de/
   2233     abc\1de
   2234  0: abc\x01de
   2235 
   2236 /(abc)[\1]de/
   2237     abc\1de
   2238  0: abc\x01de
   2239  1: abc
   2240 
   2241 /(?s)a.b/
   2242     a\nb
   2243  0: a\x0ab
   2244 
   2245 /^([^a])([^\b])([^c]*)([^d]{3,4})/
   2246     baNOTccccd
   2247  0: baNOTcccc
   2248  1: b
   2249  2: a
   2250  3: NOT
   2251  4: cccc
   2252     baNOTcccd
   2253  0: baNOTccc
   2254  1: b
   2255  2: a
   2256  3: NOT
   2257  4: ccc
   2258     baNOTccd
   2259  0: baNOTcc
   2260  1: b
   2261  2: a
   2262  3: NO
   2263  4: Tcc
   2264     bacccd
   2265  0: baccc
   2266  1: b
   2267  2: a
   2268  3: 
   2269  4: ccc
   2270     *** Failers
   2271  0: *** Failers
   2272  1: *
   2273  2: *
   2274  3: * Fail
   2275  4: ers
   2276     anything
   2277 No match
   2278     b\bc   
   2279 No match
   2280     baccd
   2281 No match
   2282 
   2283 /[^a]/
   2284     Abc
   2285  0: A
   2286   
   2287 /[^a]/i
   2288     Abc 
   2289  0: b
   2290 
   2291 /[^a]+/
   2292     AAAaAbc
   2293  0: AAA
   2294   
   2295 /[^a]+/i
   2296     AAAaAbc 
   2297  0: bc
   2298 
   2299 /[^a]+/
   2300     bbb\nccc
   2301  0: bbb\x0accc
   2302    
   2303 /[^k]$/
   2304     abc
   2305  0: c
   2306     *** Failers
   2307  0: s
   2308     abk   
   2309 No match
   2310    
   2311 /[^k]{2,3}$/
   2312     abc
   2313  0: abc
   2314     kbc
   2315  0: bc
   2316     kabc 
   2317  0: abc
   2318     *** Failers
   2319  0: ers
   2320     abk
   2321 No match
   2322     akb
   2323 No match
   2324     akk 
   2325 No match
   2326 
   2327 /^\d{8,}\@.+[^k]$/
   2328     12345678\@a.b.c.d
   2329  0: 12345678 (a] a.b.c.d
   2330     123456789\@x.y.z
   2331  0: 123456789 (a] x.y.z
   2332     *** Failers
   2333 No match
   2334     12345678\@x.y.uk
   2335 No match
   2336     1234567\@a.b.c.d       
   2337 No match
   2338 
   2339 /(a)\1{8,}/
   2340     aaaaaaaaa
   2341  0: aaaaaaaaa
   2342  1: a
   2343     aaaaaaaaaa
   2344  0: aaaaaaaaaa
   2345  1: a
   2346     *** Failers
   2347 No match
   2348     aaaaaaa   
   2349 No match
   2350 
   2351 /[^a]/
   2352     aaaabcd
   2353  0: b
   2354     aaAabcd 
   2355  0: A
   2356 
   2357 /[^a]/i
   2358     aaaabcd
   2359  0: b
   2360     aaAabcd 
   2361  0: b
   2362 
   2363 /[^az]/
   2364     aaaabcd
   2365  0: b
   2366     aaAabcd 
   2367  0: A
   2368 
   2369 /[^az]/i
   2370     aaaabcd
   2371  0: b
   2372     aaAabcd 
   2373  0: b
   2374 
   2375 /\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/
   2376  \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
   2377  0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff
   2378 
   2379 /P[^*]TAIRE[^*]{1,6}?LL/
   2380     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
   2381  0: PSTAIREISLL
   2382 
   2383 /P[^*]TAIRE[^*]{1,}?LL/
   2384     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
   2385  0: PSTAIREISLL
   2386 
   2387 /(\.\d\d[1-9]?)\d+/
   2388     1.230003938
   2389  0: .230003938
   2390  1: .23
   2391     1.875000282   
   2392  0: .875000282
   2393  1: .875
   2394     1.235  
   2395  0: .235
   2396  1: .23
   2397                   
   2398 /(\.\d\d((?=0)|\d(?=\d)))/
   2399     1.230003938      
   2400  0: .23
   2401  1: .23
   2402  2: 
   2403     1.875000282
   2404  0: .875
   2405  1: .875
   2406  2: 5
   2407     *** Failers 
   2408 No match
   2409     1.235 
   2410 No match
   2411     
   2412 /a(?)b/
   2413     ab 
   2414  0: ab
   2415  
   2416 /\b(foo)\s+(\w+)/i
   2417     Food is on the foo table
   2418  0: foo table
   2419  1: foo
   2420  2: table
   2421     
   2422 /foo(.*)bar/
   2423     The food is under the bar in the barn.
   2424  0: food is under the bar in the bar
   2425  1: d is under the bar in the 
   2426     
   2427 /foo(.*?)bar/  
   2428     The food is under the bar in the barn.
   2429  0: food is under the bar
   2430  1: d is under the 
   2431 
   2432 /(.*)(\d*)/
   2433     I have 2 numbers: 53147
   2434  0: I have 2 numbers: 53147
   2435  1: I have 2 numbers: 53147
   2436  2: 
   2437     
   2438 /(.*)(\d+)/
   2439     I have 2 numbers: 53147
   2440  0: I have 2 numbers: 53147
   2441  1: I have 2 numbers: 5314
   2442  2: 7
   2443  
   2444 /(.*?)(\d*)/
   2445     I have 2 numbers: 53147
   2446  0: 
   2447  1: 
   2448  2: 
   2449 
   2450 /(.*?)(\d+)/
   2451     I have 2 numbers: 53147
   2452  0: I have 2
   2453  1: I have 
   2454  2: 2
   2455 
   2456 /(.*)(\d+)$/
   2457     I have 2 numbers: 53147
   2458  0: I have 2 numbers: 53147
   2459  1: I have 2 numbers: 5314
   2460  2: 7
   2461 
   2462 /(.*?)(\d+)$/
   2463     I have 2 numbers: 53147
   2464  0: I have 2 numbers: 53147
   2465  1: I have 2 numbers: 
   2466  2: 53147
   2467 
   2468 /(.*)\b(\d+)$/
   2469     I have 2 numbers: 53147
   2470  0: I have 2 numbers: 53147
   2471  1: I have 2 numbers: 
   2472  2: 53147
   2473 
   2474 /(.*\D)(\d+)$/
   2475     I have 2 numbers: 53147
   2476  0: I have 2 numbers: 53147
   2477  1: I have 2 numbers: 
   2478  2: 53147
   2479 
   2480 /^\D*(?!123)/
   2481     ABC123
   2482  0: AB
   2483      
   2484 /^(\D*)(?=\d)(?!123)/
   2485     ABC445
   2486  0: ABC
   2487  1: ABC
   2488     *** Failers
   2489 No match
   2490     ABC123
   2491 No match
   2492     
   2493 /^[W-]46]/
   2494     W46]789 
   2495  0: W46]
   2496     -46]789
   2497  0: -46]
   2498     *** Failers
   2499 No match
   2500     Wall
   2501 No match
   2502     Zebra
   2503 No match
   2504     42
   2505 No match
   2506     [abcd] 
   2507 No match
   2508     ]abcd[
   2509 No match
   2510        
   2511 /^[W-\]46]/
   2512     W46]789 
   2513  0: W
   2514     Wall
   2515  0: W
   2516     Zebra
   2517  0: Z
   2518     Xylophone  
   2519  0: X
   2520     42
   2521  0: 4
   2522     [abcd] 
   2523  0: [
   2524     ]abcd[
   2525  0: ]
   2526     \\backslash 
   2527  0: \
   2528     *** Failers
   2529 No match
   2530     -46]789
   2531 No match
   2532     well
   2533 No match
   2534     
   2535 /\d\d\/\d\d\/\d\d\d\d/
   2536     01/01/2000
   2537  0: 01/01/2000
   2538 
   2539 /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
   2540   word cat dog elephant mussel cow horse canary baboon snake shark otherword
   2541  0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
   2542   word cat dog elephant mussel cow horse canary baboon snake shark
   2543 No match
   2544 
   2545 /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
   2546   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
   2547 No match
   2548 
   2549 /^(a){0,0}/
   2550     bcd
   2551  0: 
   2552     abc
   2553  0: 
   2554     aab     
   2555  0: 
   2556 
   2557 /^(a){0,1}/
   2558     bcd
   2559  0: 
   2560     abc
   2561  0: a
   2562  1: a
   2563     aab  
   2564  0: a
   2565  1: a
   2566 
   2567 /^(a){0,2}/
   2568     bcd
   2569  0: 
   2570     abc
   2571  0: a
   2572  1: a
   2573     aab  
   2574  0: aa
   2575  1: a
   2576 
   2577 /^(a){0,3}/
   2578     bcd
   2579  0: 
   2580     abc
   2581  0: a
   2582  1: a
   2583     aab
   2584  0: aa
   2585  1: a
   2586     aaa   
   2587  0: aaa
   2588  1: a
   2589 
   2590 /^(a){0,}/
   2591     bcd
   2592  0: 
   2593     abc
   2594  0: a
   2595  1: a
   2596     aab
   2597  0: aa
   2598  1: a
   2599     aaa
   2600  0: aaa
   2601  1: a
   2602     aaaaaaaa    
   2603  0: aaaaaaaa
   2604  1: a
   2605 
   2606 /^(a){1,1}/
   2607     bcd
   2608 No match
   2609     abc
   2610  0: a
   2611  1: a
   2612     aab  
   2613  0: a
   2614  1: a
   2615 
   2616 /^(a){1,2}/
   2617     bcd
   2618 No match
   2619     abc
   2620  0: a
   2621  1: a
   2622     aab  
   2623  0: aa
   2624  1: a
   2625 
   2626 /^(a){1,3}/
   2627     bcd
   2628 No match
   2629     abc
   2630  0: a
   2631  1: a
   2632     aab
   2633  0: aa
   2634  1: a
   2635     aaa   
   2636  0: aaa
   2637  1: a
   2638 
   2639 /^(a){1,}/
   2640     bcd
   2641 No match
   2642     abc
   2643  0: a
   2644  1: a
   2645     aab
   2646  0: aa
   2647  1: a
   2648     aaa
   2649  0: aaa
   2650  1: a
   2651     aaaaaaaa    
   2652  0: aaaaaaaa
   2653  1: a
   2654 
   2655 /.*\.gif/
   2656     borfle\nbib.gif\nno
   2657  0: bib.gif
   2658 
   2659 /.{0,}\.gif/
   2660     borfle\nbib.gif\nno
   2661  0: bib.gif
   2662 
   2663 /.*\.gif/m
   2664     borfle\nbib.gif\nno
   2665  0: bib.gif
   2666 
   2667 /.*\.gif/s
   2668     borfle\nbib.gif\nno
   2669  0: borfle\x0abib.gif
   2670 
   2671 /.*\.gif/ms
   2672     borfle\nbib.gif\nno
   2673  0: borfle\x0abib.gif
   2674     
   2675 /.*$/
   2676     borfle\nbib.gif\nno
   2677  0: no
   2678 
   2679 /.*$/m
   2680     borfle\nbib.gif\nno
   2681  0: borfle
   2682 
   2683 /.*$/s
   2684     borfle\nbib.gif\nno
   2685  0: borfle\x0abib.gif\x0ano
   2686 
   2687 /.*$/ms
   2688     borfle\nbib.gif\nno
   2689  0: borfle\x0abib.gif\x0ano
   2690     
   2691 /.*$/
   2692     borfle\nbib.gif\nno\n
   2693  0: no
   2694 
   2695 /.*$/m
   2696     borfle\nbib.gif\nno\n
   2697  0: borfle
   2698 
   2699 /.*$/s
   2700     borfle\nbib.gif\nno\n
   2701  0: borfle\x0abib.gif\x0ano\x0a
   2702 
   2703 /.*$/ms
   2704     borfle\nbib.gif\nno\n
   2705  0: borfle\x0abib.gif\x0ano\x0a
   2706     
   2707 /(.*X|^B)/
   2708     abcde\n1234Xyz
   2709  0: 1234X
   2710  1: 1234X
   2711     BarFoo 
   2712  0: B
   2713  1: B
   2714     *** Failers
   2715 No match
   2716     abcde\nBar  
   2717 No match
   2718 
   2719 /(.*X|^B)/m
   2720     abcde\n1234Xyz
   2721  0: 1234X
   2722  1: 1234X
   2723     BarFoo 
   2724  0: B
   2725  1: B
   2726     abcde\nBar  
   2727  0: B
   2728  1: B
   2729 
   2730 /(.*X|^B)/s
   2731     abcde\n1234Xyz
   2732  0: abcde\x0a1234X
   2733  1: abcde\x0a1234X
   2734     BarFoo 
   2735  0: B
   2736  1: B
   2737     *** Failers
   2738 No match
   2739     abcde\nBar  
   2740 No match
   2741 
   2742 /(.*X|^B)/ms
   2743     abcde\n1234Xyz
   2744  0: abcde\x0a1234X
   2745  1: abcde\x0a1234X
   2746     BarFoo 
   2747  0: B
   2748  1: B
   2749     abcde\nBar  
   2750  0: B
   2751  1: B
   2752 
   2753 /(?s)(.*X|^B)/
   2754     abcde\n1234Xyz
   2755  0: abcde\x0a1234X
   2756  1: abcde\x0a1234X
   2757     BarFoo 
   2758  0: B
   2759  1: B
   2760     *** Failers 
   2761 No match
   2762     abcde\nBar  
   2763 No match
   2764 
   2765 /(?s:.*X|^B)/
   2766     abcde\n1234Xyz
   2767  0: abcde\x0a1234X
   2768     BarFoo 
   2769  0: B
   2770     *** Failers 
   2771 No match
   2772     abcde\nBar  
   2773 No match
   2774 
   2775 /^.*B/
   2776     **** Failers
   2777 No match
   2778     abc\nB
   2779 No match
   2780      
   2781 /(?s)^.*B/
   2782     abc\nB
   2783  0: abc\x0aB
   2784 
   2785 /(?m)^.*B/
   2786     abc\nB
   2787  0: B
   2788      
   2789 /(?ms)^.*B/
   2790     abc\nB
   2791  0: abc\x0aB
   2792 
   2793 /(?ms)^B/
   2794     abc\nB
   2795  0: B
   2796 
   2797 /(?s)B$/
   2798     B\n
   2799  0: B
   2800 
   2801 /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
   2802     123456654321
   2803  0: 123456654321
   2804   
   2805 /^\d\d\d\d\d\d\d\d\d\d\d\d/
   2806     123456654321 
   2807  0: 123456654321
   2808 
   2809 /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
   2810     123456654321
   2811  0: 123456654321
   2812   
   2813 /^[abc]{12}/
   2814     abcabcabcabc
   2815  0: abcabcabcabc
   2816     
   2817 /^[a-c]{12}/
   2818     abcabcabcabc
   2819  0: abcabcabcabc
   2820     
   2821 /^(a|b|c){12}/
   2822     abcabcabcabc 
   2823  0: abcabcabcabc
   2824  1: c
   2825 
   2826 /^[abcdefghijklmnopqrstuvwxy0123456789]/
   2827     n
   2828  0: n
   2829     *** Failers 
   2830 No match
   2831     z 
   2832 No match
   2833 
   2834 /abcde{0,0}/
   2835     abcd
   2836  0: abcd
   2837     *** Failers
   2838 No match
   2839     abce  
   2840 No match
   2841 
   2842 /ab[cd]{0,0}e/
   2843     abe
   2844  0: abe
   2845     *** Failers
   2846 No match
   2847     abcde 
   2848 No match
   2849     
   2850 /ab(c){0,0}d/
   2851     abd
   2852  0: abd
   2853     *** Failers
   2854 No match
   2855     abcd   
   2856 No match
   2857 
   2858 /a(b*)/
   2859     a
   2860  0: a
   2861  1: 
   2862     ab
   2863  0: ab
   2864  1: b
   2865     abbbb
   2866  0: abbbb
   2867  1: bbbb
   2868     *** Failers
   2869  0: a
   2870  1: 
   2871     bbbbb    
   2872 No match
   2873     
   2874 /ab\d{0}e/
   2875     abe
   2876  0: abe
   2877     *** Failers
   2878 No match
   2879     ab1e   
   2880 No match
   2881     
   2882 /"([^\\"]+|\\.)*"/
   2883     the \"quick\" brown fox
   2884  0: "quick"
   2885  1: quick
   2886     \"the \\\"quick\\\" brown fox\" 
   2887  0: "the \"quick\" brown fox"
   2888  1:  brown fox
   2889 
   2890 /.*?/g+
   2891     abc
   2892  0: 
   2893  0+ abc
   2894  0: a
   2895  0+ bc
   2896  0: 
   2897  0+ bc
   2898  0: b
   2899  0+ c
   2900  0: 
   2901  0+ c
   2902  0: c
   2903  0+ 
   2904  0: 
   2905  0+ 
   2906   
   2907 /\b/g+
   2908     abc 
   2909  0: 
   2910  0+ abc
   2911  0: 
   2912  0+ 
   2913 
   2914 /\b/+g
   2915     abc 
   2916  0: 
   2917  0+ abc
   2918  0: 
   2919  0+ 
   2920 
   2921 //g
   2922     abc
   2923  0: 
   2924  0: 
   2925  0: 
   2926  0: 
   2927 
   2928 /<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
   2929   <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>
   2930  0: <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>
   2931  1:  BGCOLOR='#DBE9E9'
   2932  2:  align=left valign=top
   2933  3: 43.
   2934  4: <a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)
   2935  5: 
   2936  6: 
   2937  7: <unset>
   2938  8:  align=left valign=top
   2939  9: Lega lstaff.com
   2940 10:  align=left valign=top
   2941 11: CA - Statewide
   2942 
   2943 /a[^a]b/
   2944     acb
   2945  0: acb
   2946     a\nb
   2947  0: a\x0ab
   2948     
   2949 /a.b/
   2950     acb
   2951  0: acb
   2952     *** Failers 
   2953 No match
   2954     a\nb   
   2955 No match
   2956     
   2957 /a[^a]b/s
   2958     acb
   2959  0: acb
   2960     a\nb  
   2961  0: a\x0ab
   2962     
   2963 /a.b/s
   2964     acb
   2965  0: acb
   2966     a\nb  
   2967  0: a\x0ab
   2968 
   2969 /^(b+?|a){1,2}?c/
   2970     bac
   2971  0: bac
   2972  1: a
   2973     bbac
   2974  0: bbac
   2975  1: a
   2976     bbbac
   2977  0: bbbac
   2978  1: a
   2979     bbbbac
   2980  0: bbbbac
   2981  1: a
   2982     bbbbbac 
   2983  0: bbbbbac
   2984  1: a
   2985 
   2986 /^(b+|a){1,2}?c/
   2987     bac
   2988  0: bac
   2989  1: a
   2990     bbac
   2991  0: bbac
   2992  1: a
   2993     bbbac
   2994  0: bbbac
   2995  1: a
   2996     bbbbac
   2997  0: bbbbac
   2998  1: a
   2999     bbbbbac 
   3000  0: bbbbbac
   3001  1: a
   3002     
   3003 /(?!\A)x/m
   3004     x\nb\n
   3005 No match
   3006     a\bx\n  
   3007  0: x
   3008     
   3009 /\x0{ab}/
   3010     \0{ab} 
   3011  0: \x00{ab}
   3012 
   3013 /(A|B)*?CD/
   3014     CD 
   3015  0: CD
   3016     
   3017 /(A|B)*CD/
   3018     CD 
   3019  0: CD
   3020 
   3021 /(AB)*?\1/
   3022     ABABAB
   3023  0: ABAB
   3024  1: AB
   3025 
   3026 /(AB)*\1/
   3027     ABABAB
   3028  0: ABABAB
   3029  1: AB
   3030     
   3031 /(?<!bar)foo/
   3032     foo
   3033  0: foo
   3034     catfood
   3035  0: foo
   3036     arfootle
   3037  0: foo
   3038     rfoosh
   3039  0: foo
   3040     *** Failers
   3041 No match
   3042     barfoo
   3043 No match
   3044     towbarfoo
   3045 No match
   3046 
   3047 /\w{3}(?<!bar)foo/
   3048     catfood
   3049  0: catfoo
   3050     *** Failers
   3051 No match
   3052     foo
   3053 No match
   3054     barfoo
   3055 No match
   3056     towbarfoo
   3057 No match
   3058 
   3059 /(?<=(foo)a)bar/
   3060     fooabar
   3061  0: bar
   3062  1: foo
   3063     *** Failers
   3064 No match
   3065     bar
   3066 No match
   3067     foobbar
   3068 No match
   3069       
   3070 /\Aabc\z/m
   3071     abc
   3072  0: abc
   3073     *** Failers
   3074 No match
   3075     abc\n   
   3076 No match
   3077     qqq\nabc
   3078 No match
   3079     abc\nzzz
   3080 No match
   3081     qqq\nabc\nzzz
   3082 No match
   3083 
   3084 "(?>.*/)foo"
   3085     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
   3086 No match
   3087 
   3088 "(?>.*/)foo"
   3089     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
   3090  0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
   3091 
   3092 /(?>(\.\d\d[1-9]?))\d+/
   3093     1.230003938
   3094  0: .230003938
   3095  1: .23
   3096     1.875000282
   3097  0: .875000282
   3098  1: .875
   3099     *** Failers 
   3100 No match
   3101     1.235 
   3102 No match
   3103 
   3104 /^((?>\w+)|(?>\s+))*$/
   3105     now is the time for all good men to come to the aid of the party
   3106  0: now is the time for all good men to come to the aid of the party
   3107  1: party
   3108     *** Failers
   3109 No match
   3110     this is not a line with only words and spaces!
   3111 No match
   3112     
   3113 /(\d+)(\w)/
   3114     12345a
   3115  0: 12345a
   3116  1: 12345
   3117  2: a
   3118     12345+ 
   3119  0: 12345
   3120  1: 1234
   3121  2: 5
   3122 
   3123 /((?>\d+))(\w)/
   3124     12345a
   3125  0: 12345a
   3126  1: 12345
   3127  2: a
   3128     *** Failers
   3129 No match
   3130     12345+ 
   3131 No match
   3132 
   3133 /(?>a+)b/
   3134     aaab
   3135  0: aaab
   3136 
   3137 /((?>a+)b)/
   3138     aaab
   3139  0: aaab
   3140  1: aaab
   3141 
   3142 /(?>(a+))b/
   3143     aaab
   3144  0: aaab
   3145  1: aaa
   3146 
   3147 /(?>b)+/
   3148     aaabbbccc
   3149  0: bbb
   3150 
   3151 /(?>a+|b+|c+)*c/
   3152     aaabbbbccccd
   3153  0: aaabbbbc
   3154 
   3155 /((?>[^()]+)|\([^()]*\))+/
   3156     ((abc(ade)ufh()()x
   3157  0: abc(ade)ufh()()x
   3158  1: x
   3159     
   3160 /\(((?>[^()]+)|\([^()]+\))+\)/ 
   3161     (abc)
   3162  0: (abc)
   3163  1: abc
   3164     (abc(def)xyz)
   3165  0: (abc(def)xyz)
   3166  1: xyz
   3167     *** Failers
   3168 No match
   3169     ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa   
   3170 No match
   3171 
   3172 /a(?-i)b/i
   3173     ab
   3174  0: ab
   3175     Ab
   3176  0: Ab
   3177     *** Failers 
   3178 No match
   3179     aB
   3180 No match
   3181     AB
   3182 No match
   3183         
   3184 /(a (?x)b c)d e/
   3185     a bcd e
   3186  0: a bcd e
   3187  1: a bc
   3188     *** Failers
   3189 No match
   3190     a b cd e
   3191 No match
   3192     abcd e   
   3193 No match
   3194     a bcde 
   3195 No match
   3196  
   3197 /(a b(?x)c d (?-x)e f)/
   3198     a bcde f
   3199  0: a bcde f
   3200  1: a bcde f
   3201     *** Failers
   3202 No match
   3203     abcdef  
   3204 No match
   3205 
   3206 /(a(?i)b)c/
   3207     abc
   3208  0: abc
   3209  1: ab
   3210     aBc
   3211  0: aBc
   3212  1: aB
   3213     *** Failers
   3214 No match
   3215     abC
   3216 No match
   3217     aBC  
   3218 No match
   3219     Abc
   3220 No match
   3221     ABc
   3222 No match
   3223     ABC
   3224 No match
   3225     AbC
   3226 No match
   3227     
   3228 /a(?i:b)c/
   3229     abc
   3230  0: abc
   3231     aBc
   3232  0: aBc
   3233     *** Failers 
   3234 No match
   3235     ABC
   3236 No match
   3237     abC
   3238 No match
   3239     aBC
   3240 No match
   3241     
   3242 /a(?i:b)*c/
   3243     aBc
   3244  0: aBc
   3245     aBBc
   3246  0: aBBc
   3247     *** Failers 
   3248 No match
   3249     aBC
   3250 No match
   3251     aBBC
   3252 No match
   3253     
   3254 /a(?=b(?i)c)\w\wd/
   3255     abcd
   3256  0: abcd
   3257     abCd
   3258  0: abCd
   3259     *** Failers
   3260 No match
   3261     aBCd
   3262 No match
   3263     abcD     
   3264 No match
   3265     
   3266 /(?s-i:more.*than).*million/i
   3267     more than million
   3268  0: more than million
   3269     more than MILLION
   3270  0: more than MILLION
   3271     more \n than Million 
   3272  0: more \x0a than Million
   3273     *** Failers
   3274 No match
   3275     MORE THAN MILLION    
   3276 No match
   3277     more \n than \n million 
   3278 No match
   3279 
   3280 /(?:(?s-i)more.*than).*million/i
   3281     more than million
   3282  0: more than million
   3283     more than MILLION
   3284  0: more than MILLION
   3285     more \n than Million 
   3286  0: more \x0a than Million
   3287     *** Failers
   3288 No match
   3289     MORE THAN MILLION    
   3290 No match
   3291     more \n than \n million 
   3292 No match
   3293     
   3294 /(?>a(?i)b+)+c/ 
   3295     abc
   3296  0: abc
   3297     aBbc
   3298  0: aBbc
   3299     aBBc 
   3300  0: aBBc
   3301     *** Failers
   3302 No match
   3303     Abc
   3304 No match
   3305     abAb    
   3306 No match
   3307     abbC 
   3308 No match
   3309     
   3310 /(?=a(?i)b)\w\wc/
   3311     abc
   3312  0: abc
   3313     aBc
   3314  0: aBc
   3315     *** Failers
   3316 No match
   3317     Ab 
   3318 No match
   3319     abC
   3320 No match
   3321     aBC     
   3322 No match
   3323     
   3324 /(?<=a(?i)b)(\w\w)c/
   3325     abxxc
   3326  0: xxc
   3327  1: xx
   3328     aBxxc
   3329  0: xxc
   3330  1: xx
   3331     *** Failers
   3332 No match
   3333     Abxxc
   3334 No match
   3335     ABxxc
   3336 No match
   3337     abxxC      
   3338 No match
   3339 
   3340 /(?:(a)|b)(?(1)A|B)/
   3341     aA
   3342  0: aA
   3343  1: a
   3344     bB
   3345  0: bB
   3346     *** Failers
   3347 No match
   3348     aB
   3349 No match
   3350     bA    
   3351 No match
   3352 
   3353 /^(a)?(?(1)a|b)+$/
   3354     aa
   3355  0: aa
   3356  1: a
   3357     b
   3358  0: b
   3359     bb  
   3360  0: bb
   3361     *** Failers
   3362 No match
   3363     ab   
   3364 No match
   3365 
   3366 /^(?(?=abc)\w{3}:|\d\d)$/
   3367     abc:
   3368  0: abc:
   3369     12
   3370  0: 12
   3371     *** Failers
   3372 No match
   3373     123
   3374 No match
   3375     xyz    
   3376 No match
   3377 
   3378 /^(?(?!abc)\d\d|\w{3}:)$/
   3379     abc:
   3380  0: abc:
   3381     12
   3382  0: 12
   3383     *** Failers
   3384 No match
   3385     123
   3386 No match
   3387     xyz    
   3388 No match
   3389     
   3390 /(?(?<=foo)bar|cat)/
   3391     foobar
   3392  0: bar
   3393     cat
   3394  0: cat
   3395     fcat
   3396  0: cat
   3397     focat   
   3398  0: cat
   3399     *** Failers
   3400 No match
   3401     foocat  
   3402 No match
   3403 
   3404 /(?(?<!foo)cat|bar)/
   3405     foobar
   3406  0: bar
   3407     cat
   3408  0: cat
   3409     fcat
   3410  0: cat
   3411     focat   
   3412  0: cat
   3413     *** Failers
   3414 No match
   3415     foocat  
   3416 No match
   3417 
   3418 /( \( )? [^()]+ (?(1) \) |) /x
   3419     abcd
   3420  0: abcd
   3421     (abcd)
   3422  0: (abcd)
   3423  1: (
   3424     the quick (abcd) fox
   3425  0: the quick 
   3426     (abcd   
   3427  0: abcd
   3428 
   3429 /( \( )? [^()]+ (?(1) \) ) /x
   3430     abcd
   3431  0: abcd
   3432     (abcd)
   3433  0: (abcd)
   3434  1: (
   3435     the quick (abcd) fox
   3436  0: the quick 
   3437     (abcd   
   3438  0: abcd
   3439 
   3440 /^(?(2)a|(1)(2))+$/
   3441     12
   3442  0: 12
   3443  1: 1
   3444  2: 2
   3445     12a
   3446  0: 12a
   3447  1: 1
   3448  2: 2
   3449     12aa
   3450  0: 12aa
   3451  1: 1
   3452  2: 2
   3453     *** Failers
   3454 No match
   3455     1234    
   3456 No match
   3457 
   3458 /((?i)blah)\s+\1/
   3459     blah blah
   3460  0: blah blah
   3461  1: blah
   3462     BLAH BLAH
   3463  0: BLAH BLAH
   3464  1: BLAH
   3465     Blah Blah
   3466  0: Blah Blah
   3467  1: Blah
   3468     blaH blaH
   3469  0: blaH blaH
   3470  1: blaH
   3471     *** Failers
   3472 No match
   3473     blah BLAH
   3474 No match
   3475     Blah blah      
   3476 No match
   3477     blaH blah 
   3478 No match
   3479 
   3480 /((?i)blah)\s+(?i:\1)/
   3481     blah blah
   3482  0: blah blah
   3483  1: blah
   3484     BLAH BLAH
   3485  0: BLAH BLAH
   3486  1: BLAH
   3487     Blah Blah
   3488  0: Blah Blah
   3489  1: Blah
   3490     blaH blaH
   3491  0: blaH blaH
   3492  1: blaH
   3493     blah BLAH
   3494  0: blah BLAH
   3495  1: blah
   3496     Blah blah      
   3497  0: Blah blah
   3498  1: Blah
   3499     blaH blah 
   3500  0: blaH blah
   3501  1: blaH
   3502 
   3503 /(?>a*)*/
   3504     a
   3505  0: a
   3506     aa
   3507  0: aa
   3508     aaaa
   3509  0: aaaa
   3510     
   3511 /(abc|)+/
   3512     abc
   3513  0: abc
   3514  1: 
   3515     abcabc
   3516  0: abcabc
   3517  1: 
   3518     abcabcabc
   3519  0: abcabcabc
   3520  1: 
   3521     xyz      
   3522  0: 
   3523  1: 
   3524 
   3525 /([a]*)*/
   3526     a
   3527  0: a
   3528  1: 
   3529     aaaaa 
   3530  0: aaaaa
   3531  1: 
   3532  
   3533 /([ab]*)*/
   3534     a
   3535  0: a
   3536  1: 
   3537     b
   3538  0: b
   3539  1: 
   3540     ababab
   3541  0: ababab
   3542  1: 
   3543     aaaabcde
   3544  0: aaaab
   3545  1: 
   3546     bbbb    
   3547  0: bbbb
   3548  1: 
   3549  
   3550 /([^a]*)*/
   3551     b
   3552  0: b
   3553  1: 
   3554     bbbb
   3555  0: bbbb
   3556  1: 
   3557     aaa   
   3558  0: 
   3559  1: 
   3560  
   3561 /([^ab]*)*/
   3562     cccc
   3563  0: cccc
   3564  1: 
   3565     abab  
   3566  0: 
   3567  1: 
   3568  
   3569 /([a]*?)*/
   3570     a
   3571  0: 
   3572  1: 
   3573     aaaa 
   3574  0: 
   3575  1: 
   3576  
   3577 /([ab]*?)*/
   3578     a
   3579  0: 
   3580  1: 
   3581     b
   3582  0: 
   3583  1: 
   3584     abab
   3585  0: 
   3586  1: 
   3587     baba   
   3588  0: 
   3589  1: 
   3590  
   3591 /([^a]*?)*/
   3592     b
   3593  0: 
   3594  1: 
   3595     bbbb
   3596  0: 
   3597  1: 
   3598     aaa   
   3599  0: 
   3600  1: 
   3601  
   3602 /([^ab]*?)*/
   3603     c
   3604  0: 
   3605  1: 
   3606     cccc
   3607  0: 
   3608  1: 
   3609     baba   
   3610  0: 
   3611  1: 
   3612  
   3613 /(?>a*)*/
   3614     a
   3615  0: a
   3616     aaabcde 
   3617  0: aaa
   3618  
   3619 /((?>a*))*/
   3620     aaaaa
   3621  0: aaaaa
   3622  1: 
   3623     aabbaa 
   3624  0: aa
   3625  1: 
   3626  
   3627 /((?>a*?))*/
   3628     aaaaa
   3629  0: 
   3630  1: 
   3631     aabbaa 
   3632  0: 
   3633  1: 
   3634 
   3635 /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /x
   3636     12-sep-98
   3637  0: 12-sep-98
   3638     12-09-98
   3639  0: 12-09-98
   3640     *** Failers
   3641 No match
   3642     sep-12-98
   3643 No match
   3644         
   3645 /(?<=(foo))bar\1/
   3646     foobarfoo
   3647  0: barfoo
   3648  1: foo
   3649     foobarfootling 
   3650  0: barfoo
   3651  1: foo
   3652     *** Failers
   3653 No match
   3654     foobar
   3655 No match
   3656     barfoo   
   3657 No match
   3658 
   3659 /(?i:saturday|sunday)/
   3660     saturday
   3661  0: saturday
   3662     sunday
   3663  0: sunday
   3664     Saturday
   3665  0: Saturday
   3666     Sunday
   3667  0: Sunday
   3668     SATURDAY
   3669  0: SATURDAY
   3670     SUNDAY
   3671  0: SUNDAY
   3672     SunDay
   3673  0: SunDay
   3674     
   3675 /(a(?i)bc|BB)x/
   3676     abcx
   3677  0: abcx
   3678  1: abc
   3679     aBCx
   3680  0: aBCx
   3681  1: aBC
   3682     bbx
   3683  0: bbx
   3684  1: bb
   3685     BBx
   3686  0: BBx
   3687  1: BB
   3688     *** Failers
   3689 No match
   3690     abcX
   3691 No match
   3692     aBCX
   3693 No match
   3694     bbX
   3695 No match
   3696     BBX               
   3697 No match
   3698 
   3699 /^([ab](?i)[cd]|[ef])/
   3700     ac
   3701  0: ac
   3702  1: ac
   3703     aC
   3704  0: aC
   3705  1: aC
   3706     bD
   3707  0: bD
   3708  1: bD
   3709     elephant
   3710  0: e
   3711  1: e
   3712     Europe 
   3713  0: E
   3714  1: E
   3715     frog
   3716  0: f
   3717  1: f
   3718     France
   3719  0: F
   3720  1: F
   3721     *** Failers
   3722 No match
   3723     Africa     
   3724 No match
   3725 
   3726 /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
   3727     ab
   3728  0: ab
   3729  1: ab
   3730     aBd
   3731  0: aBd
   3732  1: aBd
   3733     xy
   3734  0: xy
   3735  1: xy
   3736     xY
   3737  0: xY
   3738  1: xY
   3739     zebra
   3740  0: z
   3741  1: z
   3742     Zambesi
   3743  0: Z
   3744  1: Z
   3745     *** Failers
   3746 No match
   3747     aCD  
   3748 No match
   3749     XY  
   3750 No match
   3751 
   3752 /(?<=foo\n)^bar/m
   3753     foo\nbar
   3754  0: bar
   3755     *** Failers
   3756 No match
   3757     bar
   3758 No match
   3759     baz\nbar   
   3760 No match
   3761 
   3762 /(?<=(?<!foo)bar)baz/
   3763     barbaz
   3764  0: baz
   3765     barbarbaz 
   3766  0: baz
   3767     koobarbaz 
   3768  0: baz
   3769     *** Failers
   3770 No match
   3771     baz
   3772 No match
   3773     foobarbaz 
   3774 No match
   3775 
   3776 /The cases of aaaa and aaaaaa are missed out below because Perl does things/
   3777 /differently. We know that odd, and maybe incorrect, things happen with/
   3778 No match
   3779 /recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./
   3780 No match
   3781 
   3782 /^(a\1?){4}$/
   3783     a
   3784 No match
   3785     aa
   3786 No match
   3787     aaa
   3788 No match
   3789     aaaaa
   3790  0: aaaaa
   3791  1: a
   3792     aaaaaaa
   3793  0: aaaaaaa
   3794  1: a
   3795     aaaaaaaa
   3796 No match
   3797     aaaaaaaaa
   3798 No match
   3799     aaaaaaaaaa
   3800  0: aaaaaaaaaa
   3801  1: aaaa
   3802     aaaaaaaaaaa
   3803 No match
   3804     aaaaaaaaaaaa
   3805 No match
   3806     aaaaaaaaaaaaa
   3807 No match
   3808     aaaaaaaaaaaaaa
   3809 No match
   3810     aaaaaaaaaaaaaaa
   3811 No match
   3812     aaaaaaaaaaaaaaaa               
   3813 No match
   3814 
   3815 /^(a\1?)(a\1?)(a\2?)(a\3?)$/
   3816     a
   3817 No match
   3818     aa
   3819 No match
   3820     aaa
   3821 No match
   3822     aaaa
   3823  0: aaaa
   3824  1: a
   3825  2: a
   3826  3: a
   3827  4: a
   3828     aaaaa
   3829  0: aaaaa
   3830  1: a
   3831  2: aa
   3832  3: a
   3833  4: a
   3834     aaaaaa
   3835  0: aaaaaa
   3836  1: a
   3837  2: aa
   3838  3: a
   3839  4: aa
   3840     aaaaaaa
   3841  0: aaaaaaa
   3842  1: a
   3843  2: aa
   3844  3: aaa
   3845  4: a
   3846     aaaaaaaa
   3847 No match
   3848     aaaaaaaaa
   3849 No match
   3850     aaaaaaaaaa
   3851  0: aaaaaaaaaa
   3852  1: a
   3853  2: aa
   3854  3: aaa
   3855  4: aaaa
   3856     aaaaaaaaaaa
   3857 No match
   3858     aaaaaaaaaaaa
   3859 No match
   3860     aaaaaaaaaaaaa
   3861 No match
   3862     aaaaaaaaaaaaaa
   3863 No match
   3864     aaaaaaaaaaaaaaa
   3865 No match
   3866     aaaaaaaaaaaaaaaa               
   3867 No match
   3868 
   3869 /The following tests are taken from the Perl 5.005 test suite; some of them/
   3870 /are compatible with 5.004, but I'd rather not have to sort them out./
   3871 No match
   3872 
   3873 /abc/
   3874     abc
   3875  0: abc
   3876     xabcy
   3877  0: abc
   3878     ababc
   3879  0: abc
   3880     *** Failers
   3881 No match
   3882     xbc
   3883 No match
   3884     axc
   3885 No match
   3886     abx
   3887 No match
   3888 
   3889 /ab*c/
   3890     abc
   3891  0: abc
   3892 
   3893 /ab*bc/
   3894     abc
   3895  0: abc
   3896     abbc
   3897  0: abbc
   3898     abbbbc
   3899  0: abbbbc
   3900 
   3901 /.{1}/
   3902     abbbbc
   3903  0: a
   3904 
   3905 /.{3,4}/
   3906     abbbbc
   3907  0: abbb
   3908 
   3909 /ab{0,}bc/
   3910     abbbbc
   3911  0: abbbbc
   3912 
   3913 /ab+bc/
   3914     abbc
   3915  0: abbc
   3916     *** Failers
   3917 No match
   3918     abc
   3919 No match
   3920     abq
   3921 No match
   3922 
   3923 /ab{1,}bc/
   3924 
   3925 /ab+bc/
   3926     abbbbc
   3927  0: abbbbc
   3928 
   3929 /ab{1,}bc/
   3930     abbbbc
   3931  0: abbbbc
   3932 
   3933 /ab{1,3}bc/
   3934     abbbbc
   3935  0: abbbbc
   3936 
   3937 /ab{3,4}bc/
   3938     abbbbc
   3939  0: abbbbc
   3940 
   3941 /ab{4,5}bc/
   3942     *** Failers
   3943 No match
   3944     abq
   3945 No match
   3946     abbbbc
   3947 No match
   3948 
   3949 /ab?bc/
   3950     abbc
   3951  0: abbc
   3952     abc
   3953  0: abc
   3954 
   3955 /ab{0,1}bc/
   3956     abc
   3957  0: abc
   3958 
   3959 /ab?bc/
   3960 
   3961 /ab?c/
   3962     abc
   3963  0: abc
   3964 
   3965 /ab{0,1}c/
   3966     abc
   3967  0: abc
   3968 
   3969 /^abc$/
   3970     abc
   3971  0: abc
   3972     *** Failers
   3973 No match
   3974     abbbbc
   3975 No match
   3976     abcc
   3977 No match
   3978 
   3979 /^abc/
   3980     abcc
   3981  0: abc
   3982 
   3983 /^abc$/
   3984 
   3985 /abc$/
   3986     aabc
   3987  0: abc
   3988     *** Failers
   3989 No match
   3990     aabc
   3991  0: abc
   3992     aabcd
   3993 No match
   3994 
   3995 /^/
   3996     abc
   3997  0: 
   3998 
   3999 /$/
   4000     abc
   4001  0: 
   4002 
   4003 /a.c/
   4004     abc
   4005  0: abc
   4006     axc
   4007  0: axc
   4008 
   4009 /a.*c/
   4010     axyzc
   4011  0: axyzc
   4012 
   4013 /a[bc]d/
   4014     abd
   4015  0: abd
   4016     *** Failers
   4017 No match
   4018     axyzd
   4019 No match
   4020     abc
   4021 No match
   4022 
   4023 /a[b-d]e/
   4024     ace
   4025  0: ace
   4026 
   4027 /a[b-d]/
   4028     aac
   4029  0: ac
   4030 
   4031 /a[-b]/
   4032     a-
   4033  0: a-
   4034 
   4035 /a[b-]/
   4036     a-
   4037  0: a-
   4038 
   4039 /a]/
   4040     a]
   4041  0: a]
   4042 
   4043 /a[]]b/
   4044     a]b
   4045  0: a]b
   4046 
   4047 /a[^bc]d/
   4048     aed
   4049  0: aed
   4050     *** Failers
   4051 No match
   4052     abd
   4053 No match
   4054     abd
   4055 No match
   4056 
   4057 /a[^-b]c/
   4058     adc
   4059  0: adc
   4060 
   4061 /a[^]b]c/
   4062     adc
   4063  0: adc
   4064     *** Failers
   4065 No match
   4066     a-c
   4067  0: a-c
   4068     a]c
   4069 No match
   4070 
   4071 /\ba\b/
   4072     a-
   4073  0: a
   4074     -a
   4075  0: a
   4076     -a-
   4077  0: a
   4078 
   4079 /\by\b/
   4080     *** Failers
   4081 No match
   4082     xy
   4083 No match
   4084     yz
   4085 No match
   4086     xyz
   4087 No match
   4088 
   4089 /\Ba\B/
   4090     *** Failers
   4091  0: a
   4092     a-
   4093 No match
   4094     -a
   4095 No match
   4096     -a-
   4097 No match
   4098 
   4099 /\By\b/
   4100     xy
   4101  0: y
   4102 
   4103 /\by\B/
   4104     yz
   4105  0: y
   4106 
   4107 /\By\B/
   4108     xyz
   4109  0: y
   4110 
   4111 /\w/
   4112     a
   4113  0: a
   4114 
   4115 /\W/
   4116     -
   4117  0: -
   4118     *** Failers
   4119  0: *
   4120     -
   4121  0: -
   4122     a
   4123 No match
   4124 
   4125 /a\sb/
   4126     a b
   4127  0: a b
   4128 
   4129 /a\Sb/
   4130     a-b
   4131  0: a-b
   4132     *** Failers
   4133 No match
   4134     a-b
   4135  0: a-b
   4136     a b
   4137 No match
   4138 
   4139 /\d/
   4140     1
   4141  0: 1
   4142 
   4143 /\D/
   4144     -
   4145  0: -
   4146     *** Failers
   4147  0: *
   4148     -
   4149  0: -
   4150     1
   4151 No match
   4152 
   4153 /[\w]/
   4154     a
   4155  0: a
   4156 
   4157 /[\W]/
   4158     -
   4159  0: -
   4160     *** Failers
   4161  0: *
   4162     -
   4163  0: -
   4164     a
   4165 No match
   4166 
   4167 /a[\s]b/
   4168     a b
   4169  0: a b
   4170 
   4171 /a[\S]b/
   4172     a-b
   4173  0: a-b
   4174     *** Failers
   4175 No match
   4176     a-b
   4177  0: a-b
   4178     a b
   4179 No match
   4180 
   4181 /[\d]/
   4182     1
   4183  0: 1
   4184 
   4185 /[\D]/
   4186     -
   4187  0: -
   4188     *** Failers
   4189  0: *
   4190     -
   4191  0: -
   4192     1
   4193 No match
   4194 
   4195 /ab|cd/
   4196     abc
   4197  0: ab
   4198     abcd
   4199  0: ab
   4200 
   4201 /()ef/
   4202     def
   4203  0: ef
   4204  1: 
   4205 
   4206 /$b/
   4207 
   4208 /a\(b/
   4209     a(b
   4210  0: a(b
   4211 
   4212 /a\(*b/
   4213     ab
   4214  0: ab
   4215     a((b
   4216  0: a((b
   4217 
   4218 /a\\b/
   4219     a\b
   4220 No match
   4221 
   4222 /((a))/
   4223     abc
   4224  0: a
   4225  1: a
   4226  2: a
   4227 
   4228 /(a)b(c)/
   4229     abc
   4230  0: abc
   4231  1: a
   4232  2: c
   4233 
   4234 /a+b+c/
   4235     aabbabc
   4236  0: abc
   4237 
   4238 /a{1,}b{1,}c/
   4239     aabbabc
   4240  0: abc
   4241 
   4242 /a.+?c/
   4243     abcabc
   4244  0: abc
   4245 
   4246 /(a+|b)*/
   4247     ab
   4248  0: ab
   4249  1: b
   4250 
   4251 /(a+|b){0,}/
   4252     ab
   4253  0: ab
   4254  1: b
   4255 
   4256 /(a+|b)+/
   4257     ab
   4258  0: ab
   4259  1: b
   4260 
   4261 /(a+|b){1,}/
   4262     ab
   4263  0: ab
   4264  1: b
   4265 
   4266 /(a+|b)?/
   4267     ab
   4268  0: a
   4269  1: a
   4270 
   4271 /(a+|b){0,1}/
   4272     ab
   4273  0: a
   4274  1: a
   4275 
   4276 /[^ab]*/
   4277     cde
   4278  0: cde
   4279 
   4280 /abc/
   4281     *** Failers
   4282 No match
   4283     b
   4284 No match
   4285     
   4286 
   4287 /a*/
   4288     
   4289 
   4290 /([abc])*d/
   4291     abbbcd
   4292  0: abbbcd
   4293  1: c
   4294 
   4295 /([abc])*bcd/
   4296     abcd
   4297  0: abcd
   4298  1: a
   4299 
   4300 /a|b|c|d|e/
   4301     e
   4302  0: e
   4303 
   4304 /(a|b|c|d|e)f/
   4305     ef
   4306  0: ef
   4307  1: e
   4308 
   4309 /abcd*efg/
   4310     abcdefg
   4311  0: abcdefg
   4312 
   4313 /ab*/
   4314     xabyabbbz
   4315  0: ab
   4316     xayabbbz
   4317  0: a
   4318 
   4319 /(ab|cd)e/
   4320     abcde
   4321  0: cde
   4322  1: cd
   4323 
   4324 /[abhgefdc]ij/
   4325     hij
   4326  0: hij
   4327 
   4328 /^(ab|cd)e/
   4329 
   4330 /(abc|)ef/
   4331     abcdef
   4332  0: ef
   4333  1: 
   4334 
   4335 /(a|b)c*d/
   4336     abcd
   4337  0: bcd
   4338  1: b
   4339 
   4340 /(ab|ab*)bc/
   4341     abc
   4342  0: abc
   4343  1: a
   4344 
   4345 /a([bc]*)c*/
   4346     abc
   4347  0: abc
   4348  1: bc
   4349 
   4350 /a([bc]*)(c*d)/
   4351     abcd
   4352  0: abcd
   4353  1: bc
   4354  2: d
   4355 
   4356 /a([bc]+)(c*d)/
   4357     abcd
   4358  0: abcd
   4359  1: bc
   4360  2: d
   4361 
   4362 /a([bc]*)(c+d)/
   4363     abcd
   4364  0: abcd
   4365  1: b
   4366  2: cd
   4367 
   4368 /a[bcd]*dcdcde/
   4369     adcdcde
   4370  0: adcdcde
   4371 
   4372 /a[bcd]+dcdcde/
   4373     *** Failers
   4374 No match
   4375     abcde
   4376 No match
   4377     adcdcde
   4378 No match
   4379 
   4380 /(ab|a)b*c/
   4381     abc
   4382  0: abc
   4383  1: ab
   4384 
   4385 /((a)(b)c)(d)/
   4386     abcd
   4387  0: abcd
   4388  1: abc
   4389  2: a
   4390  3: b
   4391  4: d
   4392 
   4393 /[a-zA-Z_][a-zA-Z0-9_]*/
   4394     alpha
   4395  0: alpha
   4396 
   4397 /^a(bc+|b[eh])g|.h$/
   4398     abh
   4399  0: bh
   4400 
   4401 /(bc+d$|ef*g.|h?i(j|k))/
   4402     effgz
   4403  0: effgz
   4404  1: effgz
   4405     ij
   4406  0: ij
   4407  1: ij
   4408  2: j
   4409     reffgz
   4410  0: effgz
   4411  1: effgz
   4412     *** Failers
   4413 No match
   4414     effg
   4415 No match
   4416     bcdd
   4417 No match
   4418 
   4419 /((((((((((a))))))))))/
   4420     a
   4421  0: a
   4422  1: a
   4423  2: a
   4424  3: a
   4425  4: a
   4426  5: a
   4427  6: a
   4428  7: a
   4429  8: a
   4430  9: a
   4431 10: a
   4432 
   4433 /((((((((((a))))))))))\10/
   4434     aa
   4435  0: aa
   4436  1: a
   4437  2: a
   4438  3: a
   4439  4: a
   4440  5: a
   4441  6: a
   4442  7: a
   4443  8: a
   4444  9: a
   4445 10: a
   4446 
   4447 /(((((((((a)))))))))/
   4448     a
   4449  0: a
   4450  1: a
   4451  2: a
   4452  3: a
   4453  4: a
   4454  5: a
   4455  6: a
   4456  7: a
   4457  8: a
   4458  9: a
   4459 
   4460 /multiple words of text/
   4461     *** Failers
   4462 No match
   4463     aa
   4464 No match
   4465     uh-uh
   4466 No match
   4467 
   4468 /multiple words/
   4469     multiple words, yeah
   4470  0: multiple words
   4471 
   4472 /(.*)c(.*)/
   4473     abcde
   4474  0: abcde
   4475  1: ab
   4476  2: de
   4477 
   4478 /\((.*), (.*)\)/
   4479     (a, b)
   4480  0: (a, b)
   4481  1: a
   4482  2: b
   4483 
   4484 /[k]/
   4485 
   4486 /abcd/
   4487     abcd
   4488  0: abcd
   4489 
   4490 /a(bc)d/
   4491     abcd
   4492  0: abcd
   4493  1: bc
   4494 
   4495 /a[-]?c/
   4496     ac
   4497  0: ac
   4498 
   4499 /(abc)\1/
   4500     abcabc
   4501  0: abcabc
   4502  1: abc
   4503 
   4504 /([a-c]*)\1/
   4505     abcabc
   4506  0: abcabc
   4507  1: abc
   4508 
   4509 /(a)|\1/
   4510     a
   4511  0: a
   4512  1: a
   4513     *** Failers
   4514  0: a
   4515  1: a
   4516     ab
   4517  0: a
   4518  1: a
   4519     x
   4520 No match
   4521 
   4522 /(([a-c])b*?\2)*/
   4523     ababbbcbc
   4524  0: ababb
   4525  1: bb
   4526  2: b
   4527 
   4528 /(([a-c])b*?\2){3}/
   4529     ababbbcbc
   4530  0: ababbbcbc
   4531  1: cbc
   4532  2: c
   4533 
   4534 /((\3|b)\2(a)x)+/
   4535     aaaxabaxbaaxbbax
   4536  0: bbax
   4537  1: bbax
   4538  2: b
   4539  3: a
   4540 
   4541 /((\3|b)\2(a)){2,}/
   4542     bbaababbabaaaaabbaaaabba
   4543  0: bbaaaabba
   4544  1: bba
   4545  2: b
   4546  3: a
   4547 
   4548 /abc/i
   4549     ABC
   4550  0: ABC
   4551     XABCY
   4552  0: ABC
   4553     ABABC
   4554  0: ABC
   4555     *** Failers
   4556 No match
   4557     aaxabxbaxbbx
   4558 No match
   4559     XBC
   4560 No match
   4561     AXC
   4562 No match
   4563     ABX
   4564 No match
   4565 
   4566 /ab*c/i
   4567     ABC
   4568  0: ABC
   4569 
   4570 /ab*bc/i
   4571     ABC
   4572  0: ABC
   4573     ABBC
   4574  0: ABBC
   4575 
   4576 /ab*?bc/i
   4577     ABBBBC
   4578  0: ABBBBC
   4579 
   4580 /ab{0,}?bc/i
   4581     ABBBBC
   4582  0: ABBBBC
   4583 
   4584 /ab+?bc/i
   4585     ABBC
   4586  0: ABBC
   4587 
   4588 /ab+bc/i
   4589     *** Failers
   4590 No match
   4591     ABC
   4592 No match
   4593     ABQ
   4594 No match
   4595 
   4596 /ab{1,}bc/i
   4597 
   4598 /ab+bc/i
   4599     ABBBBC
   4600  0: ABBBBC
   4601 
   4602 /ab{1,}?bc/i
   4603     ABBBBC
   4604  0: ABBBBC
   4605 
   4606 /ab{1,3}?bc/i
   4607     ABBBBC
   4608  0: ABBBBC
   4609 
   4610 /ab{3,4}?bc/i
   4611     ABBBBC
   4612  0: ABBBBC
   4613 
   4614 /ab{4,5}?bc/i
   4615     *** Failers
   4616 No match
   4617     ABQ
   4618 No match
   4619     ABBBBC
   4620 No match
   4621 
   4622 /ab??bc/i
   4623     ABBC
   4624  0: ABBC
   4625     ABC
   4626  0: ABC
   4627 
   4628 /ab{0,1}?bc/i
   4629     ABC
   4630  0: ABC
   4631 
   4632 /ab??bc/i
   4633 
   4634 /ab??c/i
   4635     ABC
   4636  0: ABC
   4637 
   4638 /ab{0,1}?c/i
   4639     ABC
   4640  0: ABC
   4641 
   4642 /^abc$/i
   4643     ABC
   4644  0: ABC
   4645     *** Failers
   4646 No match
   4647     ABBBBC
   4648 No match
   4649     ABCC
   4650 No match
   4651 
   4652 /^abc/i
   4653     ABCC
   4654  0: ABC
   4655 
   4656 /^abc$/i
   4657 
   4658 /abc$/i
   4659     AABC
   4660  0: ABC
   4661 
   4662 /^/i
   4663     ABC
   4664  0: 
   4665 
   4666 /$/i
   4667     ABC
   4668  0: 
   4669 
   4670 /a.c/i
   4671     ABC
   4672  0: ABC
   4673     AXC
   4674  0: AXC
   4675 
   4676 /a.*?c/i
   4677     AXYZC
   4678  0: AXYZC
   4679 
   4680 /a.*c/i
   4681     *** Failers
   4682 No match
   4683     AABC
   4684  0: AABC
   4685     AXYZD
   4686 No match
   4687 
   4688 /a[bc]d/i
   4689     ABD
   4690  0: ABD
   4691 
   4692 /a[b-d]e/i
   4693     ACE
   4694  0: ACE
   4695     *** Failers
   4696 No match
   4697     ABC
   4698 No match
   4699     ABD
   4700 No match
   4701 
   4702 /a[b-d]/i
   4703     AAC
   4704  0: AC
   4705 
   4706 /a[-b]/i
   4707     A-
   4708  0: A-
   4709 
   4710 /a[b-]/i
   4711     A-
   4712  0: A-
   4713 
   4714 /a]/i
   4715     A]
   4716  0: A]
   4717 
   4718 /a[]]b/i
   4719     A]B
   4720  0: A]B
   4721 
   4722 /a[^bc]d/i
   4723     AED
   4724  0: AED
   4725 
   4726 /a[^-b]c/i
   4727     ADC
   4728  0: ADC
   4729     *** Failers
   4730 No match
   4731     ABD
   4732 No match
   4733     A-C
   4734 No match
   4735 
   4736 /a[^]b]c/i
   4737     ADC
   4738  0: ADC
   4739 
   4740 /ab|cd/i
   4741     ABC
   4742  0: AB
   4743     ABCD
   4744  0: AB
   4745 
   4746 /()ef/i
   4747     DEF
   4748  0: EF
   4749  1: 
   4750 
   4751 /$b/i
   4752     *** Failers
   4753 No match
   4754     A]C
   4755 No match
   4756     B
   4757 No match
   4758 
   4759 /a\(b/i
   4760     A(B
   4761  0: A(B
   4762 
   4763 /a\(*b/i
   4764     AB
   4765  0: AB
   4766     A((B
   4767  0: A((B
   4768 
   4769 /a\\b/i
   4770     A\B
   4771 No match
   4772 
   4773 /((a))/i
   4774     ABC
   4775  0: A
   4776  1: A
   4777  2: A
   4778 
   4779 /(a)b(c)/i
   4780     ABC
   4781  0: ABC
   4782  1: A
   4783  2: C
   4784 
   4785 /a+b+c/i
   4786     AABBABC
   4787  0: ABC
   4788 
   4789 /a{1,}b{1,}c/i
   4790     AABBABC
   4791  0: ABC
   4792 
   4793 /a.+?c/i
   4794     ABCABC
   4795  0: ABC
   4796 
   4797 /a.*?c/i
   4798     ABCABC
   4799  0: ABC
   4800 
   4801 /a.{0,5}?c/i
   4802     ABCABC
   4803  0: ABC
   4804 
   4805 /(a+|b)*/i
   4806     AB
   4807  0: AB
   4808  1: B
   4809 
   4810 /(a+|b){0,}/i
   4811     AB
   4812  0: AB
   4813  1: B
   4814 
   4815 /(a+|b)+/i
   4816     AB
   4817  0: AB
   4818  1: B
   4819 
   4820 /(a+|b){1,}/i
   4821     AB
   4822  0: AB
   4823  1: B
   4824 
   4825 /(a+|b)?/i
   4826     AB
   4827  0: A
   4828  1: A
   4829 
   4830 /(a+|b){0,1}/i
   4831     AB
   4832  0: A
   4833  1: A
   4834 
   4835 /(a+|b){0,1}?/i
   4836     AB
   4837  0: 
   4838 
   4839 /[^ab]*/i
   4840     CDE
   4841  0: CDE
   4842 
   4843 /abc/i
   4844 
   4845 /a*/i
   4846     
   4847 
   4848 /([abc])*d/i
   4849     ABBBCD
   4850  0: ABBBCD
   4851  1: C
   4852 
   4853 /([abc])*bcd/i
   4854     ABCD
   4855  0: ABCD
   4856  1: A
   4857 
   4858 /a|b|c|d|e/i
   4859     E
   4860  0: E
   4861 
   4862 /(a|b|c|d|e)f/i
   4863     EF
   4864  0: EF
   4865  1: E
   4866 
   4867 /abcd*efg/i
   4868     ABCDEFG
   4869  0: ABCDEFG
   4870 
   4871 /ab*/i
   4872     XABYABBBZ
   4873  0: AB
   4874     XAYABBBZ
   4875  0: A
   4876 
   4877 /(ab|cd)e/i
   4878     ABCDE
   4879  0: CDE
   4880  1: CD
   4881 
   4882 /[abhgefdc]ij/i
   4883     HIJ
   4884  0: HIJ
   4885 
   4886 /^(ab|cd)e/i
   4887     ABCDE
   4888 No match
   4889 
   4890 /(abc|)ef/i
   4891     ABCDEF
   4892  0: EF
   4893  1: 
   4894 
   4895 /(a|b)c*d/i
   4896     ABCD
   4897  0: BCD
   4898  1: B
   4899 
   4900 /(ab|ab*)bc/i
   4901     ABC
   4902  0: ABC
   4903  1: A
   4904 
   4905 /a([bc]*)c*/i
   4906     ABC
   4907  0: ABC
   4908  1: BC
   4909 
   4910 /a([bc]*)(c*d)/i
   4911     ABCD
   4912  0: ABCD
   4913  1: BC
   4914  2: D
   4915 
   4916 /a([bc]+)(c*d)/i
   4917     ABCD
   4918  0: ABCD
   4919  1: BC
   4920  2: D
   4921 
   4922 /a([bc]*)(c+d)/i
   4923     ABCD
   4924  0: ABCD
   4925  1: B
   4926  2: CD
   4927 
   4928 /a[bcd]*dcdcde/i
   4929     ADCDCDE
   4930  0: ADCDCDE
   4931 
   4932 /a[bcd]+dcdcde/i
   4933 
   4934 /(ab|a)b*c/i
   4935     ABC
   4936  0: ABC
   4937  1: AB
   4938 
   4939 /((a)(b)c)(d)/i
   4940     ABCD
   4941  0: ABCD
   4942  1: ABC
   4943  2: A
   4944  3: B
   4945  4: D
   4946 
   4947 /[a-zA-Z_][a-zA-Z0-9_]*/i
   4948     ALPHA
   4949  0: ALPHA
   4950 
   4951 /^a(bc+|b[eh])g|.h$/i
   4952     ABH
   4953  0: BH
   4954 
   4955 /(bc+d$|ef*g.|h?i(j|k))/i
   4956     EFFGZ
   4957  0: EFFGZ
   4958  1: EFFGZ
   4959     IJ
   4960  0: IJ
   4961  1: IJ
   4962  2: J
   4963     REFFGZ
   4964  0: EFFGZ
   4965  1: EFFGZ
   4966     *** Failers
   4967 No match
   4968     ADCDCDE
   4969 No match
   4970     EFFG
   4971 No match
   4972     BCDD
   4973 No match
   4974 
   4975 /((((((((((a))))))))))/i
   4976     A
   4977  0: A
   4978  1: A
   4979  2: A
   4980  3: A
   4981  4: A
   4982  5: A
   4983  6: A
   4984  7: A
   4985  8: A
   4986  9: A
   4987 10: A
   4988 
   4989 /((((((((((a))))))))))\10/i
   4990     AA
   4991  0: AA
   4992  1: A
   4993  2: A
   4994  3: A
   4995  4: A
   4996  5: A
   4997  6: A
   4998  7: A
   4999  8: A
   5000  9: A
   5001 10: A
   5002 
   5003 /(((((((((a)))))))))/i
   5004     A
   5005  0: A
   5006  1: A
   5007  2: A
   5008  3: A
   5009  4: A
   5010  5: A
   5011  6: A
   5012  7: A
   5013  8: A
   5014  9: A
   5015 
   5016 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
   5017     A
   5018  0: A
   5019  1: A
   5020 
   5021 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
   5022     C
   5023  0: C
   5024  1: C
   5025 
   5026 /multiple words of text/i
   5027     *** Failers
   5028 No match
   5029     AA
   5030 No match
   5031     UH-UH
   5032 No match
   5033 
   5034 /multiple words/i
   5035     MULTIPLE WORDS, YEAH
   5036  0: MULTIPLE WORDS
   5037 
   5038 /(.*)c(.*)/i
   5039     ABCDE
   5040  0: ABCDE
   5041  1: AB
   5042  2: DE
   5043 
   5044 /\((.*), (.*)\)/i
   5045     (A, B)
   5046  0: (A, B)
   5047  1: A
   5048  2: B
   5049 
   5050 /[k]/i
   5051 
   5052 /abcd/i
   5053     ABCD
   5054  0: ABCD
   5055 
   5056 /a(bc)d/i
   5057     ABCD
   5058  0: ABCD
   5059  1: BC
   5060 
   5061 /a[-]?c/i
   5062     AC
   5063  0: AC
   5064 
   5065 /(abc)\1/i
   5066     ABCABC
   5067  0: ABCABC
   5068  1: ABC
   5069 
   5070 /([a-c]*)\1/i
   5071     ABCABC
   5072  0: ABCABC
   5073  1: ABC
   5074 
   5075 /a(?!b)./
   5076     abad
   5077  0: ad
   5078 
   5079 /a(?=d)./
   5080     abad
   5081  0: ad
   5082 
   5083 /a(?=c|d)./
   5084     abad
   5085  0: ad
   5086 
   5087 /a(?:b|c|d)(.)/
   5088     ace
   5089  0: ace
   5090  1: e
   5091 
   5092 /a(?:b|c|d)*(.)/
   5093     ace
   5094  0: ace
   5095  1: e
   5096 
   5097 /a(?:b|c|d)+?(.)/
   5098     ace
   5099  0: ace
   5100  1: e
   5101     acdbcdbe
   5102  0: acd
   5103  1: d
   5104 
   5105 /a(?:b|c|d)+(.)/
   5106     acdbcdbe
   5107  0: acdbcdbe
   5108  1: e
   5109 
   5110 /a(?:b|c|d){2}(.)/
   5111     acdbcdbe
   5112  0: acdb
   5113  1: b
   5114 
   5115 /a(?:b|c|d){4,5}(.)/
   5116     acdbcdbe
   5117  0: acdbcdb
   5118  1: b
   5119 
   5120 /a(?:b|c|d){4,5}?(.)/
   5121     acdbcdbe
   5122  0: acdbcd
   5123  1: d
   5124 
   5125 /((foo)|(bar))*/
   5126     foobar
   5127  0: foobar
   5128  1: bar
   5129  2: foo
   5130  3: bar
   5131 
   5132 /a(?:b|c|d){6,7}(.)/
   5133     acdbcdbe
   5134  0: acdbcdbe
   5135  1: e
   5136 
   5137 /a(?:b|c|d){6,7}?(.)/
   5138     acdbcdbe
   5139  0: acdbcdbe
   5140  1: e
   5141 
   5142 /a(?:b|c|d){5,6}(.)/
   5143     acdbcdbe
   5144  0: acdbcdbe
   5145  1: e
   5146 
   5147 /a(?:b|c|d){5,6}?(.)/
   5148     acdbcdbe
   5149  0: acdbcdb
   5150  1: b
   5151 
   5152 /a(?:b|c|d){5,7}(.)/
   5153     acdbcdbe
   5154  0: acdbcdbe
   5155  1: e
   5156 
   5157 /a(?:b|c|d){5,7}?(.)/
   5158     acdbcdbe
   5159  0: acdbcdb
   5160  1: b
   5161 
   5162 /a(?:b|(c|e){1,2}?|d)+?(.)/
   5163     ace
   5164  0: ace
   5165  1: c
   5166  2: e
   5167 
   5168 /^(.+)?B/
   5169     AB
   5170  0: AB
   5171  1: A
   5172 
   5173 /^([^a-z])|(\^)$/
   5174     .
   5175  0: .
   5176  1: .
   5177 
   5178 /^[<>]&/
   5179     <&OUT
   5180  0: <&
   5181 
   5182 /^(a\1?){4}$/
   5183     aaaaaaaaaa
   5184  0: aaaaaaaaaa
   5185  1: aaaa
   5186     *** Failers
   5187 No match
   5188     AB
   5189 No match
   5190     aaaaaaaaa
   5191 No match
   5192     aaaaaaaaaaa
   5193 No match
   5194 
   5195 /^(a(?(1)\1)){4}$/
   5196     aaaaaaaaaa
   5197  0: aaaaaaaaaa
   5198  1: aaaa
   5199     *** Failers
   5200 No match
   5201     aaaaaaaaa
   5202 No match
   5203     aaaaaaaaaaa
   5204 No match
   5205 
   5206 /(?:(f)(o)(o)|(b)(a)(r))*/
   5207     foobar
   5208  0: foobar
   5209  1: f
   5210  2: o
   5211  3: o
   5212  4: b
   5213  5: a
   5214  6: r
   5215 
   5216 /(?<=a)b/
   5217     ab
   5218  0: b
   5219     *** Failers
   5220 No match
   5221     cb
   5222 No match
   5223     b
   5224 No match
   5225 
   5226 /(?<!c)b/
   5227     ab
   5228  0: b
   5229     b
   5230  0: b
   5231     b
   5232  0: b
   5233 
   5234 /(?:..)*a/
   5235     aba
   5236  0: aba
   5237 
   5238 /(?:..)*?a/
   5239     aba
   5240  0: a
   5241 
   5242 /^(?:b|a(?=(.)))*\1/
   5243     abc
   5244  0: ab
   5245  1: b
   5246 
   5247 /^(){3,5}/
   5248     abc
   5249  0: 
   5250  1: 
   5251 
   5252 /^(a+)*ax/
   5253     aax
   5254  0: aax
   5255  1: a
   5256 
   5257 /^((a|b)+)*ax/
   5258     aax
   5259  0: aax
   5260  1: a
   5261  2: a
   5262 
   5263 /^((a|bc)+)*ax/
   5264     aax
   5265  0: aax
   5266  1: a
   5267  2: a
   5268 
   5269 /(a|x)*ab/
   5270     cab
   5271  0: ab
   5272 
   5273 /(a)*ab/
   5274     cab
   5275  0: ab
   5276 
   5277 /(?:(?i)a)b/
   5278     ab
   5279  0: ab
   5280 
   5281 /((?i)a)b/
   5282     ab
   5283  0: ab
   5284  1: a
   5285 
   5286 /(?:(?i)a)b/
   5287     Ab
   5288  0: Ab
   5289 
   5290 /((?i)a)b/
   5291     Ab
   5292  0: Ab
   5293  1: A
   5294 
   5295 /(?:(?i)a)b/
   5296     *** Failers
   5297 No match
   5298     cb
   5299 No match
   5300     aB
   5301 No match
   5302 
   5303 /((?i)a)b/
   5304 
   5305 /(?i:a)b/
   5306     ab
   5307  0: ab
   5308 
   5309 /((?i:a))b/
   5310     ab
   5311  0: ab
   5312  1: a
   5313 
   5314 /(?i:a)b/
   5315     Ab
   5316  0: Ab
   5317 
   5318 /((?i:a))b/
   5319     Ab
   5320  0: Ab
   5321  1: A
   5322 
   5323 /(?i:a)b/
   5324     *** Failers
   5325 No match
   5326     aB
   5327 No match
   5328     aB
   5329 No match
   5330 
   5331 /((?i:a))b/
   5332 
   5333 /(?:(?-i)a)b/i
   5334     ab
   5335  0: ab
   5336 
   5337 /((?-i)a)b/i
   5338     ab
   5339  0: ab
   5340  1: a
   5341 
   5342 /(?:(?-i)a)b/i
   5343     aB
   5344  0: aB
   5345 
   5346 /((?-i)a)b/i
   5347     aB
   5348  0: aB
   5349  1: a
   5350 
   5351 /(?:(?-i)a)b/i
   5352     *** Failers
   5353 No match
   5354     aB
   5355  0: aB
   5356     Ab
   5357 No match
   5358 
   5359 /((?-i)a)b/i
   5360 
   5361 /(?:(?-i)a)b/i
   5362     aB
   5363  0: aB
   5364 
   5365 /((?-i)a)b/i
   5366     aB
   5367  0: aB
   5368  1: a
   5369 
   5370 /(?:(?-i)a)b/i
   5371     *** Failers
   5372 No match
   5373     Ab
   5374 No match
   5375     AB
   5376 No match
   5377 
   5378 /((?-i)a)b/i
   5379 
   5380 /(?-i:a)b/i
   5381     ab
   5382  0: ab
   5383 
   5384 /((?-i:a))b/i
   5385     ab
   5386  0: ab
   5387  1: a
   5388 
   5389 /(?-i:a)b/i
   5390     aB
   5391  0: aB
   5392 
   5393 /((?-i:a))b/i
   5394     aB
   5395  0: aB
   5396  1: a
   5397 
   5398 /(?-i:a)b/i
   5399     *** Failers
   5400 No match
   5401     AB
   5402 No match
   5403     Ab
   5404 No match
   5405 
   5406 /((?-i:a))b/i
   5407 
   5408 /(?-i:a)b/i
   5409     aB
   5410  0: aB
   5411 
   5412 /((?-i:a))b/i
   5413     aB
   5414  0: aB
   5415  1: a
   5416 
   5417 /(?-i:a)b/i
   5418     *** Failers
   5419 No match
   5420     Ab
   5421 No match
   5422     AB
   5423 No match
   5424 
   5425 /((?-i:a))b/i
   5426 
   5427 /((?-i:a.))b/i
   5428     *** Failers
   5429 No match
   5430     AB
   5431 No match
   5432     a\nB
   5433 No match
   5434 
   5435 /((?s-i:a.))b/i
   5436     a\nB
   5437  0: a\x0aB
   5438  1: a\x0a
   5439 
   5440 /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
   5441     cabbbb
   5442  0: cabbbb
   5443 
   5444 /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
   5445     caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
   5446  0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
   5447 
   5448 /(ab)\d\1/i
   5449     Ab4ab
   5450  0: Ab4ab
   5451  1: Ab
   5452     ab4Ab
   5453  0: ab4Ab
   5454  1: ab
   5455 
   5456 /foo\w*\d{4}baz/
   5457     foobar1234baz
   5458  0: foobar1234baz
   5459 
   5460 /x(~~)*(?:(?:F)?)?/
   5461     x~~
   5462  0: x~~
   5463  1: ~~
   5464 
   5465 /^a(?#xxx){3}c/
   5466     aaac
   5467  0: aaac
   5468 
   5469 /^a (?#xxx) (?#yyy) {3}c/x
   5470     aaac
   5471  0: aaac
   5472 
   5473 /(?<![cd])b/
   5474     *** Failers
   5475 No match
   5476     B\nB
   5477 No match
   5478     dbcb
   5479 No match
   5480 
   5481 /(?<![cd])[ab]/
   5482     dbaacb
   5483  0: a
   5484 
   5485 /(?<!(c|d))b/
   5486 
   5487 /(?<!(c|d))[ab]/
   5488     dbaacb
   5489  0: a
   5490 
   5491 /(?<!cd)[ab]/
   5492     cdaccb
   5493  0: b
   5494 
   5495 /^(?:a?b?)*$/
   5496     \
   5497  0: 
   5498     a
   5499  0: a
   5500     ab
   5501  0: ab
   5502     aaa   
   5503  0: aaa
   5504     *** Failers
   5505 No match
   5506     dbcb
   5507 No match
   5508     a--
   5509 No match
   5510     aa-- 
   5511 No match
   5512 
   5513 /((?s)^a(.))((?m)^b$)/
   5514     a\nb\nc\n
   5515  0: a\x0ab
   5516  1: a\x0a
   5517  2: \x0a
   5518  3: b
   5519 
   5520 /((?m)^b$)/
   5521     a\nb\nc\n
   5522  0: b
   5523  1: b
   5524 
   5525 /(?m)^b/
   5526     a\nb\n
   5527  0: b
   5528 
   5529 /(?m)^(b)/
   5530     a\nb\n
   5531  0: b
   5532  1: b
   5533 
   5534 /((?m)^b)/
   5535     a\nb\n
   5536  0: b
   5537  1: b
   5538 
   5539 /\n((?m)^b)/
   5540     a\nb\n
   5541  0: \x0ab
   5542  1: b
   5543 
   5544 /((?s).)c(?!.)/
   5545     a\nb\nc\n
   5546  0: \x0ac
   5547  1: \x0a
   5548     a\nb\nc\n
   5549  0: \x0ac
   5550  1: \x0a
   5551 
   5552 /((?s)b.)c(?!.)/
   5553     a\nb\nc\n
   5554  0: b\x0ac
   5555  1: b\x0a
   5556     a\nb\nc\n
   5557  0: b\x0ac
   5558  1: b\x0a
   5559 
   5560 /^b/
   5561 
   5562 /()^b/
   5563     *** Failers
   5564 No match
   5565     a\nb\nc\n
   5566 No match
   5567     a\nb\nc\n
   5568 No match
   5569 
   5570 /((?m)^b)/
   5571     a\nb\nc\n
   5572  0: b
   5573  1: b
   5574 
   5575 /(x)?(?(1)a|b)/
   5576     *** Failers
   5577 No match
   5578     a
   5579 No match
   5580     a
   5581 No match
   5582 
   5583 /(x)?(?(1)b|a)/
   5584     a
   5585  0: a
   5586 
   5587 /()?(?(1)b|a)/
   5588     a
   5589  0: a
   5590 
   5591 /()(?(1)b|a)/
   5592 
   5593 /()?(?(1)a|b)/
   5594     a
   5595  0: a
   5596  1: 
   5597 
   5598 /^(\()?blah(?(1)(\)))$/
   5599     (blah)
   5600  0: (blah)
   5601  1: (
   5602  2: )
   5603     blah
   5604  0: blah
   5605     *** Failers
   5606 No match
   5607     a
   5608 No match
   5609     blah)
   5610 No match
   5611     (blah
   5612 No match
   5613 
   5614 /^(\(+)?blah(?(1)(\)))$/
   5615     (blah)
   5616  0: (blah)
   5617  1: (
   5618  2: )
   5619     blah
   5620  0: blah
   5621     *** Failers
   5622 No match
   5623     blah)
   5624 No match
   5625     (blah
   5626 No match
   5627 
   5628 /(?(?!a)a|b)/
   5629 
   5630 /(?(?!a)b|a)/
   5631     a
   5632  0: a
   5633 
   5634 /(?(?=a)b|a)/
   5635     *** Failers
   5636 No match
   5637     a
   5638 No match
   5639     a
   5640 No match
   5641 
   5642 /(?(?=a)a|b)/
   5643     a
   5644  0: a
   5645 
   5646 /(?=(a+?))(\1ab)/
   5647     aaab
   5648  0: aab
   5649  1: a
   5650  2: aab
   5651 
   5652 /^(?=(a+?))\1ab/
   5653 
   5654 /(\w+:)+/
   5655     one:
   5656  0: one:
   5657  1: one:
   5658 
   5659 /$(?<=^(a))/
   5660     a
   5661  0: 
   5662  1: a
   5663 
   5664 /(?=(a+?))(\1ab)/
   5665     aaab
   5666  0: aab
   5667  1: a
   5668  2: aab
   5669 
   5670 /^(?=(a+?))\1ab/
   5671     *** Failers
   5672 No match
   5673     aaab
   5674 No match
   5675     aaab
   5676 No match
   5677 
   5678 /([\w:]+::)?(\w+)$/
   5679     abcd
   5680  0: abcd
   5681  1: <unset>
   5682  2: abcd
   5683     xy:z:::abcd
   5684  0: xy:z:::abcd
   5685  1: xy:z:::
   5686  2: abcd
   5687 
   5688 /^[^bcd]*(c+)/
   5689     aexycd
   5690  0: aexyc
   5691  1: c
   5692 
   5693 /(a*)b+/
   5694     caab
   5695  0: aab
   5696  1: aa
   5697 
   5698 /([\w:]+::)?(\w+)$/
   5699     abcd
   5700  0: abcd
   5701  1: <unset>
   5702  2: abcd
   5703     xy:z:::abcd
   5704  0: xy:z:::abcd
   5705  1: xy:z:::
   5706  2: abcd
   5707     *** Failers
   5708  0: Failers
   5709  1: <unset>
   5710  2: Failers
   5711     abcd:
   5712 No match
   5713     abcd:
   5714 No match
   5715 
   5716 /^[^bcd]*(c+)/
   5717     aexycd
   5718  0: aexyc
   5719  1: c
   5720 
   5721 /(>a+)ab/
   5722 
   5723 /(?>a+)b/
   5724     aaab
   5725  0: aaab
   5726 
   5727 /([[:]+)/
   5728     a:[b]:
   5729  0: :[
   5730  1: :[
   5731 
   5732 /([[=]+)/
   5733     a=[b]=
   5734  0: =[
   5735  1: =[
   5736 
   5737 /([[.]+)/
   5738     a.[b].
   5739  0: .[
   5740  1: .[
   5741 
   5742 /((?>a+)b)/
   5743     aaab
   5744  0: aaab
   5745  1: aaab
   5746 
   5747 /(?>(a+))b/
   5748     aaab
   5749  0: aaab
   5750  1: aaa
   5751 
   5752 /((?>[^()]+)|\([^()]*\))+/
   5753     ((abc(ade)ufh()()x
   5754  0: abc(ade)ufh()()x
   5755  1: x
   5756 
   5757 /a\Z/
   5758     *** Failers
   5759 No match
   5760     aaab
   5761 No match
   5762     a\nb\n
   5763 No match
   5764 
   5765 /b\Z/
   5766     a\nb\n
   5767  0: b
   5768 
   5769 /b\z/
   5770 
   5771 /b\Z/
   5772     a\nb
   5773  0: b
   5774 
   5775 /b\z/
   5776     a\nb
   5777  0: b
   5778     *** Failers
   5779 No match
   5780     
   5781 /^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
   5782     a
   5783  0: a
   5784  1: 
   5785     abc
   5786  0: abc
   5787  1: 
   5788     a-b
   5789  0: a-b
   5790  1: 
   5791     0-9 
   5792  0: 0-9
   5793  1: 
   5794     a.b
   5795  0: a.b
   5796  1: 
   5797     5.6.7  
   5798  0: 5.6.7
   5799  1: 
   5800     the.quick.brown.fox
   5801  0: the.quick.brown.fox
   5802  1: 
   5803     a100.b200.300c  
   5804  0: a100.b200.300c
   5805  1: 
   5806     12-ab.1245 
   5807  0: 12-ab.1245
   5808  1: 
   5809     *** Failers
   5810 No match
   5811     \
   5812 No match
   5813     .a
   5814 No match
   5815     -a
   5816 No match
   5817     a-
   5818 No match
   5819     a.  
   5820 No match
   5821     a_b 
   5822 No match
   5823     a.-
   5824 No match
   5825     a..  
   5826 No match
   5827     ab..bc 
   5828 No match
   5829     the.quick.brown.fox-
   5830 No match
   5831     the.quick.brown.fox.
   5832 No match
   5833     the.quick.brown.fox_
   5834 No match
   5835     the.quick.brown.fox+       
   5836 No match
   5837 
   5838 /(?>.*)(?<=(abcd|wxyz))/
   5839     alphabetabcd
   5840  0: alphabetabcd
   5841  1: abcd
   5842     endingwxyz
   5843  0: endingwxyz
   5844  1: wxyz
   5845     *** Failers
   5846 No match
   5847     a rather long string that doesn't end with one of them
   5848 No match
   5849 
   5850 /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
   5851     word cat dog elephant mussel cow horse canary baboon snake shark otherword
   5852  0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
   5853     word cat dog elephant mussel cow horse canary baboon snake shark
   5854 No match
   5855   
   5856 /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
   5857     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
   5858 No match
   5859 
   5860 /(?<=\d{3}(?!999))foo/
   5861     999foo
   5862  0: foo
   5863     123999foo 
   5864  0: foo
   5865     *** Failers
   5866 No match
   5867     123abcfoo
   5868 No match
   5869     
   5870 /(?<=(?!...999)\d{3})foo/
   5871     999foo
   5872  0: foo
   5873     123999foo 
   5874  0: foo
   5875     *** Failers
   5876 No match
   5877     123abcfoo
   5878 No match
   5879 
   5880 /(?<=\d{3}(?!999)...)foo/
   5881     123abcfoo
   5882  0: foo
   5883     123456foo 
   5884  0: foo
   5885     *** Failers
   5886 No match
   5887     123999foo  
   5888 No match
   5889     
   5890 /(?<=\d{3}...)(?<!999)foo/
   5891     123abcfoo   
   5892  0: foo
   5893     123456foo 
   5894  0: foo
   5895     *** Failers
   5896 No match
   5897     123999foo  
   5898 No match
   5899 
   5900 /<a[\s]+href[\s]*=[\s]*          # find <a href=
   5901  ([\"\'])?                       # find single or double quote
   5902  (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
   5903                                  # quote, otherwise match up to next space
   5904 /isx
   5905     <a href=abcd xyz
   5906  0: <a href=abcd
   5907  1: <unset>
   5908  2: <unset>
   5909  3: abcd
   5910     <a href=\"abcd xyz pqr\" cats
   5911  0: <a href="abcd xyz pqr"
   5912  1: "
   5913  2: abcd xyz pqr
   5914     <a href=\'abcd xyz pqr\' cats
   5915  0: <a href='abcd xyz pqr'
   5916  1: '
   5917  2: abcd xyz pqr
   5918 
   5919 /<a\s+href\s*=\s*                # find <a href=
   5920  (["'])?                         # find single or double quote
   5921  (?(1) (.*?)\1 | (\S+))          # if quote found, match up to next matching
   5922                                  # quote, otherwise match up to next space
   5923 /isx
   5924     <a href=abcd xyz
   5925  0: <a href=abcd
   5926  1: <unset>
   5927  2: <unset>
   5928  3: abcd
   5929     <a href=\"abcd xyz pqr\" cats
   5930  0: <a href="abcd xyz pqr"
   5931  1: "
   5932  2: abcd xyz pqr
   5933     <a href       =       \'abcd xyz pqr\' cats
   5934  0: <a href       =       'abcd xyz pqr'
   5935  1: '
   5936  2: abcd xyz pqr
   5937 
   5938 /<a\s+href(?>\s*)=(?>\s*)        # find <a href=
   5939  (["'])?                         # find single or double quote
   5940  (?(1) (.*?)\1 | (\S+))          # if quote found, match up to next matching
   5941                                  # quote, otherwise match up to next space
   5942 /isx
   5943     <a href=abcd xyz
   5944  0: <a href=abcd
   5945  1: <unset>
   5946  2: <unset>
   5947  3: abcd
   5948     <a href=\"abcd xyz pqr\" cats
   5949  0: <a href="abcd xyz pqr"
   5950  1: "
   5951  2: abcd xyz pqr
   5952     <a href       =       \'abcd xyz pqr\' cats
   5953  0: <a href       =       'abcd xyz pqr'
   5954  1: '
   5955  2: abcd xyz pqr
   5956 
   5957 /((Z)+|A)*/
   5958     ZABCDEFG
   5959  0: ZA
   5960  1: A
   5961  2: Z
   5962 
   5963 /(Z()|A)*/
   5964     ZABCDEFG
   5965  0: ZA
   5966  1: A
   5967  2: 
   5968 
   5969 /(Z(())|A)*/
   5970     ZABCDEFG
   5971  0: ZA
   5972  1: A
   5973  2: 
   5974  3: 
   5975 
   5976 /((?>Z)+|A)*/
   5977     ZABCDEFG
   5978  0: ZA
   5979  1: A
   5980 
   5981 /((?>)+|A)*/
   5982     ZABCDEFG
   5983  0: 
   5984  1: 
   5985 
   5986 /a*/g
   5987     abbab
   5988  0: a
   5989  0: 
   5990  0: 
   5991  0: a
   5992  0: 
   5993  0: 
   5994 
   5995 /^[\d-a]/
   5996     abcde
   5997  0: a
   5998     -things
   5999  0: -
   6000     0digit
   6001  0: 0
   6002     *** Failers
   6003 No match
   6004     bcdef    
   6005 No match
   6006     
   6007 /[[:space:]]+/
   6008     > \x09\x0a\x0c\x0d\x0b<
   6009  0:  \x09\x0a\x0c\x0d\x0b
   6010      
   6011 /[[:blank:]]+/
   6012     > \x09\x0a\x0c\x0d\x0b<
   6013  0:  \x09
   6014      
   6015 /[\s]+/
   6016     > \x09\x0a\x0c\x0d\x0b<
   6017  0:  \x09\x0a\x0c\x0d\x0b
   6018      
   6019 /\s+/
   6020     > \x09\x0a\x0c\x0d\x0b<
   6021  0:  \x09\x0a\x0c\x0d\x0b
   6022      
   6023 /ab/x
   6025     ab
   6026  0: ab
   6027 
   6028 /(?!\A)x/m
   6029   a\nxb\n
   6030  0: x
   6031 
   6032 /(?!^)x/m
   6033   a\nxb\n
   6034 No match
   6035 
   6036 /abc\Qabc\Eabc/
   6037     abcabcabc
   6038  0: abcabcabc
   6039     
   6040 /abc\Q(*+|\Eabc/
   6041     abc(*+|abc 
   6042  0: abc(*+|abc
   6043 
   6044 /   abc\Q abc\Eabc/x
   6045     abc abcabc
   6046  0: abc abcabc
   6047     *** Failers
   6048 No match
   6049     abcabcabc  
   6050 No match
   6051     
   6052 /abc#comment
   6053     \Q#not comment
   6054     literal\E/x
   6055     abc#not comment\n    literal     
   6056  0: abc#not comment\x0a    literal
   6057 
   6058 /abc#comment
   6059     \Q#not comment
   6060     literal/x
   6061     abc#not comment\n    literal     
   6062  0: abc#not comment\x0a    literal
   6063 
   6064 /abc#comment
   6065     \Q#not comment
   6066     literal\E #more comment
   6067     /x
   6068     abc#not comment\n    literal     
   6069  0: abc#not comment\x0a    literal
   6070 
   6071 /abc#comment
   6072     \Q#not comment
   6073     literal\E #more comment/x
   6074     abc#not comment\n    literal     
   6075  0: abc#not comment\x0a    literal
   6076 
   6077 /\Qabc\$xyz\E/
   6078     abc\\\$xyz
   6079  0: abc\$xyz
   6080 
   6081 /\Qabc\E\$\Qxyz\E/
   6082     abc\$xyz
   6083  0: abc$xyz
   6084 
   6085 /\Gabc/
   6086     abc
   6087  0: abc
   6088     *** Failers
   6089 No match
   6090     xyzabc  
   6091 No match
   6092 
   6093 /\Gabc./g
   6094     abc1abc2xyzabc3
   6095  0: abc1
   6096  0: abc2
   6097 
   6098 /abc./g
   6099     abc1abc2xyzabc3 
   6100  0: abc1
   6101  0: abc2
   6102  0: abc3
   6103 
   6104 /a(?x: b c )d/
   6105     XabcdY
   6106  0: abcd
   6107     *** Failers 
   6108 No match
   6109     Xa b c d Y 
   6110 No match
   6111 
   6112 /((?x)x y z | a b c)/
   6113     XabcY
   6114  0: abc
   6115  1: abc
   6116     AxyzB 
   6117  0: xyz
   6118  1: xyz
   6119 
   6120 /(?i)AB(?-i)C/
   6121     XabCY
   6122  0: abC
   6123     *** Failers
   6124 No match
   6125     XabcY  
   6126 No match
   6127 
   6128 /((?i)AB(?-i)C|D)E/
   6129     abCE
   6130  0: abCE
   6131  1: abC
   6132     DE
   6133  0: DE
   6134  1: D
   6135     *** Failers
   6136 No match
   6137     abcE
   6138 No match
   6139     abCe  
   6140 No match
   6141     dE
   6142 No match
   6143     De    
   6144 No match
   6145 
   6146 /(.*)\d+\1/
   6147     abc123abc
   6148  0: abc123abc
   6149  1: abc
   6150     abc123bc 
   6151  0: bc123bc
   6152  1: bc
   6153 
   6154 /(.*)\d+\1/s
   6155     abc123abc
   6156  0: abc123abc
   6157  1: abc
   6158     abc123bc 
   6159  0: bc123bc
   6160  1: bc
   6161     
   6162 /((.*))\d+\1/
   6163     abc123abc
   6164  0: abc123abc
   6165  1: abc
   6166  2: abc
   6167     abc123bc  
   6168  0: bc123bc
   6169  1: bc
   6170  2: bc
   6171 
   6172 /-- This tests for an IPv6 address in the form where it can have up to
   6173     eight components, one and only one of which is empty. This must be
   6174     an internal component. --/
   6175 
   6176 /^(?!:)                       # colon disallowed at start
   6177   (?:                         # start of item
   6178     (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
   6179     (?(1)0 | () ) )           # if null previously matched, fail; else null
   6180     :                         # followed by colon
   6181   ){1,7}                      # end item; 1-7 of them required               
   6182   [0-9a-f]{1,4} $             # final hex number at end of string
   6183   (?(1)|.)                    # check that there was an empty component
   6184   /xi
   6185     a123::a123
   6186  0: a123::a123
   6187  1: 
   6188     a123:b342::abcd
   6189  0: a123:b342::abcd
   6190  1: 
   6191     a123:b342::324e:abcd
   6192  0: a123:b342::324e:abcd
   6193  1: 
   6194     a123:ddde:b342::324e:abcd
   6195  0: a123:ddde:b342::324e:abcd
   6196  1: 
   6197     a123:ddde:b342::324e:dcba:abcd
   6198  0: a123:ddde:b342::324e:dcba:abcd
   6199  1: 
   6200     a123:ddde:9999:b342::324e:dcba:abcd
   6201  0: a123:ddde:9999:b342::324e:dcba:abcd
   6202  1: 
   6203     *** Failers
   6204 No match
   6205     1:2:3:4:5:6:7:8
   6206 No match
   6207     a123:bce:ddde:9999:b342::324e:dcba:abcd
   6208 No match
   6209     a123::9999:b342::324e:dcba:abcd
   6210 No match
   6211     abcde:2:3:4:5:6:7:8
   6212 No match
   6213     ::1
   6214 No match
   6215     abcd:fee0:123::   
   6216 No match
   6217     :1
   6218 No match
   6219     1:  
   6220 No match
   6221 
   6222 /[z\Qa-d]\E]/
   6223     z
   6224  0: z
   6225     a
   6226  0: a
   6227     -
   6228  0: -
   6229     d
   6230  0: d
   6231     ] 
   6232  0: ]
   6233     *** Failers
   6234  0: a
   6235     b     
   6236 No match
   6237 
   6238 /[\z\C]/
   6239     z
   6240  0: z
   6241     C 
   6242  0: C
   6243     
   6244 /\M/
   6245     M 
   6246  0: M
   6247     
   6248 /(a+)*b/
   6249     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
   6250 No match
   6251     
   6252 /(?i)reg(?:ul(?:[a]|ae)r|ex)/
   6253     REGular
   6254  0: REGular
   6255     regulaer
   6256  0: regulaer
   6257     Regex  
   6258  0: Regex
   6259     regulr 
   6260  0: regul\xe4r
   6261 
   6262 /[--]+/
   6263     
   6264  0: \xc5\xe6\xe5\xe4\xe0
   6265     
   6266  0: \xc5\xe6\xe5\xe4\xff
   6267     
   6268  0: \xc5\xe6\xe5\xe4\xc0
   6269     
   6270  0: \xc5\xe6\xe5\xe4\xdf
   6271 
   6272 /(?<=Z)X./
   6273   \x84XAZXB
   6274  0: XB
   6275 
   6276 /ab cd (?x) de fg/
   6277     ab cd defg
   6278  0: ab cd defg
   6279 
   6280 /ab cd(?x) de fg/
   6281     ab cddefg
   6282  0: ab cddefg
   6283     ** Failers 
   6284 No match
   6285     abcddefg
   6286 No match
   6287 
   6288 /(?<![^f]oo)(bar)/
   6289     foobarX 
   6290  0: bar
   6291  1: bar
   6292     ** Failers 
   6293 No match
   6294     boobarX
   6295 No match
   6296 
   6297 /(?<![^f])X/
   6298     offX
   6299  0: X
   6300     ** Failers
   6301 No match
   6302     onyX  
   6303 No match
   6304 
   6305 /(?<=[^f])X/
   6306     onyX
   6307  0: X
   6308     ** Failers
   6309 No match
   6310     offX 
   6311 No match
   6312 
   6313 /^/mg
   6314     a\nb\nc\n
   6315  0: 
   6316  0: 
   6317  0: 
   6318     \ 
   6319  0: 
   6320     
   6321 /(?<=C\n)^/mg
   6322     A\nC\nC\n 
   6323  0: 
   6324 
   6325 /(?:(?(1)a|b)(X))+/
   6326     bXaX
   6327  0: bXaX
   6328  1: X
   6329 
   6330 /(?:(?(1)\1a|b)(X|Y))+/
   6331     bXXaYYaY
   6332  0: bXXaYYaY
   6333  1: Y
   6334     bXYaXXaX  
   6335  0: bX
   6336  1: X
   6337 
   6338 /()()()()()()()()()(?:(?(10)\10a|b)(X|Y))+/
   6339     bXXaYYaY
   6340  0: bX
   6341  1: 
   6342  2: 
   6343  3: 
   6344  4: 
   6345  5: 
   6346  6: 
   6347  7: 
   6348  8: 
   6349  9: 
   6350 10: X
   6351 
   6352 /[[,abc,]+]/
   6353     abc]
   6354  0: abc]
   6355     a,b]
   6356  0: a,b]
   6357     [a,b,c]  
   6358  0: [a,b,c]
   6359 
   6360 /(?-x: )/x
   6361     A\x20B
   6362  0:  
   6363     
   6364 "(?x)(?-x: \s*#\s*)"
   6365     A # B
   6366  0:  # 
   6367     ** Failers
   6368 No match
   6369     #  
   6370 No match
   6371 
   6372 "(?x-is)(?:(?-ixs) \s*#\s*) include"
   6373     A #include
   6374  0:  #include
   6375     ** Failers
   6376 No match
   6377     A#include  
   6378 No match
   6379     A #Include
   6380 No match
   6381 
   6382 /a*b*\w/
   6383     aaabbbb
   6384  0: aaabbbb
   6385     aaaa
   6386  0: aaaa
   6387     a
   6388  0: a
   6389 
   6390 /a*b?\w/
   6391     aaabbbb
   6392  0: aaabb
   6393     aaaa
   6394  0: aaaa
   6395     a
   6396  0: a
   6397 
   6398 /a*b{0,4}\w/
   6399     aaabbbb
   6400  0: aaabbbb
   6401     aaaa
   6402  0: aaaa
   6403     a
   6404  0: a
   6405 
   6406 /a*b{0,}\w/
   6407     aaabbbb
   6408  0: aaabbbb
   6409     aaaa
   6410  0: aaaa
   6411     a
   6412  0: a
   6413     
   6414 /a*\d*\w/
   6415     0a
   6416  0: 0a
   6417     a 
   6418  0: a
   6419     
   6420 /a*b *\w/x
   6421     a 
   6422  0: a
   6423 
   6424 /a*b#comment
   6425   *\w/x
   6426     a 
   6427  0: a
   6428 
   6429 /a* b *\w/x
   6430     a 
   6431  0: a
   6432 
   6433 /^\w+=.*(\\\n.*)*/
   6434     abc=xyz\\\npqr
   6435  0: abc=xyz\
   6436 
   6437 /(?=(\w+))\1:/
   6438     abcd:
   6439  0: abcd:
   6440  1: abcd
   6441 
   6442 /^(?=(\w+))\1:/
   6443     abcd:
   6444  0: abcd:
   6445  1: abcd
   6446 
   6447 /^\Eabc/
   6448     abc
   6449  0: abc
   6450     
   6451 /^[\Eabc]/
   6452     a
   6453  0: a
   6454     ** Failers 
   6455 No match
   6456     E 
   6457 No match
   6458     
   6459 /^[a-\Ec]/
   6460     b
   6461  0: b
   6462     ** Failers
   6463 No match
   6464     -
   6465 No match
   6466     E    
   6467 No match
   6468 
   6469 /^[a\E\E-\Ec]/
   6470     b
   6471  0: b
   6472     ** Failers
   6473 No match
   6474     -
   6475 No match
   6476     E    
   6477 No match
   6478 
   6479 /^[\E\Qa\E-\Qz\E]+/
   6480     b
   6481  0: b
   6482     ** Failers
   6483 No match
   6484     -  
   6485 No match
   6486     
   6487 /^[a\Q]bc\E]/
   6488     a
   6489  0: a
   6490     ]
   6491  0: ]
   6492     c
   6493  0: c
   6494     
   6495 /^[a-\Q\E]/
   6496     a
   6497  0: a
   6498     -     
   6499  0: -
   6500 
   6501 /^(a()*)*/
   6502     aaaa
   6503  0: aaaa
   6504  1: a
   6505  2: 
   6506 
   6507 /^(?:a(?:(?:))*)*/
   6508     aaaa
   6509  0: aaaa
   6510 
   6511 /^(a()+)+/
   6512     aaaa
   6513  0: aaaa
   6514  1: a
   6515  2: 
   6516 
   6517 /^(?:a(?:(?:))+)+/
   6518     aaaa
   6519  0: aaaa
   6520 
   6521 /(a){0,3}(?(1)b|(c|))*D/
   6522     abbD
   6523  0: abbD
   6524  1: a
   6525     ccccD
   6526  0: ccccD
   6527  1: <unset>
   6528  2: 
   6529     D  
   6530  0: D
   6531  1: <unset>
   6532  2: 
   6533 
   6534 /(a|)*\d/
   6535   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
   6536 No match
   6537   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
   6538  0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
   6539  1: 
   6540 
   6541 /(?>a|)*\d/
   6542   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
   6543 No match
   6544   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
   6545  0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
   6546 
   6547 /(?:a|)*\d/
   6548   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
   6549 No match
   6550   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
   6551  0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
   6552 
   6553 /\Z/g
   6554   abc\n
   6555  0: 
   6556  0: 
   6557   
   6558 /^(?s)(?>.*)(?<!\n)/
   6559   abc
   6560  0: abc
   6561   abc\n  
   6562 No match
   6563 
   6564 /^(?![^\n]*\n\z)/
   6565   abc
   6566  0: 
   6567   abc\n 
   6568 No match
   6569   
   6570 /\z(?<!\n)/
   6571   abc
   6572  0: 
   6573   abc\n  
   6574 No match
   6575 
   6576 /(.*(.)?)*/
   6577     abcd
   6578  0: abcd
   6579  1: 
   6580 
   6581 /( (A | (?(1)0|) )*   )/x
   6582     abcd
   6583  0: 
   6584  1: 
   6585  2: 
   6586 
   6587 /( ( (?(1)0|) )*   )/x
   6588     abcd
   6589  0: 
   6590  1: 
   6591  2: 
   6592 
   6593 /(  (?(1)0|)*   )/x
   6594     abcd
   6595  0: 
   6596  1: 
   6597 
   6598 /[[:abcd:xyz]]/
   6599     a]
   6600  0: a]
   6601     :] 
   6602  0: :]
   6603     
   6604 /[abc[:x\]pqr]/
   6605     a
   6606  0: a
   6607     [
   6608  0: [
   6609     :
   6610  0: :
   6611     ]
   6612  0: ]
   6613     p    
   6614  0: p
   6615 
   6616 /.*[op][xyz]/
   6617     fooabcfoo
   6618 No match
   6619 
   6620 /(?(?=.*b)b|^)/
   6621    adc
   6622  0: 
   6623    abc 
   6624  0: b
   6625 
   6626 /(?(?=^.*b)b|^)/
   6627    adc
   6628  0: 
   6629    abc 
   6630 No match
   6631 
   6632 /(?(?=.*b)b|^)*/
   6633    adc
   6634  0: 
   6635    abc 
   6636  0: 
   6637 
   6638 /(?(?=.*b)b|^)+/
   6639    adc
   6640  0: 
   6641    abc 
   6642  0: b
   6643 
   6644 /(?(?=b).*b|^d)/
   6645     abc
   6646  0: b
   6647 
   6648 /(?(?=.*b).*b|^d)/
   6649     abc
   6650  0: ab
   6651 
   6652 /^%((?(?=[a])[^%])|b)*%$/
   6653     %ab%
   6654  0: %ab%
   6655  1: 
   6656 
   6657 /(?i)a(?-i)b|c/
   6658     XabX
   6659  0: ab
   6660     XAbX
   6661  0: Ab
   6662     CcC 
   6663  0: c
   6664     ** Failers
   6665 No match
   6666     XABX   
   6667 No match
   6668 
   6669 /[\x00-\xff\s]+/
   6670     \x0a\x0b\x0c\x0d
   6671  0: \x0a\x0b\x0c\x0d
   6672 
   6673 /^\c/
   6674     ?
   6675  0: ?
   6676 
   6677 /(abc)\1/i
   6678    abc
   6679 No match
   6680 
   6681 /(abc)\1/
   6682    abc
   6683 No match
   6684 
   6685 /[^a]*/i
   6686     12abc
   6687  0: 12
   6688     12ABC
   6689  0: 12
   6690 
   6691 /[^a]*+/i
   6692     12abc
   6693  0: 12
   6694     12ABC
   6695  0: 12
   6696 
   6697 /[^a]*?X/i
   6698     ** Failers
   6699 No match
   6700     12abc
   6701 No match
   6702     12ABC
   6703 No match
   6704     
   6705 /[^a]+?X/i   
   6706     ** Failers
   6707 No match
   6708     12abc
   6709 No match
   6710     12ABC
   6711 No match
   6712 
   6713 /[^a]?X/i
   6714     12aXbcX
   6715  0: X
   6716     12AXBCX
   6717  0: X
   6718     BCX 
   6719  0: CX
   6720 
   6721 /[^a]??X/i
   6722     12aXbcX
   6723  0: X
   6724     12AXBCX
   6725  0: X
   6726     BCX
   6727  0: CX
   6728     
   6729 /[^a]?+X/i
   6730     12aXbcX
   6731  0: cX
   6732     12AXBCX
   6733  0: CX
   6734     BCX 
   6735  0: CX
   6736 
   6737 /[^a]{2,3}/i
   6738     abcdef
   6739  0: bcd
   6740     ABCDEF  
   6741  0: BCD
   6742 
   6743 /[^a]{2,3}?/i
   6744     abcdef
   6745  0: bc
   6746     ABCDEF  
   6747  0: BC
   6748 
   6749 /[^a]{2,3}+/i
   6750     abcdef
   6751  0: bcd
   6752     ABCDEF  
   6753  0: BCD
   6754 
   6755 /((a|)+)+Z/
   6756     Z
   6757  0: Z
   6758  1: 
   6759  2: 
   6760 
   6761 /(a)b|(a)c/
   6762     ac
   6763  0: ac
   6764  1: <unset>
   6765  2: a
   6766 
   6767 /(?>(a))b|(a)c/
   6768     ac
   6769  0: ac
   6770  1: <unset>
   6771  2: a
   6772 
   6773 /(?=(a))ab|(a)c/
   6774     ac
   6775  0: ac
   6776  1: <unset>
   6777  2: a
   6778 
   6779 /((?>(a))b|(a)c)/
   6780     ac
   6781  0: ac
   6782  1: ac
   6783  2: <unset>
   6784  3: a
   6785 
   6786 /((?>(a))b|(a)c)++/
   6787     ac
   6788  0: ac
   6789  1: ac
   6790  2: <unset>
   6791  3: a
   6792 
   6793 /(?:(?>(a))b|(a)c)++/
   6794     ac
   6795  0: ac
   6796  1: <unset>
   6797  2: a
   6798 
   6799 /(?=(?>(a))b|(a)c)(..)/
   6800     ac
   6801  0: ac
   6802  1: <unset>
   6803  2: a
   6804  3: ac
   6805 
   6806 /(?>(?>(a))b|(a)c)/
   6807     ac
   6808  0: ac
   6809  1: <unset>
   6810  2: a
   6811 
   6812 /(?:(?>([ab])))+a=/+
   6813     =ba=
   6814  0: ba=
   6815  0+ 
   6816  1: b
   6817 
   6818 /(?>([ab]))+a=/+
   6819     =ba=
   6820  0: ba=
   6821  0+ 
   6822  1: b
   6823 
   6824 /((?>(a+)b)+(aabab))/
   6825     aaaabaaabaabab
   6826  0: aaaabaaabaabab
   6827  1: aaaabaaabaabab
   6828  2: aaa
   6829  3: aabab
   6830 
   6831 /(?>a+|ab)+?c/
   6832     aabc
   6833 No match
   6834 
   6835 /(?>a+|ab)+c/
   6836     aabc
   6837 No match
   6838 
   6839 /(?:a+|ab)+c/
   6840     aabc
   6841  0: aabc
   6842 
   6843 /(?(?=(a))a)/
   6844     a
   6845  0: a
   6846  1: a
   6847 
   6848 /(?(?=(a))a)(b)/
   6849     ab
   6850  0: ab
   6851  1: a
   6852  2: b
   6853 
   6854 /^(?:a|ab)++c/
   6855     aaaabc
   6856 No match
   6857 
   6858 /^(?>a|ab)++c/
   6859     aaaabc
   6860 No match
   6861 
   6862 /^(?:a|ab)+c/
   6863     aaaabc
   6864  0: aaaabc
   6865 
   6866 /(?=abc){3}abc/+
   6867     abcabcabc
   6868  0: abc
   6869  0+ abcabc
   6870     ** Failers
   6871 No match
   6872     xyz  
   6873 No match
   6874     
   6875 /(?=abc)+abc/+
   6876     abcabcabc
   6877  0: abc
   6878  0+ abcabc
   6879     ** Failers
   6880 No match
   6881     xyz  
   6882 No match
   6883     
   6884 /(?=abc)++abc/+
   6885     abcabcabc
   6886  0: abc
   6887  0+ abcabc
   6888     ** Failers
   6889 No match
   6890     xyz  
   6891 No match
   6892     
   6893 /(?=abc){0}xyz/
   6894     xyz 
   6895  0: xyz
   6896 
   6897 /(?=abc){1}xyz/
   6898     ** Failers
   6899 No match
   6900     xyz 
   6901 No match
   6902     
   6903 /(?=(a))?./
   6904     ab
   6905  0: a
   6906  1: a
   6907     bc
   6908  0: b
   6909       
   6910 /(?=(a))??./
   6911     ab
   6912  0: a
   6913     bc
   6914  0: b
   6915 
   6916 /^(?=(?1))?[az]([abc])d/
   6917     abd 
   6918  0: abd
   6919  1: b
   6920     zcdxx 
   6921  0: zcd
   6922  1: c
   6923 
   6924 /^(?!a){0}\w+/
   6925     aaaaa
   6926  0: aaaaa
   6927 
   6928 /(?<=(abc))?xyz/
   6929     abcxyz
   6930  0: xyz
   6931  1: abc
   6932     pqrxyz 
   6933  0: xyz
   6934 
   6935 /^[\g<a>]+/
   6936     ggg<<<aaa>>>
   6937  0: ggg<<<aaa>>>
   6938     ** Failers
   6939 No match
   6940     \\ga  
   6941 No match
   6942     
   6943 /^[\ga]+/
   6944     gggagagaxyz 
   6945  0: gggagaga
   6946     
   6947 /^[:a[:digit:]]+/
   6948     aaaa444:::Z 
   6949  0: aaaa444:::
   6950 
   6951 /^[:a[:digit:]:b]+/
   6952     aaaa444:::bbbZ 
   6953  0: aaaa444:::bbb
   6954 
   6955 /[:a]xxx[b:]/
   6956      :xxx:
   6957  0: :xxx:
   6958      
   6959 /(?<=a{2})b/i
   6960     xaabc
   6961  0: b
   6962     ** Failers
   6963 No match
   6964     xabc  
   6965 No match
   6966 
   6967 /(?<!a{2})b/i
   6968     xabc
   6969  0: b
   6970     ** Failers
   6971 No match
   6972     xaabc  
   6973 No match
   6974 
   6975 /(?<=a\h)c/
   6976     xa c
   6977  0: c
   6978     
   6979 /(?<=[^a]{2})b/
   6980     axxbc
   6981  0: b
   6982     aAAbc 
   6983  0: b
   6984     ** Failers
   6985 No match
   6986     xaabc    
   6987 No match
   6988 
   6989 /(?<=[^a]{2})b/i
   6990     axxbc  
   6991  0: b
   6992     ** Failers
   6993 No match
   6994     aAAbc 
   6995 No match
   6996     xaabc    
   6997 No match
   6998 
   6999 /(?<=a\H)c/
   7000     abc
   7001  0: c
   7002 
   7003 /(?<=a\V)c/
   7004     abc
   7005  0: c
   7006     
   7007 /(?<=a\v)c/
   7008     a\nc
   7009  0: c
   7010 
   7011 /(?(?=c)c|d)++Y/
   7012     XcccddYX
   7013  0: cccddY
   7014 
   7015 /(?(?=c)c|d)*+Y/
   7016     XcccddYX
   7017  0: cccddY
   7018 
   7019 /^(a{2,3}){2,}+a/
   7020     aaaaaaa
   7021  0: aaaaaaa
   7022  1: aaa
   7023     ** Failers
   7024 No match
   7025     aaaaaa
   7026 No match
   7027     aaaaaaaaa 
   7028 No match
   7029 
   7030 /^(a{2,3})++a/
   7031     ** Failers
   7032 No match
   7033     aaaaaa
   7034 No match
   7035 
   7036 /^(a{2,3})*+a/
   7037     ** Failers
   7038 No match
   7039     aaaaaa
   7040 No match
   7041 
   7042 /ab\Cde/
   7043     abXde
   7044  0: abXde
   7045     
   7046 /(?<=ab\Cde)X/
   7047     abZdeX
   7048  0: X
   7049 
   7050 /a[\CD]b/
   7051     aCb
   7052  0: aCb
   7053     aDb 
   7054  0: aDb
   7055 
   7056 /a[\C-X]b/
   7057     aJb
   7058  0: aJb
   7059 
   7060 /\H\h\V\v/
   7061     X X\x0a
   7062  0: X X\x0a
   7063     X\x09X\x0b
   7064  0: X\x09X\x0b
   7065     ** Failers
   7066 No match
   7067     \xa0 X\x0a   
   7068 No match
   7069     
   7070 /\H*\h+\V?\v{3,4}/ 
   7071     \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
   7072  0: \x09 \xa0X\x0a\x0b\x0c\x0d
   7073     \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
   7074  0: \x09 \xa0\x0a\x0b\x0c\x0d
   7075     \x09\x20\xa0\x0a\x0b\x0c
   7076  0: \x09 \xa0\x0a\x0b\x0c
   7077     ** Failers 
   7078 No match
   7079     \x09\x20\xa0\x0a\x0b
   7080 No match
   7081      
   7082 /\H{3,4}/
   7083     XY  ABCDE
   7084  0: ABCD
   7085     XY  PQR ST 
   7086  0: PQR
   7087     
   7088 /.\h{3,4}./
   7089     XY  AB    PQRS
   7090  0: B    P
   7091 
   7092 /\h*X\h?\H+Y\H?Z/
   7093     >XNNNYZ
   7094  0: XNNNYZ
   7095     >  X NYQZ
   7096  0:   X NYQZ
   7097     ** Failers
   7098 No match
   7099     >XYZ   
   7100 No match
   7101     >  X NY Z
   7102 No match
   7103 
   7104 /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
   7105     >XY\x0aZ\x0aA\x0bNN\x0c
   7106  0: XY\x0aZ\x0aA\x0bNN\x0c
   7107     >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
   7108  0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
   7109 
   7110 /(foo)\Kbar/
   7111     foobar
   7112  0: bar
   7113  1: foo
   7114    
   7115 /(foo)(\Kbar|baz)/
   7116     foobar
   7117  0: bar
   7118  1: foo
   7119  2: bar
   7120     foobaz 
   7121  0: foobaz
   7122  1: foo
   7123  2: baz
   7124 
   7125 /(foo\Kbar)baz/
   7126     foobarbaz
   7127  0: barbaz
   7128  1: foobar
   7129 
   7130 /abc\K|def\K/g+
   7131     Xabcdefghi
   7132  0: 
   7133  0+ defghi
   7134  0: 
   7135  0+ ghi
   7136 
   7137 /ab\Kc|de\Kf/g+
   7138     Xabcdefghi
   7139  0: c
   7140  0+ defghi
   7141  0: f
   7142  0+ ghi
   7143     
   7144 /(?=C)/g+
   7145     ABCDECBA
   7146  0: 
   7147  0+ CDECBA
   7148  0: 
   7149  0+ CBA
   7150     
   7151 /^abc\K/+
   7152     abcdef
   7153  0: 
   7154  0+ def
   7155     ** Failers
   7156 No match
   7157     defabcxyz   
   7158 No match
   7159 
   7160 /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
   7161     ababababbbabZXXXX
   7162  0: ababababbbabZ
   7163  1: ab
   7164  2: b
   7165 
   7166 /(?<A>tom|bon)-\g{A}/
   7167     tom-tom
   7168  0: tom-tom
   7169  1: tom
   7170     bon-bon 
   7171  0: bon-bon
   7172  1: bon
   7173     
   7174 /(^(a|b\g{-1}))/
   7175     bacxxx
   7176 No match
   7177 
   7178 /(?|(abc)|(xyz))\1/
   7179     abcabc
   7180  0: abcabc
   7181  1: abc
   7182     xyzxyz 
   7183  0: xyzxyz
   7184  1: xyz
   7185     ** Failers
   7186 No match
   7187     abcxyz
   7188 No match
   7189     xyzabc   
   7190 No match
   7191     
   7192 /(?|(abc)|(xyz))(?1)/
   7193     abcabc
   7194  0: abcabc
   7195  1: abc
   7196     xyzabc 
   7197  0: xyzabc
   7198  1: xyz
   7199     ** Failers 
   7200 No match
   7201     xyzxyz 
   7202 No match
   7203  
   7204 /^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/
   7205     XYabcdY
   7206  0: XYabcdY
   7207  1: a
   7208  2: b
   7209  3: c
   7210  4: d
   7211  5: Y
   7212 
   7213 /^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/
   7214     XYabcdY
   7215  0: XYabcdY
   7216  1: a
   7217  2: b
   7218  3: <unset>
   7219  4: <unset>
   7220  5: c
   7221  6: d
   7222  7: Y
   7223 
   7224 /^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/
   7225     XYabcdY
   7226  0: XYabcdY
   7227  1: a
   7228  2: b
   7229  3: <unset>
   7230  4: <unset>
   7231  5: c
   7232  6: d
   7233  7: Y
   7234 
   7235 /(?'abc'\w+):\k<abc>{2}/
   7236     a:aaxyz
   7237  0: a:aa
   7238  1: a
   7239     ab:ababxyz
   7240  0: ab:abab
   7241  1: ab
   7242     ** Failers
   7243 No match
   7244     a:axyz
   7245 No match
   7246     ab:abxyz
   7247 No match
   7248 
   7249 /(?'abc'\w+):\g{abc}{2}/
   7250     a:aaxyz
   7251  0: a:aa
   7252  1: a
   7253     ab:ababxyz
   7254  0: ab:abab
   7255  1: ab
   7256     ** Failers
   7257 No match
   7258     a:axyz
   7259 No match
   7260     ab:abxyz
   7261 No match
   7262 
   7263 /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
   7264     abd
   7265  0: abd
   7266  1: a
   7267     ce
   7268  0: ce
   7269 
   7270 /^(a.)\g-1Z/
   7271     aXaXZ
   7272  0: aXaXZ
   7273  1: aX
   7274 
   7275 /^(a.)\g{-1}Z/
   7276     aXaXZ
   7277  0: aXaXZ
   7278  1: aX
   7279 
   7280 /^(?(DEFINE) (?<A> a) (?<B> b) )  (?&A) (?&B) /x
   7281     abcd
   7282  0: ab
   7283 
   7284 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
   7285   (?(DEFINE)
   7286   (?<NAME_PAT>[a-z]+)
   7287   (?<ADDRESS_PAT>\d+)
   7288   )/x
   7289     metcalfe 33
   7290  0: metcalfe 33
   7291  1: metcalfe
   7292  2: 33
   7293 
   7294 /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
   7295     1.2.3.4
   7296  0: 1.2.3.4
   7297  1: <unset>
   7298  2: .4
   7299     131.111.10.206
   7300  0: 131.111.10.206
   7301  1: <unset>
   7302  2: .206
   7303     10.0.0.0
   7304  0: 10.0.0.0
   7305  1: <unset>
   7306  2: .0
   7307     ** Failers
   7308 No match
   7309     10.6
   7310 No match
   7311     455.3.4.5
   7312 No match
   7313 
   7314 /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
   7315     1.2.3.4
   7316  0: 1.2.3.4
   7317  1: .4
   7318     131.111.10.206
   7319  0: 131.111.10.206
   7320  1: .206
   7321     10.0.0.0
   7322  0: 10.0.0.0
   7323  1: .0
   7324     ** Failers
   7325 No match
   7326     10.6
   7327 No match
   7328     455.3.4.5
   7329 No match
   7330 
   7331 /^(\w++|\s++)*$/
   7332     now is the time for all good men to come to the aid of the party
   7333  0: now is the time for all good men to come to the aid of the party
   7334  1: party
   7335     *** Failers
   7336 No match
   7337     this is not a line with only words and spaces!
   7338 No match
   7339 
   7340 /(\d++)(\w)/
   7341     12345a
   7342  0: 12345a
   7343  1: 12345
   7344  2: a
   7345     *** Failers
   7346 No match
   7347     12345+
   7348 No match
   7349 
   7350 /a++b/
   7351     aaab
   7352  0: aaab
   7353 
   7354 /(a++b)/
   7355     aaab
   7356  0: aaab
   7357  1: aaab
   7358 
   7359 /(a++)b/
   7360     aaab
   7361  0: aaab
   7362  1: aaa
   7363 
   7364 /([^()]++|\([^()]*\))+/
   7365     ((abc(ade)ufh()()x
   7366  0: abc(ade)ufh()()x
   7367  1: x
   7368 
   7369 /\(([^()]++|\([^()]+\))+\)/
   7370     (abc)
   7371  0: (abc)
   7372  1: abc
   7373     (abc(def)xyz)
   7374  0: (abc(def)xyz)
   7375  1: xyz
   7376     *** Failers
   7377 No match
   7378     ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
   7379 No match
   7380 
   7381 /^([^()]|\((?1)*\))*$/
   7382     abc
   7383  0: abc
   7384  1: c
   7385     a(b)c
   7386  0: a(b)c
   7387  1: c
   7388     a(b(c))d
   7389  0: a(b(c))d
   7390  1: d
   7391     *** Failers)
   7392 No match
   7393     a(b(c)d
   7394 No match
   7395 
   7396 /^>abc>([^()]|\((?1)*\))*<xyz<$/
   7397    >abc>123<xyz<
   7398  0: >abc>123<xyz<
   7399  1: 3
   7400    >abc>1(2)3<xyz<
   7401  0: >abc>1(2)3<xyz<
   7402  1: 3
   7403    >abc>(1(2)3)<xyz<
   7404  0: >abc>(1(2)3)<xyz<
   7405  1: (1(2)3)
   7406 
   7407 /^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
   7408     1221
   7409  0: 1221
   7410  1: 1221
   7411  2: 1
   7412     Satanoscillatemymetallicsonatas
   7413  0: Satanoscillatemymetallicsonatas
   7414  1: <unset>
   7415  2: <unset>
   7416  3: Satanoscillatemymetallicsonatas
   7417  4: S
   7418     AmanaplanacanalPanama
   7419  0: AmanaplanacanalPanama
   7420  1: <unset>
   7421  2: <unset>
   7422  3: AmanaplanacanalPanama
   7423  4: A
   7424     AblewasIereIsawElba
   7425  0: AblewasIereIsawElba
   7426  1: <unset>
   7427  2: <unset>
   7428  3: AblewasIereIsawElba
   7429  4: A
   7430     *** Failers
   7431 No match
   7432     Thequickbrownfox
   7433 No match
   7434 
   7435 /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
   7436     12
   7437  0: 12
   7438  1: 12
   7439     (((2+2)*-3)-7)
   7440  0: (((2+2)*-3)-7)
   7441  1: (((2+2)*-3)-7)
   7442  2: -
   7443     -12
   7444  0: -12
   7445  1: -12
   7446     *** Failers
   7447 No match
   7448     ((2+2)*-3)-7)
   7449 No match
   7450 
   7451 /^(x(y|(?1){2})z)/
   7452     xyz
   7453  0: xyz
   7454  1: xyz
   7455  2: y
   7456     xxyzxyzz
   7457  0: xxyzxyzz
   7458  1: xxyzxyzz
   7459  2: xyzxyz
   7460     *** Failers
   7461 No match
   7462     xxyzz
   7463 No match
   7464     xxyzxyzxyzz
   7465 No match
   7466 
   7467 /((< (?: (?(R) \d++  | [^<>]*+) | (?2)) * >))/x
   7468     <>
   7469  0: <>
   7470  1: <>
   7471  2: <>
   7472     <abcd>
   7473  0: <abcd>
   7474  1: <abcd>
   7475  2: <abcd>
   7476     <abc <123> hij>
   7477  0: <abc <123> hij>
   7478  1: <abc <123> hij>
   7479  2: <abc <123> hij>
   7480     <abc <def> hij>
   7481  0: <def>
   7482  1: <def>
   7483  2: <def>
   7484     <abc<>def>
   7485  0: <abc<>def>
   7486  1: <abc<>def>
   7487  2: <abc<>def>
   7488     <abc<>
   7489  0: <>
   7490  1: <>
   7491  2: <>
   7492     *** Failers
   7493 No match
   7494     <abc
   7495 No match
   7496 
   7497 /^a+(*FAIL)/
   7498     aaaaaa
   7499 No match
   7500     
   7501 /a+b?c+(*FAIL)/
   7502     aaabccc
   7503 No match
   7504 
   7505 /a+b?(*PRUNE)c+(*FAIL)/
   7506     aaabccc
   7507 No match
   7508 
   7509 /a+b?(*COMMIT)c+(*FAIL)/
   7510     aaabccc
   7511 No match
   7512     
   7513 /a+b?(*SKIP)c+(*FAIL)/
   7514     aaabcccaaabccc
   7515 No match
   7516 
   7517 /^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
   7518     aaaxxxxxx
   7519  0: aaaxxxxxx
   7520     aaa++++++ 
   7521  0: aaa
   7522     bbbxxxxx
   7523  0: bbbxxxxx
   7524     bbb+++++ 
   7525  0: bbb
   7526     cccxxxx
   7527  0: cccxxxx
   7528     ccc++++ 
   7529  0: ccc
   7530     dddddddd   
   7531  0: ddd
   7532 
   7533 /^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
   7534     aaaxxxxxx
   7535  0: aaaxxxxxx
   7536  1: aaaxxxxxx
   7537     aaa++++++ 
   7538  0: aaa
   7539  1: aaa
   7540     bbbxxxxx
   7541  0: bbbxxxxx
   7542  1: bbbxxxxx
   7543     bbb+++++ 
   7544  0: bbb
   7545  1: bbb
   7546     cccxxxx
   7547  0: cccxxxx
   7548  1: cccxxxx
   7549     ccc++++ 
   7550  0: ccc
   7551  1: ccc
   7552     dddddddd   
   7553  0: ddd
   7554  1: ddd
   7555 
   7556 /a+b?(*THEN)c+(*FAIL)/
   7557     aaabccc
   7558 No match
   7559 
   7560 /(A (A|B(*ACCEPT)|C) D)(E)/x
   7561     AB
   7562  0: AB
   7563  1: AB
   7564  2: B
   7565     ABX
   7566  0: AB
   7567  1: AB
   7568  2: B
   7569     AADE
   7570  0: AADE
   7571  1: AAD
   7572  2: A
   7573  3: E
   7574     ACDE
   7575  0: ACDE
   7576  1: ACD
   7577  2: C
   7578  3: E
   7579     ** Failers
   7580 No match
   7581     AD 
   7582 No match
   7583         
   7584 /^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$/i
   7585     1221
   7586  0: 1221
   7587  1: 1221
   7588  2: 1
   7589     Satan, oscillate my metallic sonatas!
   7590  0: Satan, oscillate my metallic sonatas!
   7591  1: <unset>
   7592  2: <unset>
   7593  3: Satan, oscillate my metallic sonatas
   7594  4: S
   7595     A man, a plan, a canal: Panama!
   7596  0: A man, a plan, a canal: Panama!
   7597  1: <unset>
   7598  2: <unset>
   7599  3: A man, a plan, a canal: Panama
   7600  4: A
   7601     Able was I ere I saw Elba.
   7602  0: Able was I ere I saw Elba.
   7603  1: <unset>
   7604  2: <unset>
   7605  3: Able was I ere I saw Elba
   7606  4: A
   7607     *** Failers
   7608 No match
   7609     The quick brown fox
   7610 No match
   7611 
   7612 /^((.)(?1)\2|.)$/
   7613     a
   7614  0: a
   7615  1: a
   7616     aba
   7617  0: aba
   7618  1: aba
   7619  2: a
   7620     aabaa  
   7621  0: aabaa
   7622  1: aabaa
   7623  2: a
   7624     abcdcba 
   7625  0: abcdcba
   7626  1: abcdcba
   7627  2: a
   7628     pqaabaaqp  
   7629  0: pqaabaaqp
   7630  1: pqaabaaqp
   7631  2: p
   7632     ablewasiereisawelba
   7633  0: ablewasiereisawelba
   7634  1: ablewasiereisawelba
   7635  2: a
   7636     rhubarb
   7637 No match
   7638     the quick brown fox  
   7639 No match
   7640 
   7641 /(a)(?<=b(?1))/
   7642     baz
   7643  0: a
   7644  1: a
   7645     ** Failers
   7646 No match
   7647     caz  
   7648 No match
   7649     
   7650 /(?<=b(?1))(a)/
   7651     zbaaz
   7652  0: a
   7653  1: a
   7654     ** Failers
   7655 No match
   7656     aaa  
   7657 No match
   7658     
   7659 /(?<X>a)(?<=b(?&X))/
   7660     baz
   7661  0: a
   7662  1: a
   7663 
   7664 /^(?|(abc)|(def))\1/
   7665     abcabc
   7666  0: abcabc
   7667  1: abc
   7668     defdef 
   7669  0: defdef
   7670  1: def
   7671     ** Failers
   7672 No match
   7673     abcdef
   7674 No match
   7675     defabc   
   7676 No match
   7677     
   7678 /^(?|(abc)|(def))(?1)/
   7679     abcabc
   7680  0: abcabc
   7681  1: abc
   7682     defabc
   7683  0: defabc
   7684  1: def
   7685     ** Failers
   7686 No match
   7687     defdef
   7688 No match
   7689     abcdef    
   7690 No match
   7691 
   7692 /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
   7693     a\"aaaaa
   7694  0: a"aaaaa
   7695  1: "
   7696  2: <unset>
   7697  3: "
   7698     b\"aaaaa 
   7699  0: b"aaaaa
   7700  1: <unset>
   7701  2: <unset>
   7702  3: <unset>
   7703  4: "
   7704  5: <unset>
   7705  6: "
   7706     ** Failers 
   7707 No match
   7708     b\"11111
   7709 No match
   7710 
   7711 /(?:(?1)|B)(A(*F)|C)/
   7712     ABCD
   7713  0: BC
   7714  1: C
   7715     CCD
   7716  0: CC
   7717  1: C
   7718     ** Failers
   7719 No match
   7720     CAD   
   7721 No match
   7722 
   7723 /^(?:(?1)|B)(A(*F)|C)/
   7724     CCD
   7725  0: CC
   7726  1: C
   7727     BCD 
   7728  0: BC
   7729  1: C
   7730     ** Failers
   7731 No match
   7732     ABCD
   7733 No match
   7734     CAD
   7735 No match
   7736     BAD    
   7737 No match
   7738 
   7739 /(?:(?1)|B)(A(*ACCEPT)XX|C)D/
   7740     AAD
   7741  0: AA
   7742  1: A
   7743     ACD
   7744  0: ACD
   7745  1: C
   7746     BAD
   7747  0: BA
   7748  1: A
   7749     BCD
   7750  0: BCD
   7751  1: C
   7752     BAX  
   7753  0: BA
   7754  1: A
   7755     ** Failers
   7756 No match
   7757     ACX
   7758 No match
   7759     ABC   
   7760 No match
   7761 
   7762 /(?(DEFINE)(A))B(?1)C/
   7763     BAC
   7764  0: BAC
   7765 
   7766 /(?(DEFINE)((A)\2))B(?1)C/
   7767     BAAC
   7768  0: BAAC
   7769 
   7770 /(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
   7771     (ab(cd)ef)
   7772  0: (ab(cd)ef)
   7773  1: (ab(cd)ef)
   7774  2: ef
   7775 
   7776 /^(?=a(*SKIP)b|ac)/
   7777     ** Failers
   7778 No match
   7779     ac
   7780 No match
   7781     
   7782 /^(?=a(*PRUNE)b)/
   7783     ab  
   7784  0: 
   7785     ** Failers 
   7786 No match
   7787     ac
   7788 No match
   7789 
   7790 /^(?=a(*ACCEPT)b)/
   7791     ac
   7792  0: 
   7793 
   7794 /(?>a\Kb)/
   7795     ab
   7796  0: b
   7797 
   7798 /((?>a\Kb))/
   7799     ab
   7800  0: b
   7801  1: ab
   7802 
   7803 /(a\Kb)/
   7804     ab
   7805  0: b
   7806  1: ab
   7807     
   7808 /^a\Kcz|ac/
   7809     ac
   7810  0: ac
   7811     
   7812 /(?>a\Kbz|ab)/
   7813     ab 
   7814  0: ab
   7815 
   7816 /^(?&t)(?(DEFINE)(?<t>a\Kb))$/
   7817     ab
   7818  0: b
   7819 
   7820 /^([^()]|\((?1)*\))*$/
   7821     a(b)c
   7822  0: a(b)c
   7823  1: c
   7824     a(b(c)d)e 
   7825  0: a(b(c)d)e
   7826  1: e
   7827 
   7828 /(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
   7829     0
   7830  0: 0
   7831  1: 0
   7832     00
   7833  0: 00
   7834  1: 00
   7835  2: 0
   7836     0000  
   7837  0: 0000
   7838  1: 0000
   7839  2: 0
   7840 
   7841 /(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
   7842     0
   7843  0: 0
   7844  1: 0
   7845  2: 0
   7846     00
   7847  0: 0
   7848  1: 0
   7849  2: 0
   7850     0000  
   7851  0: 0
   7852  1: 0
   7853  2: 0
   7854 
   7855 /--- This one does fail, as expected, in Perl. It needs the complex item at the
   7856      end of the pattern. A single letter instead of (B|D) makes it not fail,
   7857      which I think is a Perl bug. --- /
   7858 
   7859 /A(*COMMIT)(B|D)/
   7860     ACABX
   7861 No match
   7862 
   7863 /--- Check the use of names for failure ---/
   7864 
   7865 /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
   7866     ** Failers
   7867 No match
   7868     AC
   7869 No match, mark = A
   7870     CB    
   7871 No match, mark = B
   7872     
   7873 /--- Force no study, otherwise mark is not seen. The studied version is in
   7874      test 2 because it isn't Perl-compatible. ---/
   7875 
   7876 /(*MARK:A)(*SKIP:B)(C|X)/KSS
   7877     C
   7878  0: C
   7879  1: C
   7880 MK: A
   7881     D
   7882 No match, mark = A
   7883      
   7884 /^(A(*THEN:A)B|C(*THEN:B)D)/K
   7885     ** Failers
   7886 No match
   7887     CB    
   7888 No match, mark = B
   7889 
   7890 /^(?:A(*THEN:A)B|C(*THEN:B)D)/K
   7891     CB    
   7892 No match, mark = B
   7893     
   7894 /^(?>A(*THEN:A)B|C(*THEN:B)D)/K
   7895     CB    
   7896 No match, mark = B
   7897     
   7898 /--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
   7899 that we have to have something complicated such as (B|Z) at the end because,
   7900 for Perl, a simple character somehow causes an unwanted optimization to mess
   7901 with the handling of backtracking verbs. ---/
   7902 
   7903 /A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
   7904     AAAC
   7905  0: AC
   7906     
   7907 /--- Test skipping over a non-matching mark. ---/
   7908 
   7909 /A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
   7910     AAAC
   7911  0: AC
   7912     
   7913 /--- Check shorthand for MARK ---/
   7914 
   7915 /A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
   7916     AAAC
   7917  0: AC
   7918 
   7919 /--- Don't loop! Force no study, otherwise mark is not seen. ---/
   7920 
   7921 /(*:A)A+(*SKIP:A)(B|Z)/KSS
   7922     AAAC
   7923 No match, mark = A
   7924 
   7925 /--- This should succeed, as a non-existent skip name disables the skip ---/ 
   7926 
   7927 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
   7928     AAAC
   7929  0: AC
   7930 
   7931 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
   7932     AAAC
   7933  0: AC
   7934 MK: B
   7935 
   7936 /--- COMMIT at the start of a pattern should act like an anchor. Again, 
   7937 however, we need the complication for Perl. ---/
   7938 
   7939 /(*COMMIT)(A|P)(B|P)(C|P)/
   7940     ABCDEFG
   7941  0: ABC
   7942  1: A
   7943  2: B
   7944  3: C
   7945     ** Failers
   7946 No match
   7947     DEFGABC  
   7948 No match
   7949 
   7950 /--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
   7951 
   7952 /(\w+)(?>b(*COMMIT))\w{2}/
   7953     abbb
   7954  0: abbb
   7955  1: a
   7956 
   7957 /(\w+)b(*COMMIT)\w{2}/
   7958     abbb
   7959 No match
   7960 
   7961 /--- Check opening parens in comment when seeking forward reference. ---/ 
   7962 
   7963 /(?&t)(?#()(?(DEFINE)(?<t>a))/
   7964     bac
   7965  0: a
   7966 
   7967 /--- COMMIT should override THEN ---/
   7968 
   7969 /(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/
   7970   yes
   7971 No match
   7972 
   7973 /(?>(*COMMIT)(yes|no)(*THEN)(*F))?/
   7974   yes
   7975 No match
   7976 
   7977 /b?(*SKIP)c/
   7978     bc
   7979  0: bc
   7980     abc
   7981  0: bc
   7982    
   7983 /(*SKIP)bc/
   7984     a
   7985 No match
   7986 
   7987 /(*SKIP)b/
   7988     a 
   7989 No match
   7990 
   7991 /(?P<abn>(?P=abn)xxx|)+/
   7992     xxx
   7993  0: 
   7994  1: 
   7995 
   7996 /(?i:([^b]))(?1)/
   7997     aa
   7998  0: aa
   7999  1: a
   8000     aA     
   8001  0: aA
   8002  1: a
   8003     ** Failers
   8004  0: **
   8005  1: *
   8006     ab
   8007 No match
   8008     aB
   8009 No match
   8010     Ba
   8011 No match
   8012     ba
   8013 No match
   8014 
   8015 /^(?&t)*+(?(DEFINE)(?<t>a))\w$/
   8016     aaaaaaX
   8017  0: aaaaaaX
   8018     ** Failers 
   8019 No match
   8020     aaaaaa 
   8021 No match
   8022 
   8023 /^(?&t)*(?(DEFINE)(?<t>a))\w$/
   8024     aaaaaaX
   8025  0: aaaaaaX
   8026     aaaaaa 
   8027  0: aaaaaa
   8028 
   8029 /^(a)*+(\w)/
   8030     aaaaX
   8031  0: aaaaX
   8032  1: a
   8033  2: X
   8034     YZ 
   8035  0: Y
   8036  1: <unset>
   8037  2: Y
   8038     ** Failers 
   8039 No match
   8040     aaaa
   8041 No match
   8042 
   8043 /^(?:a)*+(\w)/
   8044     aaaaX
   8045  0: aaaaX
   8046  1: X
   8047     YZ 
   8048  0: Y
   8049  1: Y
   8050     ** Failers 
   8051 No match
   8052     aaaa
   8053 No match
   8054 
   8055 /^(a)++(\w)/
   8056     aaaaX
   8057  0: aaaaX
   8058  1: a
   8059  2: X
   8060     ** Failers 
   8061 No match
   8062     aaaa
   8063 No match
   8064     YZ 
   8065 No match
   8066 
   8067 /^(?:a)++(\w)/
   8068     aaaaX
   8069  0: aaaaX
   8070  1: X
   8071     ** Failers 
   8072 No match
   8073     aaaa
   8074 No match
   8075     YZ 
   8076 No match
   8077 
   8078 /^(a)?+(\w)/
   8079     aaaaX
   8080  0: aa
   8081  1: a
   8082  2: a
   8083     YZ 
   8084  0: Y
   8085  1: <unset>
   8086  2: Y
   8087 
   8088 /^(?:a)?+(\w)/
   8089     aaaaX
   8090  0: aa
   8091  1: a
   8092     YZ 
   8093  0: Y
   8094  1: Y
   8095 
   8096 /^(a){2,}+(\w)/
   8097     aaaaX
   8098  0: aaaaX
   8099  1: a
   8100  2: X
   8101     ** Failers
   8102 No match
   8103     aaa
   8104 No match
   8105     YZ 
   8106 No match
   8107 
   8108 /^(?:a){2,}+(\w)/
   8109     aaaaX
   8110  0: aaaaX
   8111  1: X
   8112     ** Failers
   8113 No match
   8114     aaa
   8115 No match
   8116     YZ 
   8117 No match
   8118 
   8119 /(a|)*(?1)b/
   8120     b
   8121  0: b
   8122  1: 
   8123     ab
   8124  0: ab
   8125  1: 
   8126     aab  
   8127  0: aab
   8128  1: 
   8129 
   8130 /(a)++(?1)b/
   8131     ** Failers
   8132 No match
   8133     ab 
   8134 No match
   8135     aab
   8136 No match
   8137 
   8138 /(a)*+(?1)b/
   8139     ** Failers
   8140 No match
   8141     ab
   8142 No match
   8143     aab  
   8144 No match
   8145 
   8146 /(?1)(?:(b)){0}/
   8147     b
   8148  0: b
   8149 
   8150 /(foo ( \( ((?:(?> [^()]+ )|(?2))*) \) ) )/x
   8151     foo(bar(baz)+baz(bop))
   8152  0: foo(bar(baz)+baz(bop))
   8153  1: foo(bar(baz)+baz(bop))
   8154  2: (bar(baz)+baz(bop))
   8155  3: bar(baz)+baz(bop)
   8156 
   8157 /(A (A|B(*ACCEPT)|C) D)(E)/x
   8158     AB
   8159  0: AB
   8160  1: AB
   8161  2: B
   8162 
   8163 /\A.*?(a|bc)/
   8164     ba
   8165  0: ba
   8166  1: a
   8167 
   8168 /\A.*?(?:a|bc)++/
   8169     ba
   8170  0: ba
   8171 
   8172 /\A.*?(a|bc)++/
   8173     ba
   8174  0: ba
   8175  1: a
   8176 
   8177 /\A.*?(?:a|bc|d)/
   8178     ba
   8179  0: ba
   8180 
   8181 /(?:(b))++/
   8182     beetle
   8183  0: b
   8184  1: b
   8185 
   8186 /(?(?=(a(*ACCEPT)z))a)/
   8187     a
   8188  0: a
   8189  1: a
   8190 
   8191 /^(a)(?1)+ab/
   8192     aaaab
   8193  0: aaaab
   8194  1: a
   8195     
   8196 /^(a)(?1)++ab/
   8197     aaaab
   8198 No match
   8199 
   8200 /^(?=a(*:M))aZ/K
   8201     aZbc
   8202  0: aZ
   8203 MK: M
   8204 
   8205 /^(?!(*:M)b)aZ/K
   8206     aZbc
   8207  0: aZ
   8208 
   8209 /(?(DEFINE)(a))?b(?1)/
   8210     backgammon
   8211  0: ba
   8212 
   8213 /^\N+/
   8214     abc\ndef
   8215  0: abc
   8216     
   8217 /^\N{1,}/
   8218     abc\ndef 
   8219  0: abc
   8220 
   8221 /(?(R)a+|(?R)b)/
   8222     aaaabcde
   8223  0: aaaab
   8224 
   8225 /(?(R)a+|((?R))b)/
   8226     aaaabcde
   8227  0: aaaab
   8228  1: aaaa
   8229 
   8230 /((?(R)a+|(?1)b))/
   8231     aaaabcde
   8232  0: aaaab
   8233  1: aaaab
   8234 
   8235 /((?(R1)a+|(?1)b))/
   8236     aaaabcde
   8237  0: aaaab
   8238  1: aaaab
   8239     
   8240 /((?(R)a|(?1)))*/
   8241     aaa
   8242  0: aaa
   8243  1: a
   8244 
   8245 /((?(R)a|(?1)))+/
   8246     aaa
   8247  0: aaa
   8248  1: a
   8249 
   8250 /a(*:any 
   8251 name)/K
   8252     abc
   8253  0: a
   8254 MK: any \x0aname
   8255     
   8256 /(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
   8257     a
   8258  0: a
   8259     ba
   8260  0: a
   8261     bba 
   8262  0: a
   8263     
   8264 /--- Checking revised (*THEN) handling ---/ 
   8265 
   8266 /--- Capture ---/
   8267 
   8268 /^.*? (a(*THEN)b) c/x
   8269     aabc
   8270 No match
   8271 
   8272 /^.*? (a(*THEN)b|(*F)) c/x
   8273     aabc
   8274  0: aabc
   8275  1: ab
   8276 
   8277 /^.*? ( (a(*THEN)b) | (*F) ) c/x
   8278     aabc
   8279  0: aabc
   8280  1: ab
   8281  2: ab
   8282 
   8283 /^.*? ( (a(*THEN)b) ) c/x
   8284     aabc
   8285 No match
   8286 
   8287 /--- Non-capture ---/
   8288 
   8289 /^.*? (?:a(*THEN)b) c/x
   8290     aabc
   8291 No match
   8292 
   8293 /^.*? (?:a(*THEN)b|(*F)) c/x
   8294     aabc
   8295  0: aabc
   8296 
   8297 /^.*? (?: (?:a(*THEN)b) | (*F) ) c/x
   8298     aabc
   8299  0: aabc
   8300 
   8301 /^.*? (?: (?:a(*THEN)b) ) c/x
   8302     aabc
   8303 No match
   8304 
   8305 /--- Atomic ---/
   8306 
   8307 /^.*? (?>a(*THEN)b) c/x
   8308     aabc
   8309 No match
   8310 
   8311 /^.*? (?>a(*THEN)b|(*F)) c/x
   8312     aabc
   8313  0: aabc
   8314 
   8315 /^.*? (?> (?>a(*THEN)b) | (*F) ) c/x
   8316     aabc
   8317  0: aabc
   8318 
   8319 /^.*? (?> (?>a(*THEN)b) ) c/x
   8320     aabc
   8321 No match
   8322 
   8323 /--- Possessive capture ---/
   8324 
   8325 /^.*? (a(*THEN)b)++ c/x
   8326     aabc
   8327 No match
   8328 
   8329 /^.*? (a(*THEN)b|(*F))++ c/x
   8330     aabc
   8331  0: aabc
   8332  1: ab
   8333 
   8334 /^.*? ( (a(*THEN)b)++ | (*F) )++ c/x
   8335     aabc
   8336  0: aabc
   8337  1: ab
   8338  2: ab
   8339 
   8340 /^.*? ( (a(*THEN)b)++ )++ c/x
   8341     aabc
   8342 No match
   8343 
   8344 /--- Possessive non-capture ---/
   8345 
   8346 /^.*? (?:a(*THEN)b)++ c/x
   8347     aabc
   8348 No match
   8349 
   8350 /^.*? (?:a(*THEN)b|(*F))++ c/x
   8351     aabc
   8352  0: aabc
   8353 
   8354 /^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c/x
   8355     aabc
   8356  0: aabc
   8357 
   8358 /^.*? (?: (?:a(*THEN)b)++ )++ c/x
   8359     aabc
   8360 No match
   8361     
   8362 /--- Condition assertion ---/
   8363 
   8364 /^(?(?=a(*THEN)b)ab|ac)/
   8365     ac
   8366  0: ac
   8367  
   8368 /--- Condition ---/
   8369 
   8370 /^.*?(?(?=a)a|b(*THEN)c)/
   8371     ba
   8372 No match
   8373 
   8374 /^.*?(?:(?(?=a)a|b(*THEN)c)|d)/
   8375     ba
   8376  0: ba
   8377 
   8378 /^.*?(?(?=a)a(*THEN)b|c)/
   8379     ac
   8380 No match
   8381 
   8382 /--- Assertion ---/
   8383 
   8384 /^.*(?=a(*THEN)b)/ 
   8385     aabc
   8386  0: a
   8387 
   8388 /------------------------------/
   8389 
   8390 /(?>a(*:m))/imsxSK 
   8391     a
   8392  0: a
   8393 MK: m
   8394 
   8395 /(?>(a)(*:m))/imsxSK 
   8396     a
   8397  0: a
   8398  1: a
   8399 MK: m
   8400 
   8401 /(?<=a(*ACCEPT)b)c/
   8402     xacd
   8403  0: c
   8404 
   8405 /(?<=(a(*ACCEPT)b))c/
   8406     xacd
   8407  0: c
   8408  1: a
   8409 
   8410 /(?<=(a(*COMMIT)b))c/
   8411     xabcd
   8412  0: c
   8413  1: ab
   8414     ** Failers 
   8415 No match
   8416     xacd
   8417 No match
   8418     
   8419 /(?<!a(*FAIL)b)c/
   8420     xcd
   8421  0: c
   8422     acd 
   8423  0: c
   8424 
   8425 /(?<=a(*:N)b)c/K
   8426     xabcd
   8427  0: c
   8428 MK: N
   8429     
   8430 /(?<=a(*PRUNE)b)c/
   8431     xabcd 
   8432  0: c
   8433 
   8434 /(?<=a(*SKIP)b)c/
   8435     xabcd 
   8436  0: c
   8437 
   8438 /(?<=a(*THEN)b)c/
   8439     xabcd 
   8440  0: c
   8441 
   8442 /(a)(?2){2}(.)/
   8443     abcd
   8444  0: abcd
   8445  1: a
   8446  2: d
   8447 
   8448 /(*MARK:A)(*PRUNE:B)(C|X)/KS
   8449     C
   8450  0: C
   8451  1: C
   8452 MK: B
   8453     D 
   8454 No match, mark = B
   8455 
   8456 /(*MARK:A)(*PRUNE:B)(C|X)/KSS
   8457     C
   8458  0: C
   8459  1: C
   8460 MK: B
   8461     D 
   8462 No match, mark = B
   8463 
   8464 /(*MARK:A)(*THEN:B)(C|X)/KS
   8465     C
   8466  0: C
   8467  1: C
   8468 MK: B
   8469     D 
   8470 No match, mark = B
   8471 
   8472 /(*MARK:A)(*THEN:B)(C|X)/KSY
   8473     C
   8474  0: C
   8475  1: C
   8476 MK: B
   8477     D 
   8478 No match, mark = B
   8479 
   8480 /(*MARK:A)(*THEN:B)(C|X)/KSS
   8481     C
   8482  0: C
   8483  1: C
   8484 MK: B
   8485     D 
   8486 No match, mark = B
   8487 
   8488 /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
   8489 
   8490 /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
   8491     AAAC
   8492 No match, mark = A
   8493 
   8494 /--- Same --/
   8495 
   8496 /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
   8497     AAAC
   8498 No match, mark = B
   8499 
   8500 /A(*:A)A+(*SKIP)(B|Z) | AC/xK
   8501     AAAC
   8502 No match, mark = A
   8503 
   8504 /--- This should fail, as a null name is the same as no name ---/
   8505 
   8506 /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
   8507     AAAC
   8508 No match, mark = A
   8509 
   8510 /--- A check on what happens after hitting a mark and them bumping along to
   8511 something that does not even start. Perl reports tags after the failures here, 
   8512 though it does not when the individual letters are made into something 
   8513 more complicated. ---/
   8514 
   8515 /A(*:A)B|XX(*:B)Y/K
   8516     AABC
   8517  0: AB
   8518 MK: A
   8519     XXYZ 
   8520  0: XXY
   8521 MK: B
   8522     ** Failers
   8523 No match
   8524     XAQQ  
   8525 No match, mark = A
   8526     XAQQXZZ  
   8527 No match, mark = A
   8528     AXQQQ 
   8529 No match, mark = A
   8530     AXXQQQ 
   8531 No match, mark = B
   8532     
   8533 /^(A(*THEN:A)B|C(*THEN:B)D)/K
   8534     AB
   8535  0: AB
   8536  1: AB
   8537 MK: A
   8538     CD
   8539  0: CD
   8540  1: CD
   8541 MK: B
   8542     ** Failers
   8543 No match
   8544     AC
   8545 No match, mark = A
   8546     CB    
   8547 No match, mark = B
   8548     
   8549 /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
   8550     AB
   8551  0: AB
   8552  1: AB
   8553 MK: A
   8554     CD
   8555  0: CD
   8556  1: CD
   8557 MK: B
   8558     ** Failers
   8559 No match
   8560     AC
   8561 No match, mark = A
   8562     CB    
   8563 No match, mark = B
   8564     
   8565 /--- An empty name does not pass back an empty string. It is the same as if no
   8566 name were given. ---/ 
   8567 
   8568 /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
   8569     AB
   8570  0: AB
   8571  1: AB
   8572     CD 
   8573  0: CD
   8574  1: CD
   8575 MK: B
   8576 
   8577 /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
   8578     
   8579 /A(*PRUNE:A)B/K
   8580     ACAB
   8581  0: AB
   8582 MK: A
   8583 
   8584 /--- Mark names can be duplicated ---/
   8585 
   8586 /A(*:A)B|X(*:A)Y/K
   8587     AABC
   8588  0: AB
   8589 MK: A
   8590     XXYZ 
   8591  0: XY
   8592 MK: A
   8593     
   8594 /b(*:m)f|a(*:n)w/K
   8595     aw 
   8596  0: aw
   8597 MK: n
   8598     ** Failers 
   8599 No match, mark = n
   8600     abc
   8601 No match, mark = m
   8602 
   8603 /b(*:m)f|aw/K
   8604     abaw
   8605  0: aw
   8606     ** Failers 
   8607 No match
   8608     abc
   8609 No match, mark = m
   8610     abax 
   8611 No match, mark = m
   8612 
   8613 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
   8614     AAAC
   8615  0: AAC
   8616 
   8617 /a(*PRUNE:X)bc|qq/KY
   8618     ** Failers
   8619 No match, mark = X
   8620     axy
   8621 No match, mark = X
   8622 
   8623 /a(*THEN:X)bc|qq/KY
   8624     ** Failers
   8625 No match, mark = X
   8626     axy
   8627 No match, mark = X
   8628 
   8629 /(?=a(*MARK:A)b)..x/K
   8630     abxy
   8631  0: abx
   8632 MK: A
   8633     ** Failers
   8634 No match
   8635     abpq  
   8636 No match
   8637 
   8638 /(?=a(*MARK:A)b)..(*:Y)x/K
   8639     abxy
   8640  0: abx
   8641 MK: Y
   8642     ** Failers
   8643 No match
   8644     abpq  
   8645 No match
   8646 
   8647 /(?=a(*PRUNE:A)b)..x/K
   8648     abxy
   8649  0: abx
   8650 MK: A
   8651     ** Failers
   8652 No match
   8653     abpq  
   8654 No match
   8655 
   8656 /(?=a(*PRUNE:A)b)..(*:Y)x/K
   8657     abxy
   8658  0: abx
   8659 MK: Y
   8660     ** Failers
   8661 No match
   8662     abpq  
   8663 No match
   8664 
   8665 /(?=a(*THEN:A)b)..x/K
   8666     abxy
   8667  0: abx
   8668 MK: A
   8669     ** Failers
   8670 No match
   8671     abpq  
   8672 No match
   8673 
   8674 /(?=a(*THEN:A)b)..(*:Y)x/K
   8675     abxy
   8676  0: abx
   8677 MK: Y
   8678     ** Failers
   8679 No match
   8680     abpq  
   8681 No match
   8682 
   8683 /(another)?(\1?)test/
   8684     hello world test
   8685  0: test
   8686  1: <unset>
   8687  2: 
   8688 
   8689 /(another)?(\1+)test/
   8690     hello world test
   8691 No match
   8692 
   8693 /(a(*COMMIT)b){0}a(?1)|aac/
   8694     aac
   8695  0: aac
   8696 
   8697 /((?:a?)*)*c/
   8698   aac   
   8699  0: aac
   8700  1: 
   8701 
   8702 /((?>a?)*)*c/
   8703   aac   
   8704  0: aac
   8705  1: 
   8706 
   8707 /(?>.*?a)(?<=ba)/
   8708     aba
   8709  0: ba
   8710 
   8711 /(?:.*?a)(?<=ba)/
   8712     aba
   8713  0: aba
   8714 
   8715 /.*?a(*PRUNE)b/
   8716     aab
   8717  0: ab
   8718 
   8719 /.*?a(*PRUNE)b/s
   8720     aab
   8721  0: ab
   8722 
   8723 /^a(*PRUNE)b/s
   8724     aab
   8725 No match
   8726 
   8727 /.*?a(*SKIP)b/
   8728     aab
   8729  0: ab
   8730 
   8731 /(?>.*?a)b/s
   8732     aab
   8733  0: ab
   8734 
   8735 /(?>.*?a)b/
   8736     aab
   8737  0: ab
   8738 
   8739 /(?>^a)b/s
   8740     aab
   8741 No match
   8742 
   8743 /(?>.*?)(?<=(abcd)|(wxyz))/
   8744     alphabetabcd
   8745  0: 
   8746  1: abcd
   8747     endingwxyz 
   8748  0: 
   8749  1: <unset>
   8750  2: wxyz
   8751 
   8752 /(?>.*)(?<=(abcd)|(wxyz))/
   8753     alphabetabcd
   8754  0: alphabetabcd
   8755  1: abcd
   8756     endingwxyz 
   8757  0: endingwxyz
   8758  1: <unset>
   8759  2: wxyz
   8760 
   8761 "(?>.*)foo"
   8762     abcdfooxyz
   8763 No match
   8764     
   8765 "(?>.*?)foo"
   8766     abcdfooxyz
   8767  0: foo
   8768 
   8769 /(?:(a(*PRUNE)b)){0}(?:(?1)|ac)/
   8770     ac
   8771  0: ac
   8772     
   8773 /(?:(a(*SKIP)b)){0}(?:(?1)|ac)/
   8774     ac 
   8775  0: ac
   8776 
   8777 /(?<=(*SKIP)ac)a/
   8778     aa
   8779 No match
   8780 
   8781 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
   8782     AAAC
   8783  0: AC
   8784 
   8785 /a(*SKIP:m)x|ac(*:n)(*SKIP:n)d|ac/K
   8786     acacd
   8787  0: acd
   8788 MK: n
   8789 
   8790 /A(*SKIP:m)x|A(*SKIP:n)x|AB/K
   8791     AB
   8792  0: AB
   8793 
   8794 /((*SKIP:r)d){0}a(*SKIP:m)x|ac(*:n)|ac/K
   8795     acacd
   8796  0: ac
   8797 MK: n
   8798 
   8799 /-- Tests that try to figure out how Perl works. My hypothesis is that the
   8800     first verb that is backtracked onto is the one that acts. This seems to be
   8801     the case almost all the time, but there is one exception that is perhaps a 
   8802     bug. --/
   8803 
   8804 /-- This matches "aaaac"; each PRUNE advances one character until the subject
   8805     no longer starts with 5 'a's. --/
   8806 
   8807 /aaaaa(*PRUNE)b|a+c/
   8808     aaaaaac
   8809  0: aaaac
   8810 
   8811 /-- Putting SKIP in front of PRUNE makes no difference, as it is never 
   8812 backtracked onto, whether or not it has a label. --/
   8813 
   8814 /aaaaa(*SKIP)(*PRUNE)b|a+c/
   8815     aaaaaac
   8816  0: aaaac
   8817 
   8818 /aaaaa(*SKIP:N)(*PRUNE)b|a+c/
   8819     aaaaaac
   8820  0: aaaac
   8821 
   8822 /aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c/
   8823     aaaaaac
   8824  0: aaaac
   8825 
   8826 /-- Putting THEN in front makes no difference. */
   8827     
   8828 /aaaaa(*THEN)(*PRUNE)b|a+c/
   8829     aaaaaac
   8830  0: aaaac
   8831  
   8832 /-- However, putting COMMIT in front of the prune changes it to "no match". I 
   8833     think this is inconsistent and possibly a bug. For the moment, running this
   8834     test is moved out of the Perl-compatible file. --/
   8835 
   8836 /aaaaa(*COMMIT)(*PRUNE)b|a+c/
   8837     
   8838 
   8839 /---- OK, lets play the same game again using SKIP instead of PRUNE. ----/
   8840 
   8841 /-- This matches "ac" because SKIP forces the next match to start on the
   8842     sixth "a". --/
   8843 
   8844 /aaaaa(*SKIP)b|a+c/
   8845     aaaaaac
   8846  0: ac
   8847  
   8848 /-- Putting PRUNE in front makes no difference. --/
   8849 
   8850 /aaaaa(*PRUNE)(*SKIP)b|a+c/
   8851     aaaaaac
   8852  0: ac
   8853 
   8854 /-- Putting THEN in front makes no difference. --/
   8855 
   8856 /aaaaa(*THEN)(*SKIP)b|a+c/
   8857     aaaaaac
   8858  0: ac
   8859 
   8860 /-- In this case, neither does COMMIT. This still matches "ac". --/
   8861 
   8862 /aaaaa(*COMMIT)(*SKIP)b|a+c/
   8863     aaaaaac
   8864  0: ac
   8865     
   8866 /-- This gives "no match", as expected. --/
   8867 
   8868 /aaaaa(*COMMIT)b|a+c/
   8869     aaaaaac
   8870 No match
   8871     
   8872 
   8873 /------ Tests using THEN ------/
   8874 
   8875 /-- This matches "aaaaaac", as expected. --/
   8876 
   8877 /aaaaa(*THEN)b|a+c/
   8878     aaaaaac
   8879  0: aaaaaac
   8880 
   8881 /-- Putting SKIP in front makes no difference. --/
   8882 
   8883 /aaaaa(*SKIP)(*THEN)b|a+c/
   8884     aaaaaac
   8885  0: aaaaaac
   8886     
   8887 /-- Putting PRUNE in front makes no difference. --/
   8888 
   8889 /aaaaa(*PRUNE)(*THEN)b|a+c/
   8890     aaaaaac
   8891  0: aaaaaac
   8892     
   8893 /-- Putting COMMIT in front makes no difference. --/
   8894 
   8895 /aaaaa(*COMMIT)(*THEN)b|a+c/
   8896     aaaaaac
   8897  0: aaaaaac
   8898     
   8899 /-- End of "priority" tests --/ 
   8900 
   8901 /aaaaa(*:m)(*PRUNE:m)(*SKIP:m)m|a+/
   8902     aaaaaa
   8903  0: a
   8904 
   8905 /aaaaa(*:m)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+/
   8906     aaaaaa
   8907  0: a
   8908 
   8909 /aaaaa(*:n)(*PRUNE:m)(*SKIP:m)m|a+/
   8910     aaaaaa
   8911  0: aaaa
   8912 
   8913 /aaaaa(*:n)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+/
   8914     aaaaaa
   8915  0: a
   8916 
   8917 /a(*MARK:A)aa(*PRUNE:A)a(*SKIP:A)b|a+c/
   8918     aaaac
   8919  0: aac
   8920 
   8921 /a(*MARK:A)aa(*MARK:A)a(*SKIP:A)b|a+c/
   8922     aaaac
   8923  0: ac
   8924 
   8925 /aaa(*PRUNE:A)a(*SKIP:A)b|a+c/
   8926     aaaac
   8927  0: aac
   8928 
   8929 /aaa(*MARK:A)a(*SKIP:A)b|a+c/
   8930     aaaac
   8931  0: ac
   8932 
   8933 /a(*:m)a(*COMMIT)(*SKIP:m)b|a+c/K
   8934     aaaaaac
   8935  0: ac
   8936 
   8937 /.?(a|b(*THEN)c)/
   8938     ba
   8939  0: ba
   8940  1: a
   8941 
   8942 /(a(*COMMIT)b)c|abd/
   8943     abc
   8944  0: abc
   8945  1: ab
   8946     abd
   8947 No match
   8948 
   8949 /(?=a(*COMMIT)b)abc|abd/
   8950     abc
   8951  0: abc
   8952     abd
   8953  0: abd
   8954 
   8955 /(?>a(*COMMIT)b)c|abd/
   8956     abc
   8957  0: abc
   8958     abd
   8959  0: abd
   8960 
   8961 /a(?=b(*COMMIT)c)[^d]|abd/
   8962     abd
   8963 No match
   8964     abc 
   8965  0: ab
   8966 
   8967 /a(?=bc).|abd/
   8968     abd
   8969  0: abd
   8970     abc 
   8971  0: ab
   8972     
   8973 /a(?>b(*COMMIT)c)d|abd/
   8974     abceabd 
   8975 No match
   8976 
   8977 /a(?>bc)d|abd/
   8978     abceabd 
   8979  0: abd
   8980 
   8981 /(?>a(*COMMIT)b)c|abd/
   8982     abd
   8983  0: abd
   8984 
   8985 /(?>a(*COMMIT)c)d|abd/
   8986     abd
   8987 No match
   8988 
   8989 /((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
   8990     ac 
   8991  0: ac
   8992  1: <unset>
   8993  2: c
   8994     
   8995 /-- These tests were formerly in test 2, but changes in PCRE and Perl have
   8996     made them compatible. --/
   8997     
   8998 /^(a)?(?(1)a|b)+$/
   8999     *** Failers
   9000 No match
   9001     a
   9002 No match
   9003 
   9004 /(?=a\Kb)ab/
   9005     ab 
   9006  0: b
   9007 
   9008 /(?!a\Kb)ac/
   9009     ac 
   9010  0: ac
   9011     
   9012 /^abc(?<=b\Kc)d/
   9013     abcd
   9014  0: cd
   9015 
   9016 /^abc(?<!b\Kq)d/
   9017     abcd
   9018  0: abcd
   9019 
   9020 
   9021 /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
   9022     AAAC
   9023 No match, mark = A
   9024 
   9025 /^((abc|abcx)(*THEN)y|abcd)/
   9026     abcd
   9027  0: abcd
   9028  1: abcd
   9029     *** Failers 
   9030 No match
   9031     abcxy 
   9032 No match
   9033     
   9034 /^((yes|no)(*THEN)(*F))?/
   9035   yes
   9036 No match
   9037 
   9038 /(A (.*)   C? (*THEN)  | A D) (*FAIL)/x
   9039 AbcdCBefgBhiBqz
   9040 No match
   9041 
   9042 /(A (.*)   C? (*THEN)  | A D) z/x
   9043 AbcdCBefgBhiBqz
   9044 No match
   9045 
   9046 /(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x
   9047 AbcdCBefgBhiBqz
   9048 No match
   9049 
   9050 /(A (.*)   C? (*THEN)  | A D) \s* z/x
   9051 AbcdCBefgBhiBqz
   9052 No match
   9053 
   9054 /(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x
   9055 AbcdCBefgBhiBqz
   9056 No match
   9057 
   9058 /(A (.*)   (?:C|) (*THEN)  | A D) z/x
   9059 AbcdCBefgBhiBqz
   9060 No match
   9061 
   9062 /(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x
   9063 AbcdCBefgBhiBqz
   9064 No match
   9065 
   9066 /(A (.*)   C{0,6} (*THEN)  | A D) z/x
   9067 AbcdCBefgBhiBqz
   9068 No match
   9069 
   9070 /(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x
   9071 AbcdCEBefgBhiBqz
   9072 No match
   9073 
   9074 /(A (.*)   (CE){0,6} (*THEN)  | A D) z/x
   9075 AbcdCEBefgBhiBqz
   9076 No match
   9077 
   9078 /(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x
   9079 AbcdCBefgBhiBqz
   9080 No match
   9081 
   9082 /(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x
   9083 AbcdCBefgBhiBqz
   9084 No match
   9085 
   9086 /(?=a(*COMMIT)b|ac)ac|ac/
   9087     ac
   9088 No match
   9089 
   9090 /(?=a(*COMMIT)b|(ac)) ac | (a)c/x
   9091     ac
   9092 No match
   9093 
   9094 /--------/
   9095 
   9096 /(?(?!b(*THEN)a)bn|bnn)/
   9097    bnn 
   9098  0: bn
   9099 
   9100 /(?!b(*SKIP)a)bn|bnn/
   9101     bnn
   9102  0: bn
   9103     
   9104 /(?(?!b(*SKIP)a)bn|bnn)/
   9105    bnn 
   9106  0: bn
   9107 
   9108 /(?!b(*PRUNE)a)bn|bnn/
   9109     bnn
   9110  0: bn
   9111     
   9112 /(?(?!b(*PRUNE)a)bn|bnn)/
   9113    bnn 
   9114  0: bn
   9115    
   9116 /(?!b(*COMMIT)a)bn|bnn/
   9117     bnn
   9118  0: bn
   9119     
   9120 /(?(?!b(*COMMIT)a)bn|bnn)/
   9121    bnn 
   9122  0: bn
   9123 
   9124 /(?=b(*SKIP)a)bn|bnn/
   9125     bnn
   9126 No match
   9127 
   9128 /(?=b(*THEN)a)bn|bnn/
   9129     bnn
   9130  0: bnn
   9131     
   9132  /^(?!a(*SKIP)b)/
   9133      ac
   9134  0: 
   9135 
   9136  /^(?!a(*SKIP)b)../
   9137      acd
   9138  0: ac
   9139 
   9140 /(?!a(*SKIP)b)../
   9141      acd
   9142  0: ac
   9143 
   9144 /^(?(?!a(*SKIP)b))/
   9145      ac
   9146  0: 
   9147 
   9148 /^(?!a(*PRUNE)b)../
   9149      acd
   9150  0: ac
   9151 
   9152 /(?!a(*PRUNE)b)../
   9153      acd
   9154  0: ac
   9155 
   9156  /(?!a(*COMMIT)b)ac|cd/
   9157      ac
   9158  0: ac
   9159 
   9160 /\A.*?(?:a|bc)/
   9161     ba
   9162  0: ba
   9163 
   9164 /^(A(*THEN)B|C(*THEN)D)/
   9165     CD           
   9166  0: CD
   9167  1: CD
   9168 
   9169 /(*:m(m)(?&y)(?(DEFINE)(?<y>b))/K
   9170     abc
   9171  0: b
   9172 MK: m(m
   9173 
   9174 /(*PRUNE:m(m)(?&y)(?(DEFINE)(?<y>b))/K
   9175     abc
   9176  0: b
   9177 MK: m(m
   9178 
   9179 /(*SKIP:m(m)(?&y)(?(DEFINE)(?<y>b))/K
   9180     abc
   9181  0: b
   9182 
   9183 /(*THEN:m(m)(?&y)(?(DEFINE)(?<y>b))/K
   9184     abc
   9185  0: b
   9186 MK: m(m
   9187 
   9188 /^\d*\w{4}/
   9189     1234
   9190  0: 1234
   9191     123 
   9192 No match
   9193 
   9194 /^[^b]*\w{4}/
   9195     aaaa
   9196  0: aaaa
   9197     aaa     
   9198 No match
   9199 
   9200 /^[^b]*\w{4}/i
   9201     aaaa
   9202  0: aaaa
   9203     aaa     
   9204 No match
   9205 
   9206 /^a*\w{4}/
   9207     aaaa
   9208  0: aaaa
   9209     aaa     
   9210 No match
   9211 
   9212 /^a*\w{4}/i
   9213     aaaa
   9214  0: aaaa
   9215     aaa     
   9216 No match
   9217 
   9218 /(?(?=ab)ab)/+
   9219     ca
   9220  0: 
   9221  0+ ca
   9222     cd 
   9223  0: 
   9224  0+ cd
   9225 
   9226 /(?:(?<n>foo)|(?<n>bar))\k<n>/J
   9227     foofoo
   9228  0: foofoo
   9229  1: foo
   9230     barbar
   9231  0: barbar
   9232  1: <unset>
   9233  2: bar
   9234 
   9235 /(?<n>A)(?:(?<n>foo)|(?<n>bar))\k<n>/J
   9236     AfooA
   9237  0: AfooA
   9238  1: A
   9239  2: foo
   9240     AbarA  
   9241  0: AbarA
   9242  1: A
   9243  2: <unset>
   9244  3: bar
   9245     ** Failers 
   9246 No match
   9247     Afoofoo
   9248 No match
   9249     Abarbar
   9250 No match
   9251 
   9252 /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
   9253     1 IN SOA non-sp1 non-sp2(
   9254  0: 1 IN SOA non-sp1 non-sp2(
   9255  1: 1
   9256  2: non-sp1
   9257  3: non-sp2
   9258 
   9259 /^ (?:(?<A>A)|(?'B'B)(?<A>A)) (?('A')x) (?(<B>)y)$/xJ
   9260     Ax
   9261  0: Ax
   9262  1: A
   9263     BAxy 
   9264  0: BAxy
   9265  1: <unset>
   9266  2: B
   9267  3: A
   9268     
   9269 /^A\xZ/
   9270     A\0Z 
   9271  0: A\x00Z
   9272 
   9273 /^A\o{123}B/
   9274     A\123B
   9275  0: ASB
   9276 
   9277 / ^ a + + b $ /x
   9278     aaaab
   9279  0: aaaab
   9280     
   9281 / ^ a + #comment
   9282   + b $ /x
   9283     aaaab
   9284  0: aaaab
   9285     
   9286 / ^ a + #comment
   9287   #comment
   9288   + b $ /x
   9289     aaaab
   9290  0: aaaab
   9291     
   9292 / ^ (?> a + ) b $ /x
   9293     aaaab 
   9294  0: aaaab
   9295 
   9296 / ^ ( a + ) + + \w $ /x
   9297     aaaab 
   9298  0: aaaab
   9299  1: aaaa
   9300 
   9301 /(?:a\Kb)*+/+
   9302     ababc
   9303  0: b
   9304  0+ c
   9305 
   9306 /(?>a\Kb)*/+
   9307     ababc
   9308  0: b
   9309  0+ c
   9310 
   9311 /(?:a\Kb)*/+
   9312     ababc
   9313  0: b
   9314  0+ c
   9315 
   9316 /(a\Kb)*+/+
   9317     ababc
   9318  0: b
   9319  0+ c
   9320  1: ab
   9321 
   9322 /(a\Kb)*/+
   9323     ababc
   9324  0: b
   9325  0+ c
   9326  1: ab
   9327 
   9328 /(?:x|(?:(xx|yy)+|x|x|x|x|x)|a|a|a)bc/
   9329     acb
   9330 No match
   9331 
   9332 '\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++'
   9333     NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
   9334  0: NON QUOTED "QUOT""ED" AFTER 
   9335 
   9336 '\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++'
   9337     NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
   9338  0: NON QUOTED "QUOT""ED" AFTER 
   9339 
   9340 '\A(?:[^\"]++|\"(?:[^\"]++|\"\")++\")++'
   9341     NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
   9342  0: NON QUOTED "QUOT""ED" AFTER 
   9343 
   9344 '\A([^\"1]++|[\"2]([^\"3]*+|[\"4][\"5])*+[\"6])++'
   9345     NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
   9346  0: NON QUOTED "QUOT""ED" AFTER 
   9347  1:  AFTER 
   9348  2: 
   9349 
   9350 /^\w+(?>\s*)(?<=\w)/
   9351   test test
   9352  0: tes
   9353 
   9354 /(?P<same>a)(?P<same>b)/gJ
   9355     abbaba
   9356  0: ab
   9357  1: a
   9358  2: b
   9359  0: ab
   9360  1: a
   9361  2: b
   9362 
   9363 /(?P<same>a)(?P<same>b)(?P=same)/gJ
   9364     abbaba
   9365  0: aba
   9366  1: a
   9367  2: b
   9368 
   9369 /(?P=same)?(?P<same>a)(?P<same>b)/gJ
   9370     abbaba
   9371  0: ab
   9372  1: a
   9373  2: b
   9374  0: ab
   9375  1: a
   9376  2: b
   9377 
   9378 /(?:(?P=same)?(?:(?P<same>a)|(?P<same>b))(?P=same))+/gJ
   9379     bbbaaabaabb
   9380  0: bbbaaaba
   9381  1: a
   9382  2: b
   9383  0: bb
   9384  1: <unset>
   9385  2: b
   9386 
   9387 /(?:(?P=same)?(?:(?P=same)(?P<same>a)(?P=same)|(?P=same)?(?P<same>b)(?P=same)){2}(?P=same)(?P<same>c)(?P=same)){2}(?P<same>z)?/gJ
   9388     bbbaaaccccaaabbbcc
   9389 No match
   9390 
   9391 /(?P<Name>a)?(?P<Name2>b)?(?(<Name>)c|d)*l/
   9392     acl
   9393  0: acl
   9394  1: a
   9395     bdl
   9396  0: bdl
   9397  1: <unset>
   9398  2: b
   9399     adl
   9400  0: dl
   9401     bcl    
   9402  0: l
   9403 
   9404 /\sabc/
   9405     \x{0b}abc
   9406  0: \x0babc
   9407 
   9408 /[\Qa]\E]+/
   9409     aa]]
   9410  0: aa]]
   9411 
   9412 /[\Q]a\E]+/
   9413     aa]]
   9414  0: aa]]
   9415 
   9416 /-- End of testinput1 --/
   9417