xref: /PHP-5.3/ext/pcre/pcrelib/testdata/testoutput8 (revision 276c5de0)
1/-- This set of tests check the DFA matching functionality of pcre_dfa_exec().
2    The -dfa flag must be used with pcretest when running it. --/
3
4/abc/
5    abc
6 0: abc
7
8/ab*c/
9    abc
10 0: abc
11    abbbbc
12 0: abbbbc
13    ac
14 0: ac
15
16/ab+c/
17    abc
18 0: abc
19    abbbbbbc
20 0: abbbbbbc
21    *** Failers
22No match
23    ac
24No match
25    ab
26No match
27
28/a*/
29    a
30 0: a
31 1:
32    aaaaaaaaaaaaaaaaa
33 0: aaaaaaaaaaaaaaaaa
34 1: aaaaaaaaaaaaaaaa
35 2: aaaaaaaaaaaaaaa
36 3: aaaaaaaaaaaaaa
37 4: aaaaaaaaaaaaa
38 5: aaaaaaaaaaaa
39 6: aaaaaaaaaaa
40 7: aaaaaaaaaa
41 8: aaaaaaaaa
42 9: aaaaaaaa
4310: aaaaaaa
4411: aaaaaa
4512: aaaaa
4613: aaaa
4714: aaa
4815: aa
4916: a
5017:
51    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
52Matched, but too many subsidiary matches
53 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
54 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
55 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa
56 3: aaaaaaaaaaaaaaaaaaaaaaaaaaa
57 4: aaaaaaaaaaaaaaaaaaaaaaaaaa
58 5: aaaaaaaaaaaaaaaaaaaaaaaaa
59 6: aaaaaaaaaaaaaaaaaaaaaaaa
60 7: aaaaaaaaaaaaaaaaaaaaaaa
61 8: aaaaaaaaaaaaaaaaaaaaaa
62 9: aaaaaaaaaaaaaaaaaaaaa
6310: aaaaaaaaaaaaaaaaaaaa
6411: aaaaaaaaaaaaaaaaaaa
6512: aaaaaaaaaaaaaaaaaa
6613: aaaaaaaaaaaaaaaaa
6714: aaaaaaaaaaaaaaaa
6815: aaaaaaaaaaaaaaa
6916: aaaaaaaaaaaaaa
7017: aaaaaaaaaaaaa
7118: aaaaaaaaaaaa
7219: aaaaaaaaaaa
7320: aaaaaaaaaa
7421: aaaaaaaaa
75    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
76 0:
77
78/(a|abcd|african)/
79    a
80 0: a
81    abcd
82 0: abcd
83 1: a
84    african
85 0: african
86 1: a
87
88/^abc/
89    abcdef
90 0: abc
91    *** Failers
92No match
93    xyzabc
94No match
95    xyz\nabc
96No match
97
98/^abc/m
99    abcdef
100 0: abc
101    xyz\nabc
102 0: abc
103    *** Failers
104No match
105    xyzabc
106No match
107
108/\Aabc/
109    abcdef
110 0: abc
111    *** Failers
112No match
113    xyzabc
114No match
115    xyz\nabc
116No match
117
118/\Aabc/m
119    abcdef
120 0: abc
121    *** Failers
122No match
123    xyzabc
124No match
125    xyz\nabc
126No match
127
128/\Gabc/
129    abcdef
130 0: abc
131    xyzabc\>3
132 0: abc
133    *** Failers
134No match
135    xyzabc
136No match
137    xyzabc\>2
138No match
139
140/x\dy\Dz/
141    x9yzz
142 0: x9yzz
143    x0y+z
144 0: x0y+z
145    *** Failers
146No match
147    xyz
148No match
149    xxy0z
150No match
151
152/x\sy\Sz/
153    x yzz
154 0: x yzz
155    x y+z
156 0: x y+z
157    *** Failers
158No match
159    xyz
160No match
161    xxyyz
162No match
163
164/x\wy\Wz/
165    xxy+z
166 0: xxy+z
167    *** Failers
168No match
169    xxy0z
170No match
171    x+y+z
172No match
173
174/x.y/
175    x+y
176 0: x+y
177    x-y
178 0: x-y
179    *** Failers
180No match
181    x\ny
182No match
183
184/x.y/s
185    x+y
186 0: x+y
187    x-y
188 0: x-y
189    x\ny
190 0: x\x0ay
191
192/(a.b(?s)c.d|x.y)p.q/
193    a+bc+dp+q
194 0: a+bc+dp+q
195    a+bc\ndp+q
196 0: a+bc\x0adp+q
197    x\nyp+q
198 0: x\x0ayp+q
199    *** Failers
200No match
201    a\nbc\ndp+q
202No match
203    a+bc\ndp\nq
204No match
205    x\nyp\nq
206No match
207
208/a\d\z/
209    ba0
210 0: a0
211    *** Failers
212No match
213    ba0\n
214No match
215    ba0\ncd
216No match
217
218/a\d\z/m
219    ba0
220 0: a0
221    *** Failers
222No match
223    ba0\n
224No match
225    ba0\ncd
226No match
227
228/a\d\Z/
229    ba0
230 0: a0
231    ba0\n
232 0: a0
233    *** Failers
234No match
235    ba0\ncd
236No match
237
238/a\d\Z/m
239    ba0
240 0: a0
241    ba0\n
242 0: a0
243    *** Failers
244No match
245    ba0\ncd
246No match
247
248/a\d$/
249    ba0
250 0: a0
251    ba0\n
252 0: a0
253    *** Failers
254No match
255    ba0\ncd
256No match
257
258/a\d$/m
259    ba0
260 0: a0
261    ba0\n
262 0: a0
263    ba0\ncd
264 0: a0
265    *** Failers
266No match
267
268/abc/i
269    abc
270 0: abc
271    aBc
272 0: aBc
273    ABC
274 0: ABC
275
276/[^a]/
277    abcd
278 0: b
279
280/ab?\w/
281    abz
282 0: abz
283 1: ab
284    abbz
285 0: abb
286 1: ab
287    azz
288 0: az
289
290/x{0,3}yz/
291    ayzq
292 0: yz
293    axyzq
294 0: xyz
295    axxyz
296 0: xxyz
297    axxxyzq
298 0: xxxyz
299    axxxxyzq
300 0: xxxyz
301    *** Failers
302No match
303    ax
304No match
305    axx
306No match
307
308/x{3}yz/
309    axxxyzq
310 0: xxxyz
311    axxxxyzq
312 0: xxxyz
313    *** Failers
314No match
315    ax
316No match
317    axx
318No match
319    ayzq
320No match
321    axyzq
322No match
323    axxyz
324No match
325
326/x{2,3}yz/
327    axxyz
328 0: xxyz
329    axxxyzq
330 0: xxxyz
331    axxxxyzq
332 0: xxxyz
333    *** Failers
334No match
335    ax
336No match
337    axx
338No match
339    ayzq
340No match
341    axyzq
342No match
343
344/[^a]+/
345    bac
346 0: b
347    bcdefax
348 0: bcdef
349 1: bcde
350 2: bcd
351 3: bc
352 4: b
353    *** Failers
354 0: *** F
355 1: ***
356 2: ***
357 3: **
358 4: *
359    aaaaa
360No match
361
362/[^a]*/
363    bac
364 0: b
365 1:
366    bcdefax
367 0: bcdef
368 1: bcde
369 2: bcd
370 3: bc
371 4: b
372 5:
373    *** Failers
374 0: *** F
375 1: ***
376 2: ***
377 3: **
378 4: *
379 5:
380    aaaaa
381 0:
382
383/[^a]{3,5}/
384    xyz
385 0: xyz
386    awxyza
387 0: wxyz
388 1: wxy
389    abcdefa
390 0: bcdef
391 1: bcde
392 2: bcd
393    abcdefghijk
394 0: bcdef
395 1: bcde
396 2: bcd
397    *** Failers
398 0: *** F
399 1: ***
400 2: ***
401    axya
402No match
403    axa
404No match
405    aaaaa
406No match
407
408/\d*/
409    1234b567
410 0: 1234
411 1: 123
412 2: 12
413 3: 1
414 4:
415    xyz
416 0:
417
418/\D*/
419    a1234b567
420 0: a
421 1:
422    xyz
423 0: xyz
424 1: xy
425 2: x
426 3:
427
428/\d+/
429    ab1234c56
430 0: 1234
431 1: 123
432 2: 12
433 3: 1
434    *** Failers
435No match
436    xyz
437No match
438
439/\D+/
440    ab123c56
441 0: ab
442 1: a
443    *** Failers
444 0: *** Failers
445 1: *** Failer
446 2: *** Faile
447 3: *** Fail
448 4: *** Fai
449 5: *** Fa
450 6: *** F
451 7: ***
452 8: ***
453 9: **
45410: *
455    789
456No match
457
458/\d?A/
459    045ABC
460 0: 5A
461    ABC
462 0: A
463    *** Failers
464No match
465    XYZ
466No match
467
468/\D?A/
469    ABC
470 0: A
471    BAC
472 0: BA
473    9ABC
474 0: A
475    *** Failers
476No match
477
478/a+/
479    aaaa
480 0: aaaa
481 1: aaa
482 2: aa
483 3: a
484
485/^.*xyz/
486    xyz
487 0: xyz
488    ggggggggxyz
489 0: ggggggggxyz
490
491/^.+xyz/
492    abcdxyz
493 0: abcdxyz
494    axyz
495 0: axyz
496    *** Failers
497No match
498    xyz
499No match
500
501/^.?xyz/
502    xyz
503 0: xyz
504    cxyz
505 0: cxyz
506
507/^\d{2,3}X/
508    12X
509 0: 12X
510    123X
511 0: 123X
512    *** Failers
513No match
514    X
515No match
516    1X
517No match
518    1234X
519No match
520
521/^[abcd]\d/
522    a45
523 0: a4
524    b93
525 0: b9
526    c99z
527 0: c9
528    d04
529 0: d0
530    *** Failers
531No match
532    e45
533No match
534    abcd
535No match
536    abcd1234
537No match
538    1234
539No match
540
541/^[abcd]*\d/
542    a45
543 0: a4
544    b93
545 0: b9
546    c99z
547 0: c9
548    d04
549 0: d0
550    abcd1234
551 0: abcd1
552    1234
553 0: 1
554    *** Failers
555No match
556    e45
557No match
558    abcd
559No match
560
561/^[abcd]+\d/
562    a45
563 0: a4
564    b93
565 0: b9
566    c99z
567 0: c9
568    d04
569 0: d0
570    abcd1234
571 0: abcd1
572    *** Failers
573No match
574    1234
575No match
576    e45
577No match
578    abcd
579No match
580
581/^a+X/
582    aX
583 0: aX
584    aaX
585 0: aaX
586
587/^[abcd]?\d/
588    a45
589 0: a4
590    b93
591 0: b9
592    c99z
593 0: c9
594    d04
595 0: d0
596    1234
597 0: 1
598    *** Failers
599No match
600    abcd1234
601No match
602    e45
603No match
604
605/^[abcd]{2,3}\d/
606    ab45
607 0: ab4
608    bcd93
609 0: bcd9
610    *** Failers
611No match
612    1234
613No match
614    a36
615No match
616    abcd1234
617No match
618    ee45
619No match
620
621/^(abc)*\d/
622    abc45
623 0: abc4
624    abcabcabc45
625 0: abcabcabc4
626    42xyz
627 0: 4
628    *** Failers
629No match
630
631/^(abc)+\d/
632    abc45
633 0: abc4
634    abcabcabc45
635 0: abcabcabc4
636    *** Failers
637No match
638    42xyz
639No match
640
641/^(abc)?\d/
642    abc45
643 0: abc4
644    42xyz
645 0: 4
646    *** Failers
647No match
648    abcabcabc45
649No match
650
651/^(abc){2,3}\d/
652    abcabc45
653 0: abcabc4
654    abcabcabc45
655 0: abcabcabc4
656    *** Failers
657No match
658    abcabcabcabc45
659No match
660    abc45
661No match
662    42xyz
663No match
664
665/1(abc|xyz)2(?1)3/
666    1abc2abc3456
667 0: 1abc2abc3
668    1abc2xyz3456
669 0: 1abc2xyz3
670
671/^(a*\w|ab)=(a*\w|ab)/
672    ab=ab
673 0: ab=ab
674 1: ab=a
675
676/^(a*\w|ab)=(?1)/
677    ab=ab
678 0: ab=ab
679 1: ab=a
680
681/^([^()]|\((?1)*\))*$/
682    abc
683 0: abc
684    a(b)c
685 0: a(b)c
686    a(b(c))d
687 0: a(b(c))d
688    *** Failers)
689No match
690    a(b(c)d
691No match
692
693/^>abc>([^()]|\((?1)*\))*<xyz<$/
694    >abc>123<xyz<
695 0: >abc>123<xyz<
696    >abc>1(2)3<xyz<
697 0: >abc>1(2)3<xyz<
698    >abc>(1(2)3)<xyz<
699 0: >abc>(1(2)3)<xyz<
700
701/^(?>a*)\d/
702    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
703 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9
704    *** Failers
705No match
706    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
707No match
708
709/< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/x
710    <>
711 0: <>
712    <abcd>
713 0: <abcd>
714    <abc <123> hij>
715 0: <abc <123> hij>
716    <abc <def> hij>
717 0: <def>
718    <abc<>def>
719 0: <abc<>def>
720    <abc<>
721 0: <>
722    *** Failers
723No match
724    <abc
725No match
726
727/^(?(?=abc)\w{3}:|\d\d)$/
728    abc:
729 0: abc:
730    12
731 0: 12
732    *** Failers
733No match
734    123
735No match
736    xyz
737No match
738
739/^(?(?!abc)\d\d|\w{3}:)$/
740    abc:
741 0: abc:
742    12
743 0: 12
744    *** Failers
745No match
746    123
747No match
748    xyz
749No match
750
751/^(?=abc)\w{5}:$/
752    abcde:
753 0: abcde:
754    *** Failers
755No match
756    abc..
757No match
758    123
759No match
760    vwxyz
761No match
762
763/^(?!abc)\d\d$/
764    12
765 0: 12
766    *** Failers
767No match
768    abcde:
769No match
770    abc..
771No match
772    123
773No match
774    vwxyz
775No match
776
777/(?<=abc|xy)123/
778    abc12345
779 0: 123
780    wxy123z
781 0: 123
782    *** Failers
783No match
784    123abc
785No match
786
787/(?<!abc|xy)123/
788    123abc
789 0: 123
790    mno123456
791 0: 123
792    *** Failers
793No match
794    abc12345
795No match
796    wxy123z
797No match
798
799/abc(?C1)xyz/
800    abcxyz
801--->abcxyz
802  1 ^  ^       x
803 0: abcxyz
804    123abcxyz999
805--->123abcxyz999
806  1    ^  ^          x
807 0: abcxyz
808
809/(ab|cd){3,4}/C
810  ababab
811--->ababab
812 +0 ^          (ab|cd){3,4}
813 +1 ^          a
814 +4 ^          c
815 +2 ^^         b
816 +3 ^ ^        |
817 +1 ^ ^        a
818 +4 ^ ^        c
819 +2 ^  ^       b
820 +3 ^   ^      |
821 +1 ^   ^      a
822 +4 ^   ^      c
823 +2 ^    ^     b
824 +3 ^     ^    |
825+12 ^     ^
826 +1 ^     ^    a
827 +4 ^     ^    c
828 0: ababab
829  abcdabcd
830--->abcdabcd
831 +0 ^            (ab|cd){3,4}
832 +1 ^            a
833 +4 ^            c
834 +2 ^^           b
835 +3 ^ ^          |
836 +1 ^ ^          a
837 +4 ^ ^          c
838 +5 ^  ^         d
839 +6 ^   ^        )
840 +1 ^   ^        a
841 +4 ^   ^        c
842 +2 ^    ^       b
843 +3 ^     ^      |
844+12 ^     ^
845 +1 ^     ^      a
846 +4 ^     ^      c
847 +5 ^      ^     d
848 +6 ^       ^    )
849+12 ^       ^
850 0: abcdabcd
851 1: abcdab
852  abcdcdcdcdcd
853--->abcdcdcdcdcd
854 +0 ^                (ab|cd){3,4}
855 +1 ^                a
856 +4 ^                c
857 +2 ^^               b
858 +3 ^ ^              |
859 +1 ^ ^              a
860 +4 ^ ^              c
861 +5 ^  ^             d
862 +6 ^   ^            )
863 +1 ^   ^            a
864 +4 ^   ^            c
865 +5 ^    ^           d
866 +6 ^     ^          )
867+12 ^     ^
868 +1 ^     ^          a
869 +4 ^     ^          c
870 +5 ^      ^         d
871 +6 ^       ^        )
872+12 ^       ^
873 0: abcdcdcd
874 1: abcdcd
875
876/^abc/
877    abcdef
878 0: abc
879    *** Failers
880No match
881    abcdef\B
882No match
883
884/^(a*|xyz)/
885    bcd
886 0:
887    aaabcd
888 0: aaa
889 1: aa
890 2: a
891 3:
892    xyz
893 0: xyz
894 1:
895    xyz\N
896 0: xyz
897    *** Failers
898 0:
899    bcd\N
900No match
901
902/xyz$/
903    xyz
904 0: xyz
905    xyz\n
906 0: xyz
907    *** Failers
908No match
909    xyz\Z
910No match
911    xyz\n\Z
912No match
913
914/xyz$/m
915    xyz
916 0: xyz
917    xyz\n
918 0: xyz
919    abcxyz\npqr
920 0: xyz
921    abcxyz\npqr\Z
922 0: xyz
923    xyz\n\Z
924 0: xyz
925    *** Failers
926No match
927    xyz\Z
928No match
929
930/\Gabc/
931    abcdef
932 0: abc
933    defabcxyz\>3
934 0: abc
935    *** Failers
936No match
937    defabcxyz
938No match
939
940/^abcdef/
941    ab\P
942Partial match: ab
943    abcde\P
944Partial match: abcde
945    abcdef\P
946 0: abcdef
947    *** Failers
948No match
949    abx\P
950No match
951
952/^a{2,4}\d+z/
953    a\P
954Partial match: a
955    aa\P
956Partial match: aa
957    aa2\P
958Partial match: aa2
959    aaa\P
960Partial match: aaa
961    aaa23\P
962Partial match: aaa23
963    aaaa12345\P
964Partial match: aaaa12345
965    aa0z\P
966 0: aa0z
967    aaaa4444444444444z\P
968 0: aaaa4444444444444z
969    *** Failers
970No match
971    az\P
972No match
973    aaaaa\P
974No match
975    a56\P
976No match
977
978/^abcdef/
979   abc\P
980Partial match: abc
981   def\R
982 0: def
983
984/(?<=foo)bar/
985   xyzfo\P
986No match
987   foob\P\>2
988Partial match: foob
989   foobar...\R\P\>4
990 0: ar
991   xyzfo\P
992No match
993   foobar\>2
994 0: bar
995   *** Failers
996No match
997   xyzfo\P
998No match
999   obar\R
1000No match
1001
1002/(ab*(cd|ef))+X/
1003    adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
1004No match
1005    lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
1006Partial match: abbbbbbcdaefabbbbbbbefa
1007    cdabbbbbbbb\P\R\B\Z
1008Partial match: cdabbbbbbbb
1009    efabbbbbbbbbbbbbbbb\P\R\B\Z
1010Partial match: efabbbbbbbbbbbbbbbb
1011    bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
1012 0: bbbbbbbbbbbbcdX
1013
1014/(a|b)/SF>testsavedregex
1015Compiled pattern written to testsavedregex
1016Study data written to testsavedregex
1017<testsavedregex
1018Compiled pattern (byte-inverted) loaded from testsavedregex
1019Study data loaded from testsavedregex
1020    abc
1021 0: a
1022    ** Failers
1023 0: a
1024    def
1025No match
1026
1027/the quick brown fox/
1028    the quick brown fox
1029 0: the quick brown fox
1030    The quick brown FOX
1031No match
1032    What do you know about the quick brown fox?
1033 0: the quick brown fox
1034    What do you know about THE QUICK BROWN FOX?
1035No match
1036
1037/The quick brown fox/i
1038    the quick brown fox
1039 0: the quick brown fox
1040    The quick brown FOX
1041 0: The quick brown FOX
1042    What do you know about the quick brown fox?
1043 0: the quick brown fox
1044    What do you know about THE QUICK BROWN FOX?
1045 0: THE QUICK BROWN FOX
1046
1047/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
1048    abcd\t\n\r\f\a\e9;\$\\?caxyz
1049 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
1050
1051/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
1052    abxyzpqrrrabbxyyyypqAzz
1053 0: abxyzpqrrrabbxyyyypqAzz
1054    abxyzpqrrrabbxyyyypqAzz
1055 0: abxyzpqrrrabbxyyyypqAzz
1056    aabxyzpqrrrabbxyyyypqAzz
1057 0: aabxyzpqrrrabbxyyyypqAzz
1058    aaabxyzpqrrrabbxyyyypqAzz
1059 0: aaabxyzpqrrrabbxyyyypqAzz
1060    aaaabxyzpqrrrabbxyyyypqAzz
1061 0: aaaabxyzpqrrrabbxyyyypqAzz
1062    abcxyzpqrrrabbxyyyypqAzz
1063 0: abcxyzpqrrrabbxyyyypqAzz
1064    aabcxyzpqrrrabbxyyyypqAzz
1065 0: aabcxyzpqrrrabbxyyyypqAzz
1066    aaabcxyzpqrrrabbxyyyypAzz
1067 0: aaabcxyzpqrrrabbxyyyypAzz
1068    aaabcxyzpqrrrabbxyyyypqAzz
1069 0: aaabcxyzpqrrrabbxyyyypqAzz
1070    aaabcxyzpqrrrabbxyyyypqqAzz
1071 0: aaabcxyzpqrrrabbxyyyypqqAzz
1072    aaabcxyzpqrrrabbxyyyypqqqAzz
1073 0: aaabcxyzpqrrrabbxyyyypqqqAzz
1074    aaabcxyzpqrrrabbxyyyypqqqqAzz
1075 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
1076    aaabcxyzpqrrrabbxyyyypqqqqqAzz
1077 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
1078    aaabcxyzpqrrrabbxyyyypqqqqqqAzz
1079 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
1080    aaaabcxyzpqrrrabbxyyyypqAzz
1081 0: aaaabcxyzpqrrrabbxyyyypqAzz
1082    abxyzzpqrrrabbxyyyypqAzz
1083 0: abxyzzpqrrrabbxyyyypqAzz
1084    aabxyzzzpqrrrabbxyyyypqAzz
1085 0: aabxyzzzpqrrrabbxyyyypqAzz
1086    aaabxyzzzzpqrrrabbxyyyypqAzz
1087 0: aaabxyzzzzpqrrrabbxyyyypqAzz
1088    aaaabxyzzzzpqrrrabbxyyyypqAzz
1089 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
1090    abcxyzzpqrrrabbxyyyypqAzz
1091 0: abcxyzzpqrrrabbxyyyypqAzz
1092    aabcxyzzzpqrrrabbxyyyypqAzz
1093 0: aabcxyzzzpqrrrabbxyyyypqAzz
1094    aaabcxyzzzzpqrrrabbxyyyypqAzz
1095 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
1096    aaaabcxyzzzzpqrrrabbxyyyypqAzz
1097 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
1098    aaaabcxyzzzzpqrrrabbbxyyyypqAzz
1099 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
1100    aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
1101 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
1102    aaabcxyzpqrrrabbxyyyypABzz
1103 0: aaabcxyzpqrrrabbxyyyypABzz
1104    aaabcxyzpqrrrabbxyyyypABBzz
1105 0: aaabcxyzpqrrrabbxyyyypABBzz
1106    >>>aaabxyzpqrrrabbxyyyypqAzz
1107 0: aaabxyzpqrrrabbxyyyypqAzz
1108    >aaaabxyzpqrrrabbxyyyypqAzz
1109 0: aaaabxyzpqrrrabbxyyyypqAzz
1110    >>>>abcxyzpqrrrabbxyyyypqAzz
1111 0: abcxyzpqrrrabbxyyyypqAzz
1112    *** Failers
1113No match
1114    abxyzpqrrabbxyyyypqAzz
1115No match
1116    abxyzpqrrrrabbxyyyypqAzz
1117No match
1118    abxyzpqrrrabxyyyypqAzz
1119No match
1120    aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
1121No match
1122    aaaabcxyzzzzpqrrrabbbxyyypqAzz
1123No match
1124    aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
1125No match
1126
1127/^(abc){1,2}zz/
1128    abczz
1129 0: abczz
1130    abcabczz
1131 0: abcabczz
1132    *** Failers
1133No match
1134    zz
1135No match
1136    abcabcabczz
1137No match
1138    >>abczz
1139No match
1140
1141/^(b+?|a){1,2}?c/
1142    bc
1143 0: bc
1144    bbc
1145 0: bbc
1146    bbbc
1147 0: bbbc
1148    bac
1149 0: bac
1150    bbac
1151 0: bbac
1152    aac
1153 0: aac
1154    abbbbbbbbbbbc
1155 0: abbbbbbbbbbbc
1156    bbbbbbbbbbbac
1157 0: bbbbbbbbbbbac
1158    *** Failers
1159No match
1160    aaac
1161No match
1162    abbbbbbbbbbbac
1163No match
1164
1165/^(b+|a){1,2}c/
1166    bc
1167 0: bc
1168    bbc
1169 0: bbc
1170    bbbc
1171 0: bbbc
1172    bac
1173 0: bac
1174    bbac
1175 0: bbac
1176    aac
1177 0: aac
1178    abbbbbbbbbbbc
1179 0: abbbbbbbbbbbc
1180    bbbbbbbbbbbac
1181 0: bbbbbbbbbbbac
1182    *** Failers
1183No match
1184    aaac
1185No match
1186    abbbbbbbbbbbac
1187No match
1188
1189/^(b+|a){1,2}?bc/
1190    bbc
1191 0: bbc
1192
1193/^(b*|ba){1,2}?bc/
1194    babc
1195 0: babc
1196    bbabc
1197 0: bbabc
1198    bababc
1199 0: bababc
1200    *** Failers
1201No match
1202    bababbc
1203No match
1204    babababc
1205No match
1206
1207/^(ba|b*){1,2}?bc/
1208    babc
1209 0: babc
1210    bbabc
1211 0: bbabc
1212    bababc
1213 0: bababc
1214    *** Failers
1215No match
1216    bababbc
1217No match
1218    babababc
1219No match
1220
1221/^\ca\cA\c[\c{\c:/
1222    \x01\x01\e;z
1223 0: \x01\x01\x1b;z
1224
1225/^[ab\]cde]/
1226    athing
1227 0: a
1228    bthing
1229 0: b
1230    ]thing
1231 0: ]
1232    cthing
1233 0: c
1234    dthing
1235 0: d
1236    ething
1237 0: e
1238    *** Failers
1239No match
1240    fthing
1241No match
1242    [thing
1243No match
1244    \\thing
1245No match
1246
1247/^[]cde]/
1248    ]thing
1249 0: ]
1250    cthing
1251 0: c
1252    dthing
1253 0: d
1254    ething
1255 0: e
1256    *** Failers
1257No match
1258    athing
1259No match
1260    fthing
1261No match
1262
1263/^[^ab\]cde]/
1264    fthing
1265 0: f
1266    [thing
1267 0: [
1268    \\thing
1269 0: \
1270    *** Failers
1271 0: *
1272    athing
1273No match
1274    bthing
1275No match
1276    ]thing
1277No match
1278    cthing
1279No match
1280    dthing
1281No match
1282    ething
1283No match
1284
1285/^[^]cde]/
1286    athing
1287 0: a
1288    fthing
1289 0: f
1290    *** Failers
1291 0: *
1292    ]thing
1293No match
1294    cthing
1295No match
1296    dthing
1297No match
1298    ething
1299No match
1300
1301/^\�/
13021303 0: \x81
1304
1305/^�/
13061307 0: \xff
1308
1309/^[0-9]+$/
1310    0
1311 0: 0
1312    1
1313 0: 1
1314    2
1315 0: 2
1316    3
1317 0: 3
1318    4
1319 0: 4
1320    5
1321 0: 5
1322    6
1323 0: 6
1324    7
1325 0: 7
1326    8
1327 0: 8
1328    9
1329 0: 9
1330    10
1331 0: 10
1332    100
1333 0: 100
1334    *** Failers
1335No match
1336    abc
1337No match
1338
1339/^.*nter/
1340    enter
1341 0: enter
1342    inter
1343 0: inter
1344    uponter
1345 0: uponter
1346
1347/^xxx[0-9]+$/
1348    xxx0
1349 0: xxx0
1350    xxx1234
1351 0: xxx1234
1352    *** Failers
1353No match
1354    xxx
1355No match
1356
1357/^.+[0-9][0-9][0-9]$/
1358    x123
1359 0: x123
1360    xx123
1361 0: xx123
1362    123456
1363 0: 123456
1364    *** Failers
1365No match
1366    123
1367No match
1368    x1234
1369 0: x1234
1370
1371/^.+?[0-9][0-9][0-9]$/
1372    x123
1373 0: x123
1374    xx123
1375 0: xx123
1376    123456
1377 0: 123456
1378    *** Failers
1379No match
1380    123
1381No match
1382    x1234
1383 0: x1234
1384
1385/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
1386    abc!pqr=apquxz.ixr.zzz.ac.uk
1387 0: abc!pqr=apquxz.ixr.zzz.ac.uk
1388    *** Failers
1389No match
1390    !pqr=apquxz.ixr.zzz.ac.uk
1391No match
1392    abc!=apquxz.ixr.zzz.ac.uk
1393No match
1394    abc!pqr=apquxz:ixr.zzz.ac.uk
1395No match
1396    abc!pqr=apquxz.ixr.zzz.ac.ukk
1397No match
1398
1399/:/
1400    Well, we need a colon: somewhere
1401 0: :
1402    *** Fail if we don't
1403No match
1404
1405/([\da-f:]+)$/i
1406    0abc
1407 0: 0abc
1408    abc
1409 0: abc
1410    fed
1411 0: fed
1412    E
1413 0: E
1414    ::
1415 0: ::
1416    5f03:12C0::932e
1417 0: 5f03:12C0::932e
1418    fed def
1419 0: def
1420    Any old stuff
1421 0: ff
1422    *** Failers
1423No match
1424    0zzz
1425No match
1426    gzzz
1427No match
1428    fed\x20
1429No match
1430    Any old rubbish
1431No match
1432
1433/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
1434    .1.2.3
1435 0: .1.2.3
1436    A.12.123.0
1437 0: A.12.123.0
1438    *** Failers
1439No match
1440    .1.2.3333
1441No match
1442    1.2.3
1443No match
1444    1234.2.3
1445No match
1446
1447/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
1448    1 IN SOA non-sp1 non-sp2(
1449 0: 1 IN SOA non-sp1 non-sp2(
1450    1    IN    SOA    non-sp1    non-sp2   (
1451 0: 1    IN    SOA    non-sp1    non-sp2   (
1452    *** Failers
1453No match
1454    1IN SOA non-sp1 non-sp2(
1455No match
1456
1457/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
1458    a.
1459 0: a.
1460    Z.
1461 0: Z.
1462    2.
1463 0: 2.
1464    ab-c.pq-r.
1465 0: ab-c.pq-r.
1466    sxk.zzz.ac.uk.
1467 0: sxk.zzz.ac.uk.
1468    x-.y-.
1469 0: x-.y-.
1470    *** Failers
1471No match
1472    -abc.peq.
1473No match
1474
1475/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
1476    *.a
1477 0: *.a
1478    *.b0-a
1479 0: *.b0-a
1480    *.c3-b.c
1481 0: *.c3-b.c
1482    *.c-a.b-c
1483 0: *.c-a.b-c
1484    *** Failers
1485No match
1486    *.0
1487No match
1488    *.a-
1489No match
1490    *.a-b.c-
1491No match
1492    *.c-a.0-c
1493No match
1494
1495/^(?=ab(de))(abd)(e)/
1496    abde
1497 0: abde
1498
1499/^(?!(ab)de|x)(abd)(f)/
1500    abdf
1501 0: abdf
1502
1503/^(?=(ab(cd)))(ab)/
1504    abcd
1505 0: ab
1506
1507/^[\da-f](\.[\da-f])*$/i
1508    a.b.c.d
1509 0: a.b.c.d
1510    A.B.C.D
1511 0: A.B.C.D
1512    a.b.c.1.2.3.C
1513 0: a.b.c.1.2.3.C
1514
1515/^\".*\"\s*(;.*)?$/
1516    \"1234\"
1517 0: "1234"
1518    \"abcd\" ;
1519 0: "abcd" ;
1520    \"\" ; rhubarb
1521 0: "" ; rhubarb
1522    *** Failers
1523No match
1524    \"1234\" : things
1525No match
1526
1527/^$/
1528    \
1529 0:
1530    *** Failers
1531No match
1532
1533/   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/x
1534    ab c
1535 0: ab c
1536    *** Failers
1537No match
1538    abc
1539No match
1540    ab cde
1541No match
1542
1543/(?x)   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/
1544    ab c
1545 0: ab c
1546    *** Failers
1547No match
1548    abc
1549No match
1550    ab cde
1551No match
1552
1553/^   a\ b[c ]d       $/x
1554    a bcd
1555 0: a bcd
1556    a b d
1557 0: a b d
1558    *** Failers
1559No match
1560    abcd
1561No match
1562    ab d
1563No match
1564
1565/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
1566    abcdefhijklm
1567 0: abcdefhijklm
1568
1569/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
1570    abcdefhijklm
1571 0: abcdefhijklm
1572
1573/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
1574    a+ Z0+\x08\n\x1d\x12
1575 0: a+ Z0+\x08\x0a\x1d\x12
1576
1577/^[.^$|()*+?{,}]+/
1578    .^\$(*+)|{?,?}
1579 0: .^$(*+)|{?,?}
1580 1: .^$(*+)|{?,?
1581 2: .^$(*+)|{?,
1582 3: .^$(*+)|{?
1583 4: .^$(*+)|{
1584 5: .^$(*+)|
1585 6: .^$(*+)
1586 7: .^$(*+
1587 8: .^$(*
1588 9: .^$(
158910: .^$
159011: .^
159112: .
1592
1593/^a*\w/
1594    z
1595 0: z
1596    az
1597 0: az
1598 1: a
1599    aaaz
1600 0: aaaz
1601 1: aaa
1602 2: aa
1603 3: a
1604    a
1605 0: a
1606    aa
1607 0: aa
1608 1: a
1609    aaaa
1610 0: aaaa
1611 1: aaa
1612 2: aa
1613 3: a
1614    a+
1615 0: a
1616    aa+
1617 0: aa
1618 1: a
1619
1620/^a*?\w/
1621    z
1622 0: z
1623    az
1624 0: az
1625 1: a
1626    aaaz
1627 0: aaaz
1628 1: aaa
1629 2: aa
1630 3: a
1631    a
1632 0: a
1633    aa
1634 0: aa
1635 1: a
1636    aaaa
1637 0: aaaa
1638 1: aaa
1639 2: aa
1640 3: a
1641    a+
1642 0: a
1643    aa+
1644 0: aa
1645 1: a
1646
1647/^a+\w/
1648    az
1649 0: az
1650    aaaz
1651 0: aaaz
1652 1: aaa
1653 2: aa
1654    aa
1655 0: aa
1656    aaaa
1657 0: aaaa
1658 1: aaa
1659 2: aa
1660    aa+
1661 0: aa
1662
1663/^a+?\w/
1664    az
1665 0: az
1666    aaaz
1667 0: aaaz
1668 1: aaa
1669 2: aa
1670    aa
1671 0: aa
1672    aaaa
1673 0: aaaa
1674 1: aaa
1675 2: aa
1676    aa+
1677 0: aa
1678
1679/^\d{8}\w{2,}/
1680    1234567890
1681 0: 1234567890
1682    12345678ab
1683 0: 12345678ab
1684    12345678__
1685 0: 12345678__
1686    *** Failers
1687No match
1688    1234567
1689No match
1690
1691/^[aeiou\d]{4,5}$/
1692    uoie
1693 0: uoie
1694    1234
1695 0: 1234
1696    12345
1697 0: 12345
1698    aaaaa
1699 0: aaaaa
1700    *** Failers
1701No match
1702    123456
1703No match
1704
1705/^[aeiou\d]{4,5}?/
1706    uoie
1707 0: uoie
1708    1234
1709 0: 1234
1710    12345
1711 0: 12345
1712 1: 1234
1713    aaaaa
1714 0: aaaaa
1715 1: aaaa
1716    123456
1717 0: 12345
1718 1: 1234
1719
1720/^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]/
1721    From abcd  Mon Sep 01 12:33:02 1997
1722 0: From abcd  Mon Sep 01 12:33
1723
1724/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
1725    From abcd  Mon Sep 01 12:33:02 1997
1726 0: From abcd  Mon Sep 01 12:33
1727    From abcd  Mon Sep  1 12:33:02 1997
1728 0: From abcd  Mon Sep  1 12:33
1729    *** Failers
1730No match
1731    From abcd  Sep 01 12:33:02 1997
1732No match
1733
1734/^12.34/s
1735    12\n34
1736 0: 12\x0a34
1737    12\r34
1738 0: 12\x0d34
1739
1740/\w+(?=\t)/
1741    the quick brown\t fox
1742 0: brown
1743
1744/foo(?!bar)(.*)/
1745    foobar is foolish see?
1746 0: foolish see?
1747 1: foolish see
1748 2: foolish se
1749 3: foolish s
1750 4: foolish
1751 5: foolish
1752 6: foolis
1753 7: fooli
1754 8: fool
1755 9: foo
1756
1757/(?:(?!foo)...|^.{0,2})bar(.*)/
1758    foobar crowbar etc
1759 0: rowbar etc
1760 1: rowbar et
1761 2: rowbar e
1762 3: rowbar
1763 4: rowbar
1764    barrel
1765 0: barrel
1766 1: barre
1767 2: barr
1768 3: bar
1769    2barrel
1770 0: 2barrel
1771 1: 2barre
1772 2: 2barr
1773 3: 2bar
1774    A barrel
1775 0: A barrel
1776 1: A barre
1777 2: A barr
1778 3: A bar
1779
1780/^(\D*)(?=\d)(?!123)/
1781    abc456
1782 0: abc
1783    *** Failers
1784No match
1785    abc123
1786No match
1787
1788/^1234(?# test newlines
1789  inside)/
1790    1234
1791 0: 1234
1792
1793/^1234 #comment in extended re
1794  /x
1795    1234
1796 0: 1234
1797
1798/#rhubarb
1799  abcd/x
1800    abcd
1801 0: abcd
1802
1803/^abcd#rhubarb/x
1804    abcd
1805 0: abcd
1806
1807/(?!^)abc/
1808    the abc
1809 0: abc
1810    *** Failers
1811No match
1812    abc
1813No match
1814
1815/(?=^)abc/
1816    abc
1817 0: abc
1818    *** Failers
1819No match
1820    the abc
1821No match
1822
1823/^[ab]{1,3}(ab*|b)/
1824    aabbbbb
1825 0: aabbbbb
1826 1: aabbbb
1827 2: aabbb
1828 3: aabb
1829 4: aab
1830 5: aa
1831
1832/^[ab]{1,3}?(ab*|b)/
1833    aabbbbb
1834 0: aabbbbb
1835 1: aabbbb
1836 2: aabbb
1837 3: aabb
1838 4: aab
1839 5: aa
1840
1841/^[ab]{1,3}?(ab*?|b)/
1842    aabbbbb
1843 0: aabbbbb
1844 1: aabbbb
1845 2: aabbb
1846 3: aabb
1847 4: aab
1848 5: aa
1849
1850/^[ab]{1,3}(ab*?|b)/
1851    aabbbbb
1852 0: aabbbbb
1853 1: aabbbb
1854 2: aabbb
1855 3: aabb
1856 4: aab
1857 5: aa
1858
1859/  (?: [\040\t] |  \(
1860(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1861\)  )*                          # optional leading comment
1862(?:    (?:
1863[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1864(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1865|
1866" (?:                      # opening quote...
1867[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1868|                     #    or
1869\\ [^\x80-\xff]           #   Escaped something (something != CR)
1870)* "  # closing quote
1871)                    # initial word
1872(?:  (?: [\040\t] |  \(
1873(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1874\)  )*  \.  (?: [\040\t] |  \(
1875(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1876\)  )*   (?:
1877[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1878(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1879|
1880" (?:                      # opening quote...
1881[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1882|                     #    or
1883\\ [^\x80-\xff]           #   Escaped something (something != CR)
1884)* "  # closing quote
1885)  )* # further okay, if led by a period
1886(?: [\040\t] |  \(
1887(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1888\)  )*  @  (?: [\040\t] |  \(
1889(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1890\)  )*    (?:
1891[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1892(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1893|   \[                         # [
1894(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1895\]                        #           ]
1896)                           # initial subdomain
1897(?:                                  #
1898(?: [\040\t] |  \(
1899(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1900\)  )*  \.                        # if led by a period...
1901(?: [\040\t] |  \(
1902(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1903\)  )*   (?:
1904[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1905(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1906|   \[                         # [
1907(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1908\]                        #           ]
1909)                     #   ...further okay
1910)*
1911# address
1912|                     #  or
1913(?:
1914[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1915(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1916|
1917" (?:                      # opening quote...
1918[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1919|                     #    or
1920\\ [^\x80-\xff]           #   Escaped something (something != CR)
1921)* "  # closing quote
1922)             # one word, optionally followed by....
1923(?:
1924[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
1925\(
1926(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1927\)       |  # comments, or...
1928
1929" (?:                      # opening quote...
1930[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1931|                     #    or
1932\\ [^\x80-\xff]           #   Escaped something (something != CR)
1933)* "  # closing quote
1934# quoted strings
1935)*
1936<  (?: [\040\t] |  \(
1937(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1938\)  )*                     # leading <
1939(?:  @  (?: [\040\t] |  \(
1940(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1941\)  )*    (?:
1942[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1943(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1944|   \[                         # [
1945(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1946\]                        #           ]
1947)                           # initial subdomain
1948(?:                                  #
1949(?: [\040\t] |  \(
1950(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1951\)  )*  \.                        # if led by a period...
1952(?: [\040\t] |  \(
1953(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1954\)  )*   (?:
1955[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1956(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1957|   \[                         # [
1958(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1959\]                        #           ]
1960)                     #   ...further okay
1961)*
1962
1963(?:  (?: [\040\t] |  \(
1964(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1965\)  )*  ,  (?: [\040\t] |  \(
1966(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1967\)  )*  @  (?: [\040\t] |  \(
1968(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1969\)  )*    (?:
1970[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1971(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1972|   \[                         # [
1973(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1974\]                        #           ]
1975)                           # initial subdomain
1976(?:                                  #
1977(?: [\040\t] |  \(
1978(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1979\)  )*  \.                        # if led by a period...
1980(?: [\040\t] |  \(
1981(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1982\)  )*   (?:
1983[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1984(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1985|   \[                         # [
1986(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1987\]                        #           ]
1988)                     #   ...further okay
1989)*
1990)* # further okay, if led by comma
1991:                                # closing colon
1992(?: [\040\t] |  \(
1993(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1994\)  )*  )? #       optional route
1995(?:
1996[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1997(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1998|
1999" (?:                      # opening quote...
2000[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
2001|                     #    or
2002\\ [^\x80-\xff]           #   Escaped something (something != CR)
2003)* "  # closing quote
2004)                    # initial word
2005(?:  (?: [\040\t] |  \(
2006(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2007\)  )*  \.  (?: [\040\t] |  \(
2008(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2009\)  )*   (?:
2010[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2011(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2012|
2013" (?:                      # opening quote...
2014[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
2015|                     #    or
2016\\ [^\x80-\xff]           #   Escaped something (something != CR)
2017)* "  # closing quote
2018)  )* # further okay, if led by a period
2019(?: [\040\t] |  \(
2020(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2021\)  )*  @  (?: [\040\t] |  \(
2022(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2023\)  )*    (?:
2024[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2025(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2026|   \[                         # [
2027(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
2028\]                        #           ]
2029)                           # initial subdomain
2030(?:                                  #
2031(?: [\040\t] |  \(
2032(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2033\)  )*  \.                        # if led by a period...
2034(?: [\040\t] |  \(
2035(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2036\)  )*   (?:
2037[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2038(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2039|   \[                         # [
2040(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
2041\]                        #           ]
2042)                     #   ...further okay
2043)*
2044#       address spec
2045(?: [\040\t] |  \(
2046(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2047\)  )*  > #                  trailing >
2048# name and address
2049)  (?: [\040\t] |  \(
2050(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2051\)  )*                       # optional trailing comment
2052/x
2053    Alan Other <user\@dom.ain>
2054 0: Alan Other <user@dom.ain>
2055    <user\@dom.ain>
2056 0: user@dom.ain
2057 1: user@dom
2058    user\@dom.ain
2059 0: user@dom.ain
2060 1: user@dom
2061    \"A. Other\" <user.1234\@dom.ain> (a comment)
2062 0: "A. Other" <user.1234@dom.ain> (a comment)
2063 1: "A. Other" <user.1234@dom.ain>
2064 2: "A. Other" <user.1234@dom.ain>
2065    A. Other <user.1234\@dom.ain> (a comment)
2066 0:  Other <user.1234@dom.ain> (a comment)
2067 1:  Other <user.1234@dom.ain>
2068 2:  Other <user.1234@dom.ain>
2069    \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
2070 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
2071 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
2072    A missing angle <user\@some.where
2073 0: user@some.where
2074 1: user@some
2075    *** Failers
2076No match
2077    The quick brown fox
2078No match
2079
2080/[\040\t]*                    # Nab whitespace.
2081(?:
2082\(                              #  (
2083[^\\\x80-\xff\n\015()] *                             #     normal*
2084(?:                                 #       (
2085(?:  \\ [^\x80-\xff]  |
2086\(                            #  (
2087[^\\\x80-\xff\n\015()] *                            #     normal*
2088(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2089\)                           #                       )
2090)    #         special
2091[^\\\x80-\xff\n\015()] *                         #         normal*
2092)*                                  #            )*
2093\)                             #                )
2094[\040\t]* )*    # If comment found, allow more spaces.
2095# optional leading comment
2096(?:
2097(?:
2098[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2099(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2100# Atom
2101|                       #  or
2102"                                     # "
2103[^\\\x80-\xff\n\015"] *                            #   normal
2104(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2105"                                     #        "
2106# Quoted string
2107)
2108[\040\t]*                    # Nab whitespace.
2109(?:
2110\(                              #  (
2111[^\\\x80-\xff\n\015()] *                             #     normal*
2112(?:                                 #       (
2113(?:  \\ [^\x80-\xff]  |
2114\(                            #  (
2115[^\\\x80-\xff\n\015()] *                            #     normal*
2116(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2117\)                           #                       )
2118)    #         special
2119[^\\\x80-\xff\n\015()] *                         #         normal*
2120)*                                  #            )*
2121\)                             #                )
2122[\040\t]* )*    # If comment found, allow more spaces.
2123(?:
2124\.
2125[\040\t]*                    # Nab whitespace.
2126(?:
2127\(                              #  (
2128[^\\\x80-\xff\n\015()] *                             #     normal*
2129(?:                                 #       (
2130(?:  \\ [^\x80-\xff]  |
2131\(                            #  (
2132[^\\\x80-\xff\n\015()] *                            #     normal*
2133(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2134\)                           #                       )
2135)    #         special
2136[^\\\x80-\xff\n\015()] *                         #         normal*
2137)*                                  #            )*
2138\)                             #                )
2139[\040\t]* )*    # If comment found, allow more spaces.
2140(?:
2141[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2142(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2143# Atom
2144|                       #  or
2145"                                     # "
2146[^\\\x80-\xff\n\015"] *                            #   normal
2147(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2148"                                     #        "
2149# Quoted string
2150)
2151[\040\t]*                    # Nab whitespace.
2152(?:
2153\(                              #  (
2154[^\\\x80-\xff\n\015()] *                             #     normal*
2155(?:                                 #       (
2156(?:  \\ [^\x80-\xff]  |
2157\(                            #  (
2158[^\\\x80-\xff\n\015()] *                            #     normal*
2159(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2160\)                           #                       )
2161)    #         special
2162[^\\\x80-\xff\n\015()] *                         #         normal*
2163)*                                  #            )*
2164\)                             #                )
2165[\040\t]* )*    # If comment found, allow more spaces.
2166# additional words
2167)*
2168@
2169[\040\t]*                    # Nab whitespace.
2170(?:
2171\(                              #  (
2172[^\\\x80-\xff\n\015()] *                             #     normal*
2173(?:                                 #       (
2174(?:  \\ [^\x80-\xff]  |
2175\(                            #  (
2176[^\\\x80-\xff\n\015()] *                            #     normal*
2177(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2178\)                           #                       )
2179)    #         special
2180[^\\\x80-\xff\n\015()] *                         #         normal*
2181)*                                  #            )*
2182\)                             #                )
2183[\040\t]* )*    # If comment found, allow more spaces.
2184(?:
2185[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2186(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2187|
2188\[                            # [
2189(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2190\]                           #           ]
2191)
2192[\040\t]*                    # Nab whitespace.
2193(?:
2194\(                              #  (
2195[^\\\x80-\xff\n\015()] *                             #     normal*
2196(?:                                 #       (
2197(?:  \\ [^\x80-\xff]  |
2198\(                            #  (
2199[^\\\x80-\xff\n\015()] *                            #     normal*
2200(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2201\)                           #                       )
2202)    #         special
2203[^\\\x80-\xff\n\015()] *                         #         normal*
2204)*                                  #            )*
2205\)                             #                )
2206[\040\t]* )*    # If comment found, allow more spaces.
2207# optional trailing comments
2208(?:
2209\.
2210[\040\t]*                    # Nab whitespace.
2211(?:
2212\(                              #  (
2213[^\\\x80-\xff\n\015()] *                             #     normal*
2214(?:                                 #       (
2215(?:  \\ [^\x80-\xff]  |
2216\(                            #  (
2217[^\\\x80-\xff\n\015()] *                            #     normal*
2218(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2219\)                           #                       )
2220)    #         special
2221[^\\\x80-\xff\n\015()] *                         #         normal*
2222)*                                  #            )*
2223\)                             #                )
2224[\040\t]* )*    # If comment found, allow more spaces.
2225(?:
2226[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2227(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2228|
2229\[                            # [
2230(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2231\]                           #           ]
2232)
2233[\040\t]*                    # Nab whitespace.
2234(?:
2235\(                              #  (
2236[^\\\x80-\xff\n\015()] *                             #     normal*
2237(?:                                 #       (
2238(?:  \\ [^\x80-\xff]  |
2239\(                            #  (
2240[^\\\x80-\xff\n\015()] *                            #     normal*
2241(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2242\)                           #                       )
2243)    #         special
2244[^\\\x80-\xff\n\015()] *                         #         normal*
2245)*                                  #            )*
2246\)                             #                )
2247[\040\t]* )*    # If comment found, allow more spaces.
2248# optional trailing comments
2249)*
2250# address
2251|                             #  or
2252(?:
2253[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2254(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2255# Atom
2256|                       #  or
2257"                                     # "
2258[^\\\x80-\xff\n\015"] *                            #   normal
2259(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2260"                                     #        "
2261# Quoted string
2262)
2263# leading word
2264[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *               # "normal" atoms and or spaces
2265(?:
2266(?:
2267\(                              #  (
2268[^\\\x80-\xff\n\015()] *                             #     normal*
2269(?:                                 #       (
2270(?:  \\ [^\x80-\xff]  |
2271\(                            #  (
2272[^\\\x80-\xff\n\015()] *                            #     normal*
2273(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2274\)                           #                       )
2275)    #         special
2276[^\\\x80-\xff\n\015()] *                         #         normal*
2277)*                                  #            )*
2278\)                             #                )
2279|
2280"                                     # "
2281[^\\\x80-\xff\n\015"] *                            #   normal
2282(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2283"                                     #        "
2284) # "special" comment or quoted string
2285[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *            #  more "normal"
2286)*
2287<
2288[\040\t]*                    # Nab whitespace.
2289(?:
2290\(                              #  (
2291[^\\\x80-\xff\n\015()] *                             #     normal*
2292(?:                                 #       (
2293(?:  \\ [^\x80-\xff]  |
2294\(                            #  (
2295[^\\\x80-\xff\n\015()] *                            #     normal*
2296(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2297\)                           #                       )
2298)    #         special
2299[^\\\x80-\xff\n\015()] *                         #         normal*
2300)*                                  #            )*
2301\)                             #                )
2302[\040\t]* )*    # If comment found, allow more spaces.
2303# <
2304(?:
2305@
2306[\040\t]*                    # Nab whitespace.
2307(?:
2308\(                              #  (
2309[^\\\x80-\xff\n\015()] *                             #     normal*
2310(?:                                 #       (
2311(?:  \\ [^\x80-\xff]  |
2312\(                            #  (
2313[^\\\x80-\xff\n\015()] *                            #     normal*
2314(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2315\)                           #                       )
2316)    #         special
2317[^\\\x80-\xff\n\015()] *                         #         normal*
2318)*                                  #            )*
2319\)                             #                )
2320[\040\t]* )*    # If comment found, allow more spaces.
2321(?:
2322[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2323(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2324|
2325\[                            # [
2326(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2327\]                           #           ]
2328)
2329[\040\t]*                    # Nab whitespace.
2330(?:
2331\(                              #  (
2332[^\\\x80-\xff\n\015()] *                             #     normal*
2333(?:                                 #       (
2334(?:  \\ [^\x80-\xff]  |
2335\(                            #  (
2336[^\\\x80-\xff\n\015()] *                            #     normal*
2337(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2338\)                           #                       )
2339)    #         special
2340[^\\\x80-\xff\n\015()] *                         #         normal*
2341)*                                  #            )*
2342\)                             #                )
2343[\040\t]* )*    # If comment found, allow more spaces.
2344# optional trailing comments
2345(?:
2346\.
2347[\040\t]*                    # Nab whitespace.
2348(?:
2349\(                              #  (
2350[^\\\x80-\xff\n\015()] *                             #     normal*
2351(?:                                 #       (
2352(?:  \\ [^\x80-\xff]  |
2353\(                            #  (
2354[^\\\x80-\xff\n\015()] *                            #     normal*
2355(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2356\)                           #                       )
2357)    #         special
2358[^\\\x80-\xff\n\015()] *                         #         normal*
2359)*                                  #            )*
2360\)                             #                )
2361[\040\t]* )*    # If comment found, allow more spaces.
2362(?:
2363[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2364(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2365|
2366\[                            # [
2367(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2368\]                           #           ]
2369)
2370[\040\t]*                    # Nab whitespace.
2371(?:
2372\(                              #  (
2373[^\\\x80-\xff\n\015()] *                             #     normal*
2374(?:                                 #       (
2375(?:  \\ [^\x80-\xff]  |
2376\(                            #  (
2377[^\\\x80-\xff\n\015()] *                            #     normal*
2378(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2379\)                           #                       )
2380)    #         special
2381[^\\\x80-\xff\n\015()] *                         #         normal*
2382)*                                  #            )*
2383\)                             #                )
2384[\040\t]* )*    # If comment found, allow more spaces.
2385# optional trailing comments
2386)*
2387(?: ,
2388[\040\t]*                    # Nab whitespace.
2389(?:
2390\(                              #  (
2391[^\\\x80-\xff\n\015()] *                             #     normal*
2392(?:                                 #       (
2393(?:  \\ [^\x80-\xff]  |
2394\(                            #  (
2395[^\\\x80-\xff\n\015()] *                            #     normal*
2396(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2397\)                           #                       )
2398)    #         special
2399[^\\\x80-\xff\n\015()] *                         #         normal*
2400)*                                  #            )*
2401\)                             #                )
2402[\040\t]* )*    # If comment found, allow more spaces.
2403@
2404[\040\t]*                    # Nab whitespace.
2405(?:
2406\(                              #  (
2407[^\\\x80-\xff\n\015()] *                             #     normal*
2408(?:                                 #       (
2409(?:  \\ [^\x80-\xff]  |
2410\(                            #  (
2411[^\\\x80-\xff\n\015()] *                            #     normal*
2412(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2413\)                           #                       )
2414)    #         special
2415[^\\\x80-\xff\n\015()] *                         #         normal*
2416)*                                  #            )*
2417\)                             #                )
2418[\040\t]* )*    # If comment found, allow more spaces.
2419(?:
2420[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2421(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2422|
2423\[                            # [
2424(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2425\]                           #           ]
2426)
2427[\040\t]*                    # Nab whitespace.
2428(?:
2429\(                              #  (
2430[^\\\x80-\xff\n\015()] *                             #     normal*
2431(?:                                 #       (
2432(?:  \\ [^\x80-\xff]  |
2433\(                            #  (
2434[^\\\x80-\xff\n\015()] *                            #     normal*
2435(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2436\)                           #                       )
2437)    #         special
2438[^\\\x80-\xff\n\015()] *                         #         normal*
2439)*                                  #            )*
2440\)                             #                )
2441[\040\t]* )*    # If comment found, allow more spaces.
2442# optional trailing comments
2443(?:
2444\.
2445[\040\t]*                    # Nab whitespace.
2446(?:
2447\(                              #  (
2448[^\\\x80-\xff\n\015()] *                             #     normal*
2449(?:                                 #       (
2450(?:  \\ [^\x80-\xff]  |
2451\(                            #  (
2452[^\\\x80-\xff\n\015()] *                            #     normal*
2453(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2454\)                           #                       )
2455)    #         special
2456[^\\\x80-\xff\n\015()] *                         #         normal*
2457)*                                  #            )*
2458\)                             #                )
2459[\040\t]* )*    # If comment found, allow more spaces.
2460(?:
2461[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2462(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2463|
2464\[                            # [
2465(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2466\]                           #           ]
2467)
2468[\040\t]*                    # Nab whitespace.
2469(?:
2470\(                              #  (
2471[^\\\x80-\xff\n\015()] *                             #     normal*
2472(?:                                 #       (
2473(?:  \\ [^\x80-\xff]  |
2474\(                            #  (
2475[^\\\x80-\xff\n\015()] *                            #     normal*
2476(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2477\)                           #                       )
2478)    #         special
2479[^\\\x80-\xff\n\015()] *                         #         normal*
2480)*                                  #            )*
2481\)                             #                )
2482[\040\t]* )*    # If comment found, allow more spaces.
2483# optional trailing comments
2484)*
2485)*  # additional domains
2486:
2487[\040\t]*                    # Nab whitespace.
2488(?:
2489\(                              #  (
2490[^\\\x80-\xff\n\015()] *                             #     normal*
2491(?:                                 #       (
2492(?:  \\ [^\x80-\xff]  |
2493\(                            #  (
2494[^\\\x80-\xff\n\015()] *                            #     normal*
2495(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2496\)                           #                       )
2497)    #         special
2498[^\\\x80-\xff\n\015()] *                         #         normal*
2499)*                                  #            )*
2500\)                             #                )
2501[\040\t]* )*    # If comment found, allow more spaces.
2502# optional trailing comments
2503)?     #       optional route
2504(?:
2505[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2506(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2507# Atom
2508|                       #  or
2509"                                     # "
2510[^\\\x80-\xff\n\015"] *                            #   normal
2511(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2512"                                     #        "
2513# Quoted string
2514)
2515[\040\t]*                    # Nab whitespace.
2516(?:
2517\(                              #  (
2518[^\\\x80-\xff\n\015()] *                             #     normal*
2519(?:                                 #       (
2520(?:  \\ [^\x80-\xff]  |
2521\(                            #  (
2522[^\\\x80-\xff\n\015()] *                            #     normal*
2523(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2524\)                           #                       )
2525)    #         special
2526[^\\\x80-\xff\n\015()] *                         #         normal*
2527)*                                  #            )*
2528\)                             #                )
2529[\040\t]* )*    # If comment found, allow more spaces.
2530(?:
2531\.
2532[\040\t]*                    # Nab whitespace.
2533(?:
2534\(                              #  (
2535[^\\\x80-\xff\n\015()] *                             #     normal*
2536(?:                                 #       (
2537(?:  \\ [^\x80-\xff]  |
2538\(                            #  (
2539[^\\\x80-\xff\n\015()] *                            #     normal*
2540(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2541\)                           #                       )
2542)    #         special
2543[^\\\x80-\xff\n\015()] *                         #         normal*
2544)*                                  #            )*
2545\)                             #                )
2546[\040\t]* )*    # If comment found, allow more spaces.
2547(?:
2548[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2549(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2550# Atom
2551|                       #  or
2552"                                     # "
2553[^\\\x80-\xff\n\015"] *                            #   normal
2554(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2555"                                     #        "
2556# Quoted string
2557)
2558[\040\t]*                    # Nab whitespace.
2559(?:
2560\(                              #  (
2561[^\\\x80-\xff\n\015()] *                             #     normal*
2562(?:                                 #       (
2563(?:  \\ [^\x80-\xff]  |
2564\(                            #  (
2565[^\\\x80-\xff\n\015()] *                            #     normal*
2566(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2567\)                           #                       )
2568)    #         special
2569[^\\\x80-\xff\n\015()] *                         #         normal*
2570)*                                  #            )*
2571\)                             #                )
2572[\040\t]* )*    # If comment found, allow more spaces.
2573# additional words
2574)*
2575@
2576[\040\t]*                    # Nab whitespace.
2577(?:
2578\(                              #  (
2579[^\\\x80-\xff\n\015()] *                             #     normal*
2580(?:                                 #       (
2581(?:  \\ [^\x80-\xff]  |
2582\(                            #  (
2583[^\\\x80-\xff\n\015()] *                            #     normal*
2584(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2585\)                           #                       )
2586)    #         special
2587[^\\\x80-\xff\n\015()] *                         #         normal*
2588)*                                  #            )*
2589\)                             #                )
2590[\040\t]* )*    # If comment found, allow more spaces.
2591(?:
2592[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2593(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2594|
2595\[                            # [
2596(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2597\]                           #           ]
2598)
2599[\040\t]*                    # Nab whitespace.
2600(?:
2601\(                              #  (
2602[^\\\x80-\xff\n\015()] *                             #     normal*
2603(?:                                 #       (
2604(?:  \\ [^\x80-\xff]  |
2605\(                            #  (
2606[^\\\x80-\xff\n\015()] *                            #     normal*
2607(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2608\)                           #                       )
2609)    #         special
2610[^\\\x80-\xff\n\015()] *                         #         normal*
2611)*                                  #            )*
2612\)                             #                )
2613[\040\t]* )*    # If comment found, allow more spaces.
2614# optional trailing comments
2615(?:
2616\.
2617[\040\t]*                    # Nab whitespace.
2618(?:
2619\(                              #  (
2620[^\\\x80-\xff\n\015()] *                             #     normal*
2621(?:                                 #       (
2622(?:  \\ [^\x80-\xff]  |
2623\(                            #  (
2624[^\\\x80-\xff\n\015()] *                            #     normal*
2625(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2626\)                           #                       )
2627)    #         special
2628[^\\\x80-\xff\n\015()] *                         #         normal*
2629)*                                  #            )*
2630\)                             #                )
2631[\040\t]* )*    # If comment found, allow more spaces.
2632(?:
2633[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2634(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2635|
2636\[                            # [
2637(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2638\]                           #           ]
2639)
2640[\040\t]*                    # Nab whitespace.
2641(?:
2642\(                              #  (
2643[^\\\x80-\xff\n\015()] *                             #     normal*
2644(?:                                 #       (
2645(?:  \\ [^\x80-\xff]  |
2646\(                            #  (
2647[^\\\x80-\xff\n\015()] *                            #     normal*
2648(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2649\)                           #                       )
2650)    #         special
2651[^\\\x80-\xff\n\015()] *                         #         normal*
2652)*                                  #            )*
2653\)                             #                )
2654[\040\t]* )*    # If comment found, allow more spaces.
2655# optional trailing comments
2656)*
2657#       address spec
2658>                    #                 >
2659# name and address
2660)
2661/x
2662    Alan Other <user\@dom.ain>
2663 0: Alan Other <user@dom.ain>
2664    <user\@dom.ain>
2665 0: user@dom.ain
2666 1: user@dom
2667    user\@dom.ain
2668 0: user@dom.ain
2669 1: user@dom
2670    \"A. Other\" <user.1234\@dom.ain> (a comment)
2671 0: "A. Other" <user.1234@dom.ain>
2672    A. Other <user.1234\@dom.ain> (a comment)
2673 0:  Other <user.1234@dom.ain>
2674    \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
2675 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
2676 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
2677    A missing angle <user\@some.where
2678 0: user@some.where
2679 1: user@some
2680    *** Failers
2681No match
2682    The quick brown fox
2683No match
2684
2685/abc\0def\00pqr\000xyz\0000AB/
2686    abc\0def\00pqr\000xyz\0000AB
2687 0: abc\x00def\x00pqr\x00xyz\x000AB
2688    abc456 abc\0def\00pqr\000xyz\0000ABCDE
2689 0: abc\x00def\x00pqr\x00xyz\x000AB
2690
2691/abc\x0def\x00pqr\x000xyz\x0000AB/
2692    abc\x0def\x00pqr\x000xyz\x0000AB
2693 0: abc\x0def\x00pqr\x000xyz\x0000AB
2694    abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
2695 0: abc\x0def\x00pqr\x000xyz\x0000AB
2696
2697/^[\000-\037]/
2698    \0A
2699 0: \x00
2700    \01B
2701 0: \x01
2702    \037C
2703 0: \x1f
2704
2705/\0*/
2706    \0\0\0\0
2707 0: \x00\x00\x00\x00
2708 1: \x00\x00\x00
2709 2: \x00\x00
2710 3: \x00
2711 4:
2712
2713/A\x0{2,3}Z/
2714    The A\x0\x0Z
2715 0: A\x00\x00Z
2716    An A\0\x0\0Z
2717 0: A\x00\x00\x00Z
2718    *** Failers
2719No match
2720    A\0Z
2721No match
2722    A\0\x0\0\x0Z
2723No match
2724
2725/^\s/
2726    \040abc
2727 0:
2728    \x0cabc
2729 0: \x0c
2730    \nabc
2731 0: \x0a
2732    \rabc
2733 0: \x0d
2734    \tabc
2735 0: \x09
2736    *** Failers
2737No match
2738    abc
2739No match
2740
2741/^a	b
2742      c/x
2743    abc
2744 0: abc
2745
2746/ab{1,3}bc/
2747    abbbbc
2748 0: abbbbc
2749    abbbc
2750 0: abbbc
2751    abbc
2752 0: abbc
2753    *** Failers
2754No match
2755    abc
2756No match
2757    abbbbbc
2758No match
2759
2760/([^.]*)\.([^:]*):[T ]+(.*)/
2761    track1.title:TBlah blah blah
2762 0: track1.title:TBlah blah blah
2763 1: track1.title:TBlah blah bla
2764 2: track1.title:TBlah blah bl
2765 3: track1.title:TBlah blah b
2766 4: track1.title:TBlah blah
2767 5: track1.title:TBlah blah
2768 6: track1.title:TBlah bla
2769 7: track1.title:TBlah bl
2770 8: track1.title:TBlah b
2771 9: track1.title:TBlah
277210: track1.title:TBlah
277311: track1.title:TBla
277412: track1.title:TBl
277513: track1.title:TB
277614: track1.title:T
2777
2778/([^.]*)\.([^:]*):[T ]+(.*)/i
2779    track1.title:TBlah blah blah
2780 0: track1.title:TBlah blah blah
2781 1: track1.title:TBlah blah bla
2782 2: track1.title:TBlah blah bl
2783 3: track1.title:TBlah blah b
2784 4: track1.title:TBlah blah
2785 5: track1.title:TBlah blah
2786 6: track1.title:TBlah bla
2787 7: track1.title:TBlah bl
2788 8: track1.title:TBlah b
2789 9: track1.title:TBlah
279010: track1.title:TBlah
279111: track1.title:TBla
279212: track1.title:TBl
279313: track1.title:TB
279414: track1.title:T
2795
2796/([^.]*)\.([^:]*):[t ]+(.*)/i
2797    track1.title:TBlah blah blah
2798 0: track1.title:TBlah blah blah
2799 1: track1.title:TBlah blah bla
2800 2: track1.title:TBlah blah bl
2801 3: track1.title:TBlah blah b
2802 4: track1.title:TBlah blah
2803 5: track1.title:TBlah blah
2804 6: track1.title:TBlah bla
2805 7: track1.title:TBlah bl
2806 8: track1.title:TBlah b
2807 9: track1.title:TBlah
280810: track1.title:TBlah
280911: track1.title:TBla
281012: track1.title:TBl
281113: track1.title:TB
281214: track1.title:T
2813
2814/^[W-c]+$/
2815    WXY_^abc
2816 0: WXY_^abc
2817    *** Failers
2818No match
2819    wxy
2820No match
2821
2822/^[W-c]+$/i
2823    WXY_^abc
2824 0: WXY_^abc
2825    wxy_^ABC
2826 0: wxy_^ABC
2827
2828/^[\x3f-\x5F]+$/i
2829    WXY_^abc
2830 0: WXY_^abc
2831    wxy_^ABC
2832 0: wxy_^ABC
2833
2834/^abc$/m
2835    abc
2836 0: abc
2837    qqq\nabc
2838 0: abc
2839    abc\nzzz
2840 0: abc
2841    qqq\nabc\nzzz
2842 0: abc
2843
2844/^abc$/
2845    abc
2846 0: abc
2847    *** Failers
2848No match
2849    qqq\nabc
2850No match
2851    abc\nzzz
2852No match
2853    qqq\nabc\nzzz
2854No match
2855
2856/\Aabc\Z/m
2857    abc
2858 0: abc
2859    abc\n
2860 0: abc
2861    *** Failers
2862No match
2863    qqq\nabc
2864No match
2865    abc\nzzz
2866No match
2867    qqq\nabc\nzzz
2868No match
2869
2870/\A(.)*\Z/s
2871    abc\ndef
2872 0: abc\x0adef
2873
2874/\A(.)*\Z/m
2875    *** Failers
2876 0: *** Failers
2877    abc\ndef
2878No match
2879
2880/(?:b)|(?::+)/
2881    b::c
2882 0: b
2883    c::b
2884 0: ::
2885 1: :
2886
2887/[-az]+/
2888    az-
2889 0: az-
2890 1: az
2891 2: a
2892    *** Failers
2893 0: a
2894    b
2895No match
2896
2897/[az-]+/
2898    za-
2899 0: za-
2900 1: za
2901 2: z
2902    *** Failers
2903 0: a
2904    b
2905No match
2906
2907/[a\-z]+/
2908    a-z
2909 0: a-z
2910 1: a-
2911 2: a
2912    *** Failers
2913 0: a
2914    b
2915No match
2916
2917/[a-z]+/
2918    abcdxyz
2919 0: abcdxyz
2920 1: abcdxy
2921 2: abcdx
2922 3: abcd
2923 4: abc
2924 5: ab
2925 6: a
2926
2927/[\d-]+/
2928    12-34
2929 0: 12-34
2930 1: 12-3
2931 2: 12-
2932 3: 12
2933 4: 1
2934    *** Failers
2935No match
2936    aaa
2937No match
2938
2939/[\d-z]+/
2940    12-34z
2941 0: 12-34z
2942 1: 12-34
2943 2: 12-3
2944 3: 12-
2945 4: 12
2946 5: 1
2947    *** Failers
2948No match
2949    aaa
2950No match
2951
2952/\x5c/
2953    \\
2954 0: \
2955
2956/\x20Z/
2957    the Zoo
2958 0:  Z
2959    *** Failers
2960No match
2961    Zulu
2962No match
2963
2964/ab{3cd/
2965    ab{3cd
2966 0: ab{3cd
2967
2968/ab{3,cd/
2969    ab{3,cd
2970 0: ab{3,cd
2971
2972/ab{3,4a}cd/
2973    ab{3,4a}cd
2974 0: ab{3,4a}cd
2975
2976/{4,5a}bc/
2977    {4,5a}bc
2978 0: {4,5a}bc
2979
2980/^a.b/<lf>
2981    a\rb
2982 0: a\x0db
2983    *** Failers
2984No match
2985    a\nb
2986No match
2987
2988/abc$/
2989    abc
2990 0: abc
2991    abc\n
2992 0: abc
2993    *** Failers
2994No match
2995    abc\ndef
2996No match
2997
2998/(abc)\123/
2999    abc\x53
3000 0: abcS
3001
3002/(abc)\223/
3003    abc\x93
3004 0: abc\x93
3005
3006/(abc)\323/
3007    abc\xd3
3008 0: abc\xd3
3009
3010/(abc)\100/
3011    abc\x40
3012 0: abc@
3013    abc\100
3014 0: abc@
3015
3016/(abc)\1000/
3017    abc\x400
3018 0: abc@0
3019    abc\x40\x30
3020 0: abc@0
3021    abc\1000
3022 0: abc@0
3023    abc\100\x30
3024 0: abc@0
3025    abc\100\060
3026 0: abc@0
3027    abc\100\60
3028 0: abc@0
3029
3030/abc\81/
3031    abc\081
3032 0: abc\x0081
3033    abc\0\x38\x31
3034 0: abc\x0081
3035
3036/abc\91/
3037    abc\091
3038 0: abc\x0091
3039    abc\0\x39\x31
3040 0: abc\x0091
3041
3042/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
3043    abcdefghijk\12S
3044 0: abcdefghijk\x0aS
3045
3046/ab\idef/
3047    abidef
3048 0: abidef
3049
3050/a{0}bc/
3051    bc
3052 0: bc
3053
3054/(a|(bc)){0,0}?xyz/
3055    xyz
3056 0: xyz
3057
3058/abc[\10]de/
3059    abc\010de
3060 0: abc\x08de
3061
3062/abc[\1]de/
3063    abc\1de
3064 0: abc\x01de
3065
3066/(abc)[\1]de/
3067    abc\1de
3068 0: abc\x01de
3069
3070/(?s)a.b/
3071    a\nb
3072 0: a\x0ab
3073
3074/^([^a])([^\b])([^c]*)([^d]{3,4})/
3075    baNOTccccd
3076 0: baNOTcccc
3077 1: baNOTccc
3078 2: baNOTcc
3079 3: baNOTc
3080 4: baNOT
3081    baNOTcccd
3082 0: baNOTccc
3083 1: baNOTcc
3084 2: baNOTc
3085 3: baNOT
3086    baNOTccd
3087 0: baNOTcc
3088 1: baNOTc
3089 2: baNOT
3090    bacccd
3091 0: baccc
3092    *** Failers
3093 0: *** Failers
3094 1: *** Failer
3095 2: *** Faile
3096 3: *** Fail
3097 4: *** Fai
3098 5: *** Fa
3099 6: *** F
3100    anything
3101No match
3102    b\bc
3103No match
3104    baccd
3105No match
3106
3107/[^a]/
3108    Abc
3109 0: A
3110
3111/[^a]/i
3112    Abc
3113 0: b
3114
3115/[^a]+/
3116    AAAaAbc
3117 0: AAA
3118 1: AA
3119 2: A
3120
3121/[^a]+/i
3122    AAAaAbc
3123 0: bc
3124 1: b
3125
3126/[^a]+/
3127    bbb\nccc
3128 0: bbb\x0accc
3129 1: bbb\x0acc
3130 2: bbb\x0ac
3131 3: bbb\x0a
3132 4: bbb
3133 5: bb
3134 6: b
3135
3136/[^k]$/
3137    abc
3138 0: c
3139    *** Failers
3140 0: s
3141    abk
3142No match
3143
3144/[^k]{2,3}$/
3145    abc
3146 0: abc
3147    kbc
3148 0: bc
3149    kabc
3150 0: abc
3151    *** Failers
3152 0: ers
3153    abk
3154No match
3155    akb
3156No match
3157    akk
3158No match
3159
3160/^\d{8,}\@.+[^k]$/
3161    12345678\@a.b.c.d
3162 0: 12345678@a.b.c.d
3163    123456789\@x.y.z
3164 0: 123456789@x.y.z
3165    *** Failers
3166No match
3167    12345678\@x.y.uk
3168No match
3169    1234567\@a.b.c.d
3170No match
3171
3172/[^a]/
3173    aaaabcd
3174 0: b
3175    aaAabcd
3176 0: A
3177
3178/[^a]/i
3179    aaaabcd
3180 0: b
3181    aaAabcd
3182 0: b
3183
3184/[^az]/
3185    aaaabcd
3186 0: b
3187    aaAabcd
3188 0: A
3189
3190/[^az]/i
3191    aaaabcd
3192 0: b
3193    aaAabcd
3194 0: b
3195
3196/\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/
3197 \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
3198 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
3199
3200/P[^*]TAIRE[^*]{1,6}?LL/
3201    xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
3202 0: PSTAIREISLL
3203
3204/P[^*]TAIRE[^*]{1,}?LL/
3205    xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
3206 0: PSTAIREISLL
3207
3208/(\.\d\d[1-9]?)\d+/
3209    1.230003938
3210 0: .230003938
3211 1: .23000393
3212 2: .2300039
3213 3: .230003
3214 4: .23000
3215 5: .2300
3216 6: .230
3217    1.875000282
3218 0: .875000282
3219 1: .87500028
3220 2: .8750002
3221 3: .875000
3222 4: .87500
3223 5: .8750
3224 6: .875
3225    1.235
3226 0: .235
3227
3228/(\.\d\d((?=0)|\d(?=\d)))/
3229    1.230003938
3230 0: .230
3231 1: .23
3232    1.875000282
3233 0: .875
3234    *** Failers
3235No match
3236    1.235
3237No match
3238
3239/a(?)b/
3240    ab
3241 0: ab
3242
3243/\b(foo)\s+(\w+)/i
3244    Food is on the foo table
3245 0: foo table
3246 1: foo tabl
3247 2: foo tab
3248 3: foo ta
3249 4: foo t
3250
3251/foo(.*)bar/
3252    The food is under the bar in the barn.
3253 0: food is under the bar in the bar
3254 1: food is under the bar
3255
3256/foo(.*?)bar/
3257    The food is under the bar in the barn.
3258 0: food is under the bar in the bar
3259 1: food is under the bar
3260
3261/(.*)(\d*)/
3262    I have 2 numbers: 53147
3263Matched, but too many subsidiary matches
3264 0: I have 2 numbers: 53147
3265 1: I have 2 numbers: 5314
3266 2: I have 2 numbers: 531
3267 3: I have 2 numbers: 53
3268 4: I have 2 numbers: 5
3269 5: I have 2 numbers:
3270 6: I have 2 numbers:
3271 7: I have 2 numbers
3272 8: I have 2 number
3273 9: I have 2 numbe
327410: I have 2 numb
327511: I have 2 num
327612: I have 2 nu
327713: I have 2 n
327814: I have 2
327915: I have 2
328016: I have
328117: I have
328218: I hav
328319: I ha
328420: I h
328521: I
3286
3287/(.*)(\d+)/
3288    I have 2 numbers: 53147
3289 0: I have 2 numbers: 53147
3290 1: I have 2 numbers: 5314
3291 2: I have 2 numbers: 531
3292 3: I have 2 numbers: 53
3293 4: I have 2 numbers: 5
3294 5: I have 2
3295
3296/(.*?)(\d*)/
3297    I have 2 numbers: 53147
3298Matched, but too many subsidiary matches
3299 0: I have 2 numbers: 53147
3300 1: I have 2 numbers: 5314
3301 2: I have 2 numbers: 531
3302 3: I have 2 numbers: 53
3303 4: I have 2 numbers: 5
3304 5: I have 2 numbers:
3305 6: I have 2 numbers:
3306 7: I have 2 numbers
3307 8: I have 2 number
3308 9: I have 2 numbe
330910: I have 2 numb
331011: I have 2 num
331112: I have 2 nu
331213: I have 2 n
331314: I have 2
331415: I have 2
331516: I have
331617: I have
331718: I hav
331819: I ha
331920: I h
332021: I
3321
3322/(.*?)(\d+)/
3323    I have 2 numbers: 53147
3324 0: I have 2 numbers: 53147
3325 1: I have 2 numbers: 5314
3326 2: I have 2 numbers: 531
3327 3: I have 2 numbers: 53
3328 4: I have 2 numbers: 5
3329 5: I have 2
3330
3331/(.*)(\d+)$/
3332    I have 2 numbers: 53147
3333 0: I have 2 numbers: 53147
3334
3335/(.*?)(\d+)$/
3336    I have 2 numbers: 53147
3337 0: I have 2 numbers: 53147
3338
3339/(.*)\b(\d+)$/
3340    I have 2 numbers: 53147
3341 0: I have 2 numbers: 53147
3342
3343/(.*\D)(\d+)$/
3344    I have 2 numbers: 53147
3345 0: I have 2 numbers: 53147
3346
3347/^\D*(?!123)/
3348    ABC123
3349 0: AB
3350 1: A
3351 2:
3352
3353/^(\D*)(?=\d)(?!123)/
3354    ABC445
3355 0: ABC
3356    *** Failers
3357No match
3358    ABC123
3359No match
3360
3361/^[W-]46]/
3362    W46]789
3363 0: W46]
3364    -46]789
3365 0: -46]
3366    *** Failers
3367No match
3368    Wall
3369No match
3370    Zebra
3371No match
3372    42
3373No match
3374    [abcd]
3375No match
3376    ]abcd[
3377No match
3378
3379/^[W-\]46]/
3380    W46]789
3381 0: W
3382    Wall
3383 0: W
3384    Zebra
3385 0: Z
3386    Xylophone
3387 0: X
3388    42
3389 0: 4
3390    [abcd]
3391 0: [
3392    ]abcd[
3393 0: ]
3394    \\backslash
3395 0: \
3396    *** Failers
3397No match
3398    -46]789
3399No match
3400    well
3401No match
3402
3403/\d\d\/\d\d\/\d\d\d\d/
3404    01/01/2000
3405 0: 01/01/2000
3406
3407/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
3408  word cat dog elephant mussel cow horse canary baboon snake shark otherword
3409 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
3410  word cat dog elephant mussel cow horse canary baboon snake shark
3411No match
3412
3413/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
3414  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
3415No match
3416
3417/^(a){0,0}/
3418    bcd
3419 0:
3420    abc
3421 0:
3422    aab
3423 0:
3424
3425/^(a){0,1}/
3426    bcd
3427 0:
3428    abc
3429 0: a
3430 1:
3431    aab
3432 0: a
3433 1:
3434
3435/^(a){0,2}/
3436    bcd
3437 0:
3438    abc
3439 0: a
3440 1:
3441    aab
3442 0: aa
3443 1: a
3444 2:
3445
3446/^(a){0,3}/
3447    bcd
3448 0:
3449    abc
3450 0: a
3451 1:
3452    aab
3453 0: aa
3454 1: a
3455 2:
3456    aaa
3457 0: aaa
3458 1: aa
3459 2: a
3460 3:
3461
3462/^(a){0,}/
3463    bcd
3464 0:
3465    abc
3466 0: a
3467 1:
3468    aab
3469 0: aa
3470 1: a
3471 2:
3472    aaa
3473 0: aaa
3474 1: aa
3475 2: a
3476 3:
3477    aaaaaaaa
3478 0: aaaaaaaa
3479 1: aaaaaaa
3480 2: aaaaaa
3481 3: aaaaa
3482 4: aaaa
3483 5: aaa
3484 6: aa
3485 7: a
3486 8:
3487
3488/^(a){1,1}/
3489    bcd
3490No match
3491    abc
3492 0: a
3493    aab
3494 0: a
3495
3496/^(a){1,2}/
3497    bcd
3498No match
3499    abc
3500 0: a
3501    aab
3502 0: aa
3503 1: a
3504
3505/^(a){1,3}/
3506    bcd
3507No match
3508    abc
3509 0: a
3510    aab
3511 0: aa
3512 1: a
3513    aaa
3514 0: aaa
3515 1: aa
3516 2: a
3517
3518/^(a){1,}/
3519    bcd
3520No match
3521    abc
3522 0: a
3523    aab
3524 0: aa
3525 1: a
3526    aaa
3527 0: aaa
3528 1: aa
3529 2: a
3530    aaaaaaaa
3531 0: aaaaaaaa
3532 1: aaaaaaa
3533 2: aaaaaa
3534 3: aaaaa
3535 4: aaaa
3536 5: aaa
3537 6: aa
3538 7: a
3539
3540/.*\.gif/
3541    borfle\nbib.gif\nno
3542 0: bib.gif
3543
3544/.{0,}\.gif/
3545    borfle\nbib.gif\nno
3546 0: bib.gif
3547
3548/.*\.gif/m
3549    borfle\nbib.gif\nno
3550 0: bib.gif
3551
3552/.*\.gif/s
3553    borfle\nbib.gif\nno
3554 0: borfle\x0abib.gif
3555
3556/.*\.gif/ms
3557    borfle\nbib.gif\nno
3558 0: borfle\x0abib.gif
3559
3560/.*$/
3561    borfle\nbib.gif\nno
3562 0: no
3563
3564/.*$/m
3565    borfle\nbib.gif\nno
3566 0: borfle
3567
3568/.*$/s
3569    borfle\nbib.gif\nno
3570 0: borfle\x0abib.gif\x0ano
3571
3572/.*$/ms
3573    borfle\nbib.gif\nno
3574 0: borfle\x0abib.gif\x0ano
3575 1: borfle\x0abib.gif
3576 2: borfle
3577
3578/.*$/
3579    borfle\nbib.gif\nno\n
3580 0: no
3581
3582/.*$/m
3583    borfle\nbib.gif\nno\n
3584 0: borfle
3585
3586/.*$/s
3587    borfle\nbib.gif\nno\n
3588 0: borfle\x0abib.gif\x0ano\x0a
3589 1: borfle\x0abib.gif\x0ano
3590
3591/.*$/ms
3592    borfle\nbib.gif\nno\n
3593 0: borfle\x0abib.gif\x0ano\x0a
3594 1: borfle\x0abib.gif\x0ano
3595 2: borfle\x0abib.gif
3596 3: borfle
3597
3598/(.*X|^B)/
3599    abcde\n1234Xyz
3600 0: 1234X
3601    BarFoo
3602 0: B
3603    *** Failers
3604No match
3605    abcde\nBar
3606No match
3607
3608/(.*X|^B)/m
3609    abcde\n1234Xyz
3610 0: 1234X
3611    BarFoo
3612 0: B
3613    abcde\nBar
3614 0: B
3615
3616/(.*X|^B)/s
3617    abcde\n1234Xyz
3618 0: abcde\x0a1234X
3619    BarFoo
3620 0: B
3621    *** Failers
3622No match
3623    abcde\nBar
3624No match
3625
3626/(.*X|^B)/ms
3627    abcde\n1234Xyz
3628 0: abcde\x0a1234X
3629    BarFoo
3630 0: B
3631    abcde\nBar
3632 0: B
3633
3634/(?s)(.*X|^B)/
3635    abcde\n1234Xyz
3636 0: abcde\x0a1234X
3637    BarFoo
3638 0: B
3639    *** Failers
3640No match
3641    abcde\nBar
3642No match
3643
3644/(?s:.*X|^B)/
3645    abcde\n1234Xyz
3646 0: abcde\x0a1234X
3647    BarFoo
3648 0: B
3649    *** Failers
3650No match
3651    abcde\nBar
3652No match
3653
3654/^.*B/
3655    **** Failers
3656No match
3657    abc\nB
3658No match
3659
3660/(?s)^.*B/
3661    abc\nB
3662 0: abc\x0aB
3663
3664/(?m)^.*B/
3665    abc\nB
3666 0: B
3667
3668/(?ms)^.*B/
3669    abc\nB
3670 0: abc\x0aB
3671
3672/(?ms)^B/
3673    abc\nB
3674 0: B
3675
3676/(?s)B$/
3677    B\n
3678 0: B
3679
3680/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
3681    123456654321
3682 0: 123456654321
3683
3684/^\d\d\d\d\d\d\d\d\d\d\d\d/
3685    123456654321
3686 0: 123456654321
3687
3688/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
3689    123456654321
3690 0: 123456654321
3691
3692/^[abc]{12}/
3693    abcabcabcabc
3694 0: abcabcabcabc
3695
3696/^[a-c]{12}/
3697    abcabcabcabc
3698 0: abcabcabcabc
3699
3700/^(a|b|c){12}/
3701    abcabcabcabc
3702 0: abcabcabcabc
3703
3704/^[abcdefghijklmnopqrstuvwxy0123456789]/
3705    n
3706 0: n
3707    *** Failers
3708No match
3709    z
3710No match
3711
3712/abcde{0,0}/
3713    abcd
3714 0: abcd
3715    *** Failers
3716No match
3717    abce
3718No match
3719
3720/ab[cd]{0,0}e/
3721    abe
3722 0: abe
3723    *** Failers
3724No match
3725    abcde
3726No match
3727
3728/ab(c){0,0}d/
3729    abd
3730 0: abd
3731    *** Failers
3732No match
3733    abcd
3734No match
3735
3736/a(b*)/
3737    a
3738 0: a
3739    ab
3740 0: ab
3741 1: a
3742    abbbb
3743 0: abbbb
3744 1: abbb
3745 2: abb
3746 3: ab
3747 4: a
3748    *** Failers
3749 0: a
3750    bbbbb
3751No match
3752
3753/ab\d{0}e/
3754    abe
3755 0: abe
3756    *** Failers
3757No match
3758    ab1e
3759No match
3760
3761/"([^\\"]+|\\.)*"/
3762    the \"quick\" brown fox
3763 0: "quick"
3764    \"the \\\"quick\\\" brown fox\"
3765 0: "the \"quick\" brown fox"
3766
3767/.*?/g+
3768    abc
3769 0: abc
3770 0+
3771 1: ab
3772 2: a
3773 3:
3774 0:
3775 0+
3776
3777/\b/g+
3778    abc
3779 0:
3780 0+ abc
3781 0:
3782 0+
3783
3784/\b/+g
3785    abc
3786 0:
3787 0+ abc
3788 0:
3789 0+
3790
3791//g
3792    abc
3793 0:
3794 0:
3795 0:
3796 0:
3797
3798/<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
3799  <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>
3800 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>
3801
3802/a[^a]b/
3803    acb
3804 0: acb
3805    a\nb
3806 0: a\x0ab
3807
3808/a.b/
3809    acb
3810 0: acb
3811    *** Failers
3812No match
3813    a\nb
3814No match
3815
3816/a[^a]b/s
3817    acb
3818 0: acb
3819    a\nb
3820 0: a\x0ab
3821
3822/a.b/s
3823    acb
3824 0: acb
3825    a\nb
3826 0: a\x0ab
3827
3828/^(b+?|a){1,2}?c/
3829    bac
3830 0: bac
3831    bbac
3832 0: bbac
3833    bbbac
3834 0: bbbac
3835    bbbbac
3836 0: bbbbac
3837    bbbbbac
3838 0: bbbbbac
3839
3840/^(b+|a){1,2}?c/
3841    bac
3842 0: bac
3843    bbac
3844 0: bbac
3845    bbbac
3846 0: bbbac
3847    bbbbac
3848 0: bbbbac
3849    bbbbbac
3850 0: bbbbbac
3851
3852/(?!\A)x/m
3853    x\nb\n
3854No match
3855    a\bx\n
3856 0: x
3857
3858/\x0{ab}/
3859    \0{ab}
3860 0: \x00{ab}
3861
3862/(A|B)*?CD/
3863    CD
3864 0: CD
3865
3866/(A|B)*CD/
3867    CD
3868 0: CD
3869
3870/(?<!bar)foo/
3871    foo
3872 0: foo
3873    catfood
3874 0: foo
3875    arfootle
3876 0: foo
3877    rfoosh
3878 0: foo
3879    *** Failers
3880No match
3881    barfoo
3882No match
3883    towbarfoo
3884No match
3885
3886/\w{3}(?<!bar)foo/
3887    catfood
3888 0: catfoo
3889    *** Failers
3890No match
3891    foo
3892No match
3893    barfoo
3894No match
3895    towbarfoo
3896No match
3897
3898/(?<=(foo)a)bar/
3899    fooabar
3900 0: bar
3901    *** Failers
3902No match
3903    bar
3904No match
3905    foobbar
3906No match
3907
3908/\Aabc\z/m
3909    abc
3910 0: abc
3911    *** Failers
3912No match
3913    abc\n
3914No match
3915    qqq\nabc
3916No match
3917    abc\nzzz
3918No match
3919    qqq\nabc\nzzz
3920No match
3921
3922"(?>.*/)foo"
3923    /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
3924No match
3925
3926"(?>.*/)foo"
3927    /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
3928 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
3929
3930/(?>(\.\d\d[1-9]?))\d+/
3931    1.230003938
3932 0: .230003938
3933 1: .23000393
3934 2: .2300039
3935 3: .230003
3936 4: .23000
3937 5: .2300
3938 6: .230
3939    1.875000282
3940 0: .875000282
3941 1: .87500028
3942 2: .8750002
3943 3: .875000
3944 4: .87500
3945 5: .8750
3946    *** Failers
3947No match
3948    1.235
3949No match
3950
3951/^((?>\w+)|(?>\s+))*$/
3952    now is the time for all good men to come to the aid of the party
3953 0: now is the time for all good men to come to the aid of the party
3954    *** Failers
3955No match
3956    this is not a line with only words and spaces!
3957No match
3958
3959/(\d+)(\w)/
3960    12345a
3961 0: 12345a
3962 1: 12345
3963 2: 1234
3964 3: 123
3965 4: 12
3966    12345+
3967 0: 12345
3968 1: 1234
3969 2: 123
3970 3: 12
3971
3972/((?>\d+))(\w)/
3973    12345a
3974 0: 12345a
3975    *** Failers
3976No match
3977    12345+
3978No match
3979
3980/(?>a+)b/
3981    aaab
3982 0: aaab
3983
3984/((?>a+)b)/
3985    aaab
3986 0: aaab
3987
3988/(?>(a+))b/
3989    aaab
3990 0: aaab
3991
3992/(?>b)+/
3993    aaabbbccc
3994 0: bbb
3995 1: bb
3996 2: b
3997
3998/(?>a+|b+|c+)*c/
3999    aaabbbbccccd
4000 0: aaabbbbcccc
4001 1: aaabbbbc
4002
4003/(a+|b+|c+)*c/
4004    aaabbbbccccd
4005 0: aaabbbbcccc
4006 1: aaabbbbccc
4007 2: aaabbbbcc
4008 3: aaabbbbc
4009
4010/((?>[^()]+)|\([^()]*\))+/
4011    ((abc(ade)ufh()()x
4012 0: abc(ade)ufh()()x
4013 1: abc(ade)ufh()()
4014 2: abc(ade)ufh()
4015 3: abc(ade)ufh
4016 4: abc(ade)
4017 5: abc
4018
4019/\(((?>[^()]+)|\([^()]+\))+\)/
4020    (abc)
4021 0: (abc)
4022    (abc(def)xyz)
4023 0: (abc(def)xyz)
4024    *** Failers
4025No match
4026    ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4027No match
4028
4029/a(?-i)b/i
4030    ab
4031 0: ab
4032    Ab
4033 0: Ab
4034    *** Failers
4035No match
4036    aB
4037No match
4038    AB
4039No match
4040
4041/(a (?x)b c)d e/
4042    a bcd e
4043 0: a bcd e
4044    *** Failers
4045No match
4046    a b cd e
4047No match
4048    abcd e
4049No match
4050    a bcde
4051No match
4052
4053/(a b(?x)c d (?-x)e f)/
4054    a bcde f
4055 0: a bcde f
4056    *** Failers
4057No match
4058    abcdef
4059No match
4060
4061/(a(?i)b)c/
4062    abc
4063 0: abc
4064    aBc
4065 0: aBc
4066    *** Failers
4067No match
4068    abC
4069No match
4070    aBC
4071No match
4072    Abc
4073No match
4074    ABc
4075No match
4076    ABC
4077No match
4078    AbC
4079No match
4080
4081/a(?i:b)c/
4082    abc
4083 0: abc
4084    aBc
4085 0: aBc
4086    *** Failers
4087No match
4088    ABC
4089No match
4090    abC
4091No match
4092    aBC
4093No match
4094
4095/a(?i:b)*c/
4096    aBc
4097 0: aBc
4098    aBBc
4099 0: aBBc
4100    *** Failers
4101No match
4102    aBC
4103No match
4104    aBBC
4105No match
4106
4107/a(?=b(?i)c)\w\wd/
4108    abcd
4109 0: abcd
4110    abCd
4111 0: abCd
4112    *** Failers
4113No match
4114    aBCd
4115No match
4116    abcD
4117No match
4118
4119/(?s-i:more.*than).*million/i
4120    more than million
4121 0: more than million
4122    more than MILLION
4123 0: more than MILLION
4124    more \n than Million
4125 0: more \x0a than Million
4126    *** Failers
4127No match
4128    MORE THAN MILLION
4129No match
4130    more \n than \n million
4131No match
4132
4133/(?:(?s-i)more.*than).*million/i
4134    more than million
4135 0: more than million
4136    more than MILLION
4137 0: more than MILLION
4138    more \n than Million
4139 0: more \x0a than Million
4140    *** Failers
4141No match
4142    MORE THAN MILLION
4143No match
4144    more \n than \n million
4145No match
4146
4147/(?>a(?i)b+)+c/
4148    abc
4149 0: abc
4150    aBbc
4151 0: aBbc
4152    aBBc
4153 0: aBBc
4154    *** Failers
4155No match
4156    Abc
4157No match
4158    abAb
4159No match
4160    abbC
4161No match
4162
4163/(?=a(?i)b)\w\wc/
4164    abc
4165 0: abc
4166    aBc
4167 0: aBc
4168    *** Failers
4169No match
4170    Ab
4171No match
4172    abC
4173No match
4174    aBC
4175No match
4176
4177/(?<=a(?i)b)(\w\w)c/
4178    abxxc
4179 0: xxc
4180    aBxxc
4181 0: xxc
4182    *** Failers
4183No match
4184    Abxxc
4185No match
4186    ABxxc
4187No match
4188    abxxC
4189No match
4190
4191/^(?(?=abc)\w{3}:|\d\d)$/
4192    abc:
4193 0: abc:
4194    12
4195 0: 12
4196    *** Failers
4197No match
4198    123
4199No match
4200    xyz
4201No match
4202
4203/^(?(?!abc)\d\d|\w{3}:)$/
4204    abc:
4205 0: abc:
4206    12
4207 0: 12
4208    *** Failers
4209No match
4210    123
4211No match
4212    xyz
4213No match
4214
4215/(?(?<=foo)bar|cat)/
4216    foobar
4217 0: bar
4218    cat
4219 0: cat
4220    fcat
4221 0: cat
4222    focat
4223 0: cat
4224    *** Failers
4225No match
4226    foocat
4227No match
4228
4229/(?(?<!foo)cat|bar)/
4230    foobar
4231 0: bar
4232    cat
4233 0: cat
4234    fcat
4235 0: cat
4236    focat
4237 0: cat
4238    *** Failers
4239No match
4240    foocat
4241No match
4242
4243/(?>a*)*/
4244    a
4245 0: a
4246 1:
4247    aa
4248 0: aa
4249 1:
4250    aaaa
4251 0: aaaa
4252 1:
4253
4254/(abc|)+/
4255    abc
4256 0: abc
4257 1:
4258    abcabc
4259 0: abcabc
4260 1: abc
4261 2:
4262    abcabcabc
4263 0: abcabcabc
4264 1: abcabc
4265 2: abc
4266 3:
4267    xyz
4268 0:
4269
4270/([a]*)*/
4271    a
4272 0: a
4273 1:
4274    aaaaa
4275 0: aaaaa
4276 1: aaaa
4277 2: aaa
4278 3: aa
4279 4: a
4280 5:
4281
4282/([ab]*)*/
4283    a
4284 0: a
4285 1:
4286    b
4287 0: b
4288 1:
4289    ababab
4290 0: ababab
4291 1: ababa
4292 2: abab
4293 3: aba
4294 4: ab
4295 5: a
4296 6:
4297    aaaabcde
4298 0: aaaab
4299 1: aaaa
4300 2: aaa
4301 3: aa
4302 4: a
4303 5:
4304    bbbb
4305 0: bbbb
4306 1: bbb
4307 2: bb
4308 3: b
4309 4:
4310
4311/([^a]*)*/
4312    b
4313 0: b
4314 1:
4315    bbbb
4316 0: bbbb
4317 1: bbb
4318 2: bb
4319 3: b
4320 4:
4321    aaa
4322 0:
4323
4324/([^ab]*)*/
4325    cccc
4326 0: cccc
4327 1: ccc
4328 2: cc
4329 3: c
4330 4:
4331    abab
4332 0:
4333
4334/([a]*?)*/
4335    a
4336 0: a
4337 1:
4338    aaaa
4339 0: aaaa
4340 1: aaa
4341 2: aa
4342 3: a
4343 4:
4344
4345/([ab]*?)*/
4346    a
4347 0: a
4348 1:
4349    b
4350 0: b
4351 1:
4352    abab
4353 0: abab
4354 1: aba
4355 2: ab
4356 3: a
4357 4:
4358    baba
4359 0: baba
4360 1: bab
4361 2: ba
4362 3: b
4363 4:
4364
4365/([^a]*?)*/
4366    b
4367 0: b
4368 1:
4369    bbbb
4370 0: bbbb
4371 1: bbb
4372 2: bb
4373 3: b
4374 4:
4375    aaa
4376 0:
4377
4378/([^ab]*?)*/
4379    c
4380 0: c
4381 1:
4382    cccc
4383 0: cccc
4384 1: ccc
4385 2: cc
4386 3: c
4387 4:
4388    baba
4389 0:
4390
4391/(?>a*)*/
4392    a
4393 0: a
4394 1:
4395    aaabcde
4396 0: aaa
4397 1:
4398
4399/((?>a*))*/
4400    aaaaa
4401 0: aaaaa
4402 1:
4403    aabbaa
4404 0: aa
4405 1:
4406
4407/((?>a*?))*/
4408    aaaaa
4409 0: aaaaa
4410 1:
4411    aabbaa
4412 0: aa
4413 1:
4414
4415/(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /x
4416    12-sep-98
4417 0: 12-sep-98
4418    12-09-98
4419 0: 12-09-98
4420    *** Failers
4421No match
4422    sep-12-98
4423No match
4424
4425/(?i:saturday|sunday)/
4426    saturday
4427 0: saturday
4428    sunday
4429 0: sunday
4430    Saturday
4431 0: Saturday
4432    Sunday
4433 0: Sunday
4434    SATURDAY
4435 0: SATURDAY
4436    SUNDAY
4437 0: SUNDAY
4438    SunDay
4439 0: SunDay
4440
4441/(a(?i)bc|BB)x/
4442    abcx
4443 0: abcx
4444    aBCx
4445 0: aBCx
4446    bbx
4447 0: bbx
4448    BBx
4449 0: BBx
4450    *** Failers
4451No match
4452    abcX
4453No match
4454    aBCX
4455No match
4456    bbX
4457No match
4458    BBX
4459No match
4460
4461/^([ab](?i)[cd]|[ef])/
4462    ac
4463 0: ac
4464    aC
4465 0: aC
4466    bD
4467 0: bD
4468    elephant
4469 0: e
4470    Europe
4471 0: E
4472    frog
4473 0: f
4474    France
4475 0: F
4476    *** Failers
4477No match
4478    Africa
4479No match
4480
4481/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
4482    ab
4483 0: ab
4484    aBd
4485 0: aBd
4486    xy
4487 0: xy
4488    xY
4489 0: xY
4490    zebra
4491 0: z
4492    Zambesi
4493 0: Z
4494    *** Failers
4495No match
4496    aCD
4497No match
4498    XY
4499No match
4500
4501/(?<=foo\n)^bar/m
4502    foo\nbar
4503 0: bar
4504    *** Failers
4505No match
4506    bar
4507No match
4508    baz\nbar
4509No match
4510
4511/(?<=(?<!foo)bar)baz/
4512    barbaz
4513 0: baz
4514    barbarbaz
4515 0: baz
4516    koobarbaz
4517 0: baz
4518    *** Failers
4519No match
4520    baz
4521No match
4522    foobarbaz
4523No match
4524
4525/The following tests are taken from the Perl 5.005 test suite; some of them/
4526/are compatible with 5.004, but I'd rather not have to sort them out./
4527No match
4528
4529/abc/
4530    abc
4531 0: abc
4532    xabcy
4533 0: abc
4534    ababc
4535 0: abc
4536    *** Failers
4537No match
4538    xbc
4539No match
4540    axc
4541No match
4542    abx
4543No match
4544
4545/ab*c/
4546    abc
4547 0: abc
4548
4549/ab*bc/
4550    abc
4551 0: abc
4552    abbc
4553 0: abbc
4554    abbbbc
4555 0: abbbbc
4556
4557/.{1}/
4558    abbbbc
4559 0: a
4560
4561/.{3,4}/
4562    abbbbc
4563 0: abbb
4564 1: abb
4565
4566/ab{0,}bc/
4567    abbbbc
4568 0: abbbbc
4569
4570/ab+bc/
4571    abbc
4572 0: abbc
4573    *** Failers
4574No match
4575    abc
4576No match
4577    abq
4578No match
4579
4580/ab+bc/
4581    abbbbc
4582 0: abbbbc
4583
4584/ab{1,}bc/
4585    abbbbc
4586 0: abbbbc
4587
4588/ab{1,3}bc/
4589    abbbbc
4590 0: abbbbc
4591
4592/ab{3,4}bc/
4593    abbbbc
4594 0: abbbbc
4595
4596/ab{4,5}bc/
4597    *** Failers
4598No match
4599    abq
4600No match
4601    abbbbc
4602No match
4603
4604/ab?bc/
4605    abbc
4606 0: abbc
4607    abc
4608 0: abc
4609
4610/ab{0,1}bc/
4611    abc
4612 0: abc
4613
4614/ab?bc/
4615
4616/ab?c/
4617    abc
4618 0: abc
4619
4620/ab{0,1}c/
4621    abc
4622 0: abc
4623
4624/^abc$/
4625    abc
4626 0: abc
4627    *** Failers
4628No match
4629    abbbbc
4630No match
4631    abcc
4632No match
4633
4634/^abc/
4635    abcc
4636 0: abc
4637
4638/^abc$/
4639
4640/abc$/
4641    aabc
4642 0: abc
4643    *** Failers
4644No match
4645    aabc
4646 0: abc
4647    aabcd
4648No match
4649
4650/^/
4651    abc
4652 0:
4653
4654/$/
4655    abc
4656 0:
4657
4658/a.c/
4659    abc
4660 0: abc
4661    axc
4662 0: axc
4663
4664/a.*c/
4665    axyzc
4666 0: axyzc
4667
4668/a[bc]d/
4669    abd
4670 0: abd
4671    *** Failers
4672No match
4673    axyzd
4674No match
4675    abc
4676No match
4677
4678/a[b-d]e/
4679    ace
4680 0: ace
4681
4682/a[b-d]/
4683    aac
4684 0: ac
4685
4686/a[-b]/
4687    a-
4688 0: a-
4689
4690/a[b-]/
4691    a-
4692 0: a-
4693
4694/a]/
4695    a]
4696 0: a]
4697
4698/a[]]b/
4699    a]b
4700 0: a]b
4701
4702/a[^bc]d/
4703    aed
4704 0: aed
4705    *** Failers
4706No match
4707    abd
4708No match
4709    abd
4710No match
4711
4712/a[^-b]c/
4713    adc
4714 0: adc
4715
4716/a[^]b]c/
4717    adc
4718 0: adc
4719    *** Failers
4720No match
4721    a-c
4722 0: a-c
4723    a]c
4724No match
4725
4726/\ba\b/
4727    a-
4728 0: a
4729    -a
4730 0: a
4731    -a-
4732 0: a
4733
4734/\by\b/
4735    *** Failers
4736No match
4737    xy
4738No match
4739    yz
4740No match
4741    xyz
4742No match
4743
4744/\Ba\B/
4745    *** Failers
4746 0: a
4747    a-
4748No match
4749    -a
4750No match
4751    -a-
4752No match
4753
4754/\By\b/
4755    xy
4756 0: y
4757
4758/\by\B/
4759    yz
4760 0: y
4761
4762/\By\B/
4763    xyz
4764 0: y
4765
4766/\w/
4767    a
4768 0: a
4769
4770/\W/
4771    -
4772 0: -
4773    *** Failers
4774 0: *
4775    -
4776 0: -
4777    a
4778No match
4779
4780/a\sb/
4781    a b
4782 0: a b
4783
4784/a\Sb/
4785    a-b
4786 0: a-b
4787    *** Failers
4788No match
4789    a-b
4790 0: a-b
4791    a b
4792No match
4793
4794/\d/
4795    1
4796 0: 1
4797
4798/\D/
4799    -
4800 0: -
4801    *** Failers
4802 0: *
4803    -
4804 0: -
4805    1
4806No match
4807
4808/[\w]/
4809    a
4810 0: a
4811
4812/[\W]/
4813    -
4814 0: -
4815    *** Failers
4816 0: *
4817    -
4818 0: -
4819    a
4820No match
4821
4822/a[\s]b/
4823    a b
4824 0: a b
4825
4826/a[\S]b/
4827    a-b
4828 0: a-b
4829    *** Failers
4830No match
4831    a-b
4832 0: a-b
4833    a b
4834No match
4835
4836/[\d]/
4837    1
4838 0: 1
4839
4840/[\D]/
4841    -
4842 0: -
4843    *** Failers
4844 0: *
4845    -
4846 0: -
4847    1
4848No match
4849
4850/ab|cd/
4851    abc
4852 0: ab
4853    abcd
4854 0: ab
4855
4856/()ef/
4857    def
4858 0: ef
4859
4860/$b/
4861
4862/a\(b/
4863    a(b
4864 0: a(b
4865
4866/a\(*b/
4867    ab
4868 0: ab
4869    a((b
4870 0: a((b
4871
4872/a\\b/
4873    a\b
4874No match
4875
4876/((a))/
4877    abc
4878 0: a
4879
4880/(a)b(c)/
4881    abc
4882 0: abc
4883
4884/a+b+c/
4885    aabbabc
4886 0: abc
4887
4888/a{1,}b{1,}c/
4889    aabbabc
4890 0: abc
4891
4892/a.+?c/
4893    abcabc
4894 0: abcabc
4895 1: abc
4896
4897/(a+|b)*/
4898    ab
4899 0: ab
4900 1: a
4901 2:
4902
4903/(a+|b){0,}/
4904    ab
4905 0: ab
4906 1: a
4907 2:
4908
4909/(a+|b)+/
4910    ab
4911 0: ab
4912 1: a
4913
4914/(a+|b){1,}/
4915    ab
4916 0: ab
4917 1: a
4918
4919/(a+|b)?/
4920    ab
4921 0: a
4922 1:
4923
4924/(a+|b){0,1}/
4925    ab
4926 0: a
4927 1:
4928
4929/[^ab]*/
4930    cde
4931 0: cde
4932 1: cd
4933 2: c
4934 3:
4935
4936/abc/
4937    *** Failers
4938No match
4939    b
4940No match
4941
4942
4943/a*/
4944
4945
4946/([abc])*d/
4947    abbbcd
4948 0: abbbcd
4949
4950/([abc])*bcd/
4951    abcd
4952 0: abcd
4953
4954/a|b|c|d|e/
4955    e
4956 0: e
4957
4958/(a|b|c|d|e)f/
4959    ef
4960 0: ef
4961
4962/abcd*efg/
4963    abcdefg
4964 0: abcdefg
4965
4966/ab*/
4967    xabyabbbz
4968 0: ab
4969 1: a
4970    xayabbbz
4971 0: a
4972
4973/(ab|cd)e/
4974    abcde
4975 0: cde
4976
4977/[abhgefdc]ij/
4978    hij
4979 0: hij
4980
4981/^(ab|cd)e/
4982
4983/(abc|)ef/
4984    abcdef
4985 0: ef
4986
4987/(a|b)c*d/
4988    abcd
4989 0: bcd
4990
4991/(ab|ab*)bc/
4992    abc
4993 0: abc
4994
4995/a([bc]*)c*/
4996    abc
4997 0: abc
4998 1: ab
4999 2: a
5000
5001/a([bc]*)(c*d)/
5002    abcd
5003 0: abcd
5004
5005/a([bc]+)(c*d)/
5006    abcd
5007 0: abcd
5008
5009/a([bc]*)(c+d)/
5010    abcd
5011 0: abcd
5012
5013/a[bcd]*dcdcde/
5014    adcdcde
5015 0: adcdcde
5016
5017/a[bcd]+dcdcde/
5018    *** Failers
5019No match
5020    abcde
5021No match
5022    adcdcde
5023No match
5024
5025/(ab|a)b*c/
5026    abc
5027 0: abc
5028
5029/((a)(b)c)(d)/
5030    abcd
5031 0: abcd
5032
5033/[a-zA-Z_][a-zA-Z0-9_]*/
5034    alpha
5035 0: alpha
5036 1: alph
5037 2: alp
5038 3: al
5039 4: a
5040
5041/^a(bc+|b[eh])g|.h$/
5042    abh
5043 0: bh
5044
5045/(bc+d$|ef*g.|h?i(j|k))/
5046    effgz
5047 0: effgz
5048    ij
5049 0: ij
5050    reffgz
5051 0: effgz
5052    *** Failers
5053No match
5054    effg
5055No match
5056    bcdd
5057No match
5058
5059/((((((((((a))))))))))/
5060    a
5061 0: a
5062
5063/(((((((((a)))))))))/
5064    a
5065 0: a
5066
5067/multiple words of text/
5068    *** Failers
5069No match
5070    aa
5071No match
5072    uh-uh
5073No match
5074
5075/multiple words/
5076    multiple words, yeah
5077 0: multiple words
5078
5079/(.*)c(.*)/
5080    abcde
5081 0: abcde
5082 1: abcd
5083 2: abc
5084
5085/\((.*), (.*)\)/
5086    (a, b)
5087 0: (a, b)
5088
5089/[k]/
5090
5091/abcd/
5092    abcd
5093 0: abcd
5094
5095/a(bc)d/
5096    abcd
5097 0: abcd
5098
5099/a[-]?c/
5100    ac
5101 0: ac
5102
5103/abc/i
5104    ABC
5105 0: ABC
5106    XABCY
5107 0: ABC
5108    ABABC
5109 0: ABC
5110    *** Failers
5111No match
5112    aaxabxbaxbbx
5113No match
5114    XBC
5115No match
5116    AXC
5117No match
5118    ABX
5119No match
5120
5121/ab*c/i
5122    ABC
5123 0: ABC
5124
5125/ab*bc/i
5126    ABC
5127 0: ABC
5128    ABBC
5129 0: ABBC
5130
5131/ab*?bc/i
5132    ABBBBC
5133 0: ABBBBC
5134
5135/ab{0,}?bc/i
5136    ABBBBC
5137 0: ABBBBC
5138
5139/ab+?bc/i
5140    ABBC
5141 0: ABBC
5142
5143/ab+bc/i
5144    *** Failers
5145No match
5146    ABC
5147No match
5148    ABQ
5149No match
5150
5151/ab{1,}bc/i
5152
5153/ab+bc/i
5154    ABBBBC
5155 0: ABBBBC
5156
5157/ab{1,}?bc/i
5158    ABBBBC
5159 0: ABBBBC
5160
5161/ab{1,3}?bc/i
5162    ABBBBC
5163 0: ABBBBC
5164
5165/ab{3,4}?bc/i
5166    ABBBBC
5167 0: ABBBBC
5168
5169/ab{4,5}?bc/i
5170    *** Failers
5171No match
5172    ABQ
5173No match
5174    ABBBBC
5175No match
5176
5177/ab??bc/i
5178    ABBC
5179 0: ABBC
5180    ABC
5181 0: ABC
5182
5183/ab{0,1}?bc/i
5184    ABC
5185 0: ABC
5186
5187/ab??bc/i
5188
5189/ab??c/i
5190    ABC
5191 0: ABC
5192
5193/ab{0,1}?c/i
5194    ABC
5195 0: ABC
5196
5197/^abc$/i
5198    ABC
5199 0: ABC
5200    *** Failers
5201No match
5202    ABBBBC
5203No match
5204    ABCC
5205No match
5206
5207/^abc/i
5208    ABCC
5209 0: ABC
5210
5211/^abc$/i
5212
5213/abc$/i
5214    AABC
5215 0: ABC
5216
5217/^/i
5218    ABC
5219 0:
5220
5221/$/i
5222    ABC
5223 0:
5224
5225/a.c/i
5226    ABC
5227 0: ABC
5228    AXC
5229 0: AXC
5230
5231/a.*?c/i
5232    AXYZC
5233 0: AXYZC
5234
5235/a.*c/i
5236    *** Failers
5237No match
5238    AABC
5239 0: AABC
5240    AXYZD
5241No match
5242
5243/a[bc]d/i
5244    ABD
5245 0: ABD
5246
5247/a[b-d]e/i
5248    ACE
5249 0: ACE
5250    *** Failers
5251No match
5252    ABC
5253No match
5254    ABD
5255No match
5256
5257/a[b-d]/i
5258    AAC
5259 0: AC
5260
5261/a[-b]/i
5262    A-
5263 0: A-
5264
5265/a[b-]/i
5266    A-
5267 0: A-
5268
5269/a]/i
5270    A]
5271 0: A]
5272
5273/a[]]b/i
5274    A]B
5275 0: A]B
5276
5277/a[^bc]d/i
5278    AED
5279 0: AED
5280
5281/a[^-b]c/i
5282    ADC
5283 0: ADC
5284    *** Failers
5285No match
5286    ABD
5287No match
5288    A-C
5289No match
5290
5291/a[^]b]c/i
5292    ADC
5293 0: ADC
5294
5295/ab|cd/i
5296    ABC
5297 0: AB
5298    ABCD
5299 0: AB
5300
5301/()ef/i
5302    DEF
5303 0: EF
5304
5305/$b/i
5306    *** Failers
5307No match
5308    A]C
5309No match
5310    B
5311No match
5312
5313/a\(b/i
5314    A(B
5315 0: A(B
5316
5317/a\(*b/i
5318    AB
5319 0: AB
5320    A((B
5321 0: A((B
5322
5323/a\\b/i
5324    A\B
5325No match
5326
5327/((a))/i
5328    ABC
5329 0: A
5330
5331/(a)b(c)/i
5332    ABC
5333 0: ABC
5334
5335/a+b+c/i
5336    AABBABC
5337 0: ABC
5338
5339/a{1,}b{1,}c/i
5340    AABBABC
5341 0: ABC
5342
5343/a.+?c/i
5344    ABCABC
5345 0: ABCABC
5346 1: ABC
5347
5348/a.*?c/i
5349    ABCABC
5350 0: ABCABC
5351 1: ABC
5352
5353/a.{0,5}?c/i
5354    ABCABC
5355 0: ABCABC
5356 1: ABC
5357
5358/(a+|b)*/i
5359    AB
5360 0: AB
5361 1: A
5362 2:
5363
5364/(a+|b){0,}/i
5365    AB
5366 0: AB
5367 1: A
5368 2:
5369
5370/(a+|b)+/i
5371    AB
5372 0: AB
5373 1: A
5374
5375/(a+|b){1,}/i
5376    AB
5377 0: AB
5378 1: A
5379
5380/(a+|b)?/i
5381    AB
5382 0: A
5383 1:
5384
5385/(a+|b){0,1}/i
5386    AB
5387 0: A
5388 1:
5389
5390/(a+|b){0,1}?/i
5391    AB
5392 0: A
5393 1:
5394
5395/[^ab]*/i
5396    CDE
5397 0: CDE
5398 1: CD
5399 2: C
5400 3:
5401
5402/abc/i
5403
5404/a*/i
5405
5406
5407/([abc])*d/i
5408    ABBBCD
5409 0: ABBBCD
5410
5411/([abc])*bcd/i
5412    ABCD
5413 0: ABCD
5414
5415/a|b|c|d|e/i
5416    E
5417 0: E
5418
5419/(a|b|c|d|e)f/i
5420    EF
5421 0: EF
5422
5423/abcd*efg/i
5424    ABCDEFG
5425 0: ABCDEFG
5426
5427/ab*/i
5428    XABYABBBZ
5429 0: AB
5430 1: A
5431    XAYABBBZ
5432 0: A
5433
5434/(ab|cd)e/i
5435    ABCDE
5436 0: CDE
5437
5438/[abhgefdc]ij/i
5439    HIJ
5440 0: HIJ
5441
5442/^(ab|cd)e/i
5443    ABCDE
5444No match
5445
5446/(abc|)ef/i
5447    ABCDEF
5448 0: EF
5449
5450/(a|b)c*d/i
5451    ABCD
5452 0: BCD
5453
5454/(ab|ab*)bc/i
5455    ABC
5456 0: ABC
5457
5458/a([bc]*)c*/i
5459    ABC
5460 0: ABC
5461 1: AB
5462 2: A
5463
5464/a([bc]*)(c*d)/i
5465    ABCD
5466 0: ABCD
5467
5468/a([bc]+)(c*d)/i
5469    ABCD
5470 0: ABCD
5471
5472/a([bc]*)(c+d)/i
5473    ABCD
5474 0: ABCD
5475
5476/a[bcd]*dcdcde/i
5477    ADCDCDE
5478 0: ADCDCDE
5479
5480/a[bcd]+dcdcde/i
5481
5482/(ab|a)b*c/i
5483    ABC
5484 0: ABC
5485
5486/((a)(b)c)(d)/i
5487    ABCD
5488 0: ABCD
5489
5490/[a-zA-Z_][a-zA-Z0-9_]*/i
5491    ALPHA
5492 0: ALPHA
5493 1: ALPH
5494 2: ALP
5495 3: AL
5496 4: A
5497
5498/^a(bc+|b[eh])g|.h$/i
5499    ABH
5500 0: BH
5501
5502/(bc+d$|ef*g.|h?i(j|k))/i
5503    EFFGZ
5504 0: EFFGZ
5505    IJ
5506 0: IJ
5507    REFFGZ
5508 0: EFFGZ
5509    *** Failers
5510No match
5511    ADCDCDE
5512No match
5513    EFFG
5514No match
5515    BCDD
5516No match
5517
5518/((((((((((a))))))))))/i
5519    A
5520 0: A
5521
5522/(((((((((a)))))))))/i
5523    A
5524 0: A
5525
5526/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
5527    A
5528 0: A
5529
5530/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
5531    C
5532 0: C
5533
5534/multiple words of text/i
5535    *** Failers
5536No match
5537    AA
5538No match
5539    UH-UH
5540No match
5541
5542/multiple words/i
5543    MULTIPLE WORDS, YEAH
5544 0: MULTIPLE WORDS
5545
5546/(.*)c(.*)/i
5547    ABCDE
5548 0: ABCDE
5549 1: ABCD
5550 2: ABC
5551
5552/\((.*), (.*)\)/i
5553    (A, B)
5554 0: (A, B)
5555
5556/[k]/i
5557
5558/abcd/i
5559    ABCD
5560 0: ABCD
5561
5562/a(bc)d/i
5563    ABCD
5564 0: ABCD
5565
5566/a[-]?c/i
5567    AC
5568 0: AC
5569
5570/a(?!b)./
5571    abad
5572 0: ad
5573
5574/a(?=d)./
5575    abad
5576 0: ad
5577
5578/a(?=c|d)./
5579    abad
5580 0: ad
5581
5582/a(?:b|c|d)(.)/
5583    ace
5584 0: ace
5585
5586/a(?:b|c|d)*(.)/
5587    ace
5588 0: ace
5589 1: ac
5590
5591/a(?:b|c|d)+?(.)/
5592    ace
5593 0: ace
5594    acdbcdbe
5595 0: acdbcdbe
5596 1: acdbcdb
5597 2: acdbcd
5598 3: acdbc
5599 4: acdb
5600 5: acd
5601
5602/a(?:b|c|d)+(.)/
5603    acdbcdbe
5604 0: acdbcdbe
5605 1: acdbcdb
5606 2: acdbcd
5607 3: acdbc
5608 4: acdb
5609 5: acd
5610
5611/a(?:b|c|d){2}(.)/
5612    acdbcdbe
5613 0: acdb
5614
5615/a(?:b|c|d){4,5}(.)/
5616    acdbcdbe
5617 0: acdbcdb
5618 1: acdbcd
5619
5620/a(?:b|c|d){4,5}?(.)/
5621    acdbcdbe
5622 0: acdbcdb
5623 1: acdbcd
5624
5625/((foo)|(bar))*/
5626    foobar
5627 0: foobar
5628 1: foo
5629 2:
5630
5631/a(?:b|c|d){6,7}(.)/
5632    acdbcdbe
5633 0: acdbcdbe
5634
5635/a(?:b|c|d){6,7}?(.)/
5636    acdbcdbe
5637 0: acdbcdbe
5638
5639/a(?:b|c|d){5,6}(.)/
5640    acdbcdbe
5641 0: acdbcdbe
5642 1: acdbcdb
5643
5644/a(?:b|c|d){5,6}?(.)/
5645    acdbcdbe
5646 0: acdbcdbe
5647 1: acdbcdb
5648
5649/a(?:b|c|d){5,7}(.)/
5650    acdbcdbe
5651 0: acdbcdbe
5652 1: acdbcdb
5653
5654/a(?:b|c|d){5,7}?(.)/
5655    acdbcdbe
5656 0: acdbcdbe
5657 1: acdbcdb
5658
5659/a(?:b|(c|e){1,2}?|d)+?(.)/
5660    ace
5661 0: ace
5662
5663/^(.+)?B/
5664    AB
5665 0: AB
5666
5667/^([^a-z])|(\^)$/
5668    .
5669 0: .
5670
5671/^[<>]&/
5672    <&OUT
5673 0: <&
5674
5675/(?:(f)(o)(o)|(b)(a)(r))*/
5676    foobar
5677 0: foobar
5678 1: foo
5679 2:
5680
5681/(?<=a)b/
5682    ab
5683 0: b
5684    *** Failers
5685No match
5686    cb
5687No match
5688    b
5689No match
5690
5691/(?<!c)b/
5692    ab
5693 0: b
5694    b
5695 0: b
5696    b
5697 0: b
5698
5699/(?:..)*a/
5700    aba
5701 0: aba
5702 1: a
5703
5704/(?:..)*?a/
5705    aba
5706 0: aba
5707 1: a
5708
5709/^(){3,5}/
5710    abc
5711 0:
5712
5713/^(a+)*ax/
5714    aax
5715 0: aax
5716
5717/^((a|b)+)*ax/
5718    aax
5719 0: aax
5720
5721/^((a|bc)+)*ax/
5722    aax
5723 0: aax
5724
5725/(a|x)*ab/
5726    cab
5727 0: ab
5728
5729/(a)*ab/
5730    cab
5731 0: ab
5732
5733/(?:(?i)a)b/
5734    ab
5735 0: ab
5736
5737/((?i)a)b/
5738    ab
5739 0: ab
5740
5741/(?:(?i)a)b/
5742    Ab
5743 0: Ab
5744
5745/((?i)a)b/
5746    Ab
5747 0: Ab
5748
5749/(?:(?i)a)b/
5750    *** Failers
5751No match
5752    cb
5753No match
5754    aB
5755No match
5756
5757/((?i)a)b/
5758
5759/(?i:a)b/
5760    ab
5761 0: ab
5762
5763/((?i:a))b/
5764    ab
5765 0: ab
5766
5767/(?i:a)b/
5768    Ab
5769 0: Ab
5770
5771/((?i:a))b/
5772    Ab
5773 0: Ab
5774
5775/(?i:a)b/
5776    *** Failers
5777No match
5778    aB
5779No match
5780    aB
5781No match
5782
5783/((?i:a))b/
5784
5785/(?:(?-i)a)b/i
5786    ab
5787 0: ab
5788
5789/((?-i)a)b/i
5790    ab
5791 0: ab
5792
5793/(?:(?-i)a)b/i
5794    aB
5795 0: aB
5796
5797/((?-i)a)b/i
5798    aB
5799 0: aB
5800
5801/(?:(?-i)a)b/i
5802    *** Failers
5803No match
5804    aB
5805 0: aB
5806    Ab
5807No match
5808
5809/((?-i)a)b/i
5810
5811/(?:(?-i)a)b/i
5812    aB
5813 0: aB
5814
5815/((?-i)a)b/i
5816    aB
5817 0: aB
5818
5819/(?:(?-i)a)b/i
5820    *** Failers
5821No match
5822    Ab
5823No match
5824    AB
5825No match
5826
5827/((?-i)a)b/i
5828
5829/(?-i:a)b/i
5830    ab
5831 0: ab
5832
5833/((?-i:a))b/i
5834    ab
5835 0: ab
5836
5837/(?-i:a)b/i
5838    aB
5839 0: aB
5840
5841/((?-i:a))b/i
5842    aB
5843 0: aB
5844
5845/(?-i:a)b/i
5846    *** Failers
5847No match
5848    AB
5849No match
5850    Ab
5851No match
5852
5853/((?-i:a))b/i
5854
5855/(?-i:a)b/i
5856    aB
5857 0: aB
5858
5859/((?-i:a))b/i
5860    aB
5861 0: aB
5862
5863/(?-i:a)b/i
5864    *** Failers
5865No match
5866    Ab
5867No match
5868    AB
5869No match
5870
5871/((?-i:a))b/i
5872
5873/((?-i:a.))b/i
5874    *** Failers
5875No match
5876    AB
5877No match
5878    a\nB
5879No match
5880
5881/((?s-i:a.))b/i
5882    a\nB
5883 0: a\x0aB
5884
5885/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
5886    cabbbb
5887 0: cabbbb
5888
5889/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
5890    caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
5891 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
5892
5893/foo\w*\d{4}baz/
5894    foobar1234baz
5895 0: foobar1234baz
5896
5897/x(~~)*(?:(?:F)?)?/
5898    x~~
5899 0: x~~
5900 1: x
5901
5902/^a(?#xxx){3}c/
5903    aaac
5904 0: aaac
5905
5906/^a (?#xxx) (?#yyy) {3}c/x
5907    aaac
5908 0: aaac
5909
5910/(?<![cd])b/
5911    *** Failers
5912No match
5913    B\nB
5914No match
5915    dbcb
5916No match
5917
5918/(?<![cd])[ab]/
5919    dbaacb
5920 0: a
5921
5922/(?<!(c|d))b/
5923
5924/(?<!(c|d))[ab]/
5925    dbaacb
5926 0: a
5927
5928/(?<!cd)[ab]/
5929    cdaccb
5930 0: b
5931
5932/^(?:a?b?)*$/
5933    *** Failers
5934No match
5935    dbcb
5936No match
5937    a--
5938No match
5939
5940/((?s)^a(.))((?m)^b$)/
5941    a\nb\nc\n
5942 0: a\x0ab
5943
5944/((?m)^b$)/
5945    a\nb\nc\n
5946 0: b
5947
5948/(?m)^b/
5949    a\nb\n
5950 0: b
5951
5952/(?m)^(b)/
5953    a\nb\n
5954 0: b
5955
5956/((?m)^b)/
5957    a\nb\n
5958 0: b
5959
5960/\n((?m)^b)/
5961    a\nb\n
5962 0: \x0ab
5963
5964/((?s).)c(?!.)/
5965    a\nb\nc\n
5966 0: \x0ac
5967    a\nb\nc\n
5968 0: \x0ac
5969
5970/((?s)b.)c(?!.)/
5971    a\nb\nc\n
5972 0: b\x0ac
5973    a\nb\nc\n
5974 0: b\x0ac
5975
5976/^b/
5977
5978/()^b/
5979    *** Failers
5980No match
5981    a\nb\nc\n
5982No match
5983    a\nb\nc\n
5984No match
5985
5986/((?m)^b)/
5987    a\nb\nc\n
5988 0: b
5989
5990/(?(?!a)a|b)/
5991
5992/(?(?!a)b|a)/
5993    a
5994 0: a
5995
5996/(?(?=a)b|a)/
5997    *** Failers
5998No match
5999    a
6000No match
6001    a
6002No match
6003
6004/(?(?=a)a|b)/
6005    a
6006 0: a
6007
6008/(\w+:)+/
6009    one:
6010 0: one:
6011
6012/$(?<=^(a))/
6013    a
6014 0:
6015
6016/([\w:]+::)?(\w+)$/
6017    abcd
6018 0: abcd
6019    xy:z:::abcd
6020 0: xy:z:::abcd
6021
6022/^[^bcd]*(c+)/
6023    aexycd
6024 0: aexyc
6025
6026/(a*)b+/
6027    caab
6028 0: aab
6029
6030/([\w:]+::)?(\w+)$/
6031    abcd
6032 0: abcd
6033    xy:z:::abcd
6034 0: xy:z:::abcd
6035    *** Failers
6036 0: Failers
6037    abcd:
6038No match
6039    abcd:
6040No match
6041
6042/^[^bcd]*(c+)/
6043    aexycd
6044 0: aexyc
6045
6046/(>a+)ab/
6047
6048/(?>a+)b/
6049    aaab
6050 0: aaab
6051
6052/([[:]+)/
6053    a:[b]:
6054 0: :[
6055 1: :
6056
6057/([[=]+)/
6058    a=[b]=
6059 0: =[
6060 1: =
6061
6062/([[.]+)/
6063    a.[b].
6064 0: .[
6065 1: .
6066
6067/((?>a+)b)/
6068    aaab
6069 0: aaab
6070
6071/(?>(a+))b/
6072    aaab
6073 0: aaab
6074
6075/((?>[^()]+)|\([^()]*\))+/
6076    ((abc(ade)ufh()()x
6077 0: abc(ade)ufh()()x
6078 1: abc(ade)ufh()()
6079 2: abc(ade)ufh()
6080 3: abc(ade)ufh
6081 4: abc(ade)
6082 5: abc
6083
6084/a\Z/
6085    *** Failers
6086No match
6087    aaab
6088No match
6089    a\nb\n
6090No match
6091
6092/b\Z/
6093    a\nb\n
6094 0: b
6095
6096/b\z/
6097
6098/b\Z/
6099    a\nb
6100 0: b
6101
6102/b\z/
6103    a\nb
6104 0: b
6105    *** Failers
6106No match
6107
6108/(?>.*)(?<=(abcd|wxyz))/
6109    alphabetabcd
6110 0: alphabetabcd
6111    endingwxyz
6112 0: endingwxyz
6113    *** Failers
6114No match
6115    a rather long string that doesn't end with one of them
6116No match
6117
6118/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
6119    word cat dog elephant mussel cow horse canary baboon snake shark otherword
6120 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
6121    word cat dog elephant mussel cow horse canary baboon snake shark
6122No match
6123
6124/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
6125    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
6126No match
6127
6128/(?<=\d{3}(?!999))foo/
6129    999foo
6130 0: foo
6131    123999foo
6132 0: foo
6133    *** Failers
6134No match
6135    123abcfoo
6136No match
6137
6138/(?<=(?!...999)\d{3})foo/
6139    999foo
6140 0: foo
6141    123999foo
6142 0: foo
6143    *** Failers
6144No match
6145    123abcfoo
6146No match
6147
6148/(?<=\d{3}(?!999)...)foo/
6149    123abcfoo
6150 0: foo
6151    123456foo
6152 0: foo
6153    *** Failers
6154No match
6155    123999foo
6156No match
6157
6158/(?<=\d{3}...)(?<!999)foo/
6159    123abcfoo
6160 0: foo
6161    123456foo
6162 0: foo
6163    *** Failers
6164No match
6165    123999foo
6166No match
6167
6168/((Z)+|A)*/
6169    ZABCDEFG
6170 0: ZA
6171 1: Z
6172 2:
6173
6174/(Z()|A)*/
6175    ZABCDEFG
6176 0: ZA
6177 1: Z
6178 2:
6179
6180/(Z(())|A)*/
6181    ZABCDEFG
6182 0: ZA
6183 1: Z
6184 2:
6185
6186/((?>Z)+|A)*/
6187    ZABCDEFG
6188 0: ZA
6189 1: Z
6190 2:
6191
6192/((?>)+|A)*/
6193    ZABCDEFG
6194 0:
6195
6196/a*/g
6197    abbab
6198 0: a
6199 1:
6200 0:
6201 0:
6202 0: a
6203 1:
6204 0:
6205 0:
6206
6207/^[a-\d]/
6208    abcde
6209 0: a
6210    -things
6211 0: -
6212    0digit
6213 0: 0
6214    *** Failers
6215No match
6216    bcdef
6217No match
6218
6219/^[\d-a]/
6220    abcde
6221 0: a
6222    -things
6223 0: -
6224    0digit
6225 0: 0
6226    *** Failers
6227No match
6228    bcdef
6229No match
6230
6231/[[:space:]]+/
6232    > \x09\x0a\x0c\x0d\x0b<
6233 0:  \x09\x0a\x0c\x0d\x0b
6234 1:  \x09\x0a\x0c\x0d
6235 2:  \x09\x0a\x0c
6236 3:  \x09\x0a
6237 4:  \x09
6238 5:
6239
6240/[[:blank:]]+/
6241    > \x09\x0a\x0c\x0d\x0b<
6242 0:  \x09
6243 1:
6244
6245/[\s]+/
6246    > \x09\x0a\x0c\x0d\x0b<
6247 0:  \x09\x0a\x0c\x0d
6248 1:  \x09\x0a\x0c
6249 2:  \x09\x0a
6250 3:  \x09
6251 4:
6252
6253/\s+/
6254    > \x09\x0a\x0c\x0d\x0b<
6255 0:  \x09\x0a\x0c\x0d
6256 1:  \x09\x0a\x0c
6257 2:  \x09\x0a
6258 3:  \x09
6259 4:
6260
6261/ab/x
6262    ab
6263No match
6264
6265/(?!\A)x/m
6266  a\nxb\n
6267 0: x
6268
6269/(?!^)x/m
6270  a\nxb\n
6271No match
6272
6273/abc\Qabc\Eabc/
6274    abcabcabc
6275 0: abcabcabc
6276
6277/abc\Q(*+|\Eabc/
6278    abc(*+|abc
6279 0: abc(*+|abc
6280
6281/   abc\Q abc\Eabc/x
6282    abc abcabc
6283 0: abc abcabc
6284    *** Failers
6285No match
6286    abcabcabc
6287No match
6288
6289/abc#comment
6290    \Q#not comment
6291    literal\E/x
6292    abc#not comment\n    literal
6293 0: abc#not comment\x0a    literal
6294
6295/abc#comment
6296    \Q#not comment
6297    literal/x
6298    abc#not comment\n    literal
6299 0: abc#not comment\x0a    literal
6300
6301/abc#comment
6302    \Q#not comment
6303    literal\E #more comment
6304    /x
6305    abc#not comment\n    literal
6306 0: abc#not comment\x0a    literal
6307
6308/abc#comment
6309    \Q#not comment
6310    literal\E #more comment/x
6311    abc#not comment\n    literal
6312 0: abc#not comment\x0a    literal
6313
6314/\Qabc\$xyz\E/
6315    abc\\\$xyz
6316 0: abc\$xyz
6317
6318/\Qabc\E\$\Qxyz\E/
6319    abc\$xyz
6320 0: abc$xyz
6321
6322/\Gabc/
6323    abc
6324 0: abc
6325    *** Failers
6326No match
6327    xyzabc
6328No match
6329
6330/\Gabc./g
6331    abc1abc2xyzabc3
6332 0: abc1
6333 0: abc2
6334
6335/abc./g
6336    abc1abc2xyzabc3
6337 0: abc1
6338 0: abc2
6339 0: abc3
6340
6341/a(?x: b c )d/
6342    XabcdY
6343 0: abcd
6344    *** Failers
6345No match
6346    Xa b c d Y
6347No match
6348
6349/((?x)x y z | a b c)/
6350    XabcY
6351 0: abc
6352    AxyzB
6353 0: xyz
6354
6355/(?i)AB(?-i)C/
6356    XabCY
6357 0: abC
6358    *** Failers
6359No match
6360    XabcY
6361No match
6362
6363/((?i)AB(?-i)C|D)E/
6364    abCE
6365 0: abCE
6366    DE
6367 0: DE
6368    *** Failers
6369No match
6370    abcE
6371No match
6372    abCe
6373No match
6374    dE
6375No match
6376    De
6377No match
6378
6379/[z\Qa-d]\E]/
6380    z
6381 0: z
6382    a
6383 0: a
6384    -
6385 0: -
6386    d
6387 0: d
6388    ]
6389 0: ]
6390    *** Failers
6391 0: a
6392    b
6393No match
6394
6395/[\z\C]/
6396    z
6397 0: z
6398    C
6399 0: C
6400
6401/\M/
6402    M
6403 0: M
6404
6405/(a+)*b/
6406    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
6407No match
6408
6409/(?i)reg(?:ul(?:[a�]|ae)r|ex)/
6410    REGular
6411 0: REGular
6412    regulaer
6413 0: regulaer
6414    Regex
6415 0: Regex
6416    regul�r
6417 0: regul\xe4r
6418
6419/����[�-��-�]+/
6420    �����
6421 0: \xc5\xe6\xe5\xe4\xe0
6422    �����
6423 0: \xc5\xe6\xe5\xe4\xff
6424    �����
6425 0: \xc5\xe6\xe5\xe4\xc0
6426    �����
6427 0: \xc5\xe6\xe5\xe4\xdf
6428
6429/(?<=Z)X./
6430    \x84XAZXB
6431 0: XB
6432
6433/^(?(2)a|(1)(2))+$/
6434    123a
6435Error -17 (backreference condition or recursion test not supported for DFA matching)
6436
6437/(?<=a|bbbb)c/
6438    ac
6439 0: c
6440    bbbbc
6441 0: c
6442
6443/abc/SS>testsavedregex
6444Compiled pattern written to testsavedregex
6445<testsavedregex
6446Compiled pattern loaded from testsavedregex
6447No study data
6448    abc
6449 0: abc
6450    *** Failers
6451No match
6452    bca
6453No match
6454
6455/abc/FSS>testsavedregex
6456Compiled pattern written to testsavedregex
6457<testsavedregex
6458Compiled pattern (byte-inverted) loaded from testsavedregex
6459No study data
6460    abc
6461 0: abc
6462    *** Failers
6463No match
6464    bca
6465No match
6466
6467/(a|b)/S>testsavedregex
6468Compiled pattern written to testsavedregex
6469Study data written to testsavedregex
6470<testsavedregex
6471Compiled pattern loaded from testsavedregex
6472Study data loaded from testsavedregex
6473    abc
6474 0: a
6475    *** Failers
6476 0: a
6477    def
6478No match
6479
6480/(a|b)/SF>testsavedregex
6481Compiled pattern written to testsavedregex
6482Study data written to testsavedregex
6483<testsavedregex
6484Compiled pattern (byte-inverted) loaded from testsavedregex
6485Study data loaded from testsavedregex
6486    abc
6487 0: a
6488    *** Failers
6489 0: a
6490    def
6491No match
6492
6493/line\nbreak/
6494    this is a line\nbreak
6495 0: line\x0abreak
6496    line one\nthis is a line\nbreak in the second line
6497 0: line\x0abreak
6498
6499/line\nbreak/f
6500    this is a line\nbreak
6501 0: line\x0abreak
6502    ** Failers
6503No match
6504    line one\nthis is a line\nbreak in the second line
6505No match
6506
6507/line\nbreak/mf
6508    this is a line\nbreak
6509 0: line\x0abreak
6510    ** Failers
6511No match
6512    line one\nthis is a line\nbreak in the second line
6513No match
6514
6515/1234/
6516    123\P
6517Partial match: 123
6518    a4\P\R
6519No match
6520
6521/1234/
6522    123\P
6523Partial match: 123
6524    4\P\R
6525 0: 4
6526
6527/^/mg
6528    a\nb\nc\n
6529 0:
6530 0:
6531 0:
6532    \
6533 0:
6534
6535/(?<=C\n)^/mg
6536    A\nC\nC\n
6537 0:
6538
6539/(?s)A?B/
6540    AB
6541 0: AB
6542    aB
6543 0: B
6544
6545/(?s)A*B/
6546    AB
6547 0: AB
6548    aB
6549 0: B
6550
6551/(?m)A?B/
6552    AB
6553 0: AB
6554    aB
6555 0: B
6556
6557/(?m)A*B/
6558    AB
6559 0: AB
6560    aB
6561 0: B
6562
6563/Content-Type\x3A[^\r\n]{6,}/
6564    Content-Type:xxxxxyyy
6565 0: Content-Type:xxxxxyyy
6566 1: Content-Type:xxxxxyy
6567 2: Content-Type:xxxxxy
6568
6569/Content-Type\x3A[^\r\n]{6,}z/
6570    Content-Type:xxxxxyyyz
6571 0: Content-Type:xxxxxyyyz
6572
6573/Content-Type\x3A[^a]{6,}/
6574    Content-Type:xxxyyy
6575 0: Content-Type:xxxyyy
6576
6577/Content-Type\x3A[^a]{6,}z/
6578    Content-Type:xxxyyyz
6579 0: Content-Type:xxxyyyz
6580
6581/^abc/m
6582    xyz\nabc
6583 0: abc
6584    xyz\nabc\<lf>
6585 0: abc
6586    xyz\r\nabc\<lf>
6587 0: abc
6588    xyz\rabc\<cr>
6589 0: abc
6590    xyz\r\nabc\<crlf>
6591 0: abc
6592    ** Failers
6593No match
6594    xyz\nabc\<cr>
6595No match
6596    xyz\r\nabc\<cr>
6597No match
6598    xyz\nabc\<crlf>
6599No match
6600    xyz\rabc\<crlf>
6601No match
6602    xyz\rabc\<lf>
6603No match
6604
6605/abc$/m<lf>
6606    xyzabc
6607 0: abc
6608    xyzabc\n
6609 0: abc
6610    xyzabc\npqr
6611 0: abc
6612    xyzabc\r\<cr>
6613 0: abc
6614    xyzabc\rpqr\<cr>
6615 0: abc
6616    xyzabc\r\n\<crlf>
6617 0: abc
6618    xyzabc\r\npqr\<crlf>
6619 0: abc
6620    ** Failers
6621No match
6622    xyzabc\r
6623No match
6624    xyzabc\rpqr
6625No match
6626    xyzabc\r\n
6627No match
6628    xyzabc\r\npqr
6629No match
6630
6631/^abc/m<cr>
6632    xyz\rabcdef
6633 0: abc
6634    xyz\nabcdef\<lf>
6635 0: abc
6636    ** Failers
6637No match
6638    xyz\nabcdef
6639No match
6640
6641/^abc/m<lf>
6642    xyz\nabcdef
6643 0: abc
6644    xyz\rabcdef\<cr>
6645 0: abc
6646    ** Failers
6647No match
6648    xyz\rabcdef
6649No match
6650
6651/^abc/m<crlf>
6652    xyz\r\nabcdef
6653 0: abc
6654    xyz\rabcdef\<cr>
6655 0: abc
6656    ** Failers
6657No match
6658    xyz\rabcdef
6659No match
6660
6661/.*/<lf>
6662    abc\ndef
6663 0: abc
6664 1: ab
6665 2: a
6666 3:
6667    abc\rdef
6668 0: abc\x0ddef
6669 1: abc\x0dde
6670 2: abc\x0dd
6671 3: abc\x0d
6672 4: abc
6673 5: ab
6674 6: a
6675 7:
6676    abc\r\ndef
6677 0: abc\x0d
6678 1: abc
6679 2: ab
6680 3: a
6681 4:
6682    \<cr>abc\ndef
6683 0: abc\x0adef
6684 1: abc\x0ade
6685 2: abc\x0ad
6686 3: abc\x0a
6687 4: abc
6688 5: ab
6689 6: a
6690 7:
6691    \<cr>abc\rdef
6692 0: abc
6693 1: ab
6694 2: a
6695 3:
6696    \<cr>abc\r\ndef
6697 0: abc
6698 1: ab
6699 2: a
6700 3:
6701    \<crlf>abc\ndef
6702 0: abc\x0adef
6703 1: abc\x0ade
6704 2: abc\x0ad
6705 3: abc\x0a
6706 4: abc
6707 5: ab
6708 6: a
6709 7:
6710    \<crlf>abc\rdef
6711 0: abc\x0ddef
6712 1: abc\x0dde
6713 2: abc\x0dd
6714 3: abc\x0d
6715 4: abc
6716 5: ab
6717 6: a
6718 7:
6719    \<crlf>abc\r\ndef
6720 0: abc
6721 1: ab
6722 2: a
6723 3:
6724
6725/\w+(.)(.)?def/s
6726    abc\ndef
6727 0: abc\x0adef
6728    abc\rdef
6729 0: abc\x0ddef
6730    abc\r\ndef
6731 0: abc\x0d\x0adef
6732
6733/^\w+=.*(\\\n.*)*/
6734    abc=xyz\\\npqr
6735 0: abc=xyz\\x0apqr
6736 1: abc=xyz\\x0apq
6737 2: abc=xyz\\x0ap
6738 3: abc=xyz\\x0a
6739 4: abc=xyz\
6740 5: abc=xyz
6741 6: abc=xy
6742 7: abc=x
6743 8: abc=
6744
6745/^(a()*)*/
6746    aaaa
6747 0: aaaa
6748 1: aaa
6749 2: aa
6750 3: a
6751 4:
6752
6753/^(?:a(?:(?:))*)*/
6754    aaaa
6755 0: aaaa
6756 1: aaa
6757 2: aa
6758 3: a
6759 4:
6760
6761/^(a()+)+/
6762    aaaa
6763 0: aaaa
6764 1: aaa
6765 2: aa
6766 3: a
6767
6768/^(?:a(?:(?:))+)+/
6769    aaaa
6770 0: aaaa
6771 1: aaa
6772 2: aa
6773 3: a
6774
6775/(a|)*\d/
6776  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
6777No match
6778  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
6779 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
6780
6781/(?>a|)*\d/
6782  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
6783No match
6784  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
6785 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
6786
6787/(?:a|)*\d/
6788  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
6789No match
6790  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
6791 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
6792
6793/^a.b/<lf>
6794    a\rb
6795 0: a\x0db
6796    a\nb\<cr>
6797 0: a\x0ab
6798    ** Failers
6799No match
6800    a\nb
6801No match
6802    a\nb\<any>
6803No match
6804    a\rb\<cr>
6805No match
6806    a\rb\<any>
6807No match
6808
6809/^abc./mgx<any>
6810    abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
6811 0: abc1
6812 0: abc2
6813 0: abc3
6814 0: abc4
6815 0: abc5
6816 0: abc6
6817 0: abc7
6818
6819/abc.$/mgx<any>
6820    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
6821 0: abc1
6822 0: abc2
6823 0: abc3
6824 0: abc4
6825 0: abc5
6826 0: abc6
6827 0: abc9
6828
6829/^a\Rb/<bsr_unicode>
6830    a\nb
6831 0: a\x0ab
6832    a\rb
6833 0: a\x0db
6834    a\r\nb
6835 0: a\x0d\x0ab
6836    a\x0bb
6837 0: a\x0bb
6838    a\x0cb
6839 0: a\x0cb
6840    a\x85b
6841 0: a\x85b
6842    ** Failers
6843No match
6844    a\n\rb
6845No match
6846
6847/^a\R*b/<bsr_unicode>
6848    ab
6849 0: ab
6850    a\nb
6851 0: a\x0ab
6852    a\rb
6853 0: a\x0db
6854    a\r\nb
6855 0: a\x0d\x0ab
6856    a\x0bb
6857 0: a\x0bb
6858    a\x0cb
6859 0: a\x0cb
6860    a\x85b
6861 0: a\x85b
6862    a\n\rb
6863 0: a\x0a\x0db
6864    a\n\r\x85\x0cb
6865 0: a\x0a\x0d\x85\x0cb
6866
6867/^a\R+b/<bsr_unicode>
6868    a\nb
6869 0: a\x0ab
6870    a\rb
6871 0: a\x0db
6872    a\r\nb
6873 0: a\x0d\x0ab
6874    a\x0bb
6875 0: a\x0bb
6876    a\x0cb
6877 0: a\x0cb
6878    a\x85b
6879 0: a\x85b
6880    a\n\rb
6881 0: a\x0a\x0db
6882    a\n\r\x85\x0cb
6883 0: a\x0a\x0d\x85\x0cb
6884    ** Failers
6885No match
6886    ab
6887No match
6888
6889/^a\R{1,3}b/<bsr_unicode>
6890    a\nb
6891 0: a\x0ab
6892    a\n\rb
6893 0: a\x0a\x0db
6894    a\n\r\x85b
6895 0: a\x0a\x0d\x85b
6896    a\r\n\r\nb
6897 0: a\x0d\x0a\x0d\x0ab
6898    a\r\n\r\n\r\nb
6899 0: a\x0d\x0a\x0d\x0a\x0d\x0ab
6900    a\n\r\n\rb
6901 0: a\x0a\x0d\x0a\x0db
6902    a\n\n\r\nb
6903 0: a\x0a\x0a\x0d\x0ab
6904    ** Failers
6905No match
6906    a\n\n\n\rb
6907No match
6908    a\r
6909No match
6910
6911/^a[\R]b/<bsr_unicode>
6912    aRb
6913 0: aRb
6914    ** Failers
6915No match
6916    a\nb
6917No match
6918
6919/.+foo/
6920    afoo
6921 0: afoo
6922    ** Failers
6923No match
6924    \r\nfoo
6925No match
6926    \nfoo
6927No match
6928
6929/.+foo/<crlf>
6930    afoo
6931 0: afoo
6932    \nfoo
6933 0: \x0afoo
6934    ** Failers
6935No match
6936    \r\nfoo
6937No match
6938
6939/.+foo/<any>
6940    afoo
6941 0: afoo
6942    ** Failers
6943No match
6944    \nfoo
6945No match
6946    \r\nfoo
6947No match
6948
6949/.+foo/s
6950    afoo
6951 0: afoo
6952    \r\nfoo
6953 0: \x0d\x0afoo
6954    \nfoo
6955 0: \x0afoo
6956
6957/^$/mg<any>
6958    abc\r\rxyz
6959 0:
6960    abc\n\rxyz
6961 0:
6962    ** Failers
6963No match
6964    abc\r\nxyz
6965No match
6966
6967/^X/m
6968    XABC
6969 0: X
6970    ** Failers
6971No match
6972    XABC\B
6973No match
6974
6975/(?m)^$/<any>g+
6976    abc\r\n\r\n
6977 0:
6978 0+ \x0d\x0a
6979
6980/(?m)^$|^\r\n/<any>g+
6981    abc\r\n\r\n
6982 0: \x0d\x0a
6983 0+
6984 1:
6985
6986/(?m)$/<any>g+
6987    abc\r\n\r\n
6988 0:
6989 0+ \x0d\x0a\x0d\x0a
6990 0:
6991 0+ \x0d\x0a
6992 0:
6993 0+
6994
6995/(?|(abc)|(xyz))/
6996   >abc<
6997 0: abc
6998   >xyz<
6999 0: xyz
7000
7001/(x)(?|(abc)|(xyz))(x)/
7002    xabcx
7003 0: xabcx
7004    xxyzx
7005 0: xxyzx
7006
7007/(x)(?|(abc)(pqr)|(xyz))(x)/
7008    xabcpqrx
7009 0: xabcpqrx
7010    xxyzx
7011 0: xxyzx
7012
7013/(?|(abc)|(xyz))(?1)/
7014    abcabc
7015 0: abcabc
7016    xyzabc
7017 0: xyzabc
7018    ** Failers
7019No match
7020    xyzxyz
7021No match
7022
7023/\H\h\V\v/
7024    X X\x0a
7025 0: X X\x0a
7026    X\x09X\x0b
7027 0: X\x09X\x0b
7028    ** Failers
7029No match
7030    \xa0 X\x0a
7031No match
7032
7033/\H*\h+\V?\v{3,4}/
7034    \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
7035 0: \x09 \xa0X\x0a\x0b\x0c\x0d
7036 1: \x09 \xa0X\x0a\x0b\x0c
7037    \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
7038 0: \x09 \xa0\x0a\x0b\x0c\x0d
7039 1: \x09 \xa0\x0a\x0b\x0c
7040    \x09\x20\xa0\x0a\x0b\x0c
7041 0: \x09 \xa0\x0a\x0b\x0c
7042    ** Failers
7043No match
7044    \x09\x20\xa0\x0a\x0b
7045No match
7046
7047/\H{3,4}/
7048    XY  ABCDE
7049 0: ABCD
7050 1: ABC
7051    XY  PQR ST
7052 0: PQR
7053
7054/.\h{3,4}./
7055    XY  AB    PQRS
7056 0: B    P
7057 1: B
7058
7059/\h*X\h?\H+Y\H?Z/
7060    >XNNNYZ
7061 0: XNNNYZ
7062    >  X NYQZ
7063 0:   X NYQZ
7064    ** Failers
7065No match
7066    >XYZ
7067No match
7068    >  X NY Z
7069No match
7070
7071/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
7072    >XY\x0aZ\x0aA\x0bNN\x0c
7073 0: XY\x0aZ\x0aA\x0bNN\x0c
7074    >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
7075 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
7076
7077/.+A/<crlf>
7078    \r\nA
7079No match
7080
7081/\nA/<crlf>
7082    \r\nA
7083 0: \x0aA
7084
7085/[\r\n]A/<crlf>
7086    \r\nA
7087 0: \x0aA
7088
7089/(\r|\n)A/<crlf>
7090    \r\nA
7091 0: \x0aA
7092
7093/a\Rb/I<bsr_anycrlf>
7094Capturing subpattern count = 0
7095Options: bsr_anycrlf
7096First char = 'a'
7097Need char = 'b'
7098    a\rb
7099 0: a\x0db
7100    a\nb
7101 0: a\x0ab
7102    a\r\nb
7103 0: a\x0d\x0ab
7104    ** Failers
7105No match
7106    a\x85b
7107No match
7108    a\x0bb
7109No match
7110
7111/a\Rb/I<bsr_unicode>
7112Capturing subpattern count = 0
7113Options: bsr_unicode
7114First char = 'a'
7115Need char = 'b'
7116    a\rb
7117 0: a\x0db
7118    a\nb
7119 0: a\x0ab
7120    a\r\nb
7121 0: a\x0d\x0ab
7122    a\x85b
7123 0: a\x85b
7124    a\x0bb
7125 0: a\x0bb
7126    ** Failers
7127No match
7128    a\x85b\<bsr_anycrlf>
7129No match
7130    a\x0bb\<bsr_anycrlf>
7131No match
7132
7133/a\R?b/I<bsr_anycrlf>
7134Capturing subpattern count = 0
7135Options: bsr_anycrlf
7136First char = 'a'
7137Need char = 'b'
7138    a\rb
7139 0: a\x0db
7140    a\nb
7141 0: a\x0ab
7142    a\r\nb
7143 0: a\x0d\x0ab
7144    ** Failers
7145No match
7146    a\x85b
7147No match
7148    a\x0bb
7149No match
7150
7151/a\R?b/I<bsr_unicode>
7152Capturing subpattern count = 0
7153Options: bsr_unicode
7154First char = 'a'
7155Need char = 'b'
7156    a\rb
7157 0: a\x0db
7158    a\nb
7159 0: a\x0ab
7160    a\r\nb
7161 0: a\x0d\x0ab
7162    a\x85b
7163 0: a\x85b
7164    a\x0bb
7165 0: a\x0bb
7166    ** Failers
7167No match
7168    a\x85b\<bsr_anycrlf>
7169No match
7170    a\x0bb\<bsr_anycrlf>
7171No match
7172
7173/a\R{2,4}b/I<bsr_anycrlf>
7174Capturing subpattern count = 0
7175Options: bsr_anycrlf
7176First char = 'a'
7177Need char = 'b'
7178    a\r\n\nb
7179 0: a\x0d\x0a\x0ab
7180    a\n\r\rb
7181 0: a\x0a\x0d\x0db
7182    a\r\n\r\n\r\n\r\nb
7183 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
7184    ** Failers
7185No match
7186    a\x85\85b
7187No match
7188    a\x0b\0bb
7189No match
7190
7191/a\R{2,4}b/I<bsr_unicode>
7192Capturing subpattern count = 0
7193Options: bsr_unicode
7194First char = 'a'
7195Need char = 'b'
7196    a\r\rb
7197 0: a\x0d\x0db
7198    a\n\n\nb
7199 0: a\x0a\x0a\x0ab
7200    a\r\n\n\r\rb
7201 0: a\x0d\x0a\x0a\x0d\x0db
7202    a\x85\85b
7203No match
7204    a\x0b\0bb
7205No match
7206    ** Failers
7207No match
7208    a\r\r\r\r\rb
7209No match
7210    a\x85\85b\<bsr_anycrlf>
7211No match
7212    a\x0b\0bb\<bsr_anycrlf>
7213No match
7214
7215/a(?!)|\wbc/
7216    abc
7217 0: abc
7218
7219/a[]b/<JS>
7220    ** Failers
7221No match
7222    ab
7223No match
7224
7225/a[]+b/<JS>
7226    ** Failers
7227No match
7228    ab
7229No match
7230
7231/a[]*+b/<JS>
7232    ** Failers
7233No match
7234    ab
7235No match
7236
7237/a[^]b/<JS>
7238    aXb
7239 0: aXb
7240    a\nb
7241 0: a\x0ab
7242    ** Failers
7243No match
7244    ab
7245No match
7246
7247/a[^]+b/<JS>
7248    aXb
7249 0: aXb
7250    a\nX\nXb
7251 0: a\x0aX\x0aXb
7252    ** Failers
7253No match
7254    ab
7255No match
7256
7257/X$/E
7258    X
7259 0: X
7260    ** Failers
7261No match
7262    X\n
7263No match
7264
7265/X$/
7266    X
7267 0: X
7268    X\n
7269 0: X
7270
7271/xyz/C
7272  xyz
7273--->xyz
7274 +0 ^       x
7275 +1 ^^      y
7276 +2 ^ ^     z
7277 +3 ^  ^
7278 0: xyz
7279  abcxyz
7280--->abcxyz
7281 +0    ^       x
7282 +1    ^^      y
7283 +2    ^ ^     z
7284 +3    ^  ^
7285 0: xyz
7286  abcxyz\Y
7287--->abcxyz
7288 +0 ^          x
7289 +0  ^         x
7290 +0   ^        x
7291 +0    ^       x
7292 +1    ^^      y
7293 +2    ^ ^     z
7294 +3    ^  ^
7295 0: xyz
7296  ** Failers
7297No match
7298  abc
7299No match
7300  abc\Y
7301--->abc
7302 +0 ^       x
7303 +0  ^      x
7304 +0   ^     x
7305 +0    ^    x
7306No match
7307  abcxypqr
7308No match
7309  abcxypqr\Y
7310--->abcxypqr
7311 +0 ^            x
7312 +0  ^           x
7313 +0   ^          x
7314 +0    ^         x
7315 +1    ^^        y
7316 +2    ^ ^       z
7317 +0     ^        x
7318 +0      ^       x
7319 +0       ^      x
7320 +0        ^     x
7321 +0         ^    x
7322No match
7323
7324/(*NO_START_OPT)xyz/C
7325  abcxyz
7326--->abcxyz
7327+15 ^          x
7328+15  ^         x
7329+15   ^        x
7330+15    ^       x
7331+16    ^^      y
7332+17    ^ ^     z
7333+18    ^  ^
7334 0: xyz
7335
7336/(?C)ab/
7337  ab
7338--->ab
7339  0 ^      a
7340 0: ab
7341  \C-ab
7342 0: ab
7343
7344/ab/C
7345  ab
7346--->ab
7347 +0 ^      a
7348 +1 ^^     b
7349 +2 ^ ^
7350 0: ab
7351  \C-ab
7352 0: ab
7353
7354/^"((?(?=[a])[^"])|b)*"$/C
7355    "ab"
7356--->"ab"
7357 +0 ^        ^
7358 +1 ^        "
7359 +2 ^^       ((?(?=[a])[^"])|b)*
7360+21 ^^       "
7361 +3 ^^       (?(?=[a])[^"])
7362+18 ^^       b
7363 +5 ^^       (?=[a])
7364 +8  ^       [a]
7365+11  ^^      )
7366+12 ^^       [^"]
7367+16 ^ ^      )
7368+17 ^ ^      |
7369+21 ^ ^      "
7370 +3 ^ ^      (?(?=[a])[^"])
7371+18 ^ ^      b
7372 +5 ^ ^      (?=[a])
7373 +8   ^      [a]
7374+19 ^  ^     )
7375+21 ^  ^     "
7376 +3 ^  ^     (?(?=[a])[^"])
7377+18 ^  ^     b
7378 +5 ^  ^     (?=[a])
7379 +8    ^     [a]
7380+17 ^  ^     |
7381+22 ^   ^    $
7382+23 ^   ^
7383 0: "ab"
7384    \C-"ab"
7385 0: "ab"
7386
7387/\d+X|9+Y/
7388    ++++123999\P
7389Partial match: 123999
7390    ++++123999Y\P
7391 0: 999Y
7392
7393/Z(*F)/
7394    Z\P
7395No match
7396    ZA\P
7397No match
7398
7399/Z(?!)/
7400    Z\P
7401No match
7402    ZA\P
7403No match
7404
7405/dog(sbody)?/
7406    dogs\P
7407 0: dog
7408    dogs\P\P
7409Partial match: dogs
7410
7411/dog(sbody)??/
7412    dogs\P
7413 0: dog
7414    dogs\P\P
7415Partial match: dogs
7416
7417/dog|dogsbody/
7418    dogs\P
7419 0: dog
7420    dogs\P\P
7421Partial match: dogs
7422
7423/dogsbody|dog/
7424    dogs\P
7425 0: dog
7426    dogs\P\P
7427Partial match: dogs
7428
7429/Z(*F)Q|ZXY/
7430    Z\P
7431Partial match: Z
7432    ZA\P
7433No match
7434    X\P
7435No match
7436
7437/\bthe cat\b/
7438    the cat\P
7439 0: the cat
7440    the cat\P\P
7441Partial match: the cat
7442
7443/dog(sbody)?/
7444    dogs\D\P
7445 0: dog
7446    body\D\R
7447 0: body
7448
7449/dog(sbody)?/
7450    dogs\D\P\P
7451Partial match: dogs
7452    body\D\R
7453 0: body
7454
7455/abc/
7456   abc\P
7457 0: abc
7458   abc\P\P
7459 0: abc
7460
7461/abc\K123/
7462    xyzabc123pqr
7463Error -16 (item unsupported for DFA matching)
7464
7465/(?<=abc)123/
7466    xyzabc123pqr
7467 0: 123
7468    xyzabc12\P
7469Partial match: abc12
7470    xyzabc12\P\P
7471Partial match: abc12
7472
7473/\babc\b/
7474    +++abc+++
7475 0: abc
7476    +++ab\P
7477Partial match: +ab
7478    +++ab\P\P
7479Partial match: +ab
7480
7481/(?=C)/g+
7482    ABCDECBA
7483 0:
7484 0+ CDECBA
7485 0:
7486 0+ CBA
7487
7488/(abc|def|xyz)/I
7489Capturing subpattern count = 1
7490No options
7491No first char
7492No need char
7493    terhjk;abcdaadsfe
7494 0: abc
7495    the quick xyz brown fox
7496 0: xyz
7497    \Yterhjk;abcdaadsfe
7498 0: abc
7499    \Ythe quick xyz brown fox
7500 0: xyz
7501    ** Failers
7502No match
7503    thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
7504No match
7505    \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
7506No match
7507
7508/(abc|def|xyz)/SI
7509Capturing subpattern count = 1
7510No options
7511No first char
7512No need char
7513Subject length lower bound = 3
7514Starting byte set: a d x
7515    terhjk;abcdaadsfe
7516 0: abc
7517    the quick xyz brown fox
7518 0: xyz
7519    \Yterhjk;abcdaadsfe
7520 0: abc
7521    \Ythe quick xyz brown fox
7522 0: xyz
7523    ** Failers
7524No match
7525    thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
7526No match
7527    \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
7528No match
7529
7530/abcd*/+
7531    xxxxabcd\P
7532 0: abcd
7533 0+
7534 1: abc
7535    xxxxabcd\P\P
7536Partial match: abcd
7537    dddxxx\R
7538 0: ddd
7539 0+ xxx
7540 1: dd
7541 2: d
7542 3:
7543    xxxxabcd\P\P
7544Partial match: abcd
7545    xxx\R
7546 0:
7547 0+ xxx
7548
7549/abcd*/i
7550    xxxxabcd\P
7551 0: abcd
7552 1: abc
7553    xxxxabcd\P\P
7554Partial match: abcd
7555    XXXXABCD\P
7556 0: ABCD
7557 1: ABC
7558    XXXXABCD\P\P
7559Partial match: ABCD
7560
7561/abc\d*/
7562    xxxxabc1\P
7563 0: abc1
7564 1: abc
7565    xxxxabc1\P\P
7566Partial match: abc1
7567
7568/abc[de]*/
7569    xxxxabcde\P
7570 0: abcde
7571 1: abcd
7572 2: abc
7573    xxxxabcde\P\P
7574Partial match: abcde
7575
7576/(?:(?1)|B)(A(*F)|C)/
7577    ABCD
7578 0: BC
7579    CCD
7580 0: CC
7581    ** Failers
7582No match
7583    CAD
7584No match
7585
7586/^(?:(?1)|B)(A(*F)|C)/
7587    CCD
7588 0: CC
7589    BCD
7590 0: BC
7591    ** Failers
7592No match
7593    ABCD
7594No match
7595    CAD
7596No match
7597    BAD
7598No match
7599
7600/^(?!a(*SKIP)b)/
7601    ac
7602Error -16 (item unsupported for DFA matching)
7603
7604/^(?=a(*SKIP)b|ac)/
7605    ** Failers
7606No match
7607    ac
7608Error -16 (item unsupported for DFA matching)
7609
7610/^(?=a(*THEN)b|ac)/
7611    ac
7612Error -16 (item unsupported for DFA matching)
7613
7614/^(?=a(*PRUNE)b)/
7615    ab
7616Error -16 (item unsupported for DFA matching)
7617    ** Failers
7618No match
7619    ac
7620Error -16 (item unsupported for DFA matching)
7621
7622/^(?(?!a(*SKIP)b))/
7623    ac
7624Error -16 (item unsupported for DFA matching)
7625
7626/(?<=abc)def/
7627    abc\P\P
7628Partial match: abc
7629
7630/abc$/
7631    abc
7632 0: abc
7633    abc\P
7634 0: abc
7635    abc\P\P
7636Partial match: abc
7637
7638/abc$/m
7639    abc
7640 0: abc
7641    abc\n
7642 0: abc
7643    abc\P\P
7644Partial match: abc
7645    abc\n\P\P
7646 0: abc
7647    abc\P
7648 0: abc
7649    abc\n\P
7650 0: abc
7651
7652/abc\z/
7653    abc
7654 0: abc
7655    abc\P
7656 0: abc
7657    abc\P\P
7658Partial match: abc
7659
7660/abc\Z/
7661    abc
7662 0: abc
7663    abc\P
7664 0: abc
7665    abc\P\P
7666Partial match: abc
7667
7668/abc\b/
7669    abc
7670 0: abc
7671    abc\P
7672 0: abc
7673    abc\P\P
7674Partial match: abc
7675
7676/abc\B/
7677    abc
7678No match
7679    abc\P
7680Partial match: abc
7681    abc\P\P
7682Partial match: abc
7683
7684/.+/
7685    abc\>0
7686 0: abc
7687 1: ab
7688 2: a
7689    abc\>1
7690 0: bc
7691 1: b
7692    abc\>2
7693 0: c
7694    abc\>3
7695No match
7696    abc\>4
7697Error -24 (bad offset value)
7698    abc\>-4
7699Error -24 (bad offset value)
7700
7701/^(?:a)++\w/
7702     aaaab
7703 0: aaaab
7704     ** Failers
7705No match
7706     aaaa
7707No match
7708     bbb
7709No match
7710
7711/^(?:aa|(?:a)++\w)/
7712     aaaab
7713 0: aaaab
7714 1: aa
7715     aaaa
7716 0: aa
7717     ** Failers
7718No match
7719     bbb
7720No match
7721
7722/^(?:a)*+\w/
7723     aaaab
7724 0: aaaab
7725     bbb
7726 0: b
7727     ** Failers
7728No match
7729     aaaa
7730No match
7731
7732/^(a)++\w/
7733     aaaab
7734 0: aaaab
7735     ** Failers
7736No match
7737     aaaa
7738No match
7739     bbb
7740No match
7741
7742/^(a|)++\w/
7743     aaaab
7744 0: aaaab
7745     ** Failers
7746No match
7747     aaaa
7748No match
7749     bbb
7750No match
7751
7752/(?=abc){3}abc/+
7753    abcabcabc
7754 0: abc
7755 0+ abcabc
7756    ** Failers
7757No match
7758    xyz
7759No match
7760
7761/(?=abc)+abc/+
7762    abcabcabc
7763 0: abc
7764 0+ abcabc
7765    ** Failers
7766No match
7767    xyz
7768No match
7769
7770/(?=abc)++abc/+
7771    abcabcabc
7772 0: abc
7773 0+ abcabc
7774    ** Failers
7775No match
7776    xyz
7777No match
7778
7779/(?=abc){0}xyz/
7780    xyz
7781 0: xyz
7782
7783/(?=abc){1}xyz/
7784    ** Failers
7785No match
7786    xyz
7787No match
7788
7789/(?=(a))?./
7790    ab
7791 0: a
7792    bc
7793 0: b
7794
7795/(?=(a))??./
7796    ab
7797 0: a
7798    bc
7799 0: b
7800
7801/^(?=(a)){0}b(?1)/
7802    backgammon
7803 0: ba
7804
7805/^(?=(?1))?[az]([abc])d/
7806    abd
7807 0: abd
7808    zcdxx
7809 0: zcd
7810
7811/^(?!a){0}\w+/
7812    aaaaa
7813 0: aaaaa
7814 1: aaaa
7815 2: aaa
7816 3: aa
7817 4: a
7818
7819/(?<=(abc))?xyz/
7820    abcxyz
7821 0: xyz
7822    pqrxyz
7823 0: xyz
7824
7825/((?2))((?1))/
7826    abc
7827Error -26 (nested recursion at the same subject position)
7828
7829/(?(R)a+|(?R)b)/
7830    aaaabcde
7831 0: aaaab
7832
7833/(?(R)a+|((?R))b)/
7834    aaaabcde
7835 0: aaaab
7836
7837/((?(R)a+|(?1)b))/
7838    aaaabcde
7839 0: aaaab
7840
7841/((?(R2)a+|(?1)b))/
7842    aaaabcde
7843Error -17 (backreference condition or recursion test not supported for DFA matching)
7844
7845/(?(R)a*(?1)|((?R))b)/
7846    aaaabcde
7847Error -26 (nested recursion at the same subject position)
7848
7849/(a+)/
7850    \O6aaaa
7851Matched, but too many subsidiary matches
7852 0: aaaa
7853 1: aaa
7854 2: aa
7855    \O8aaaa
7856 0: aaaa
7857 1: aaa
7858 2: aa
7859 3: a
7860
7861/ab\Cde/
7862    abXde
7863 0: abXde
7864
7865/(?<=ab\Cde)X/
7866    abZdeX
7867 0: X
7868
7869/^\R/
7870    \r\P
7871 0: \x0d
7872    \r\P\P
7873Partial match: \x0d
7874
7875/^\R{2,3}x/
7876    \r\P
7877Partial match: \x0d
7878    \r\P\P
7879Partial match: \x0d
7880    \r\r\P
7881Partial match: \x0d\x0d
7882    \r\r\P\P
7883Partial match: \x0d\x0d
7884    \r\r\r\P
7885Partial match: \x0d\x0d\x0d
7886    \r\r\r\P\P
7887Partial match: \x0d\x0d\x0d
7888    \r\rx
7889 0: \x0d\x0dx
7890    \r\r\rx
7891 0: \x0d\x0d\x0dx
7892
7893/^\R{2,3}?x/
7894    \r\P
7895Partial match: \x0d
7896    \r\P\P
7897Partial match: \x0d
7898    \r\r\P
7899Partial match: \x0d\x0d
7900    \r\r\P\P
7901Partial match: \x0d\x0d
7902    \r\r\r\P
7903Partial match: \x0d\x0d\x0d
7904    \r\r\r\P\P
7905Partial match: \x0d\x0d\x0d
7906    \r\rx
7907 0: \x0d\x0dx
7908    \r\r\rx
7909 0: \x0d\x0d\x0dx
7910
7911/^\R?x/
7912    \r\P
7913Partial match: \x0d
7914    \r\P\P
7915Partial match: \x0d
7916    x
7917 0: x
7918    \rx
7919 0: \x0dx
7920
7921/^\R+x/
7922    \r\P
7923Partial match: \x0d
7924    \r\P\P
7925Partial match: \x0d
7926    \r\n\P
7927Partial match: \x0d\x0a
7928    \r\n\P\P
7929Partial match: \x0d\x0a
7930    \rx
7931 0: \x0dx
7932
7933/^a$/<CRLF>
7934    a\r\P
7935Partial match: a\x0d
7936    a\r\P\P
7937Partial match: a\x0d
7938
7939/^a$/m<CRLF>
7940    a\r\P
7941Partial match: a\x0d
7942    a\r\P\P
7943Partial match: a\x0d
7944
7945/^(a$|a\r)/<CRLF>
7946    a\r\P
7947 0: a\x0d
7948    a\r\P\P
7949Partial match: a\x0d
7950
7951/^(a$|a\r)/m<CRLF>
7952    a\r\P
7953 0: a\x0d
7954    a\r\P\P
7955Partial match: a\x0d
7956
7957/./<CRLF>
7958    \r\P
7959 0: \x0d
7960    \r\P\P
7961Partial match: \x0d
7962
7963/.{2,3}/<CRLF>
7964    \r\P
7965Partial match: \x0d
7966    \r\P\P
7967Partial match: \x0d
7968    \r\r\P
7969 0: \x0d\x0d
7970    \r\r\P\P
7971Partial match: \x0d\x0d
7972    \r\r\r\P
7973 0: \x0d\x0d\x0d
7974 1: \x0d\x0d
7975    \r\r\r\P\P
7976Partial match: \x0d\x0d\x0d
7977
7978/.{2,3}?/<CRLF>
7979    \r\P
7980Partial match: \x0d
7981    \r\P\P
7982Partial match: \x0d
7983    \r\r\P
7984 0: \x0d\x0d
7985    \r\r\P\P
7986Partial match: \x0d\x0d
7987    \r\r\r\P
7988 0: \x0d\x0d\x0d
7989 1: \x0d\x0d
7990    \r\r\r\P\P
7991Partial match: \x0d\x0d\x0d
7992
7993/-- Test simple validity check for restarts --/
7994
7995/abcdef/
7996   abc\R
7997Error -30 (invalid data in workspace for DFA restart)
7998
7999/<H((?(?!<H|F>)(.)|(?R))++)*F>/
8000    text <H more text <H texting more  hexA0-"\xA0"    hex above 7F-"\xBC" F> text xxxxx <H text F> text F> text2 <H text sample F> more text.
8001 0: <H more text <H texting more  hexA0-"\xa0"    hex above 7F-"\xbc" F> text xxxxx <H text F> text F>
8002
8003/^(?>.{4})abc|^\w\w.xabcd/
8004    xxxxabcd
8005 0: xxxxabcd
8006 1: xxxxabc
8007    xx\xa0xabcd
8008 0: xx\xa0xabcd
8009 1: xx\xa0xabc
8010
8011/^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/
8012    xxxxxxxxabcd
8013 0: xxxxxxxxabcd
8014 1: xxxxxxxxabc
8015    xx\xa0xxxxxabcd
8016 0: xx\xa0xxxxxabcd
8017 1: xx\xa0xxxxxabc
8018
8019/-- End of testinput8 --/
8020