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