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