bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / native / iis / pcre / testdata / testoutput1
1 PCRE version 5.0 13-Sep-2004
2
3 /the quick brown fox/
4     the quick brown fox
5  0: the quick brown fox
6     The quick brown FOX
7 No match
8     What do you know about the quick brown fox?
9  0: the quick brown fox
10     What do you know about THE QUICK BROWN FOX?
11 No match
12
13 /The quick brown fox/i
14     the quick brown fox
15  0: the quick brown fox
16     The quick brown FOX
17  0: The quick brown FOX
18     What do you know about the quick brown fox?
19  0: the quick brown fox
20     What do you know about THE QUICK BROWN FOX?
21  0: THE QUICK BROWN FOX
22
23 /abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
24     abcd\t\n\r\f\a\e9;\$\\?caxyz
25  0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
26
27 /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
28     abxyzpqrrrabbxyyyypqAzz
29  0: abxyzpqrrrabbxyyyypqAzz
30     abxyzpqrrrabbxyyyypqAzz
31  0: abxyzpqrrrabbxyyyypqAzz
32     aabxyzpqrrrabbxyyyypqAzz
33  0: aabxyzpqrrrabbxyyyypqAzz
34     aaabxyzpqrrrabbxyyyypqAzz
35  0: aaabxyzpqrrrabbxyyyypqAzz
36     aaaabxyzpqrrrabbxyyyypqAzz
37  0: aaaabxyzpqrrrabbxyyyypqAzz
38     abcxyzpqrrrabbxyyyypqAzz
39  0: abcxyzpqrrrabbxyyyypqAzz
40     aabcxyzpqrrrabbxyyyypqAzz
41  0: aabcxyzpqrrrabbxyyyypqAzz
42     aaabcxyzpqrrrabbxyyyypAzz
43  0: aaabcxyzpqrrrabbxyyyypAzz
44     aaabcxyzpqrrrabbxyyyypqAzz
45  0: aaabcxyzpqrrrabbxyyyypqAzz
46     aaabcxyzpqrrrabbxyyyypqqAzz
47  0: aaabcxyzpqrrrabbxyyyypqqAzz
48     aaabcxyzpqrrrabbxyyyypqqqAzz
49  0: aaabcxyzpqrrrabbxyyyypqqqAzz
50     aaabcxyzpqrrrabbxyyyypqqqqAzz
51  0: aaabcxyzpqrrrabbxyyyypqqqqAzz
52     aaabcxyzpqrrrabbxyyyypqqqqqAzz
53  0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
54     aaabcxyzpqrrrabbxyyyypqqqqqqAzz
55  0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
56     aaaabcxyzpqrrrabbxyyyypqAzz
57  0: aaaabcxyzpqrrrabbxyyyypqAzz
58     abxyzzpqrrrabbxyyyypqAzz
59  0: abxyzzpqrrrabbxyyyypqAzz
60     aabxyzzzpqrrrabbxyyyypqAzz
61  0: aabxyzzzpqrrrabbxyyyypqAzz
62     aaabxyzzzzpqrrrabbxyyyypqAzz
63  0: aaabxyzzzzpqrrrabbxyyyypqAzz
64     aaaabxyzzzzpqrrrabbxyyyypqAzz
65  0: aaaabxyzzzzpqrrrabbxyyyypqAzz
66     abcxyzzpqrrrabbxyyyypqAzz
67  0: abcxyzzpqrrrabbxyyyypqAzz
68     aabcxyzzzpqrrrabbxyyyypqAzz
69  0: aabcxyzzzpqrrrabbxyyyypqAzz
70     aaabcxyzzzzpqrrrabbxyyyypqAzz
71  0: aaabcxyzzzzpqrrrabbxyyyypqAzz
72     aaaabcxyzzzzpqrrrabbxyyyypqAzz
73  0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
74     aaaabcxyzzzzpqrrrabbbxyyyypqAzz
75  0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
76     aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
77  0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
78     aaabcxyzpqrrrabbxyyyypABzz
79  0: aaabcxyzpqrrrabbxyyyypABzz
80     aaabcxyzpqrrrabbxyyyypABBzz
81  0: aaabcxyzpqrrrabbxyyyypABBzz
82     >>>aaabxyzpqrrrabbxyyyypqAzz
83  0: aaabxyzpqrrrabbxyyyypqAzz
84     >aaaabxyzpqrrrabbxyyyypqAzz
85  0: aaaabxyzpqrrrabbxyyyypqAzz
86     >>>>abcxyzpqrrrabbxyyyypqAzz
87  0: abcxyzpqrrrabbxyyyypqAzz
88     *** Failers
89 No match
90     abxyzpqrrabbxyyyypqAzz
91 No match
92     abxyzpqrrrrabbxyyyypqAzz
93 No match
94     abxyzpqrrrabxyyyypqAzz
95 No match
96     aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
97 No match
98     aaaabcxyzzzzpqrrrabbbxyyypqAzz
99 No match
100     aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
101 No match
102
103 /^(abc){1,2}zz/
104     abczz
105  0: abczz
106  1: abc
107     abcabczz
108  0: abcabczz
109  1: abc
110     *** Failers
111 No match
112     zz
113 No match
114     abcabcabczz
115 No match
116     >>abczz
117 No match
118
119 /^(b+?|a){1,2}?c/
120     bc
121  0: bc
122  1: b
123     bbc
124  0: bbc
125  1: b
126     bbbc
127  0: bbbc
128  1: bb
129     bac
130  0: bac
131  1: a
132     bbac
133  0: bbac
134  1: a
135     aac
136  0: aac
137  1: a
138     abbbbbbbbbbbc
139  0: abbbbbbbbbbbc
140  1: bbbbbbbbbbb
141     bbbbbbbbbbbac
142  0: bbbbbbbbbbbac
143  1: a
144     *** Failers
145 No match
146     aaac
147 No match
148     abbbbbbbbbbbac
149 No match
150
151 /^(b+|a){1,2}c/
152     bc
153  0: bc
154  1: b
155     bbc
156  0: bbc
157  1: bb
158     bbbc
159  0: bbbc
160  1: bbb
161     bac
162  0: bac
163  1: a
164     bbac
165  0: bbac
166  1: a
167     aac
168  0: aac
169  1: a
170     abbbbbbbbbbbc
171  0: abbbbbbbbbbbc
172  1: bbbbbbbbbbb
173     bbbbbbbbbbbac
174  0: bbbbbbbbbbbac
175  1: a
176     *** Failers
177 No match
178     aaac
179 No match
180     abbbbbbbbbbbac
181 No match
182
183 /^(b+|a){1,2}?bc/
184     bbc
185  0: bbc
186  1: b
187
188 /^(b*|ba){1,2}?bc/
189     babc
190  0: babc
191  1: ba
192     bbabc
193  0: bbabc
194  1: ba
195     bababc
196  0: bababc
197  1: ba
198     *** Failers
199 No match
200     bababbc
201 No match
202     babababc
203 No match
204
205 /^(ba|b*){1,2}?bc/
206     babc
207  0: babc
208  1: ba
209     bbabc
210  0: bbabc
211  1: ba
212     bababc
213  0: bababc
214  1: ba
215     *** Failers
216 No match
217     bababbc
218 No match
219     babababc
220 No match
221
222 /^\ca\cA\c[\c{\c:/
223     \x01\x01\e;z
224  0: \x01\x01\x1b;z
225
226 /^[ab\]cde]/
227     athing
228  0: a
229     bthing
230  0: b
231     ]thing
232  0: ]
233     cthing
234  0: c
235     dthing
236  0: d
237     ething
238  0: e
239     *** Failers
240 No match
241     fthing
242 No match
243     [thing
244 No match
245     \\thing
246 No match
247
248 /^[]cde]/
249     ]thing
250  0: ]
251     cthing
252  0: c
253     dthing
254  0: d
255     ething
256  0: e
257     *** Failers
258 No match
259     athing
260 No match
261     fthing
262 No match
263
264 /^[^ab\]cde]/
265     fthing
266  0: f
267     [thing
268  0: [
269     \\thing
270  0: \
271     *** Failers
272  0: *
273     athing
274 No match
275     bthing
276 No match
277     ]thing
278 No match
279     cthing
280 No match
281     dthing
282 No match
283     ething
284 No match
285
286 /^[^]cde]/
287     athing
288  0: a
289     fthing
290  0: f
291     *** Failers
292  0: *
293     ]thing
294 No match
295     cthing
296 No match
297     dthing
298 No match
299     ething
300 No match
301
302 /^\\81/
303     \81
304  0: \x81
305
306 /^ÿ/
307     ÿ
308  0: \xff
309
310 /^[0-9]+$/
311     0
312  0: 0
313     1
314  0: 1
315     2
316  0: 2
317     3
318  0: 3
319     4
320  0: 4
321     5
322  0: 5
323     6
324  0: 6
325     7
326  0: 7
327     8
328  0: 8
329     9
330  0: 9
331     10
332  0: 10
333     100
334  0: 100
335     *** Failers
336 No match
337     abc
338 No match
339
340 /^.*nter/
341     enter
342  0: enter
343     inter
344  0: inter
345     uponter
346  0: uponter
347
348 /^xxx[0-9]+$/
349     xxx0
350  0: xxx0
351     xxx1234
352  0: xxx1234
353     *** Failers
354 No match
355     xxx
356 No match
357
358 /^.+[0-9][0-9][0-9]$/
359     x123
360  0: x123
361     xx123
362  0: xx123
363     123456
364  0: 123456
365     *** Failers
366 No match
367     123
368 No match
369     x1234
370  0: x1234
371
372 /^.+?[0-9][0-9][0-9]$/
373     x123
374  0: x123
375     xx123
376  0: xx123
377     123456
378  0: 123456
379     *** Failers
380 No match
381     123
382 No match
383     x1234
384  0: x1234
385
386 /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
387     abc!pqr=apquxz.ixr.zzz.ac.uk
388  0: abc!pqr=apquxz.ixr.zzz.ac.uk
389  1: abc
390  2: pqr
391     *** Failers
392 No match
393     !pqr=apquxz.ixr.zzz.ac.uk
394 No match
395     abc!=apquxz.ixr.zzz.ac.uk
396 No match
397     abc!pqr=apquxz:ixr.zzz.ac.uk
398 No match
399     abc!pqr=apquxz.ixr.zzz.ac.ukk
400 No match
401
402 /:/
403     Well, we need a colon: somewhere
404  0: :
405     *** Fail if we don't
406 No match
407
408 /([\da-f:]+)$/i
409     0abc
410  0: 0abc
411  1: 0abc
412     abc
413  0: abc
414  1: abc
415     fed
416  0: fed
417  1: fed
418     E
419  0: E
420  1: E
421     ::
422  0: ::
423  1: ::
424     5f03:12C0::932e
425  0: 5f03:12C0::932e
426  1: 5f03:12C0::932e
427     fed def
428  0: def
429  1: def
430     Any old stuff
431  0: ff
432  1: ff
433     *** Failers
434 No match
435     0zzz
436 No match
437     gzzz
438 No match
439     fed\x20
440 No match
441     Any old rubbish
442 No match
443
444 /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
445     .1.2.3
446  0: .1.2.3
447  1: 1
448  2: 2
449  3: 3
450     A.12.123.0
451  0: A.12.123.0
452  1: 12
453  2: 123
454  3: 0
455     *** Failers
456 No match
457     .1.2.3333
458 No match
459     1.2.3
460 No match
461     1234.2.3
462 No match
463
464 /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
465     1 IN SOA non-sp1 non-sp2(
466  0: 1 IN SOA non-sp1 non-sp2(
467  1: 1
468  2: non-sp1
469  3: non-sp2
470     1    IN    SOA    non-sp1    non-sp2   (
471  0: 1    IN    SOA    non-sp1    non-sp2   (
472  1: 1
473  2: non-sp1
474  3: non-sp2
475     *** Failers
476 No match
477     1IN SOA non-sp1 non-sp2(
478 No match
479
480 /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
481     a.
482  0: a.
483     Z.
484  0: Z.
485     2.
486  0: 2.
487     ab-c.pq-r.
488  0: ab-c.pq-r.
489  1: .pq-r
490     sxk.zzz.ac.uk.
491  0: sxk.zzz.ac.uk.
492  1: .uk
493     x-.y-.
494  0: x-.y-.
495  1: .y-
496     *** Failers
497 No match
498     -abc.peq.
499 No match
500
501 /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
502     *.a
503  0: *.a
504     *.b0-a
505  0: *.b0-a
506  1: 0-a
507     *.c3-b.c
508  0: *.c3-b.c
509  1: 3-b
510  2: .c
511     *.c-a.b-c
512  0: *.c-a.b-c
513  1: -a
514  2: .b-c
515  3: -c
516     *** Failers
517 No match
518     *.0
519 No match
520     *.a-
521 No match
522     *.a-b.c-
523 No match
524     *.c-a.0-c
525 No match
526
527 /^(?=ab(de))(abd)(e)/
528     abde
529  0: abde
530  1: de
531  2: abd
532  3: e
533
534 /^(?!(ab)de|x)(abd)(f)/
535     abdf
536  0: abdf
537  1: <unset>
538  2: abd
539  3: f
540
541 /^(?=(ab(cd)))(ab)/
542     abcd
543  0: ab
544  1: abcd
545  2: cd
546  3: ab
547
548 /^[\da-f](\.[\da-f])*$/i
549     a.b.c.d
550  0: a.b.c.d
551  1: .d
552     A.B.C.D
553  0: A.B.C.D
554  1: .D
555     a.b.c.1.2.3.C
556  0: a.b.c.1.2.3.C
557  1: .C
558
559 /^\".*\"\s*(;.*)?$/
560     \"1234\"
561  0: "1234"
562     \"abcd\" ;
563  0: "abcd" ;
564  1: ;
565     \"\" ; rhubarb
566  0: "" ; rhubarb
567  1: ; rhubarb
568     *** Failers
569 No match
570     \"1234\" : things
571 No match
572
573 /^$/
574     \
575  0: 
576     *** Failers
577 No match
578
579 /   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/x
580     ab c
581  0: ab c
582     *** Failers
583 No match
584     abc
585 No match
586     ab cde
587 No match
588
589 /(?x)   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/
590     ab c
591  0: ab c
592     *** Failers
593 No match
594     abc
595 No match
596     ab cde
597 No match
598
599 /^   a\ b[c ]d       $/x
600     a bcd
601  0: a bcd
602     a b d
603  0: a b d
604     *** Failers
605 No match
606     abcd
607 No match
608     ab d
609 No match
610
611 /^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
612     abcdefhijklm
613  0: abcdefhijklm
614  1: abc
615  2: bc
616  3: c
617  4: def
618  5: ef
619  6: f
620  7: hij
621  8: ij
622  9: j
623 10: klm
624 11: lm
625 12: m
626
627 /^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
628     abcdefhijklm
629  0: abcdefhijklm
630  1: bc
631  2: c
632  3: ef
633  4: f
634  5: ij
635  6: j
636  7: lm
637  8: m
638
639 /^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
640     a+ Z0+\x08\n\x1d\x12
641  0: a+ Z0+\x08\x0a\x1d\x12
642
643 /^[.^$|()*+?{,}]+/
644     .^\$(*+)|{?,?}
645  0: .^$(*+)|{?,?}
646
647 /^a*\w/
648     z
649  0: z
650     az
651  0: az
652     aaaz
653  0: aaaz
654     a
655  0: a
656     aa
657  0: aa
658     aaaa
659  0: aaaa
660     a+
661  0: a
662     aa+
663  0: aa
664
665 /^a*?\w/
666     z
667  0: z
668     az
669  0: a
670     aaaz
671  0: a
672     a
673  0: a
674     aa
675  0: a
676     aaaa
677  0: a
678     a+
679  0: a
680     aa+
681  0: a
682
683 /^a+\w/
684     az
685  0: az
686     aaaz
687  0: aaaz
688     aa
689  0: aa
690     aaaa
691  0: aaaa
692     aa+
693  0: aa
694
695 /^a+?\w/
696     az
697  0: az
698     aaaz
699  0: aa
700     aa
701  0: aa
702     aaaa
703  0: aa
704     aa+
705  0: aa
706
707 /^\d{8}\w{2,}/
708     1234567890
709  0: 1234567890
710     12345678ab
711  0: 12345678ab
712     12345678__
713  0: 12345678__
714     *** Failers
715 No match
716     1234567
717 No match
718
719 /^[aeiou\d]{4,5}$/
720     uoie
721  0: uoie
722     1234
723  0: 1234
724     12345
725  0: 12345
726     aaaaa
727  0: aaaaa
728     *** Failers
729 No match
730     123456
731 No match
732
733 /^[aeiou\d]{4,5}?/
734     uoie
735  0: uoie
736     1234
737  0: 1234
738     12345
739  0: 1234
740     aaaaa
741  0: aaaa
742     123456
743  0: 1234
744
745 /\A(abc|def)=(\1){2,3}\Z/
746     abc=abcabc
747  0: abc=abcabc
748  1: abc
749  2: abc
750     def=defdefdef
751  0: def=defdefdef
752  1: def
753  2: def
754     *** Failers
755 No match
756     abc=defdef
757 No match
758
759 /^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/
760     abcdefghijkcda2
761  0: abcdefghijkcda2
762  1: a
763  2: b
764  3: c
765  4: d
766  5: e
767  6: f
768  7: g
769  8: h
770  9: i
771 10: j
772 11: k
773 12: cd
774     abcdefghijkkkkcda2
775  0: abcdefghijkkkkcda2
776  1: a
777  2: b
778  3: c
779  4: d
780  5: e
781  6: f
782  7: g
783  8: h
784  9: i
785 10: j
786 11: k
787 12: cd
788
789 /(cat(a(ract|tonic)|erpillar)) \1()2(3)/
790     cataract cataract23
791  0: cataract cataract23
792  1: cataract
793  2: aract
794  3: ract
795  4: 
796  5: 3
797     catatonic catatonic23
798  0: catatonic catatonic23
799  1: catatonic
800  2: atonic
801  3: tonic
802  4: 
803  5: 3
804     caterpillar caterpillar23
805  0: caterpillar caterpillar23
806  1: caterpillar
807  2: erpillar
808  3: <unset>
809  4: 
810  5: 3
811
812
813 /^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]/
814     From abcd  Mon Sep 01 12:33:02 1997
815  0: From abcd  Mon Sep 01 12:33
816  1: abcd
817
818 /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
819     From abcd  Mon Sep 01 12:33:02 1997
820  0: From abcd  Mon Sep 01 12:33
821  1: Sep 
822     From abcd  Mon Sep  1 12:33:02 1997
823  0: From abcd  Mon Sep  1 12:33
824  1: Sep  
825     *** Failers
826 No match
827     From abcd  Sep 01 12:33:02 1997
828 No match
829
830 /^12.34/s
831     12\n34
832  0: 12\x0a34
833     12\r34
834  0: 12\x0d34
835
836 /\w+(?=\t)/
837     the quick brown\t fox
838  0: brown
839
840 /foo(?!bar)(.*)/
841     foobar is foolish see?
842  0: foolish see?
843  1: lish see?
844
845 /(?:(?!foo)...|^.{0,2})bar(.*)/
846     foobar crowbar etc
847  0: rowbar etc
848  1:  etc
849     barrel
850  0: barrel
851  1: rel
852     2barrel
853  0: 2barrel
854  1: rel
855     A barrel
856  0: A barrel
857  1: rel
858
859 /^(\D*)(?=\d)(?!123)/
860     abc456
861  0: abc
862  1: abc
863     *** Failers
864 No match
865     abc123
866 No match
867
868 /^1234(?# test newlines
869   inside)/
870     1234
871  0: 1234
872
873 /^1234 #comment in extended re
874   /x
875     1234
876  0: 1234
877
878 /#rhubarb
879   abcd/x
880     abcd
881  0: abcd
882
883 /^abcd#rhubarb/x
884     abcd
885  0: abcd
886
887 /^(a)\1{2,3}(.)/
888     aaab
889  0: aaab
890  1: a
891  2: b
892     aaaab
893  0: aaaab
894  1: a
895  2: b
896     aaaaab
897  0: aaaaa
898  1: a
899  2: a
900     aaaaaab
901  0: aaaaa
902  1: a
903  2: a
904
905 /(?!^)abc/
906     the abc
907  0: abc
908     *** Failers
909 No match
910     abc
911 No match
912
913 /(?=^)abc/
914     abc
915  0: abc
916     *** Failers
917 No match
918     the abc
919 No match
920
921 /^[ab]{1,3}(ab*|b)/
922     aabbbbb
923  0: aabb
924  1: b
925
926 /^[ab]{1,3}?(ab*|b)/
927     aabbbbb
928  0: aabbbbb
929  1: abbbbb
930
931 /^[ab]{1,3}?(ab*?|b)/
932     aabbbbb
933  0: aa
934  1: a
935
936 /^[ab]{1,3}(ab*?|b)/
937     aabbbbb
938  0: aabb
939  1: b
940
941 /  (?: [\040\t] |  \(
942 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
943 \)  )*                          # optional leading comment
944 (?:    (?:
945 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
946 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
947 |
948 " (?:                      # opening quote...
949 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
950 |                     #    or
951 \\ [^\x80-\xff]           #   Escaped something (something != CR)
952 )* "  # closing quote
953 )                    # initial word
954 (?:  (?: [\040\t] |  \(
955 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
956 \)  )*  \.  (?: [\040\t] |  \(
957 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
958 \)  )*   (?:
959 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
960 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
961 |
962 " (?:                      # opening quote...
963 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
964 |                     #    or
965 \\ [^\x80-\xff]           #   Escaped something (something != CR)
966 )* "  # closing quote
967 )  )* # further okay, if led by a period
968 (?: [\040\t] |  \(
969 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
970 \)  )*  @  (?: [\040\t] |  \(
971 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
972 \)  )*    (?:
973 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
974 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
975 |   \[                         # [
976 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
977 \]                        #           ]
978 )                           # initial subdomain
979 (?:                                  #
980 (?: [\040\t] |  \(
981 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
982 \)  )*  \.                        # if led by a period...
983 (?: [\040\t] |  \(
984 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
985 \)  )*   (?:
986 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
987 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
988 |   \[                         # [
989 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
990 \]                        #           ]
991 )                     #   ...further okay
992 )*
993 # address
994 |                     #  or
995 (?:
996 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
997 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
998 |
999 " (?:                      # opening quote...
1000 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1001 |                     #    or
1002 \\ [^\x80-\xff]           #   Escaped something (something != CR)
1003 )* "  # closing quote
1004 )             # one word, optionally followed by....
1005 (?:
1006 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
1007 \(
1008 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1009 \)       |  # comments, or...
1010
1011 " (?:                      # opening quote...
1012 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1013 |                     #    or
1014 \\ [^\x80-\xff]           #   Escaped something (something != CR)
1015 )* "  # closing quote
1016 # quoted strings
1017 )*
1018 <  (?: [\040\t] |  \(
1019 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1020 \)  )*                     # leading <
1021 (?:  @  (?: [\040\t] |  \(
1022 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1023 \)  )*    (?:
1024 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1025 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1026 |   \[                         # [
1027 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1028 \]                        #           ]
1029 )                           # initial subdomain
1030 (?:                                  #
1031 (?: [\040\t] |  \(
1032 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1033 \)  )*  \.                        # if led by a period...
1034 (?: [\040\t] |  \(
1035 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1036 \)  )*   (?:
1037 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1038 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1039 |   \[                         # [
1040 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1041 \]                        #           ]
1042 )                     #   ...further okay
1043 )*
1044
1045 (?:  (?: [\040\t] |  \(
1046 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1047 \)  )*  ,  (?: [\040\t] |  \(
1048 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1049 \)  )*  @  (?: [\040\t] |  \(
1050 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1051 \)  )*    (?:
1052 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1053 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1054 |   \[                         # [
1055 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1056 \]                        #           ]
1057 )                           # initial subdomain
1058 (?:                                  #
1059 (?: [\040\t] |  \(
1060 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1061 \)  )*  \.                        # if led by a period...
1062 (?: [\040\t] |  \(
1063 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1064 \)  )*   (?:
1065 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1066 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1067 |   \[                         # [
1068 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1069 \]                        #           ]
1070 )                     #   ...further okay
1071 )*
1072 )* # further okay, if led by comma
1073 :                                # closing colon
1074 (?: [\040\t] |  \(
1075 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1076 \)  )*  )? #       optional route
1077 (?:
1078 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1079 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1080 |
1081 " (?:                      # opening quote...
1082 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1083 |                     #    or
1084 \\ [^\x80-\xff]           #   Escaped something (something != CR)
1085 )* "  # closing quote
1086 )                    # initial word
1087 (?:  (?: [\040\t] |  \(
1088 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1089 \)  )*  \.  (?: [\040\t] |  \(
1090 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1091 \)  )*   (?:
1092 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1093 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1094 |
1095 " (?:                      # opening quote...
1096 [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1097 |                     #    or
1098 \\ [^\x80-\xff]           #   Escaped something (something != CR)
1099 )* "  # closing quote
1100 )  )* # further okay, if led by a period
1101 (?: [\040\t] |  \(
1102 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1103 \)  )*  @  (?: [\040\t] |  \(
1104 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1105 \)  )*    (?:
1106 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1107 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1108 |   \[                         # [
1109 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1110 \]                        #           ]
1111 )                           # initial subdomain
1112 (?:                                  #
1113 (?: [\040\t] |  \(
1114 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1115 \)  )*  \.                        # if led by a period...
1116 (?: [\040\t] |  \(
1117 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1118 \)  )*   (?:
1119 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1120 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1121 |   \[                         # [
1122 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1123 \]                        #           ]
1124 )                     #   ...further okay
1125 )*
1126 #       address spec
1127 (?: [\040\t] |  \(
1128 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1129 \)  )*  > #                  trailing >
1130 # name and address
1131 )  (?: [\040\t] |  \(
1132 (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1133 \)  )*                       # optional trailing comment
1134 /x
1135     Alan Other <user\@dom.ain>
1136  0: Alan Other <user@dom.ain>
1137     <user\@dom.ain>
1138  0: user@dom.ain
1139     user\@dom.ain
1140  0: user@dom.ain
1141     \"A. Other\" <user.1234\@dom.ain> (a comment)
1142  0: "A. Other" <user.1234@dom.ain> (a comment)
1143     A. Other <user.1234\@dom.ain> (a comment)
1144  0:  Other <user.1234@dom.ain> (a comment)
1145     \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
1146  0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
1147     A missing angle <user\@some.where
1148  0: user@some.where
1149     *** Failers
1150 No match
1151     The quick brown fox
1152 No match
1153
1154 /[\040\t]*                    # Nab whitespace.
1155 (?:
1156 \(                              #  (
1157 [^\\\x80-\xff\n\015()] *                             #     normal*
1158 (?:                                 #       (
1159 (?:  \\ [^\x80-\xff]  |
1160 \(                            #  (
1161 [^\\\x80-\xff\n\015()] *                            #     normal*
1162 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1163 \)                           #                       )
1164 )    #         special
1165 [^\\\x80-\xff\n\015()] *                         #         normal*
1166 )*                                  #            )*
1167 \)                             #                )
1168 [\040\t]* )*    # If comment found, allow more spaces.
1169 # optional leading comment
1170 (?:
1171 (?:
1172 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1173 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1174 # Atom
1175 |                       #  or
1176 "                                     # "
1177 [^\\\x80-\xff\n\015"] *                            #   normal
1178 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
1179 "                                     #        "
1180 # Quoted string
1181 )
1182 [\040\t]*                    # Nab whitespace.
1183 (?:
1184 \(                              #  (
1185 [^\\\x80-\xff\n\015()] *                             #     normal*
1186 (?:                                 #       (
1187 (?:  \\ [^\x80-\xff]  |
1188 \(                            #  (
1189 [^\\\x80-\xff\n\015()] *                            #     normal*
1190 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1191 \)                           #                       )
1192 )    #         special
1193 [^\\\x80-\xff\n\015()] *                         #         normal*
1194 )*                                  #            )*
1195 \)                             #                )
1196 [\040\t]* )*    # If comment found, allow more spaces.
1197 (?:
1198 \.
1199 [\040\t]*                    # Nab whitespace.
1200 (?:
1201 \(                              #  (
1202 [^\\\x80-\xff\n\015()] *                             #     normal*
1203 (?:                                 #       (
1204 (?:  \\ [^\x80-\xff]  |
1205 \(                            #  (
1206 [^\\\x80-\xff\n\015()] *                            #     normal*
1207 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1208 \)                           #                       )
1209 )    #         special
1210 [^\\\x80-\xff\n\015()] *                         #         normal*
1211 )*                                  #            )*
1212 \)                             #                )
1213 [\040\t]* )*    # If comment found, allow more spaces.
1214 (?:
1215 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1216 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1217 # Atom
1218 |                       #  or
1219 "                                     # "
1220 [^\\\x80-\xff\n\015"] *                            #   normal
1221 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
1222 "                                     #        "
1223 # Quoted string
1224 )
1225 [\040\t]*                    # Nab whitespace.
1226 (?:
1227 \(                              #  (
1228 [^\\\x80-\xff\n\015()] *                             #     normal*
1229 (?:                                 #       (
1230 (?:  \\ [^\x80-\xff]  |
1231 \(                            #  (
1232 [^\\\x80-\xff\n\015()] *                            #     normal*
1233 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1234 \)                           #                       )
1235 )    #         special
1236 [^\\\x80-\xff\n\015()] *                         #         normal*
1237 )*                                  #            )*
1238 \)                             #                )
1239 [\040\t]* )*    # If comment found, allow more spaces.
1240 # additional words
1241 )*
1242 @
1243 [\040\t]*                    # Nab whitespace.
1244 (?:
1245 \(                              #  (
1246 [^\\\x80-\xff\n\015()] *                             #     normal*
1247 (?:                                 #       (
1248 (?:  \\ [^\x80-\xff]  |
1249 \(                            #  (
1250 [^\\\x80-\xff\n\015()] *                            #     normal*
1251 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1252 \)                           #                       )
1253 )    #         special
1254 [^\\\x80-\xff\n\015()] *                         #         normal*
1255 )*                                  #            )*
1256 \)                             #                )
1257 [\040\t]* )*    # If comment found, allow more spaces.
1258 (?:
1259 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1260 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1261 |
1262 \[                            # [
1263 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
1264 \]                           #           ]
1265 )
1266 [\040\t]*                    # Nab whitespace.
1267 (?:
1268 \(                              #  (
1269 [^\\\x80-\xff\n\015()] *                             #     normal*
1270 (?:                                 #       (
1271 (?:  \\ [^\x80-\xff]  |
1272 \(                            #  (
1273 [^\\\x80-\xff\n\015()] *                            #     normal*
1274 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1275 \)                           #                       )
1276 )    #         special
1277 [^\\\x80-\xff\n\015()] *                         #         normal*
1278 )*                                  #            )*
1279 \)                             #                )
1280 [\040\t]* )*    # If comment found, allow more spaces.
1281 # optional trailing comments
1282 (?:
1283 \.
1284 [\040\t]*                    # Nab whitespace.
1285 (?:
1286 \(                              #  (
1287 [^\\\x80-\xff\n\015()] *                             #     normal*
1288 (?:                                 #       (
1289 (?:  \\ [^\x80-\xff]  |
1290 \(                            #  (
1291 [^\\\x80-\xff\n\015()] *                            #     normal*
1292 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1293 \)                           #                       )
1294 )    #         special
1295 [^\\\x80-\xff\n\015()] *                         #         normal*
1296 )*                                  #            )*
1297 \)                             #                )
1298 [\040\t]* )*    # If comment found, allow more spaces.
1299 (?:
1300 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1301 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1302 |
1303 \[                            # [
1304 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
1305 \]                           #           ]
1306 )
1307 [\040\t]*                    # Nab whitespace.
1308 (?:
1309 \(                              #  (
1310 [^\\\x80-\xff\n\015()] *                             #     normal*
1311 (?:                                 #       (
1312 (?:  \\ [^\x80-\xff]  |
1313 \(                            #  (
1314 [^\\\x80-\xff\n\015()] *                            #     normal*
1315 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1316 \)                           #                       )
1317 )    #         special
1318 [^\\\x80-\xff\n\015()] *                         #         normal*
1319 )*                                  #            )*
1320 \)                             #                )
1321 [\040\t]* )*    # If comment found, allow more spaces.
1322 # optional trailing comments
1323 )*
1324 # address
1325 |                             #  or
1326 (?:
1327 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1328 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1329 # Atom
1330 |                       #  or
1331 "                                     # "
1332 [^\\\x80-\xff\n\015"] *                            #   normal
1333 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
1334 "                                     #        "
1335 # Quoted string
1336 )
1337 # leading word
1338 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *               # "normal" atoms and or spaces
1339 (?:
1340 (?:
1341 \(                              #  (
1342 [^\\\x80-\xff\n\015()] *                             #     normal*
1343 (?:                                 #       (
1344 (?:  \\ [^\x80-\xff]  |
1345 \(                            #  (
1346 [^\\\x80-\xff\n\015()] *                            #     normal*
1347 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1348 \)                           #                       )
1349 )    #         special
1350 [^\\\x80-\xff\n\015()] *                         #         normal*
1351 )*                                  #            )*
1352 \)                             #                )
1353 |
1354 "                                     # "
1355 [^\\\x80-\xff\n\015"] *                            #   normal
1356 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
1357 "                                     #        "
1358 ) # "special" comment or quoted string
1359 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *            #  more "normal"
1360 )*
1361 <
1362 [\040\t]*                    # Nab whitespace.
1363 (?:
1364 \(                              #  (
1365 [^\\\x80-\xff\n\015()] *                             #     normal*
1366 (?:                                 #       (
1367 (?:  \\ [^\x80-\xff]  |
1368 \(                            #  (
1369 [^\\\x80-\xff\n\015()] *                            #     normal*
1370 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1371 \)                           #                       )
1372 )    #         special
1373 [^\\\x80-\xff\n\015()] *                         #         normal*
1374 )*                                  #            )*
1375 \)                             #                )
1376 [\040\t]* )*    # If comment found, allow more spaces.
1377 # <
1378 (?:
1379 @
1380 [\040\t]*                    # Nab whitespace.
1381 (?:
1382 \(                              #  (
1383 [^\\\x80-\xff\n\015()] *                             #     normal*
1384 (?:                                 #       (
1385 (?:  \\ [^\x80-\xff]  |
1386 \(                            #  (
1387 [^\\\x80-\xff\n\015()] *                            #     normal*
1388 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1389 \)                           #                       )
1390 )    #         special
1391 [^\\\x80-\xff\n\015()] *                         #         normal*
1392 )*                                  #            )*
1393 \)                             #                )
1394 [\040\t]* )*    # If comment found, allow more spaces.
1395 (?:
1396 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1397 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1398 |
1399 \[                            # [
1400 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
1401 \]                           #           ]
1402 )
1403 [\040\t]*                    # Nab whitespace.
1404 (?:
1405 \(                              #  (
1406 [^\\\x80-\xff\n\015()] *                             #     normal*
1407 (?:                                 #       (
1408 (?:  \\ [^\x80-\xff]  |
1409 \(                            #  (
1410 [^\\\x80-\xff\n\015()] *                            #     normal*
1411 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1412 \)                           #                       )
1413 )    #         special
1414 [^\\\x80-\xff\n\015()] *                         #         normal*
1415 )*                                  #            )*
1416 \)                             #                )
1417 [\040\t]* )*    # If comment found, allow more spaces.
1418 # optional trailing comments
1419 (?:
1420 \.
1421 [\040\t]*                    # Nab whitespace.
1422 (?:
1423 \(                              #  (
1424 [^\\\x80-\xff\n\015()] *                             #     normal*
1425 (?:                                 #       (
1426 (?:  \\ [^\x80-\xff]  |
1427 \(                            #  (
1428 [^\\\x80-\xff\n\015()] *                            #     normal*
1429 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1430 \)                           #                       )
1431 )    #         special
1432 [^\\\x80-\xff\n\015()] *                         #         normal*
1433 )*                                  #            )*
1434 \)                             #                )
1435 [\040\t]* )*    # If comment found, allow more spaces.
1436 (?:
1437 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1438 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1439 |
1440 \[                            # [
1441 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
1442 \]                           #           ]
1443 )
1444 [\040\t]*                    # Nab whitespace.
1445 (?:
1446 \(                              #  (
1447 [^\\\x80-\xff\n\015()] *                             #     normal*
1448 (?:                                 #       (
1449 (?:  \\ [^\x80-\xff]  |
1450 \(                            #  (
1451 [^\\\x80-\xff\n\015()] *                            #     normal*
1452 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1453 \)                           #                       )
1454 )    #         special
1455 [^\\\x80-\xff\n\015()] *                         #         normal*
1456 )*                                  #            )*
1457 \)                             #                )
1458 [\040\t]* )*    # If comment found, allow more spaces.
1459 # optional trailing comments
1460 )*
1461 (?: ,
1462 [\040\t]*                    # Nab whitespace.
1463 (?:
1464 \(                              #  (
1465 [^\\\x80-\xff\n\015()] *                             #     normal*
1466 (?:                                 #       (
1467 (?:  \\ [^\x80-\xff]  |
1468 \(                            #  (
1469 [^\\\x80-\xff\n\015()] *                            #     normal*
1470 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1471 \)                           #                       )
1472 )    #         special
1473 [^\\\x80-\xff\n\015()] *                         #         normal*
1474 )*                                  #            )*
1475 \)                             #                )
1476 [\040\t]* )*    # If comment found, allow more spaces.
1477 @
1478 [\040\t]*                    # Nab whitespace.
1479 (?:
1480 \(                              #  (
1481 [^\\\x80-\xff\n\015()] *                             #     normal*
1482 (?:                                 #       (
1483 (?:  \\ [^\x80-\xff]  |
1484 \(                            #  (
1485 [^\\\x80-\xff\n\015()] *                            #     normal*
1486 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1487 \)                           #                       )
1488 )    #         special
1489 [^\\\x80-\xff\n\015()] *                         #         normal*
1490 )*                                  #            )*
1491 \)                             #                )
1492 [\040\t]* )*    # If comment found, allow more spaces.
1493 (?:
1494 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1495 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1496 |
1497 \[                            # [
1498 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
1499 \]                           #           ]
1500 )
1501 [\040\t]*                    # Nab whitespace.
1502 (?:
1503 \(                              #  (
1504 [^\\\x80-\xff\n\015()] *                             #     normal*
1505 (?:                                 #       (
1506 (?:  \\ [^\x80-\xff]  |
1507 \(                            #  (
1508 [^\\\x80-\xff\n\015()] *                            #     normal*
1509 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1510 \)                           #                       )
1511 )    #         special
1512 [^\\\x80-\xff\n\015()] *                         #         normal*
1513 )*                                  #            )*
1514 \)                             #                )
1515 [\040\t]* )*    # If comment found, allow more spaces.
1516 # optional trailing comments
1517 (?:
1518 \.
1519 [\040\t]*                    # Nab whitespace.
1520 (?:
1521 \(                              #  (
1522 [^\\\x80-\xff\n\015()] *                             #     normal*
1523 (?:                                 #       (
1524 (?:  \\ [^\x80-\xff]  |
1525 \(                            #  (
1526 [^\\\x80-\xff\n\015()] *                            #     normal*
1527 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1528 \)                           #                       )
1529 )    #         special
1530 [^\\\x80-\xff\n\015()] *                         #         normal*
1531 )*                                  #            )*
1532 \)                             #                )
1533 [\040\t]* )*    # If comment found, allow more spaces.
1534 (?:
1535 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1536 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1537 |
1538 \[                            # [
1539 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
1540 \]                           #           ]
1541 )
1542 [\040\t]*                    # Nab whitespace.
1543 (?:
1544 \(                              #  (
1545 [^\\\x80-\xff\n\015()] *                             #     normal*
1546 (?:                                 #       (
1547 (?:  \\ [^\x80-\xff]  |
1548 \(                            #  (
1549 [^\\\x80-\xff\n\015()] *                            #     normal*
1550 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1551 \)                           #                       )
1552 )    #         special
1553 [^\\\x80-\xff\n\015()] *                         #         normal*
1554 )*                                  #            )*
1555 \)                             #                )
1556 [\040\t]* )*    # If comment found, allow more spaces.
1557 # optional trailing comments
1558 )*
1559 )*  # additional domains
1560 :
1561 [\040\t]*                    # Nab whitespace.
1562 (?:
1563 \(                              #  (
1564 [^\\\x80-\xff\n\015()] *                             #     normal*
1565 (?:                                 #       (
1566 (?:  \\ [^\x80-\xff]  |
1567 \(                            #  (
1568 [^\\\x80-\xff\n\015()] *                            #     normal*
1569 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1570 \)                           #                       )
1571 )    #         special
1572 [^\\\x80-\xff\n\015()] *                         #         normal*
1573 )*                                  #            )*
1574 \)                             #                )
1575 [\040\t]* )*    # If comment found, allow more spaces.
1576 # optional trailing comments
1577 )?     #       optional route
1578 (?:
1579 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1580 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1581 # Atom
1582 |                       #  or
1583 "                                     # "
1584 [^\\\x80-\xff\n\015"] *                            #   normal
1585 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
1586 "                                     #        "
1587 # Quoted string
1588 )
1589 [\040\t]*                    # Nab whitespace.
1590 (?:
1591 \(                              #  (
1592 [^\\\x80-\xff\n\015()] *                             #     normal*
1593 (?:                                 #       (
1594 (?:  \\ [^\x80-\xff]  |
1595 \(                            #  (
1596 [^\\\x80-\xff\n\015()] *                            #     normal*
1597 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1598 \)                           #                       )
1599 )    #         special
1600 [^\\\x80-\xff\n\015()] *                         #         normal*
1601 )*                                  #            )*
1602 \)                             #                )
1603 [\040\t]* )*    # If comment found, allow more spaces.
1604 (?:
1605 \.
1606 [\040\t]*                    # Nab whitespace.
1607 (?:
1608 \(                              #  (
1609 [^\\\x80-\xff\n\015()] *                             #     normal*
1610 (?:                                 #       (
1611 (?:  \\ [^\x80-\xff]  |
1612 \(                            #  (
1613 [^\\\x80-\xff\n\015()] *                            #     normal*
1614 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1615 \)                           #                       )
1616 )    #         special
1617 [^\\\x80-\xff\n\015()] *                         #         normal*
1618 )*                                  #            )*
1619 \)                             #                )
1620 [\040\t]* )*    # If comment found, allow more spaces.
1621 (?:
1622 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1623 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1624 # Atom
1625 |                       #  or
1626 "                                     # "
1627 [^\\\x80-\xff\n\015"] *                            #   normal
1628 (?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
1629 "                                     #        "
1630 # Quoted string
1631 )
1632 [\040\t]*                    # Nab whitespace.
1633 (?:
1634 \(                              #  (
1635 [^\\\x80-\xff\n\015()] *                             #     normal*
1636 (?:                                 #       (
1637 (?:  \\ [^\x80-\xff]  |
1638 \(                            #  (
1639 [^\\\x80-\xff\n\015()] *                            #     normal*
1640 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1641 \)                           #                       )
1642 )    #         special
1643 [^\\\x80-\xff\n\015()] *                         #         normal*
1644 )*                                  #            )*
1645 \)                             #                )
1646 [\040\t]* )*    # If comment found, allow more spaces.
1647 # additional words
1648 )*
1649 @
1650 [\040\t]*                    # Nab whitespace.
1651 (?:
1652 \(                              #  (
1653 [^\\\x80-\xff\n\015()] *                             #     normal*
1654 (?:                                 #       (
1655 (?:  \\ [^\x80-\xff]  |
1656 \(                            #  (
1657 [^\\\x80-\xff\n\015()] *                            #     normal*
1658 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1659 \)                           #                       )
1660 )    #         special
1661 [^\\\x80-\xff\n\015()] *                         #         normal*
1662 )*                                  #            )*
1663 \)                             #                )
1664 [\040\t]* )*    # If comment found, allow more spaces.
1665 (?:
1666 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1667 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1668 |
1669 \[                            # [
1670 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
1671 \]                           #           ]
1672 )
1673 [\040\t]*                    # Nab whitespace.
1674 (?:
1675 \(                              #  (
1676 [^\\\x80-\xff\n\015()] *                             #     normal*
1677 (?:                                 #       (
1678 (?:  \\ [^\x80-\xff]  |
1679 \(                            #  (
1680 [^\\\x80-\xff\n\015()] *                            #     normal*
1681 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1682 \)                           #                       )
1683 )    #         special
1684 [^\\\x80-\xff\n\015()] *                         #         normal*
1685 )*                                  #            )*
1686 \)                             #                )
1687 [\040\t]* )*    # If comment found, allow more spaces.
1688 # optional trailing comments
1689 (?:
1690 \.
1691 [\040\t]*                    # Nab whitespace.
1692 (?:
1693 \(                              #  (
1694 [^\\\x80-\xff\n\015()] *                             #     normal*
1695 (?:                                 #       (
1696 (?:  \\ [^\x80-\xff]  |
1697 \(                            #  (
1698 [^\\\x80-\xff\n\015()] *                            #     normal*
1699 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1700 \)                           #                       )
1701 )    #         special
1702 [^\\\x80-\xff\n\015()] *                         #         normal*
1703 )*                                  #            )*
1704 \)                             #                )
1705 [\040\t]* )*    # If comment found, allow more spaces.
1706 (?:
1707 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1708 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1709 |
1710 \[                            # [
1711 (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
1712 \]                           #           ]
1713 )
1714 [\040\t]*                    # Nab whitespace.
1715 (?:
1716 \(                              #  (
1717 [^\\\x80-\xff\n\015()] *                             #     normal*
1718 (?:                                 #       (
1719 (?:  \\ [^\x80-\xff]  |
1720 \(                            #  (
1721 [^\\\x80-\xff\n\015()] *                            #     normal*
1722 (?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
1723 \)                           #                       )
1724 )    #         special
1725 [^\\\x80-\xff\n\015()] *                         #         normal*
1726 )*                                  #            )*
1727 \)                             #                )
1728 [\040\t]* )*    # If comment found, allow more spaces.
1729 # optional trailing comments
1730 )*
1731 #       address spec
1732 >                    #                 >
1733 # name and address
1734 )
1735 /x
1736     Alan Other <user\@dom.ain>
1737  0: Alan Other <user@dom.ain>
1738     <user\@dom.ain>
1739  0: user@dom.ain
1740     user\@dom.ain
1741  0: user@dom.ain
1742     \"A. Other\" <user.1234\@dom.ain> (a comment)
1743  0: "A. Other" <user.1234@dom.ain>
1744     A. Other <user.1234\@dom.ain> (a comment)
1745  0:  Other <user.1234@dom.ain>
1746     \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
1747  0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
1748     A missing angle <user\@some.where
1749  0: user@some.where
1750     *** Failers
1751 No match
1752     The quick brown fox
1753 No match
1754
1755 /abc\0def\00pqr\000xyz\0000AB/
1756     abc\0def\00pqr\000xyz\0000AB
1757  0: abc\x00def\x00pqr\x00xyz\x000AB
1758     abc456 abc\0def\00pqr\000xyz\0000ABCDE
1759  0: abc\x00def\x00pqr\x00xyz\x000AB
1760
1761 /abc\x0def\x00pqr\x000xyz\x0000AB/
1762     abc\x0def\x00pqr\x000xyz\x0000AB
1763  0: abc\x0def\x00pqr\x000xyz\x0000AB
1764     abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
1765  0: abc\x0def\x00pqr\x000xyz\x0000AB
1766
1767 /^[\000-\037]/
1768     \0A
1769  0: \x00
1770     \01B
1771  0: \x01
1772     \037C
1773  0: \x1f
1774
1775 /\0*/
1776     \0\0\0\0
1777  0: \x00\x00\x00\x00
1778
1779 /A\x0{2,3}Z/
1780     The A\x0\x0Z
1781  0: A\x00\x00Z
1782     An A\0\x0\0Z
1783  0: A\x00\x00\x00Z
1784     *** Failers
1785 No match
1786     A\0Z
1787 No match
1788     A\0\x0\0\x0Z
1789 No match
1790
1791 /^(cow|)\1(bell)/
1792     cowcowbell
1793  0: cowcowbell
1794  1: cow
1795  2: bell
1796     bell
1797  0: bell
1798  1: 
1799  2: bell
1800     *** Failers
1801 No match
1802     cowbell
1803 No match
1804
1805 /^\s/
1806     \040abc
1807  0:  
1808     \x0cabc
1809  0: \x0c
1810     \nabc
1811  0: \x0a
1812     \rabc
1813  0: \x0d
1814     \tabc
1815  0: \x09
1816     *** Failers
1817 No match
1818     abc
1819 No match
1820
1821 /^a     b
1822   \r  \f  c/x
1823     abc
1824  0: abc
1825
1826 /^(a|)\1*b/
1827     ab
1828  0: ab
1829  1: a
1830     aaaab
1831  0: aaaab
1832  1: a
1833     b
1834  0: b
1835  1: 
1836     *** Failers
1837 No match
1838     acb
1839 No match
1840
1841 /^(a|)\1+b/
1842     aab
1843  0: aab
1844  1: a
1845     aaaab
1846  0: aaaab
1847  1: a
1848     b
1849  0: b
1850  1: 
1851     *** Failers
1852 No match
1853     ab
1854 No match
1855
1856 /^(a|)\1?b/
1857     ab
1858  0: ab
1859  1: a
1860     aab
1861  0: aab
1862  1: a
1863     b
1864  0: b
1865  1: 
1866     *** Failers
1867 No match
1868     acb
1869 No match
1870
1871 /^(a|)\1{2}b/
1872     aaab
1873  0: aaab
1874  1: a
1875     b
1876  0: b
1877  1: 
1878     *** Failers
1879 No match
1880     ab
1881 No match
1882     aab
1883 No match
1884     aaaab
1885 No match
1886
1887 /^(a|)\1{2,3}b/
1888     aaab
1889  0: aaab
1890  1: a
1891     aaaab
1892  0: aaaab
1893  1: a
1894     b
1895  0: b
1896  1: 
1897     *** Failers
1898 No match
1899     ab
1900 No match
1901     aab
1902 No match
1903     aaaaab
1904 No match
1905
1906 /ab{1,3}bc/
1907     abbbbc
1908  0: abbbbc
1909     abbbc
1910  0: abbbc
1911     abbc
1912  0: abbc
1913     *** Failers
1914 No match
1915     abc
1916 No match
1917     abbbbbc
1918 No match
1919
1920 /([^.]*)\.([^:]*):[T ]+(.*)/
1921     track1.title:TBlah blah blah
1922  0: track1.title:TBlah blah blah
1923  1: track1
1924  2: title
1925  3: Blah blah blah
1926
1927 /([^.]*)\.([^:]*):[T ]+(.*)/i
1928     track1.title:TBlah blah blah
1929  0: track1.title:TBlah blah blah
1930  1: track1
1931  2: title
1932  3: Blah blah blah
1933
1934 /([^.]*)\.([^:]*):[t ]+(.*)/i
1935     track1.title:TBlah blah blah
1936  0: track1.title:TBlah blah blah
1937  1: track1
1938  2: title
1939  3: Blah blah blah
1940
1941 /^[W-c]+$/
1942     WXY_^abc
1943  0: WXY_^abc
1944     *** Failers
1945 No match
1946     wxy
1947 No match
1948
1949 /^[W-c]+$/i
1950     WXY_^abc
1951  0: WXY_^abc
1952     wxy_^ABC
1953  0: wxy_^ABC
1954
1955 /^[\x3f-\x5F]+$/i
1956     WXY_^abc
1957  0: WXY_^abc
1958     wxy_^ABC
1959  0: wxy_^ABC
1960
1961 /^abc$/m
1962     abc
1963  0: abc
1964     qqq\nabc
1965  0: abc
1966     abc\nzzz
1967  0: abc
1968     qqq\nabc\nzzz
1969  0: abc
1970
1971 /^abc$/
1972     abc
1973  0: abc
1974     *** Failers
1975 No match
1976     qqq\nabc
1977 No match
1978     abc\nzzz
1979 No match
1980     qqq\nabc\nzzz
1981 No match
1982
1983 /\Aabc\Z/m
1984     abc
1985  0: abc
1986     abc\n 
1987  0: abc
1988     *** Failers
1989 No match
1990     qqq\nabc
1991 No match
1992     abc\nzzz
1993 No match
1994     qqq\nabc\nzzz
1995 No match
1996     
1997 /\A(.)*\Z/s
1998     abc\ndef
1999  0: abc\x0adef
2000  1: f
2001
2002 /\A(.)*\Z/m
2003     *** Failers
2004  0: *** Failers
2005  1: s
2006     abc\ndef
2007 No match
2008
2009 /(?:b)|(?::+)/
2010     b::c
2011  0: b
2012     c::b
2013  0: ::
2014
2015 /[-az]+/
2016     az-
2017  0: az-
2018     *** Failers
2019  0: a
2020     b
2021 No match
2022
2023 /[az-]+/
2024     za-
2025  0: za-
2026     *** Failers
2027  0: a
2028     b
2029 No match
2030
2031 /[a\-z]+/
2032     a-z
2033  0: a-z
2034     *** Failers
2035  0: a
2036     b
2037 No match
2038
2039 /[a-z]+/
2040     abcdxyz
2041  0: abcdxyz
2042
2043 /[\d-]+/
2044     12-34
2045  0: 12-34
2046     *** Failers
2047 No match
2048     aaa
2049 No match
2050
2051 /[\d-z]+/
2052     12-34z
2053  0: 12-34z
2054     *** Failers
2055 No match
2056     aaa
2057 No match
2058
2059 /\x5c/
2060     \\
2061  0: \
2062
2063 /\x20Z/
2064     the Zoo
2065  0:  Z
2066     *** Failers
2067 No match
2068     Zulu
2069 No match
2070
2071 /(abc)\1/i
2072     abcabc
2073  0: abcabc
2074  1: abc
2075     ABCabc
2076  0: ABCabc
2077  1: ABC
2078     abcABC
2079  0: abcABC
2080  1: abc
2081
2082 /ab{3cd/
2083     ab{3cd
2084  0: ab{3cd
2085
2086 /ab{3,cd/
2087     ab{3,cd
2088  0: ab{3,cd
2089
2090 /ab{3,4a}cd/
2091     ab{3,4a}cd
2092  0: ab{3,4a}cd
2093
2094 /{4,5a}bc/
2095     {4,5a}bc
2096  0: {4,5a}bc
2097
2098 /^a.b/
2099     a\rb
2100  0: a\x0db
2101     *** Failers
2102 No match
2103     a\nb
2104 No match
2105
2106 /abc$/
2107     abc
2108  0: abc
2109     abc\n
2110  0: abc
2111     *** Failers
2112 No match
2113     abc\ndef
2114 No match
2115
2116 /(abc)\123/
2117     abc\x53
2118  0: abcS
2119  1: abc
2120
2121 /(abc)\223/
2122     abc\x93
2123  0: abc\x93
2124  1: abc
2125
2126 /(abc)\323/
2127     abc\xd3
2128  0: abc\xd3
2129  1: abc
2130
2131 /(abc)\500/
2132     abc\x40
2133  0: abc@
2134  1: abc
2135     abc\100
2136  0: abc@
2137  1: abc
2138
2139 /(abc)\5000/
2140     abc\x400
2141  0: abc@0
2142  1: abc
2143     abc\x40\x30
2144  0: abc@0
2145  1: abc
2146     abc\1000
2147  0: abc@0
2148  1: abc
2149     abc\100\x30
2150  0: abc@0
2151  1: abc
2152     abc\100\060
2153  0: abc@0
2154  1: abc
2155     abc\100\60
2156  0: abc@0
2157  1: abc
2158
2159 /abc\81/
2160     abc\081
2161  0: abc\x0081
2162     abc\0\x38\x31
2163  0: abc\x0081
2164
2165 /abc\91/
2166     abc\091
2167  0: abc\x0091
2168     abc\0\x39\x31
2169  0: abc\x0091
2170
2171 /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/
2172     abcdefghijkllS
2173  0: abcdefghijkllS
2174  1: a
2175  2: b
2176  3: c
2177  4: d
2178  5: e
2179  6: f
2180  7: g
2181  8: h
2182  9: i
2183 10: j
2184 11: k
2185 12: l
2186
2187 /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
2188     abcdefghijk\12S
2189  0: abcdefghijk\x0aS
2190  1: a
2191  2: b
2192  3: c
2193  4: d
2194  5: e
2195  6: f
2196  7: g
2197  8: h
2198  9: i
2199 10: j
2200 11: k
2201
2202 /ab\gdef/
2203     abgdef
2204  0: abgdef
2205
2206 /a{0}bc/
2207     bc
2208  0: bc
2209
2210 /(a|(bc)){0,0}?xyz/
2211     xyz
2212  0: xyz
2213
2214 /abc[\10]de/
2215     abc\010de
2216  0: abc\x08de
2217
2218 /abc[\1]de/
2219     abc\1de
2220  0: abc\x01de
2221
2222 /(abc)[\1]de/
2223     abc\1de
2224  0: abc\x01de
2225  1: abc
2226
2227 /(?s)a.b/
2228     a\nb
2229  0: a\x0ab
2230
2231 /^([^a])([^\b])([^c]*)([^d]{3,4})/
2232     baNOTccccd
2233  0: baNOTcccc
2234  1: b
2235  2: a
2236  3: NOT
2237  4: cccc
2238     baNOTcccd
2239  0: baNOTccc
2240  1: b
2241  2: a
2242  3: NOT
2243  4: ccc
2244     baNOTccd
2245  0: baNOTcc
2246  1: b
2247  2: a
2248  3: NO
2249  4: Tcc
2250     bacccd
2251  0: baccc
2252  1: b
2253  2: a
2254  3: 
2255  4: ccc
2256     *** Failers
2257  0: *** Failers
2258  1: *
2259  2: *
2260  3: * Fail
2261  4: ers
2262     anything
2263 No match
2264     b\bc   
2265 No match
2266     baccd
2267 No match
2268
2269 /[^a]/
2270     Abc
2271  0: A
2272   
2273 /[^a]/i
2274     Abc 
2275  0: b
2276
2277 /[^a]+/
2278     AAAaAbc
2279  0: AAA
2280   
2281 /[^a]+/i
2282     AAAaAbc 
2283  0: bc
2284
2285 /[^a]+/
2286     bbb\nccc
2287  0: bbb\x0accc
2288    
2289 /[^k]$/
2290     abc
2291  0: c
2292     *** Failers
2293  0: s
2294     abk   
2295 No match
2296    
2297 /[^k]{2,3}$/
2298     abc
2299  0: abc
2300     kbc
2301  0: bc
2302     kabc 
2303  0: abc
2304     *** Failers
2305  0: ers
2306     abk
2307 No match
2308     akb
2309 No match
2310     akk 
2311 No match
2312
2313 /^\d{8,}\@.+[^k]$/
2314     12345678\@a.b.c.d
2315  0: 12345678@a.b.c.d
2316     123456789\@x.y.z
2317  0: 123456789@x.y.z
2318     *** Failers
2319 No match
2320     12345678\@x.y.uk
2321 No match
2322     1234567\@a.b.c.d       
2323 No match
2324
2325 /(a)\1{8,}/
2326     aaaaaaaaa
2327  0: aaaaaaaaa
2328  1: a
2329     aaaaaaaaaa
2330  0: aaaaaaaaaa
2331  1: a
2332     *** Failers
2333 No match
2334     aaaaaaa   
2335 No match
2336
2337 /[^a]/
2338     aaaabcd
2339  0: b
2340     aaAabcd 
2341  0: A
2342
2343 /[^a]/i
2344     aaaabcd
2345  0: b
2346     aaAabcd 
2347  0: b
2348
2349 /[^az]/
2350     aaaabcd
2351  0: b
2352     aaAabcd 
2353  0: A
2354
2355 /[^az]/i
2356     aaaabcd
2357  0: b
2358     aaAabcd 
2359  0: b
2360
2361 /\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/
2362  \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
2363  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
2364
2365 /P[^*]TAIRE[^*]{1,6}?LL/
2366     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
2367  0: PSTAIREISLL
2368
2369 /P[^*]TAIRE[^*]{1,}?LL/
2370     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
2371  0: PSTAIREISLL
2372
2373 /(\.\d\d[1-9]?)\d+/
2374     1.230003938
2375  0: .230003938
2376  1: .23
2377     1.875000282   
2378  0: .875000282
2379  1: .875
2380     1.235  
2381  0: .235
2382  1: .23
2383                   
2384 /(\.\d\d((?=0)|\d(?=\d)))/
2385     1.230003938      
2386  0: .23
2387  1: .23
2388  2: 
2389     1.875000282
2390  0: .875
2391  1: .875
2392  2: 5
2393     *** Failers 
2394 No match
2395     1.235 
2396 No match
2397     
2398 /a(?)b/
2399     ab 
2400  0: ab
2401  
2402 /\b(foo)\s+(\w+)/i
2403     Food is on the foo table
2404  0: foo table
2405  1: foo
2406  2: table
2407     
2408 /foo(.*)bar/
2409     The food is under the bar in the barn.
2410  0: food is under the bar in the bar
2411  1: d is under the bar in the 
2412     
2413 /foo(.*?)bar/  
2414     The food is under the bar in the barn.
2415  0: food is under the bar
2416  1: d is under the 
2417
2418 /(.*)(\d*)/
2419     I have 2 numbers: 53147
2420  0: I have 2 numbers: 53147
2421  1: I have 2 numbers: 53147
2422  2: 
2423     
2424 /(.*)(\d+)/
2425     I have 2 numbers: 53147
2426  0: I have 2 numbers: 53147
2427  1: I have 2 numbers: 5314
2428  2: 7
2429  
2430 /(.*?)(\d*)/
2431     I have 2 numbers: 53147
2432  0: 
2433  1: 
2434  2: 
2435
2436 /(.*?)(\d+)/
2437     I have 2 numbers: 53147
2438  0: I have 2
2439  1: I have 
2440  2: 2
2441
2442 /(.*)(\d+)$/
2443     I have 2 numbers: 53147
2444  0: I have 2 numbers: 53147
2445  1: I have 2 numbers: 5314
2446  2: 7
2447
2448 /(.*?)(\d+)$/
2449     I have 2 numbers: 53147
2450  0: I have 2 numbers: 53147
2451  1: I have 2 numbers: 
2452  2: 53147
2453
2454 /(.*)\b(\d+)$/
2455     I have 2 numbers: 53147
2456  0: I have 2 numbers: 53147
2457  1: I have 2 numbers: 
2458  2: 53147
2459
2460 /(.*\D)(\d+)$/
2461     I have 2 numbers: 53147
2462  0: I have 2 numbers: 53147
2463  1: I have 2 numbers: 
2464  2: 53147
2465
2466 /^\D*(?!123)/
2467     ABC123
2468  0: AB
2469      
2470 /^(\D*)(?=\d)(?!123)/
2471     ABC445
2472  0: ABC
2473  1: ABC
2474     *** Failers
2475 No match
2476     ABC123
2477 No match
2478     
2479 /^[W-]46]/
2480     W46]789 
2481  0: W46]
2482     -46]789
2483  0: -46]
2484     *** Failers
2485 No match
2486     Wall
2487 No match
2488     Zebra
2489 No match
2490     42
2491 No match
2492     [abcd] 
2493 No match
2494     ]abcd[
2495 No match
2496        
2497 /^[W-\]46]/
2498     W46]789 
2499  0: W
2500     Wall
2501  0: W
2502     Zebra
2503  0: Z
2504     Xylophone  
2505  0: X
2506     42
2507  0: 4
2508     [abcd] 
2509  0: [
2510     ]abcd[
2511  0: ]
2512     \\backslash 
2513  0: \
2514     *** Failers
2515 No match
2516     -46]789
2517 No match
2518     well
2519 No match
2520     
2521 /\d\d\/\d\d\/\d\d\d\d/
2522     01/01/2000
2523  0: 01/01/2000
2524
2525 /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
2526   word cat dog elephant mussel cow horse canary baboon snake shark otherword
2527  0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
2528   word cat dog elephant mussel cow horse canary baboon snake shark
2529 No match
2530
2531 /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
2532   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
2533 No match
2534
2535 /^(a){0,0}/
2536     bcd
2537  0: 
2538     abc
2539  0: 
2540     aab     
2541  0: 
2542
2543 /^(a){0,1}/
2544     bcd
2545  0: 
2546     abc
2547  0: a
2548  1: a
2549     aab  
2550  0: a
2551  1: a
2552
2553 /^(a){0,2}/
2554     bcd
2555  0: 
2556     abc
2557  0: a
2558  1: a
2559     aab  
2560  0: aa
2561  1: a
2562
2563 /^(a){0,3}/
2564     bcd
2565  0: 
2566     abc
2567  0: a
2568  1: a
2569     aab
2570  0: aa
2571  1: a
2572     aaa   
2573  0: aaa
2574  1: a
2575
2576 /^(a){0,}/
2577     bcd
2578  0: 
2579     abc
2580  0: a
2581  1: a
2582     aab
2583  0: aa
2584  1: a
2585     aaa
2586  0: aaa
2587  1: a
2588     aaaaaaaa    
2589  0: aaaaaaaa
2590  1: a
2591
2592 /^(a){1,1}/
2593     bcd
2594 No match
2595     abc
2596  0: a
2597  1: a
2598     aab  
2599  0: a
2600  1: a
2601
2602 /^(a){1,2}/
2603     bcd
2604 No match
2605     abc
2606  0: a
2607  1: a
2608     aab  
2609  0: aa
2610  1: a
2611
2612 /^(a){1,3}/
2613     bcd
2614 No match
2615     abc
2616  0: a
2617  1: a
2618     aab
2619  0: aa
2620  1: a
2621     aaa   
2622  0: aaa
2623  1: a
2624
2625 /^(a){1,}/
2626     bcd
2627 No match
2628     abc
2629  0: a
2630  1: a
2631     aab
2632  0: aa
2633  1: a
2634     aaa
2635  0: aaa
2636  1: a
2637     aaaaaaaa    
2638  0: aaaaaaaa
2639  1: a
2640
2641 /.*\.gif/
2642     borfle\nbib.gif\nno
2643  0: bib.gif
2644
2645 /.{0,}\.gif/
2646     borfle\nbib.gif\nno
2647  0: bib.gif
2648
2649 /.*\.gif/m
2650     borfle\nbib.gif\nno
2651  0: bib.gif
2652
2653 /.*\.gif/s
2654     borfle\nbib.gif\nno
2655  0: borfle\x0abib.gif
2656
2657 /.*\.gif/ms
2658     borfle\nbib.gif\nno
2659  0: borfle\x0abib.gif
2660     
2661 /.*$/
2662     borfle\nbib.gif\nno
2663  0: no
2664
2665 /.*$/m
2666     borfle\nbib.gif\nno
2667  0: borfle
2668
2669 /.*$/s
2670     borfle\nbib.gif\nno
2671  0: borfle\x0abib.gif\x0ano
2672
2673 /.*$/ms
2674     borfle\nbib.gif\nno
2675  0: borfle\x0abib.gif\x0ano
2676     
2677 /.*$/
2678     borfle\nbib.gif\nno\n
2679  0: no
2680
2681 /.*$/m
2682     borfle\nbib.gif\nno\n
2683  0: borfle
2684
2685 /.*$/s
2686     borfle\nbib.gif\nno\n
2687  0: borfle\x0abib.gif\x0ano\x0a
2688
2689 /.*$/ms
2690     borfle\nbib.gif\nno\n
2691  0: borfle\x0abib.gif\x0ano\x0a
2692     
2693 /(.*X|^B)/
2694     abcde\n1234Xyz
2695  0: 1234X
2696  1: 1234X
2697     BarFoo 
2698  0: B
2699  1: B
2700     *** Failers
2701 No match
2702     abcde\nBar  
2703 No match
2704
2705 /(.*X|^B)/m
2706     abcde\n1234Xyz
2707  0: 1234X
2708  1: 1234X
2709     BarFoo 
2710  0: B
2711  1: B
2712     abcde\nBar  
2713  0: B
2714  1: B
2715
2716 /(.*X|^B)/s
2717     abcde\n1234Xyz
2718  0: abcde\x0a1234X
2719  1: abcde\x0a1234X
2720     BarFoo 
2721  0: B
2722  1: B
2723     *** Failers
2724 No match
2725     abcde\nBar  
2726 No match
2727
2728 /(.*X|^B)/ms
2729     abcde\n1234Xyz
2730  0: abcde\x0a1234X
2731  1: abcde\x0a1234X
2732     BarFoo 
2733  0: B
2734  1: B
2735     abcde\nBar  
2736  0: B
2737  1: B
2738
2739 /(?s)(.*X|^B)/
2740     abcde\n1234Xyz
2741  0: abcde\x0a1234X
2742  1: abcde\x0a1234X
2743     BarFoo 
2744  0: B
2745  1: B
2746     *** Failers 
2747 No match
2748     abcde\nBar  
2749 No match
2750
2751 /(?s:.*X|^B)/
2752     abcde\n1234Xyz
2753  0: abcde\x0a1234X
2754     BarFoo 
2755  0: B
2756     *** Failers 
2757 No match
2758     abcde\nBar  
2759 No match
2760
2761 /^.*B/
2762     **** Failers
2763 No match
2764     abc\nB
2765 No match
2766      
2767 /(?s)^.*B/
2768     abc\nB
2769  0: abc\x0aB
2770
2771 /(?m)^.*B/
2772     abc\nB
2773  0: B
2774      
2775 /(?ms)^.*B/
2776     abc\nB
2777  0: abc\x0aB
2778
2779 /(?ms)^B/
2780     abc\nB
2781  0: B
2782
2783 /(?s)B$/
2784     B\n
2785  0: B
2786
2787 /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
2788     123456654321
2789  0: 123456654321
2790   
2791 /^\d\d\d\d\d\d\d\d\d\d\d\d/
2792     123456654321 
2793  0: 123456654321
2794
2795 /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
2796     123456654321
2797  0: 123456654321
2798   
2799 /^[abc]{12}/
2800     abcabcabcabc
2801  0: abcabcabcabc
2802     
2803 /^[a-c]{12}/
2804     abcabcabcabc
2805  0: abcabcabcabc
2806     
2807 /^(a|b|c){12}/
2808     abcabcabcabc 
2809  0: abcabcabcabc
2810  1: c
2811
2812 /^[abcdefghijklmnopqrstuvwxy0123456789]/
2813     n
2814  0: n
2815     *** Failers 
2816 No match
2817     z 
2818 No match
2819
2820 /abcde{0,0}/
2821     abcd
2822  0: abcd
2823     *** Failers
2824 No match
2825     abce  
2826 No match
2827
2828 /ab[cd]{0,0}e/
2829     abe
2830  0: abe
2831     *** Failers
2832 No match
2833     abcde 
2834 No match
2835     
2836 /ab(c){0,0}d/
2837     abd
2838  0: abd
2839     *** Failers
2840 No match
2841     abcd   
2842 No match
2843
2844 /a(b*)/
2845     a
2846  0: a
2847  1: 
2848     ab
2849  0: ab
2850  1: b
2851     abbbb
2852  0: abbbb
2853  1: bbbb
2854     *** Failers
2855  0: a
2856  1: 
2857     bbbbb    
2858 No match
2859     
2860 /ab\d{0}e/
2861     abe
2862  0: abe
2863     *** Failers
2864 No match
2865     ab1e   
2866 No match
2867     
2868 /"([^\\"]+|\\.)*"/
2869     the \"quick\" brown fox
2870  0: "quick"
2871  1: quick
2872     \"the \\\"quick\\\" brown fox\" 
2873  0: "the \"quick\" brown fox"
2874  1:  brown fox
2875
2876 /.*?/g+
2877     abc
2878  0: 
2879  0+ abc
2880  0: a
2881  0+ bc
2882  0: 
2883  0+ bc
2884  0: b
2885  0+ c
2886  0: 
2887  0+ c
2888  0: c
2889  0+ 
2890  0: 
2891  0+ 
2892   
2893 /\b/g+
2894     abc 
2895  0: 
2896  0+ abc
2897  0: 
2898  0+ 
2899
2900 /\b/+g
2901     abc 
2902  0: 
2903  0+ abc
2904  0: 
2905  0+ 
2906
2907 //g
2908     abc
2909  0: 
2910  0: 
2911  0: 
2912  0: 
2913
2914 /<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
2915   <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>
2916  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>
2917  1:  BGCOLOR='#DBE9E9'
2918  2:  align=left valign=top
2919  3: 43.
2920  4: <a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)
2921  5: 
2922  6: 
2923  7: <unset>
2924  8:  align=left valign=top
2925  9: Lega lstaff.com
2926 10:  align=left valign=top
2927 11: CA - Statewide
2928
2929 /a[^a]b/
2930     acb
2931  0: acb
2932     a\nb
2933  0: a\x0ab
2934     
2935 /a.b/
2936     acb
2937  0: acb
2938     *** Failers 
2939 No match
2940     a\nb   
2941 No match
2942     
2943 /a[^a]b/s
2944     acb
2945  0: acb
2946     a\nb  
2947  0: a\x0ab
2948     
2949 /a.b/s
2950     acb
2951  0: acb
2952     a\nb  
2953  0: a\x0ab
2954
2955 /^(b+?|a){1,2}?c/
2956     bac
2957  0: bac
2958  1: a
2959     bbac
2960  0: bbac
2961  1: a
2962     bbbac
2963  0: bbbac
2964  1: a
2965     bbbbac
2966  0: bbbbac
2967  1: a
2968     bbbbbac 
2969  0: bbbbbac
2970  1: a
2971
2972 /^(b+|a){1,2}?c/
2973     bac
2974  0: bac
2975  1: a
2976     bbac
2977  0: bbac
2978  1: a
2979     bbbac
2980  0: bbbac
2981  1: a
2982     bbbbac
2983  0: bbbbac
2984  1: a
2985     bbbbbac 
2986  0: bbbbbac
2987  1: a
2988     
2989 /(?!\A)x/m
2990     x\nb\n
2991 No match
2992     a\bx\n  
2993  0: x
2994     
2995 /\x0{ab}/
2996     \0{ab} 
2997  0: \x00{ab}
2998
2999 /(A|B)*?CD/
3000     CD 
3001  0: CD
3002     
3003 /(A|B)*CD/
3004     CD 
3005  0: CD
3006
3007 /(AB)*?\1/
3008     ABABAB
3009  0: ABAB
3010  1: AB
3011
3012 /(AB)*\1/
3013     ABABAB
3014  0: ABABAB
3015  1: AB
3016     
3017 /(?<!bar)foo/
3018     foo
3019  0: foo
3020     catfood
3021  0: foo
3022     arfootle
3023  0: foo
3024     rfoosh
3025  0: foo
3026     *** Failers
3027 No match
3028     barfoo
3029 No match
3030     towbarfoo
3031 No match
3032
3033 /\w{3}(?<!bar)foo/
3034     catfood
3035  0: catfoo
3036     *** Failers
3037 No match
3038     foo
3039 No match
3040     barfoo
3041 No match
3042     towbarfoo
3043 No match
3044
3045 /(?<=(foo)a)bar/
3046     fooabar
3047  0: bar
3048  1: foo
3049     *** Failers
3050 No match
3051     bar
3052 No match
3053     foobbar
3054 No match
3055       
3056 /\Aabc\z/m
3057     abc
3058  0: abc
3059     *** Failers
3060 No match
3061     abc\n   
3062 No match
3063     qqq\nabc
3064 No match
3065     abc\nzzz
3066 No match
3067     qqq\nabc\nzzz
3068 No match
3069
3070 "(?>.*/)foo"
3071     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
3072 No match
3073
3074 "(?>.*/)foo"
3075     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
3076  0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
3077
3078 /(?>(\.\d\d[1-9]?))\d+/
3079     1.230003938
3080  0: .230003938
3081  1: .23
3082     1.875000282
3083  0: .875000282
3084  1: .875
3085     *** Failers 
3086 No match
3087     1.235 
3088 No match
3089
3090 /^((?>\w+)|(?>\s+))*$/
3091     now is the time for all good men to come to the aid of the party
3092  0: now is the time for all good men to come to the aid of the party
3093  1: party
3094     *** Failers
3095 No match
3096     this is not a line with only words and spaces!
3097 No match
3098     
3099 /(\d+)(\w)/
3100     12345a
3101  0: 12345a
3102  1: 12345
3103  2: a
3104     12345+ 
3105  0: 12345
3106  1: 1234
3107  2: 5
3108
3109 /((?>\d+))(\w)/
3110     12345a
3111  0: 12345a
3112  1: 12345
3113  2: a
3114     *** Failers
3115 No match
3116     12345+ 
3117 No match
3118
3119 /(?>a+)b/
3120     aaab
3121  0: aaab
3122
3123 /((?>a+)b)/
3124     aaab
3125  0: aaab
3126  1: aaab
3127
3128 /(?>(a+))b/
3129     aaab
3130  0: aaab
3131  1: aaa
3132
3133 /(?>b)+/
3134     aaabbbccc
3135  0: bbb
3136
3137 /(?>a+|b+|c+)*c/
3138     aaabbbbccccd
3139  0: aaabbbbc
3140
3141 /((?>[^()]+)|\([^()]*\))+/
3142     ((abc(ade)ufh()()x
3143  0: abc(ade)ufh()()x
3144  1: x
3145     
3146 /\(((?>[^()]+)|\([^()]+\))+\)/ 
3147     (abc)
3148  0: (abc)
3149  1: abc
3150     (abc(def)xyz)
3151  0: (abc(def)xyz)
3152  1: xyz
3153     *** Failers
3154 No match
3155     ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa   
3156 No match
3157
3158 /a(?-i)b/i
3159     ab
3160  0: ab
3161     Ab
3162  0: Ab
3163     *** Failers 
3164 No match
3165     aB
3166 No match
3167     AB
3168 No match
3169         
3170 /(a (?x)b c)d e/
3171     a bcd e
3172  0: a bcd e
3173  1: a bc
3174     *** Failers
3175 No match
3176     a b cd e
3177 No match
3178     abcd e   
3179 No match
3180     a bcde 
3181 No match
3182  
3183 /(a b(?x)c d (?-x)e f)/
3184     a bcde f
3185  0: a bcde f
3186  1: a bcde f
3187     *** Failers
3188 No match
3189     abcdef  
3190 No match
3191
3192 /(a(?i)b)c/
3193     abc
3194  0: abc
3195  1: ab
3196     aBc
3197  0: aBc
3198  1: aB
3199     *** Failers
3200 No match
3201     abC
3202 No match
3203     aBC  
3204 No match
3205     Abc
3206 No match
3207     ABc
3208 No match
3209     ABC
3210 No match
3211     AbC
3212 No match
3213     
3214 /a(?i:b)c/
3215     abc
3216  0: abc
3217     aBc
3218  0: aBc
3219     *** Failers 
3220 No match
3221     ABC
3222 No match
3223     abC
3224 No match
3225     aBC
3226 No match
3227     
3228 /a(?i:b)*c/
3229     aBc
3230  0: aBc
3231     aBBc
3232  0: aBBc
3233     *** Failers 
3234 No match
3235     aBC
3236 No match
3237     aBBC
3238 No match
3239     
3240 /a(?=b(?i)c)\w\wd/
3241     abcd
3242  0: abcd
3243     abCd
3244  0: abCd
3245     *** Failers
3246 No match
3247     aBCd
3248 No match
3249     abcD     
3250 No match
3251     
3252 /(?s-i:more.*than).*million/i
3253     more than million
3254  0: more than million
3255     more than MILLION
3256  0: more than MILLION
3257     more \n than Million 
3258  0: more \x0a than Million
3259     *** Failers
3260 No match
3261     MORE THAN MILLION    
3262 No match
3263     more \n than \n million 
3264 No match
3265
3266 /(?:(?s-i)more.*than).*million/i
3267     more than million
3268  0: more than million
3269     more than MILLION
3270  0: more than MILLION
3271     more \n than Million 
3272  0: more \x0a than Million
3273     *** Failers
3274 No match
3275     MORE THAN MILLION    
3276 No match
3277     more \n than \n million 
3278 No match
3279     
3280 /(?>a(?i)b+)+c/ 
3281     abc
3282  0: abc
3283     aBbc
3284  0: aBbc
3285     aBBc 
3286  0: aBBc
3287     *** Failers
3288 No match
3289     Abc
3290 No match
3291     abAb    
3292 No match
3293     abbC 
3294 No match
3295     
3296 /(?=a(?i)b)\w\wc/
3297     abc
3298  0: abc
3299     aBc
3300  0: aBc
3301     *** Failers
3302 No match
3303     Ab 
3304 No match
3305     abC
3306 No match
3307     aBC     
3308 No match
3309     
3310 /(?<=a(?i)b)(\w\w)c/
3311     abxxc
3312  0: xxc
3313  1: xx
3314     aBxxc
3315  0: xxc
3316  1: xx
3317     *** Failers
3318 No match
3319     Abxxc
3320 No match
3321     ABxxc
3322 No match
3323     abxxC      
3324 No match
3325
3326 /(?:(a)|b)(?(1)A|B)/
3327     aA
3328  0: aA
3329  1: a
3330     bB
3331  0: bB
3332     *** Failers
3333 No match
3334     aB
3335 No match
3336     bA    
3337 No match
3338
3339 /^(a)?(?(1)a|b)+$/
3340     aa
3341  0: aa
3342  1: a
3343     b
3344  0: b
3345     bb  
3346  0: bb
3347     *** Failers
3348 No match
3349     ab   
3350 No match
3351
3352 /^(?(?=abc)\w{3}:|\d\d)$/
3353     abc:
3354  0: abc:
3355     12
3356  0: 12
3357     *** Failers
3358 No match
3359     123
3360 No match
3361     xyz    
3362 No match
3363
3364 /^(?(?!abc)\d\d|\w{3}:)$/
3365     abc:
3366  0: abc:
3367     12
3368  0: 12
3369     *** Failers
3370 No match
3371     123
3372 No match
3373     xyz    
3374 No match
3375     
3376 /(?(?<=foo)bar|cat)/
3377     foobar
3378  0: bar
3379     cat
3380  0: cat
3381     fcat
3382  0: cat
3383     focat   
3384  0: cat
3385     *** Failers
3386 No match
3387     foocat  
3388 No match
3389
3390 /(?(?<!foo)cat|bar)/
3391     foobar
3392  0: bar
3393     cat
3394  0: cat
3395     fcat
3396  0: cat
3397     focat   
3398  0: cat
3399     *** Failers
3400 No match
3401     foocat  
3402 No match
3403
3404 /( \( )? [^()]+ (?(1) \) |) /x
3405     abcd
3406  0: abcd
3407     (abcd)
3408  0: (abcd)
3409  1: (
3410     the quick (abcd) fox
3411  0: the quick 
3412     (abcd   
3413  0: abcd
3414
3415 /( \( )? [^()]+ (?(1) \) ) /x
3416     abcd
3417  0: abcd
3418     (abcd)
3419  0: (abcd)
3420  1: (
3421     the quick (abcd) fox
3422  0: the quick 
3423     (abcd   
3424  0: abcd
3425
3426 /^(?(2)a|(1)(2))+$/
3427     12
3428  0: 12
3429  1: 1
3430  2: 2
3431     12a
3432  0: 12a
3433  1: 1
3434  2: 2
3435     12aa
3436  0: 12aa
3437  1: 1
3438  2: 2
3439     *** Failers
3440 No match
3441     1234    
3442 No match
3443
3444 /((?i)blah)\s+\1/
3445     blah blah
3446  0: blah blah
3447  1: blah
3448     BLAH BLAH
3449  0: BLAH BLAH
3450  1: BLAH
3451     Blah Blah
3452  0: Blah Blah
3453  1: Blah
3454     blaH blaH
3455  0: blaH blaH
3456  1: blaH
3457     *** Failers
3458 No match
3459     blah BLAH
3460 No match
3461     Blah blah      
3462 No match
3463     blaH blah 
3464 No match
3465
3466 /((?i)blah)\s+(?i:\1)/
3467     blah blah
3468  0: blah blah
3469  1: blah
3470     BLAH BLAH
3471  0: BLAH BLAH
3472  1: BLAH
3473     Blah Blah
3474  0: Blah Blah
3475  1: Blah
3476     blaH blaH
3477  0: blaH blaH
3478  1: blaH
3479     blah BLAH
3480  0: blah BLAH
3481  1: blah
3482     Blah blah      
3483  0: Blah blah
3484  1: Blah
3485     blaH blah 
3486  0: blaH blah
3487  1: blaH
3488
3489 /(?>a*)*/
3490     a
3491  0: a
3492     aa
3493  0: aa
3494     aaaa
3495  0: aaaa
3496     
3497 /(abc|)+/
3498     abc
3499  0: abc
3500  1: 
3501     abcabc
3502  0: abcabc
3503  1: 
3504     abcabcabc
3505  0: abcabcabc
3506  1: 
3507     xyz      
3508  0: 
3509  1: 
3510
3511 /([a]*)*/
3512     a
3513  0: a
3514  1: 
3515     aaaaa 
3516  0: aaaaa
3517  1: 
3518  
3519 /([ab]*)*/
3520     a
3521  0: a
3522  1: 
3523     b
3524  0: b
3525  1: 
3526     ababab
3527  0: ababab
3528  1: 
3529     aaaabcde
3530  0: aaaab
3531  1: 
3532     bbbb    
3533  0: bbbb
3534  1: 
3535  
3536 /([^a]*)*/
3537     b
3538  0: b
3539  1: 
3540     bbbb
3541  0: bbbb
3542  1: 
3543     aaa   
3544  0: 
3545  1: 
3546  
3547 /([^ab]*)*/
3548     cccc
3549  0: cccc
3550  1: 
3551     abab  
3552  0: 
3553  1: 
3554  
3555 /([a]*?)*/
3556     a
3557  0: 
3558  1: 
3559     aaaa 
3560  0: 
3561  1: 
3562  
3563 /([ab]*?)*/
3564     a
3565  0: 
3566  1: 
3567     b
3568  0: 
3569  1: 
3570     abab
3571  0: 
3572  1: 
3573     baba   
3574  0: 
3575  1: 
3576  
3577 /([^a]*?)*/
3578     b
3579  0: 
3580  1: 
3581     bbbb
3582  0: 
3583  1: 
3584     aaa   
3585  0: 
3586  1: 
3587  
3588 /([^ab]*?)*/
3589     c
3590  0: 
3591  1: 
3592     cccc
3593  0: 
3594  1: 
3595     baba   
3596  0: 
3597  1: 
3598  
3599 /(?>a*)*/
3600     a
3601  0: a
3602     aaabcde 
3603  0: aaa
3604  
3605 /((?>a*))*/
3606     aaaaa
3607  0: aaaaa
3608  1: 
3609     aabbaa 
3610  0: aa
3611  1: 
3612  
3613 /((?>a*?))*/
3614     aaaaa
3615  0: 
3616  1: 
3617     aabbaa 
3618  0: 
3619  1: 
3620
3621 /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /x
3622     12-sep-98
3623  0: 12-sep-98
3624     12-09-98
3625  0: 12-09-98
3626     *** Failers
3627 No match
3628     sep-12-98
3629 No match
3630         
3631 /(?<=(foo))bar\1/
3632     foobarfoo
3633  0: barfoo
3634  1: foo
3635     foobarfootling 
3636  0: barfoo
3637  1: foo
3638     *** Failers
3639 No match
3640     foobar
3641 No match
3642     barfoo   
3643 No match
3644
3645 /(?i:saturday|sunday)/
3646     saturday
3647  0: saturday
3648     sunday
3649  0: sunday
3650     Saturday
3651  0: Saturday
3652     Sunday
3653  0: Sunday
3654     SATURDAY
3655  0: SATURDAY
3656     SUNDAY
3657  0: SUNDAY
3658     SunDay
3659  0: SunDay
3660     
3661 /(a(?i)bc|BB)x/
3662     abcx
3663  0: abcx
3664  1: abc
3665     aBCx
3666  0: aBCx
3667  1: aBC
3668     bbx
3669  0: bbx
3670  1: bb
3671     BBx
3672  0: BBx
3673  1: BB
3674     *** Failers
3675 No match
3676     abcX
3677 No match
3678     aBCX
3679 No match
3680     bbX
3681 No match
3682     BBX               
3683 No match
3684
3685 /^([ab](?i)[cd]|[ef])/
3686     ac
3687  0: ac
3688  1: ac
3689     aC
3690  0: aC
3691  1: aC
3692     bD
3693  0: bD
3694  1: bD
3695     elephant
3696  0: e
3697  1: e
3698     Europe 
3699  0: E
3700  1: E
3701     frog
3702  0: f
3703  1: f
3704     France
3705  0: F
3706  1: F
3707     *** Failers
3708 No match
3709     Africa     
3710 No match
3711
3712 /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
3713     ab
3714  0: ab
3715  1: ab
3716     aBd
3717  0: aBd
3718  1: aBd
3719     xy
3720  0: xy
3721  1: xy
3722     xY
3723  0: xY
3724  1: xY
3725     zebra
3726  0: z
3727  1: z
3728     Zambesi
3729  0: Z
3730  1: Z
3731     *** Failers
3732 No match
3733     aCD  
3734 No match
3735     XY  
3736 No match
3737
3738 /(?<=foo\n)^bar/m
3739     foo\nbar
3740  0: bar
3741     *** Failers
3742 No match
3743     bar
3744 No match
3745     baz\nbar   
3746 No match
3747
3748 /(?<=(?<!foo)bar)baz/
3749     barbaz
3750  0: baz
3751     barbarbaz 
3752  0: baz
3753     koobarbaz 
3754  0: baz
3755     *** Failers
3756 No match
3757     baz
3758 No match
3759     foobarbaz 
3760 No match
3761
3762 /The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/
3763 /it wrong; it sets $1 to aaa rather than aa. Compare the following test,/
3764 No match
3765 /where it does set $1 to aa when matching aaaaaa./
3766 No match
3767
3768 /^(a\1?){4}$/
3769     a
3770 No match
3771     aa
3772 No match
3773     aaa
3774 No match
3775     aaaa
3776  0: aaaa
3777  1: a
3778     aaaaa
3779  0: aaaaa
3780  1: a
3781     aaaaaaa
3782  0: aaaaaaa
3783  1: a
3784     aaaaaaaa
3785 No match
3786     aaaaaaaaa
3787 No match
3788     aaaaaaaaaa
3789  0: aaaaaaaaaa
3790  1: aaaa
3791     aaaaaaaaaaa
3792 No match
3793     aaaaaaaaaaaa
3794 No match
3795     aaaaaaaaaaaaa
3796 No match
3797     aaaaaaaaaaaaaa
3798 No match
3799     aaaaaaaaaaaaaaa
3800 No match
3801     aaaaaaaaaaaaaaaa               
3802 No match
3803
3804 /^(a\1?)(a\1?)(a\2?)(a\3?)$/
3805     a
3806 No match
3807     aa
3808 No match
3809     aaa
3810 No match
3811     aaaa
3812  0: aaaa
3813  1: a
3814  2: a
3815  3: a
3816  4: a
3817     aaaaa
3818  0: aaaaa
3819  1: a
3820  2: aa
3821  3: a
3822  4: a
3823     aaaaaa
3824  0: aaaaaa
3825  1: a
3826  2: aa
3827  3: a
3828  4: aa
3829     aaaaaaa
3830  0: aaaaaaa
3831  1: a
3832  2: aa
3833  3: aaa
3834  4: a
3835     aaaaaaaa
3836 No match
3837     aaaaaaaaa
3838 No match
3839     aaaaaaaaaa
3840  0: aaaaaaaaaa
3841  1: a
3842  2: aa
3843  3: aaa
3844  4: aaaa
3845     aaaaaaaaaaa
3846 No match
3847     aaaaaaaaaaaa
3848 No match
3849     aaaaaaaaaaaaa
3850 No match
3851     aaaaaaaaaaaaaa
3852 No match
3853     aaaaaaaaaaaaaaa
3854 No match
3855     aaaaaaaaaaaaaaaa               
3856 No match
3857
3858 /The following tests are taken from the Perl 5.005 test suite; some of them/
3859 /are compatible with 5.004, but I'd rather not have to sort them out./
3860 No match
3861
3862 /abc/
3863     abc
3864  0: abc
3865     xabcy
3866  0: abc
3867     ababc
3868  0: abc
3869     *** Failers
3870 No match
3871     xbc
3872 No match
3873     axc
3874 No match
3875     abx
3876 No match
3877
3878 /ab*c/
3879     abc
3880  0: abc
3881
3882 /ab*bc/
3883     abc
3884  0: abc
3885     abbc
3886  0: abbc
3887     abbbbc
3888  0: abbbbc
3889
3890 /.{1}/
3891     abbbbc
3892  0: a
3893
3894 /.{3,4}/
3895     abbbbc
3896  0: abbb
3897
3898 /ab{0,}bc/
3899     abbbbc
3900  0: abbbbc
3901
3902 /ab+bc/
3903     abbc
3904  0: abbc
3905     *** Failers
3906 No match
3907     abc
3908 No match
3909     abq
3910 No match
3911
3912 /ab{1,}bc/
3913
3914 /ab+bc/
3915     abbbbc
3916  0: abbbbc
3917
3918 /ab{1,}bc/
3919     abbbbc
3920  0: abbbbc
3921
3922 /ab{1,3}bc/
3923     abbbbc
3924  0: abbbbc
3925
3926 /ab{3,4}bc/
3927     abbbbc
3928  0: abbbbc
3929
3930 /ab{4,5}bc/
3931     *** Failers
3932 No match
3933     abq
3934 No match
3935     abbbbc
3936 No match
3937
3938 /ab?bc/
3939     abbc
3940  0: abbc
3941     abc
3942  0: abc
3943
3944 /ab{0,1}bc/
3945     abc
3946  0: abc
3947
3948 /ab?bc/
3949
3950 /ab?c/
3951     abc
3952  0: abc
3953
3954 /ab{0,1}c/
3955     abc
3956  0: abc
3957
3958 /^abc$/
3959     abc
3960  0: abc
3961     *** Failers
3962 No match
3963     abbbbc
3964 No match
3965     abcc
3966 No match
3967
3968 /^abc/
3969     abcc
3970  0: abc
3971
3972 /^abc$/
3973
3974 /abc$/
3975     aabc
3976  0: abc
3977     *** Failers
3978 No match
3979     aabc
3980  0: abc
3981     aabcd
3982 No match
3983
3984 /^/
3985     abc
3986  0: 
3987
3988 /$/
3989     abc
3990  0: 
3991
3992 /a.c/
3993     abc
3994  0: abc
3995     axc
3996  0: axc
3997
3998 /a.*c/
3999     axyzc
4000  0: axyzc
4001
4002 /a[bc]d/
4003     abd
4004  0: abd
4005     *** Failers
4006 No match
4007     axyzd
4008 No match
4009     abc
4010 No match
4011
4012 /a[b-d]e/
4013     ace
4014  0: ace
4015
4016 /a[b-d]/
4017     aac
4018  0: ac
4019
4020 /a[-b]/
4021     a-
4022  0: a-
4023
4024 /a[b-]/
4025     a-
4026  0: a-
4027
4028 /a]/
4029     a]
4030  0: a]
4031
4032 /a[]]b/
4033     a]b
4034  0: a]b
4035
4036 /a[^bc]d/
4037     aed
4038  0: aed
4039     *** Failers
4040 No match
4041     abd
4042 No match
4043     abd
4044 No match
4045
4046 /a[^-b]c/
4047     adc
4048  0: adc
4049
4050 /a[^]b]c/
4051     adc
4052  0: adc
4053     *** Failers
4054 No match
4055     a-c
4056  0: a-c
4057     a]c
4058 No match
4059
4060 /\ba\b/
4061     a-
4062  0: a
4063     -a
4064  0: a
4065     -a-
4066  0: a
4067
4068 /\by\b/
4069     *** Failers
4070 No match
4071     xy
4072 No match
4073     yz
4074 No match
4075     xyz
4076 No match
4077
4078 /\Ba\B/
4079     *** Failers
4080  0: a
4081     a-
4082 No match
4083     -a
4084 No match
4085     -a-
4086 No match
4087
4088 /\By\b/
4089     xy
4090  0: y
4091
4092 /\by\B/
4093     yz
4094  0: y
4095
4096 /\By\B/
4097     xyz
4098  0: y
4099
4100 /\w/
4101     a
4102  0: a
4103
4104 /\W/
4105     -
4106  0: -
4107     *** Failers
4108  0: *
4109     -
4110  0: -
4111     a
4112 No match
4113
4114 /a\sb/
4115     a b
4116  0: a b
4117
4118 /a\Sb/
4119     a-b
4120  0: a-b
4121     *** Failers
4122 No match
4123     a-b
4124  0: a-b
4125     a b
4126 No match
4127
4128 /\d/
4129     1
4130  0: 1
4131
4132 /\D/
4133     -
4134  0: -
4135     *** Failers
4136  0: *
4137     -
4138  0: -
4139     1
4140 No match
4141
4142 /[\w]/
4143     a
4144  0: a
4145
4146 /[\W]/
4147     -
4148  0: -
4149     *** Failers
4150  0: *
4151     -
4152  0: -
4153     a
4154 No match
4155
4156 /a[\s]b/
4157     a b
4158  0: a b
4159
4160 /a[\S]b/
4161     a-b
4162  0: a-b
4163     *** Failers
4164 No match
4165     a-b
4166  0: a-b
4167     a b
4168 No match
4169
4170 /[\d]/
4171     1
4172  0: 1
4173
4174 /[\D]/
4175     -
4176  0: -
4177     *** Failers
4178  0: *
4179     -
4180  0: -
4181     1
4182 No match
4183
4184 /ab|cd/
4185     abc
4186  0: ab
4187     abcd
4188  0: ab
4189
4190 /()ef/
4191     def
4192  0: ef
4193  1: 
4194
4195 /$b/
4196
4197 /a\(b/
4198     a(b
4199  0: a(b
4200
4201 /a\(*b/
4202     ab
4203  0: ab
4204     a((b
4205  0: a((b
4206
4207 /a\\b/
4208     a\b
4209 No match
4210
4211 /((a))/
4212     abc
4213  0: a
4214  1: a
4215  2: a
4216
4217 /(a)b(c)/
4218     abc
4219  0: abc
4220  1: a
4221  2: c
4222
4223 /a+b+c/
4224     aabbabc
4225  0: abc
4226
4227 /a{1,}b{1,}c/
4228     aabbabc
4229  0: abc
4230
4231 /a.+?c/
4232     abcabc
4233  0: abc
4234
4235 /(a+|b)*/
4236     ab
4237  0: ab
4238  1: b
4239
4240 /(a+|b){0,}/
4241     ab
4242  0: ab
4243  1: b
4244
4245 /(a+|b)+/
4246     ab
4247  0: ab
4248  1: b
4249
4250 /(a+|b){1,}/
4251     ab
4252  0: ab
4253  1: b
4254
4255 /(a+|b)?/
4256     ab
4257  0: a
4258  1: a
4259
4260 /(a+|b){0,1}/
4261     ab
4262  0: a
4263  1: a
4264
4265 /[^ab]*/
4266     cde
4267  0: cde
4268
4269 /abc/
4270     *** Failers
4271 No match
4272     b
4273 No match
4274     
4275
4276 /a*/
4277     
4278
4279 /([abc])*d/
4280     abbbcd
4281  0: abbbcd
4282  1: c
4283
4284 /([abc])*bcd/
4285     abcd
4286  0: abcd
4287  1: a
4288
4289 /a|b|c|d|e/
4290     e
4291  0: e
4292
4293 /(a|b|c|d|e)f/
4294     ef
4295  0: ef
4296  1: e
4297
4298 /abcd*efg/
4299     abcdefg
4300  0: abcdefg
4301
4302 /ab*/
4303     xabyabbbz
4304  0: ab
4305     xayabbbz
4306  0: a
4307
4308 /(ab|cd)e/
4309     abcde
4310  0: cde
4311  1: cd
4312
4313 /[abhgefdc]ij/
4314     hij
4315  0: hij
4316
4317 /^(ab|cd)e/
4318
4319 /(abc|)ef/
4320     abcdef
4321  0: ef
4322  1: 
4323
4324 /(a|b)c*d/
4325     abcd
4326  0: bcd
4327  1: b
4328
4329 /(ab|ab*)bc/
4330     abc
4331  0: abc
4332  1: a
4333
4334 /a([bc]*)c*/
4335     abc
4336  0: abc
4337  1: bc
4338
4339 /a([bc]*)(c*d)/
4340     abcd
4341  0: abcd
4342  1: bc
4343  2: d
4344
4345 /a([bc]+)(c*d)/
4346     abcd
4347  0: abcd
4348  1: bc
4349  2: d
4350
4351 /a([bc]*)(c+d)/
4352     abcd
4353  0: abcd
4354  1: b
4355  2: cd
4356
4357 /a[bcd]*dcdcde/
4358     adcdcde
4359  0: adcdcde
4360
4361 /a[bcd]+dcdcde/
4362     *** Failers
4363 No match
4364     abcde
4365 No match
4366     adcdcde
4367 No match
4368
4369 /(ab|a)b*c/
4370     abc
4371  0: abc
4372  1: ab
4373
4374 /((a)(b)c)(d)/
4375     abcd
4376  0: abcd
4377  1: abc
4378  2: a
4379  3: b
4380  4: d
4381
4382 /[a-zA-Z_][a-zA-Z0-9_]*/
4383     alpha
4384  0: alpha
4385
4386 /^a(bc+|b[eh])g|.h$/
4387     abh
4388  0: bh
4389
4390 /(bc+d$|ef*g.|h?i(j|k))/
4391     effgz
4392  0: effgz
4393  1: effgz
4394     ij
4395  0: ij
4396  1: ij
4397  2: j
4398     reffgz
4399  0: effgz
4400  1: effgz
4401     *** Failers
4402 No match
4403     effg
4404 No match
4405     bcdd
4406 No match
4407
4408 /((((((((((a))))))))))/
4409     a
4410  0: a
4411  1: a
4412  2: a
4413  3: a
4414  4: a
4415  5: a
4416  6: a
4417  7: a
4418  8: a
4419  9: a
4420 10: a
4421
4422 /((((((((((a))))))))))\10/
4423     aa
4424  0: aa
4425  1: a
4426  2: a
4427  3: a
4428  4: a
4429  5: a
4430  6: a
4431  7: a
4432  8: a
4433  9: a
4434 10: a
4435
4436 /(((((((((a)))))))))/
4437     a
4438  0: a
4439  1: a
4440  2: a
4441  3: a
4442  4: a
4443  5: a
4444  6: a
4445  7: a
4446  8: a
4447  9: a
4448
4449 /multiple words of text/
4450     *** Failers
4451 No match
4452     aa
4453 No match
4454     uh-uh
4455 No match
4456
4457 /multiple words/
4458     multiple words, yeah
4459  0: multiple words
4460
4461 /(.*)c(.*)/
4462     abcde
4463  0: abcde
4464  1: ab
4465  2: de
4466
4467 /\((.*), (.*)\)/
4468     (a, b)
4469  0: (a, b)
4470  1: a
4471  2: b
4472
4473 /[k]/
4474
4475 /abcd/
4476     abcd
4477  0: abcd
4478
4479 /a(bc)d/
4480     abcd
4481  0: abcd
4482  1: bc
4483
4484 /a[-]?c/
4485     ac
4486  0: ac
4487
4488 /(abc)\1/
4489     abcabc
4490  0: abcabc
4491  1: abc
4492
4493 /([a-c]*)\1/
4494     abcabc
4495  0: abcabc
4496  1: abc
4497
4498 /(a)|\1/
4499     a
4500  0: a
4501  1: a
4502     *** Failers
4503  0: a
4504  1: a
4505     ab
4506  0: a
4507  1: a
4508     x
4509 No match
4510
4511 /(([a-c])b*?\2)*/
4512     ababbbcbc
4513  0: ababb
4514  1: bb
4515  2: b
4516
4517 /(([a-c])b*?\2){3}/
4518     ababbbcbc
4519  0: ababbbcbc
4520  1: cbc
4521  2: c
4522
4523 /((\3|b)\2(a)x)+/
4524     aaaxabaxbaaxbbax
4525  0: bbax
4526  1: bbax
4527  2: b
4528  3: a
4529
4530 /((\3|b)\2(a)){2,}/
4531     bbaababbabaaaaabbaaaabba
4532  0: bbaaaabba
4533  1: bba
4534  2: b
4535  3: a
4536
4537 /abc/i
4538     ABC
4539  0: ABC
4540     XABCY
4541  0: ABC
4542     ABABC
4543  0: ABC
4544     *** Failers
4545 No match
4546     aaxabxbaxbbx
4547 No match
4548     XBC
4549 No match
4550     AXC
4551 No match
4552     ABX
4553 No match
4554
4555 /ab*c/i
4556     ABC
4557  0: ABC
4558
4559 /ab*bc/i
4560     ABC
4561  0: ABC
4562     ABBC
4563  0: ABBC
4564
4565 /ab*?bc/i
4566     ABBBBC
4567  0: ABBBBC
4568
4569 /ab{0,}?bc/i
4570     ABBBBC
4571  0: ABBBBC
4572
4573 /ab+?bc/i
4574     ABBC
4575  0: ABBC
4576
4577 /ab+bc/i
4578     *** Failers
4579 No match
4580     ABC
4581 No match
4582     ABQ
4583 No match
4584
4585 /ab{1,}bc/i
4586
4587 /ab+bc/i
4588     ABBBBC
4589  0: ABBBBC
4590
4591 /ab{1,}?bc/i
4592     ABBBBC
4593  0: ABBBBC
4594
4595 /ab{1,3}?bc/i
4596     ABBBBC
4597  0: ABBBBC
4598
4599 /ab{3,4}?bc/i
4600     ABBBBC
4601  0: ABBBBC
4602
4603 /ab{4,5}?bc/i
4604     *** Failers
4605 No match
4606     ABQ
4607 No match
4608     ABBBBC
4609 No match
4610
4611 /ab??bc/i
4612     ABBC
4613  0: ABBC
4614     ABC
4615  0: ABC
4616
4617 /ab{0,1}?bc/i
4618     ABC
4619  0: ABC
4620
4621 /ab??bc/i
4622
4623 /ab??c/i
4624     ABC
4625  0: ABC
4626
4627 /ab{0,1}?c/i
4628     ABC
4629  0: ABC
4630
4631 /^abc$/i
4632     ABC
4633  0: ABC
4634     *** Failers
4635 No match
4636     ABBBBC
4637 No match
4638     ABCC
4639 No match
4640
4641 /^abc/i
4642     ABCC
4643  0: ABC
4644
4645 /^abc$/i
4646
4647 /abc$/i
4648     AABC
4649  0: ABC
4650
4651 /^/i
4652     ABC
4653  0: 
4654
4655 /$/i
4656     ABC
4657  0: 
4658
4659 /a.c/i
4660     ABC
4661  0: ABC
4662     AXC
4663  0: AXC
4664
4665 /a.*?c/i
4666     AXYZC
4667  0: AXYZC
4668
4669 /a.*c/i
4670     *** Failers
4671 No match
4672     AABC
4673  0: AABC
4674     AXYZD
4675 No match
4676
4677 /a[bc]d/i
4678     ABD
4679  0: ABD
4680
4681 /a[b-d]e/i
4682     ACE
4683  0: ACE
4684     *** Failers
4685 No match
4686     ABC
4687 No match
4688     ABD
4689 No match
4690
4691 /a[b-d]/i
4692     AAC
4693  0: AC
4694
4695 /a[-b]/i
4696     A-
4697  0: A-
4698
4699 /a[b-]/i
4700     A-
4701  0: A-
4702
4703 /a]/i
4704     A]
4705  0: A]
4706
4707 /a[]]b/i
4708     A]B
4709  0: A]B
4710
4711 /a[^bc]d/i
4712     AED
4713  0: AED
4714
4715 /a[^-b]c/i
4716     ADC
4717  0: ADC
4718     *** Failers
4719 No match
4720     ABD
4721 No match
4722     A-C
4723 No match
4724
4725 /a[^]b]c/i
4726     ADC
4727  0: ADC
4728
4729 /ab|cd/i
4730     ABC
4731  0: AB
4732     ABCD
4733  0: AB
4734
4735 /()ef/i
4736     DEF
4737  0: EF
4738  1: 
4739
4740 /$b/i
4741     *** Failers
4742 No match
4743     A]C
4744 No match
4745     B
4746 No match
4747
4748 /a\(b/i
4749     A(B
4750  0: A(B
4751
4752 /a\(*b/i
4753     AB
4754  0: AB
4755     A((B
4756  0: A((B
4757
4758 /a\\b/i
4759     A\B
4760 No match
4761
4762 /((a))/i
4763     ABC
4764  0: A
4765  1: A
4766  2: A
4767
4768 /(a)b(c)/i
4769     ABC
4770  0: ABC
4771  1: A
4772  2: C
4773
4774 /a+b+c/i
4775     AABBABC
4776  0: ABC
4777
4778 /a{1,}b{1,}c/i
4779     AABBABC
4780  0: ABC
4781
4782 /a.+?c/i
4783     ABCABC
4784  0: ABC
4785
4786 /a.*?c/i
4787     ABCABC
4788  0: ABC
4789
4790 /a.{0,5}?c/i
4791     ABCABC
4792  0: ABC
4793
4794 /(a+|b)*/i
4795     AB
4796  0: AB
4797  1: B
4798
4799 /(a+|b){0,}/i
4800     AB
4801  0: AB
4802  1: B
4803
4804 /(a+|b)+/i
4805     AB
4806  0: AB
4807  1: B
4808
4809 /(a+|b){1,}/i
4810     AB
4811  0: AB
4812  1: B
4813
4814 /(a+|b)?/i
4815     AB
4816  0: A
4817  1: A
4818
4819 /(a+|b){0,1}/i
4820     AB
4821  0: A
4822  1: A
4823
4824 /(a+|b){0,1}?/i
4825     AB
4826  0: 
4827
4828 /[^ab]*/i
4829     CDE
4830  0: CDE
4831
4832 /abc/i
4833
4834 /a*/i
4835     
4836
4837 /([abc])*d/i
4838     ABBBCD
4839  0: ABBBCD
4840  1: C
4841
4842 /([abc])*bcd/i
4843     ABCD
4844  0: ABCD
4845  1: A
4846
4847 /a|b|c|d|e/i
4848     E
4849  0: E
4850
4851 /(a|b|c|d|e)f/i
4852     EF
4853  0: EF
4854  1: E
4855
4856 /abcd*efg/i
4857     ABCDEFG
4858  0: ABCDEFG
4859
4860 /ab*/i
4861     XABYABBBZ
4862  0: AB
4863     XAYABBBZ
4864  0: A
4865
4866 /(ab|cd)e/i
4867     ABCDE
4868  0: CDE
4869  1: CD
4870
4871 /[abhgefdc]ij/i
4872     HIJ
4873  0: HIJ
4874
4875 /^(ab|cd)e/i
4876     ABCDE
4877 No match
4878
4879 /(abc|)ef/i
4880     ABCDEF
4881  0: EF
4882  1: 
4883
4884 /(a|b)c*d/i
4885     ABCD
4886  0: BCD
4887  1: B
4888
4889 /(ab|ab*)bc/i
4890     ABC
4891  0: ABC
4892  1: A
4893
4894 /a([bc]*)c*/i
4895     ABC
4896  0: ABC
4897  1: BC
4898
4899 /a([bc]*)(c*d)/i
4900     ABCD
4901  0: ABCD
4902  1: BC
4903  2: D
4904
4905 /a([bc]+)(c*d)/i
4906     ABCD
4907  0: ABCD
4908  1: BC
4909  2: D
4910
4911 /a([bc]*)(c+d)/i
4912     ABCD
4913  0: ABCD
4914  1: B
4915  2: CD
4916
4917 /a[bcd]*dcdcde/i
4918     ADCDCDE
4919  0: ADCDCDE
4920
4921 /a[bcd]+dcdcde/i
4922
4923 /(ab|a)b*c/i
4924     ABC
4925  0: ABC
4926  1: AB
4927
4928 /((a)(b)c)(d)/i
4929     ABCD
4930  0: ABCD
4931  1: ABC
4932  2: A
4933  3: B
4934  4: D
4935
4936 /[a-zA-Z_][a-zA-Z0-9_]*/i
4937     ALPHA
4938  0: ALPHA
4939
4940 /^a(bc+|b[eh])g|.h$/i
4941     ABH
4942  0: BH
4943
4944 /(bc+d$|ef*g.|h?i(j|k))/i
4945     EFFGZ
4946  0: EFFGZ
4947  1: EFFGZ
4948     IJ
4949  0: IJ
4950  1: IJ
4951  2: J
4952     REFFGZ
4953  0: EFFGZ
4954  1: EFFGZ
4955     *** Failers
4956 No match
4957     ADCDCDE
4958 No match
4959     EFFG
4960 No match
4961     BCDD
4962 No match
4963
4964 /((((((((((a))))))))))/i
4965     A
4966  0: A
4967  1: A
4968  2: A
4969  3: A
4970  4: A
4971  5: A
4972  6: A
4973  7: A
4974  8: A
4975  9: A
4976 10: A
4977
4978 /((((((((((a))))))))))\10/i
4979     AA
4980  0: AA
4981  1: A
4982  2: A
4983  3: A
4984  4: A
4985  5: A
4986  6: A
4987  7: A
4988  8: A
4989  9: A
4990 10: A
4991
4992 /(((((((((a)))))))))/i
4993     A
4994  0: A
4995  1: A
4996  2: A
4997  3: A
4998  4: A
4999  5: A
5000  6: A
5001  7: A
5002  8: A
5003  9: A
5004
5005 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
5006     A
5007  0: A
5008  1: A
5009
5010 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
5011     C
5012  0: C
5013  1: C
5014
5015 /multiple words of text/i
5016     *** Failers
5017 No match
5018     AA
5019 No match
5020     UH-UH
5021 No match
5022
5023 /multiple words/i
5024     MULTIPLE WORDS, YEAH
5025  0: MULTIPLE WORDS
5026
5027 /(.*)c(.*)/i
5028     ABCDE
5029  0: ABCDE
5030  1: AB
5031  2: DE
5032
5033 /\((.*), (.*)\)/i
5034     (A, B)
5035  0: (A, B)
5036  1: A
5037  2: B
5038
5039 /[k]/i
5040
5041 /abcd/i
5042     ABCD
5043  0: ABCD
5044
5045 /a(bc)d/i
5046     ABCD
5047  0: ABCD
5048  1: BC
5049
5050 /a[-]?c/i
5051     AC
5052  0: AC
5053
5054 /(abc)\1/i
5055     ABCABC
5056  0: ABCABC
5057  1: ABC
5058
5059 /([a-c]*)\1/i
5060     ABCABC
5061  0: ABCABC
5062  1: ABC
5063
5064 /a(?!b)./
5065     abad
5066  0: ad
5067
5068 /a(?=d)./
5069     abad
5070  0: ad
5071
5072 /a(?=c|d)./
5073     abad
5074  0: ad
5075
5076 /a(?:b|c|d)(.)/
5077     ace
5078  0: ace
5079  1: e
5080
5081 /a(?:b|c|d)*(.)/
5082     ace
5083  0: ace
5084  1: e
5085
5086 /a(?:b|c|d)+?(.)/
5087     ace
5088  0: ace
5089  1: e
5090     acdbcdbe
5091  0: acd
5092  1: d
5093
5094 /a(?:b|c|d)+(.)/
5095     acdbcdbe
5096  0: acdbcdbe
5097  1: e
5098
5099 /a(?:b|c|d){2}(.)/
5100     acdbcdbe
5101  0: acdb
5102  1: b
5103
5104 /a(?:b|c|d){4,5}(.)/
5105     acdbcdbe
5106  0: acdbcdb
5107  1: b
5108
5109 /a(?:b|c|d){4,5}?(.)/
5110     acdbcdbe
5111  0: acdbcd
5112  1: d
5113
5114 /((foo)|(bar))*/
5115     foobar
5116  0: foobar
5117  1: bar
5118  2: foo
5119  3: bar
5120
5121 /a(?:b|c|d){6,7}(.)/
5122     acdbcdbe
5123  0: acdbcdbe
5124  1: e
5125
5126 /a(?:b|c|d){6,7}?(.)/
5127     acdbcdbe
5128  0: acdbcdbe
5129  1: e
5130
5131 /a(?:b|c|d){5,6}(.)/
5132     acdbcdbe
5133  0: acdbcdbe
5134  1: e
5135
5136 /a(?:b|c|d){5,6}?(.)/
5137     acdbcdbe
5138  0: acdbcdb
5139  1: b
5140
5141 /a(?:b|c|d){5,7}(.)/
5142     acdbcdbe
5143  0: acdbcdbe
5144  1: e
5145
5146 /a(?:b|c|d){5,7}?(.)/
5147     acdbcdbe
5148  0: acdbcdb
5149  1: b
5150
5151 /a(?:b|(c|e){1,2}?|d)+?(.)/
5152     ace
5153  0: ace
5154  1: c
5155  2: e
5156
5157 /^(.+)?B/
5158     AB
5159  0: AB
5160  1: A
5161
5162 /^([^a-z])|(\^)$/
5163     .
5164  0: .
5165  1: .
5166
5167 /^[<>]&/
5168     <&OUT
5169  0: <&
5170
5171 /^(a\1?){4}$/
5172     aaaaaaaaaa
5173  0: aaaaaaaaaa
5174  1: aaaa
5175     *** Failers
5176 No match
5177     AB
5178 No match
5179     aaaaaaaaa
5180 No match
5181     aaaaaaaaaaa
5182 No match
5183
5184 /^(a(?(1)\1)){4}$/
5185     aaaaaaaaaa
5186  0: aaaaaaaaaa
5187  1: aaaa
5188     *** Failers
5189 No match
5190     aaaaaaaaa
5191 No match
5192     aaaaaaaaaaa
5193 No match
5194
5195 /(?:(f)(o)(o)|(b)(a)(r))*/
5196     foobar
5197  0: foobar
5198  1: f
5199  2: o
5200  3: o
5201  4: b
5202  5: a
5203  6: r
5204
5205 /(?<=a)b/
5206     ab
5207  0: b
5208     *** Failers
5209 No match
5210     cb
5211 No match
5212     b
5213 No match
5214
5215 /(?<!c)b/
5216     ab
5217  0: b
5218     b
5219  0: b
5220     b
5221  0: b
5222
5223 /(?:..)*a/
5224     aba
5225  0: aba
5226
5227 /(?:..)*?a/
5228     aba
5229  0: a
5230
5231 /^(?:b|a(?=(.)))*\1/
5232     abc
5233  0: ab
5234  1: b
5235
5236 /^(){3,5}/
5237     abc
5238  0: 
5239  1: 
5240
5241 /^(a+)*ax/
5242     aax
5243  0: aax
5244  1: a
5245
5246 /^((a|b)+)*ax/
5247     aax
5248  0: aax
5249  1: a
5250  2: a
5251
5252 /^((a|bc)+)*ax/
5253     aax
5254  0: aax
5255  1: a
5256  2: a
5257
5258 /(a|x)*ab/
5259     cab
5260  0: ab
5261
5262 /(a)*ab/
5263     cab
5264  0: ab
5265
5266 /(?:(?i)a)b/
5267     ab
5268  0: ab
5269
5270 /((?i)a)b/
5271     ab
5272  0: ab
5273  1: a
5274
5275 /(?:(?i)a)b/
5276     Ab
5277  0: Ab
5278
5279 /((?i)a)b/
5280     Ab
5281  0: Ab
5282  1: A
5283
5284 /(?:(?i)a)b/
5285     *** Failers
5286 No match
5287     cb
5288 No match
5289     aB
5290 No match
5291
5292 /((?i)a)b/
5293
5294 /(?i:a)b/
5295     ab
5296  0: ab
5297
5298 /((?i:a))b/
5299     ab
5300  0: ab
5301  1: a
5302
5303 /(?i:a)b/
5304     Ab
5305  0: Ab
5306
5307 /((?i:a))b/
5308     Ab
5309  0: Ab
5310  1: A
5311
5312 /(?i:a)b/
5313     *** Failers
5314 No match
5315     aB
5316 No match
5317     aB
5318 No match
5319
5320 /((?i:a))b/
5321
5322 /(?:(?-i)a)b/i
5323     ab
5324  0: ab
5325
5326 /((?-i)a)b/i
5327     ab
5328  0: ab
5329  1: a
5330
5331 /(?:(?-i)a)b/i
5332     aB
5333  0: aB
5334
5335 /((?-i)a)b/i
5336     aB
5337  0: aB
5338  1: a
5339
5340 /(?:(?-i)a)b/i
5341     *** Failers
5342 No match
5343     aB
5344  0: aB
5345     Ab
5346 No match
5347
5348 /((?-i)a)b/i
5349
5350 /(?:(?-i)a)b/i
5351     aB
5352  0: aB
5353
5354 /((?-i)a)b/i
5355     aB
5356  0: aB
5357  1: a
5358
5359 /(?:(?-i)a)b/i
5360     *** Failers
5361 No match
5362     Ab
5363 No match
5364     AB
5365 No match
5366
5367 /((?-i)a)b/i
5368
5369 /(?-i:a)b/i
5370     ab
5371  0: ab
5372
5373 /((?-i:a))b/i
5374     ab
5375  0: ab
5376  1: a
5377
5378 /(?-i:a)b/i
5379     aB
5380  0: aB
5381
5382 /((?-i:a))b/i
5383     aB
5384  0: aB
5385  1: a
5386
5387 /(?-i:a)b/i
5388     *** Failers
5389 No match
5390     AB
5391 No match
5392     Ab
5393 No match
5394
5395 /((?-i:a))b/i
5396
5397 /(?-i:a)b/i
5398     aB
5399  0: aB
5400
5401 /((?-i:a))b/i
5402     aB
5403  0: aB
5404  1: a
5405
5406 /(?-i:a)b/i
5407     *** Failers
5408 No match
5409     Ab
5410 No match
5411     AB
5412 No match
5413
5414 /((?-i:a))b/i
5415
5416 /((?-i:a.))b/i
5417     *** Failers
5418 No match
5419     AB
5420 No match
5421     a\nB
5422 No match
5423
5424 /((?s-i:a.))b/i
5425     a\nB
5426  0: a\x0aB
5427  1: a\x0a
5428
5429 /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
5430     cabbbb
5431  0: cabbbb
5432
5433 /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
5434     caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
5435  0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
5436
5437 /(ab)\d\1/i
5438     Ab4ab
5439  0: Ab4ab
5440  1: Ab
5441     ab4Ab
5442  0: ab4Ab
5443  1: ab
5444
5445 /foo\w*\d{4}baz/
5446     foobar1234baz
5447  0: foobar1234baz
5448
5449 /x(~~)*(?:(?:F)?)?/
5450     x~~
5451  0: x~~
5452  1: ~~
5453
5454 /^a(?#xxx){3}c/
5455     aaac
5456  0: aaac
5457
5458 /^a (?#xxx) (?#yyy) {3}c/x
5459     aaac
5460  0: aaac
5461
5462 /(?<![cd])b/
5463     *** Failers
5464 No match
5465     B\nB
5466 No match
5467     dbcb
5468 No match
5469
5470 /(?<![cd])[ab]/
5471     dbaacb
5472  0: a
5473
5474 /(?<!(c|d))b/
5475
5476 /(?<!(c|d))[ab]/
5477     dbaacb
5478  0: a
5479
5480 /(?<!cd)[ab]/
5481     cdaccb
5482  0: b
5483
5484 /^(?:a?b?)*$/
5485     *** Failers
5486 No match
5487     dbcb
5488 No match
5489     a--
5490 No match
5491
5492 /((?s)^a(.))((?m)^b$)/
5493     a\nb\nc\n
5494  0: a\x0ab
5495  1: a\x0a
5496  2: \x0a
5497  3: b
5498
5499 /((?m)^b$)/
5500     a\nb\nc\n
5501  0: b
5502  1: b
5503
5504 /(?m)^b/
5505     a\nb\n
5506  0: b
5507
5508 /(?m)^(b)/
5509     a\nb\n
5510  0: b
5511  1: b
5512
5513 /((?m)^b)/
5514     a\nb\n
5515  0: b
5516  1: b
5517
5518 /\n((?m)^b)/
5519     a\nb\n
5520  0: \x0ab
5521  1: b
5522
5523 /((?s).)c(?!.)/
5524     a\nb\nc\n
5525  0: \x0ac
5526  1: \x0a
5527     a\nb\nc\n
5528  0: \x0ac
5529  1: \x0a
5530
5531 /((?s)b.)c(?!.)/
5532     a\nb\nc\n
5533  0: b\x0ac
5534  1: b\x0a
5535     a\nb\nc\n
5536  0: b\x0ac
5537  1: b\x0a
5538
5539 /^b/
5540
5541 /()^b/
5542     *** Failers
5543 No match
5544     a\nb\nc\n
5545 No match
5546     a\nb\nc\n
5547 No match
5548
5549 /((?m)^b)/
5550     a\nb\nc\n
5551  0: b
5552  1: b
5553
5554 /(?(1)a|b)/
5555
5556 /(?(1)b|a)/
5557     a
5558  0: a
5559
5560 /(x)?(?(1)a|b)/
5561     *** Failers
5562 No match
5563     a
5564 No match
5565     a
5566 No match
5567
5568 /(x)?(?(1)b|a)/
5569     a
5570  0: a
5571
5572 /()?(?(1)b|a)/
5573     a
5574  0: a
5575
5576 /()(?(1)b|a)/
5577
5578 /()?(?(1)a|b)/
5579     a
5580  0: a
5581  1: 
5582
5583 /^(\()?blah(?(1)(\)))$/
5584     (blah)
5585  0: (blah)
5586  1: (
5587  2: )
5588     blah
5589  0: blah
5590     *** Failers
5591 No match
5592     a
5593 No match
5594     blah)
5595 No match
5596     (blah
5597 No match
5598
5599 /^(\(+)?blah(?(1)(\)))$/
5600     (blah)
5601  0: (blah)
5602  1: (
5603  2: )
5604     blah
5605  0: blah
5606     *** Failers
5607 No match
5608     blah)
5609 No match
5610     (blah
5611 No match
5612
5613 /(?(?!a)a|b)/
5614
5615 /(?(?!a)b|a)/
5616     a
5617  0: a
5618
5619 /(?(?=a)b|a)/
5620     *** Failers
5621 No match
5622     a
5623 No match
5624     a
5625 No match
5626
5627 /(?(?=a)a|b)/
5628     a
5629  0: a
5630
5631 /(?=(a+?))(\1ab)/
5632     aaab
5633  0: aab
5634  1: a
5635  2: aab
5636
5637 /^(?=(a+?))\1ab/
5638
5639 /(\w+:)+/
5640     one:
5641  0: one:
5642  1: one:
5643
5644 /$(?<=^(a))/
5645     a
5646  0: 
5647  1: a
5648
5649 /(?=(a+?))(\1ab)/
5650     aaab
5651  0: aab
5652  1: a
5653  2: aab
5654
5655 /^(?=(a+?))\1ab/
5656     *** Failers
5657 No match
5658     aaab
5659 No match
5660     aaab
5661 No match
5662
5663 /([\w:]+::)?(\w+)$/
5664     abcd
5665  0: abcd
5666  1: <unset>
5667  2: abcd
5668     xy:z:::abcd
5669  0: xy:z:::abcd
5670  1: xy:z:::
5671  2: abcd
5672
5673 /^[^bcd]*(c+)/
5674     aexycd
5675  0: aexyc
5676  1: c
5677
5678 /(a*)b+/
5679     caab
5680  0: aab
5681  1: aa
5682
5683 /([\w:]+::)?(\w+)$/
5684     abcd
5685  0: abcd
5686  1: <unset>
5687  2: abcd
5688     xy:z:::abcd
5689  0: xy:z:::abcd
5690  1: xy:z:::
5691  2: abcd
5692     *** Failers
5693  0: Failers
5694  1: <unset>
5695  2: Failers
5696     abcd:
5697 No match
5698     abcd:
5699 No match
5700
5701 /^[^bcd]*(c+)/
5702     aexycd
5703  0: aexyc
5704  1: c
5705
5706 /(>a+)ab/
5707
5708 /(?>a+)b/
5709     aaab
5710  0: aaab
5711
5712 /([[:]+)/
5713     a:[b]:
5714  0: :[
5715  1: :[
5716
5717 /([[=]+)/
5718     a=[b]=
5719  0: =[
5720  1: =[
5721
5722 /([[.]+)/
5723     a.[b].
5724  0: .[
5725  1: .[
5726
5727 /((?>a+)b)/
5728     aaab
5729  0: aaab
5730  1: aaab
5731
5732 /(?>(a+))b/
5733     aaab
5734  0: aaab
5735  1: aaa
5736
5737 /((?>[^()]+)|\([^()]*\))+/
5738     ((abc(ade)ufh()()x
5739  0: abc(ade)ufh()()x
5740  1: x
5741
5742 /a\Z/
5743     *** Failers
5744 No match
5745     aaab
5746 No match
5747     a\nb\n
5748 No match
5749
5750 /b\Z/
5751     a\nb\n
5752  0: b
5753
5754 /b\z/
5755
5756 /b\Z/
5757     a\nb
5758  0: b
5759
5760 /b\z/
5761     a\nb
5762  0: b
5763     *** Failers
5764 No match
5765     
5766 /^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
5767     a
5768  0: a
5769  1: 
5770     abc
5771  0: abc
5772  1: 
5773     a-b
5774  0: a-b
5775  1: 
5776     0-9 
5777  0: 0-9
5778  1: 
5779     a.b
5780  0: a.b
5781  1: 
5782     5.6.7  
5783  0: 5.6.7
5784  1: 
5785     the.quick.brown.fox
5786  0: the.quick.brown.fox
5787  1: 
5788     a100.b200.300c  
5789  0: a100.b200.300c
5790  1: 
5791     12-ab.1245 
5792  0: 12-ab.1245
5793  1: 
5794     *** Failers
5795 No match
5796     \
5797 No match
5798     .a
5799 No match
5800     -a
5801 No match
5802     a-
5803 No match
5804     a.  
5805 No match
5806     a_b 
5807 No match
5808     a.-
5809 No match
5810     a..  
5811 No match
5812     ab..bc 
5813 No match
5814     the.quick.brown.fox-
5815 No match
5816     the.quick.brown.fox.
5817 No match
5818     the.quick.brown.fox_
5819 No match
5820     the.quick.brown.fox+       
5821 No match
5822
5823 /(?>.*)(?<=(abcd|wxyz))/
5824     alphabetabcd
5825  0: alphabetabcd
5826  1: abcd
5827     endingwxyz
5828  0: endingwxyz
5829  1: wxyz
5830     *** Failers
5831 No match
5832     a rather long string that doesn't end with one of them
5833 No match
5834
5835 /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
5836     word cat dog elephant mussel cow horse canary baboon snake shark otherword
5837  0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
5838     word cat dog elephant mussel cow horse canary baboon snake shark
5839 No match
5840   
5841 /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
5842     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
5843 No match
5844
5845 /(?<=\d{3}(?!999))foo/
5846     999foo
5847  0: foo
5848     123999foo 
5849  0: foo
5850     *** Failers
5851 No match
5852     123abcfoo
5853 No match
5854     
5855 /(?<=(?!...999)\d{3})foo/
5856     999foo
5857  0: foo
5858     123999foo 
5859  0: foo
5860     *** Failers
5861 No match
5862     123abcfoo
5863 No match
5864
5865 /(?<=\d{3}(?!999)...)foo/
5866     123abcfoo
5867  0: foo
5868     123456foo 
5869  0: foo
5870     *** Failers
5871 No match
5872     123999foo  
5873 No match
5874     
5875 /(?<=\d{3}...)(?<!999)foo/
5876     123abcfoo   
5877  0: foo
5878     123456foo 
5879  0: foo
5880     *** Failers
5881 No match
5882     123999foo  
5883 No match
5884
5885 /<a[\s]+href[\s]*=[\s]*          # find <a href=
5886  ([\"\'])?                       # find single or double quote
5887  (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
5888                                  # quote, otherwise match up to next space
5889 /isx
5890     <a href=abcd xyz
5891  0: <a href=abcd
5892  1: <unset>
5893  2: <unset>
5894  3: abcd
5895     <a href=\"abcd xyz pqr\" cats
5896  0: <a href="abcd xyz pqr"
5897  1: "
5898  2: abcd xyz pqr
5899     <a href=\'abcd xyz pqr\' cats
5900  0: <a href='abcd xyz pqr'
5901  1: '
5902  2: abcd xyz pqr
5903
5904 /<a\s+href\s*=\s*                # find <a href=
5905  (["'])?                         # find single or double quote
5906  (?(1) (.*?)\1 | (\S+))          # if quote found, match up to next matching
5907                                  # quote, otherwise match up to next space
5908 /isx
5909     <a href=abcd xyz
5910  0: <a href=abcd
5911  1: <unset>
5912  2: <unset>
5913  3: abcd
5914     <a href=\"abcd xyz pqr\" cats
5915  0: <a href="abcd xyz pqr"
5916  1: "
5917  2: abcd xyz pqr
5918     <a href       =       \'abcd xyz pqr\' cats
5919  0: <a href       =       'abcd xyz pqr'
5920  1: '
5921  2: abcd xyz pqr
5922
5923 /<a\s+href(?>\s*)=(?>\s*)        # find <a href=
5924  (["'])?                         # find single or double quote
5925  (?(1) (.*?)\1 | (\S+))          # if quote found, match up to next matching
5926                                  # quote, otherwise match up to next space
5927 /isx
5928     <a href=abcd xyz
5929  0: <a href=abcd
5930  1: <unset>
5931  2: <unset>
5932  3: abcd
5933     <a href=\"abcd xyz pqr\" cats
5934  0: <a href="abcd xyz pqr"
5935  1: "
5936  2: abcd xyz pqr
5937     <a href       =       \'abcd xyz pqr\' cats
5938  0: <a href       =       'abcd xyz pqr'
5939  1: '
5940  2: abcd xyz pqr
5941
5942 /((Z)+|A)*/
5943     ZABCDEFG
5944  0: ZA
5945  1: A
5946  2: Z
5947
5948 /(Z()|A)*/
5949     ZABCDEFG
5950  0: ZA
5951  1: A
5952  2: 
5953
5954 /(Z(())|A)*/
5955     ZABCDEFG
5956  0: ZA
5957  1: A
5958  2: 
5959  3: 
5960
5961 /((?>Z)+|A)*/
5962     ZABCDEFG
5963  0: ZA
5964  1: A
5965
5966 /((?>)+|A)*/
5967     ZABCDEFG
5968  0: 
5969  1: 
5970
5971 /a*/g
5972     abbab
5973  0: a
5974  0: 
5975  0: 
5976  0: a
5977  0: 
5978  0: 
5979
5980 /^[a-\d]/
5981     abcde
5982  0: a
5983     -things
5984  0: -
5985     0digit
5986  0: 0
5987     *** Failers
5988 No match
5989     bcdef    
5990 No match
5991
5992 /^[\d-a]/
5993     abcde
5994  0: a
5995     -things
5996  0: -
5997     0digit
5998  0: 0
5999     *** Failers
6000 No match
6001     bcdef    
6002 No match
6003     
6004 /[[:space:]]+/
6005     > \x09\x0a\x0c\x0d\x0b<
6006  0:  \x09\x0a\x0c\x0d\x0b
6007      
6008 /[[:blank:]]+/
6009     > \x09\x0a\x0c\x0d\x0b<
6010  0:  \x09
6011      
6012 /[\s]+/
6013     > \x09\x0a\x0c\x0d\x0b<
6014  0:  \x09\x0a\x0c\x0d
6015      
6016 /\s+/
6017     > \x09\x0a\x0c\x0d\x0b<
6018  0:  \x09\x0a\x0c\x0d
6019      
6020 /a\vb/x
6021     ab
6022 No match
6023
6024 /(?!\A)x/m
6025   a\nxb\n
6026  0: x
6027
6028 /(?!^)x/m
6029   a\nxb\n
6030 No match
6031
6032 /abc\Qabc\Eabc/
6033     abcabcabc
6034  0: abcabcabc
6035     
6036 /abc\Q(*+|\Eabc/
6037     abc(*+|abc 
6038  0: abc(*+|abc
6039
6040 /   abc\Q abc\Eabc/x
6041     abc abcabc
6042  0: abc abcabc
6043     *** Failers
6044 No match
6045     abcabcabc  
6046 No match
6047     
6048 /abc#comment
6049     \Q#not comment
6050     literal\E/x
6051     abc#not comment\n    literal     
6052  0: abc#not comment\x0a    literal
6053
6054 /abc#comment
6055     \Q#not comment
6056     literal/x
6057     abc#not comment\n    literal     
6058  0: abc#not comment\x0a    literal
6059
6060 /abc#comment
6061     \Q#not comment
6062     literal\E #more comment
6063     /x
6064     abc#not comment\n    literal     
6065  0: abc#not comment\x0a    literal
6066
6067 /abc#comment
6068     \Q#not comment
6069     literal\E #more comment/x
6070     abc#not comment\n    literal     
6071  0: abc#not comment\x0a    literal
6072
6073 /\Qabc\$xyz\E/
6074     abc\\\$xyz
6075  0: abc\$xyz
6076
6077 /\Qabc\E\$\Qxyz\E/
6078     abc\$xyz
6079  0: abc$xyz
6080
6081 /\Gabc/
6082     abc
6083  0: abc
6084     *** Failers
6085 No match
6086     xyzabc  
6087 No match
6088
6089 /\Gabc./g
6090     abc1abc2xyzabc3
6091  0: abc1
6092  0: abc2
6093
6094 /abc./g
6095     abc1abc2xyzabc3 
6096  0: abc1
6097  0: abc2
6098  0: abc3
6099
6100 /a(?x: b c )d/
6101     XabcdY
6102  0: abcd
6103     *** Failers 
6104 No match
6105     Xa b c d Y 
6106 No match
6107
6108 /((?x)x y z | a b c)/
6109     XabcY
6110  0: abc
6111  1: abc
6112     AxyzB 
6113  0: xyz
6114  1: xyz
6115
6116 /(?i)AB(?-i)C/
6117     XabCY
6118  0: abC
6119     *** Failers
6120 No match
6121     XabcY  
6122 No match
6123
6124 /((?i)AB(?-i)C|D)E/
6125     abCE
6126  0: abCE
6127  1: abC
6128     DE
6129  0: DE
6130  1: D
6131     *** Failers
6132 No match
6133     abcE
6134 No match
6135     abCe  
6136 No match
6137     dE
6138 No match
6139     De    
6140 No match
6141
6142 /(.*)\d+\1/
6143     abc123abc
6144  0: abc123abc
6145  1: abc
6146     abc123bc 
6147  0: bc123bc
6148  1: bc
6149
6150 /(.*)\d+\1/s
6151     abc123abc
6152  0: abc123abc
6153  1: abc
6154     abc123bc 
6155  0: bc123bc
6156  1: bc
6157     
6158 /((.*))\d+\1/
6159     abc123abc
6160  0: abc123abc
6161  1: abc
6162  2: abc
6163     abc123bc  
6164  0: bc123bc
6165  1: bc
6166  2: bc
6167
6168 /-- This tests for an IPv6 address in the form where it can have up to --/
6169 /-- eight components, one and only one of which is empty. This must be --/
6170 No match
6171 /-- an internal component. --/
6172 No match
6173
6174 /^(?!:)                       # colon disallowed at start
6175   (?:                         # start of item
6176     (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
6177     (?(1)0 | () ) )           # if null previously matched, fail; else null
6178     :                         # followed by colon
6179   ){1,7}                      # end item; 1-7 of them required               
6180   [0-9a-f]{1,4} $             # final hex number at end of string
6181   (?(1)|.)                    # check that there was an empty component
6182   /xi
6183     a123::a123
6184  0: a123::a123
6185  1: 
6186     a123:b342::abcd
6187  0: a123:b342::abcd
6188  1: 
6189     a123:b342::324e:abcd
6190  0: a123:b342::324e:abcd
6191  1: 
6192     a123:ddde:b342::324e:abcd
6193  0: a123:ddde:b342::324e:abcd
6194  1: 
6195     a123:ddde:b342::324e:dcba:abcd
6196  0: a123:ddde:b342::324e:dcba:abcd
6197  1: 
6198     a123:ddde:9999:b342::324e:dcba:abcd
6199  0: a123:ddde:9999:b342::324e:dcba:abcd
6200  1: 
6201     *** Failers
6202 No match
6203     1:2:3:4:5:6:7:8
6204 No match
6205     a123:bce:ddde:9999:b342::324e:dcba:abcd
6206 No match
6207     a123::9999:b342::324e:dcba:abcd
6208 No match
6209     abcde:2:3:4:5:6:7:8
6210 No match
6211     ::1
6212 No match
6213     abcd:fee0:123::   
6214 No match
6215     :1
6216 No match
6217     1:  
6218 No match
6219
6220 /[z\Qa-d]\E]/
6221     z
6222  0: z
6223     a
6224  0: a
6225     -
6226  0: -
6227     d
6228  0: d
6229     ] 
6230  0: ]
6231     *** Failers
6232  0: a
6233     b     
6234 No match
6235
6236 /[\z\C]/
6237     z
6238  0: z
6239     C 
6240  0: C
6241     
6242 /\M/
6243     M 
6244  0: M
6245     
6246 /(a+)*b/
6247     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
6248 No match
6249     
6250 /(?i)reg(?:ul(?:[aä]|ae)r|ex)/
6251     REGular
6252  0: REGular
6253     regulaer
6254  0: regulaer
6255     Regex  
6256  0: Regex
6257     regulär 
6258  0: regul\xe4r
6259
6260 /Åæåä[à-ÿÀ-ß]+/
6261     Åæåäà
6262  0: \xc5\xe6\xe5\xe4\xe0
6263     Åæåäÿ
6264  0: \xc5\xe6\xe5\xe4\xff
6265     ÅæåäÀ
6266  0: \xc5\xe6\xe5\xe4\xc0
6267     Åæåäß
6268  0: \xc5\xe6\xe5\xe4\xdf
6269
6270 /(?<=Z)X./
6271   \x84XAZXB
6272  0: XB
6273
6274 / End of testinput1 /