/[pcre]/code/trunk/testdata/testoutput1
ViewVC logotype

Contents of /code/trunk/testdata/testoutput1

Parent Directory Parent Directory | Revision Log Revision Log


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