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

Contents of /code/trunk/testdata/testoutput1

Parent Directory Parent Directory | Revision Log Revision Log


Revision 87 - (show annotations) (download)
Sat Feb 24 21:41:21 2007 UTC (7 years, 8 months ago) by nigel
File size: 98413 byte(s)
Load pcre-6.5 into code/trunk.

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12