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

Contents of /code/trunk/testdata/testoutput1

Parent Directory Parent Directory | Revision Log Revision Log


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