Annotation of embedaddon/pcre/testdata/testinput2, revision 1.1.1.5
1.1 misho 1: /-- This set of tests is not Perl-compatible. It checks on special features
2: of PCRE's API, error diagnostics, and the compiled code of some patterns.
3: It also checks the non-Perl syntax the PCRE supports (Python, .NET,
4: Oniguruma). Finally, there are some tests where PCRE and Perl differ,
5: either because PCRE can't be compatible, or there is a possible Perl
6: bug.
7:
1.1.1.2 misho 8: NOTE: This is a non-UTF set of tests. When UTF support is needed, use
9: test 5, and if Unicode Property Support is needed, use test 7. --/
1.1.1.5 ! misho 10:
! 11: < forbid 8W
1.1 misho 12:
13: /(a)b|/I
14:
15: /abc/I
16: abc
17: defabc
18: \Aabc
19: *** Failers
20: \Adefabc
21: ABC
22:
23: /^abc/I
24: abc
25: \Aabc
26: *** Failers
27: defabc
28: \Adefabc
29:
30: /a+bc/I
31:
32: /a*bc/I
33:
34: /a{3}bc/I
35:
36: /(abc|a+z)/I
37:
38: /^abc$/I
39: abc
40: *** Failers
41: def\nabc
42:
43: /ab\idef/X
44:
45: /(?X)ab\idef/X
46:
47: /x{5,4}/
48:
49: /z{65536}/
50:
51: /[abcd/
52:
53: /(?X)[\B]/
54:
55: /(?X)[\R]/
56:
57: /(?X)[\X]/
58:
59: /[\B]/BZ
60:
61: /[\R]/BZ
62:
63: /[\X]/BZ
64:
65: /[z-a]/
66:
67: /^*/
68:
69: /(abc/
70:
71: /(?# abc/
72:
73: /(?z)abc/
74:
75: /.*b/I
76:
77: /.*?b/I
78:
79: /cat|dog|elephant/I
80: this sentence eventually mentions a cat
81: this sentences rambles on and on for a while and then reaches elephant
82:
83: /cat|dog|elephant/IS
84: this sentence eventually mentions a cat
85: this sentences rambles on and on for a while and then reaches elephant
86:
87: /cat|dog|elephant/IiS
88: this sentence eventually mentions a CAT cat
89: this sentences rambles on and on for a while to elephant ElePhant
90:
91: /a|[bcd]/IS
92:
93: /(a|[^\dZ])/IS
94:
95: /(a|b)*[\s]/IS
96:
97: /(ab\2)/
98:
99: /{4,5}abc/
100:
101: /(a)(b)(c)\2/I
102: abcb
103: \O0abcb
104: \O3abcb
105: \O6abcb
106: \O9abcb
107: \O12abcb
108:
109: /(a)bc|(a)(b)\2/I
110: abc
111: \O0abc
112: \O3abc
113: \O6abc
114: aba
115: \O0aba
116: \O3aba
117: \O6aba
118: \O9aba
119: \O12aba
120:
121: /abc$/IE
122: abc
123: *** Failers
124: abc\n
125: abc\ndef
126:
127: /(a)(b)(c)(d)(e)\6/
128:
129: /the quick brown fox/I
130: the quick brown fox
131: this is a line with the quick brown fox
132:
133: /the quick brown fox/IA
134: the quick brown fox
135: *** Failers
136: this is a line with the quick brown fox
137:
138: /ab(?z)cd/
139:
140: /^abc|def/I
141: abcdef
142: abcdef\B
143:
144: /.*((abc)$|(def))/I
145: defabc
146: \Zdefabc
147:
148: /)/
149:
150: /a[]b/
151:
152: /[^aeiou ]{3,}/I
153: co-processors, and for
154:
155: /<.*>/I
156: abc<def>ghi<klm>nop
157:
158: /<.*?>/I
159: abc<def>ghi<klm>nop
160:
161: /<.*>/IU
162: abc<def>ghi<klm>nop
163:
164: /(?U)<.*>/I
165: abc<def>ghi<klm>nop
166:
167: /<.*?>/IU
168: abc<def>ghi<klm>nop
169:
170: /={3,}/IU
171: abc========def
172:
173: /(?U)={3,}?/I
174: abc========def
175:
176: /(?<!bar|cattle)foo/I
177: foo
178: catfoo
179: *** Failers
180: the barfoo
181: and cattlefoo
182:
183: /(?<=a+)b/
184:
185: /(?<=aaa|b{0,3})b/
186:
187: /(?<!(foo)a\1)bar/
188:
189: /(?i)abc/I
190:
191: /(a|(?m)a)/I
192:
193: /(?i)^1234/I
194:
195: /(^b|(?i)^d)/I
196:
197: /(?s).*/I
198:
199: /[abcd]/IS
200:
201: /(?i)[abcd]/IS
202:
203: /(?m)[xy]|(b|c)/IS
204:
205: /(^a|^b)/Im
206:
207: /(?i)(^a|^b)/Im
208:
209: /(a)(?(1)a|b|c)/
210:
211: /(?(?=a)a|b|c)/
212:
213: /(?(1a)/
214:
215: /(?(1a))/
216:
217: /(?(?i))/
218:
219: /(?(abc))/
220:
221: /(?(?<ab))/
222:
223: /((?s)blah)\s+\1/I
224:
225: /((?i)blah)\s+\1/I
226:
227: /((?i)b)/IDZS
228:
229: /(a*b|(?i:c*(?-i)d))/IS
230:
231: /a$/I
232: a
233: a\n
234: *** Failers
235: \Za
236: \Za\n
237:
238: /a$/Im
239: a
240: a\n
241: \Za\n
242: *** Failers
243: \Za
244:
245: /\Aabc/Im
246:
247: /^abc/Im
248:
249: /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
250: aaaaabbbbbcccccdef
251:
252: /(?<=foo)[ab]/IS
253:
254: /(?<!foo)(alpha|omega)/IS
255:
256: /(?!alphabet)[ab]/IS
257:
258: /(?<=foo\n)^bar/Im
259: foo\nbarbar
260: ***Failers
261: rhubarb
262: barbell
263: abc\nbarton
264:
265: /^(?<=foo\n)bar/Im
266: foo\nbarbar
267: ***Failers
268: rhubarb
269: barbell
270: abc\nbarton
271:
272: /(?>^abc)/Im
273: abc
274: def\nabc
275: *** Failers
276: defabc
277:
278: /(?<=ab(c+)d)ef/
279:
280: /(?<=ab(?<=c+)d)ef/
281:
282: /(?<=ab(c|de)f)g/
283:
284: /The next three are in testinput2 because they have variable length branches/
285:
286: /(?<=bullock|donkey)-cart/I
287: the bullock-cart
288: a donkey-cart race
289: *** Failers
290: cart
291: horse-and-cart
292:
293: /(?<=ab(?i)x|y|z)/I
294:
295: /(?>.*)(?<=(abcd)|(xyz))/I
296: alphabetabcd
297: endingxyz
298:
299: /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
300: abxyZZ
301: abXyZZ
302: ZZZ
303: zZZ
304: bZZ
305: BZZ
306: *** Failers
307: ZZ
308: abXYZZ
309: zzz
310: bzz
311:
312: /(?<!(foo)a)bar/I
313: bar
314: foobbar
315: *** Failers
316: fooabar
317:
318: /This one is here because Perl behaves differently; see also the following/I
319:
320: /^(a\1?){4}$/I
321: aaaa
322: aaaaaa
323:
324: /Perl does not fail these two for the final subjects. Neither did PCRE until/
325: /release 8.01. The problem is in backtracking into a subpattern that contains/
326: /a recursive reference to itself. PCRE has now made these into atomic patterns./
327:
328: /^(xa|=?\1a){2}$/
329: xa=xaa
330: ** Failers
331: xa=xaaa
332:
333: /^(xa|=?\1a)+$/
334: xa=xaa
335: ** Failers
336: xa=xaaa
337:
338: /These are syntax tests from Perl 5.005/I
339:
340: /a[b-a]/
341:
342: /a[]b/
343:
344: /a[/
345:
346: /*a/
347:
348: /(*)b/
349:
350: /abc)/
351:
352: /(abc/
353:
354: /a**/
355:
356: /)(/
357:
358: /\1/
359:
360: /\2/
361:
362: /(a)|\2/
363:
364: /a[b-a]/Ii
365:
366: /a[]b/Ii
367:
368: /a[/Ii
369:
370: /*a/Ii
371:
372: /(*)b/Ii
373:
374: /abc)/Ii
375:
376: /(abc/Ii
377:
378: /a**/Ii
379:
380: /)(/Ii
381:
382: /:(?:/
383:
384: /(?<%)b/
385:
386: /a(?{)b/
387:
388: /a(?{{})b/
389:
390: /a(?{}})b/
391:
392: /a(?{"{"})b/
393:
394: /a(?{"{"}})b/
395:
396: /(?(1?)a|b)/
397:
398: /[a[:xyz:/
399:
400: /(?<=x+)y/
401:
402: /a{37,17}/
403:
404: /abc/\
405:
406: /abc/\i
407:
408: /(a)bc(d)/I
409: abcd
410: abcd\C2
411: abcd\C5
412:
413: /(.{20})/I
414: abcdefghijklmnopqrstuvwxyz
415: abcdefghijklmnopqrstuvwxyz\C1
416: abcdefghijklmnopqrstuvwxyz\G1
417:
418: /(.{15})/I
419: abcdefghijklmnopqrstuvwxyz
420: abcdefghijklmnopqrstuvwxyz\C1\G1
421:
422: /(.{16})/I
423: abcdefghijklmnopqrstuvwxyz
424: abcdefghijklmnopqrstuvwxyz\C1\G1\L
425:
426: /^(a|(bc))de(f)/I
427: adef\G1\G2\G3\G4\L
428: bcdef\G1\G2\G3\G4\L
429: adefghijk\C0
430:
431: /^abc\00def/I
432: abc\00def\L\C0
433:
434: /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
435: )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
436: )?)?)?)?)?)?)?)?)?otherword/I
437:
438: /.*X/IDZ
439:
440: /.*X/IDZs
441:
442: /(.*X|^B)/IDZ
443:
444: /(.*X|^B)/IDZs
445:
446: /(?s)(.*X|^B)/IDZ
447:
448: /(?s:.*X|^B)/IDZ
449:
450: /\Biss\B/I+
451: Mississippi
452:
453: /iss/IG+
454: Mississippi
455:
456: /\Biss\B/IG+
457: Mississippi
458:
459: /\Biss\B/Ig+
460: Mississippi
461: *** Failers
462: Mississippi\A
463:
464: /(?<=[Ms])iss/Ig+
465: Mississippi
466:
467: /(?<=[Ms])iss/IG+
468: Mississippi
469:
470: /^iss/Ig+
471: ississippi
472:
473: /.*iss/Ig+
474: abciss\nxyzisspqr
475:
476: /.i./I+g
477: Mississippi
478: Mississippi\A
479: Missouri river
480: Missouri river\A
481:
482: /^.is/I+g
483: Mississippi
484:
485: /^ab\n/Ig+
486: ab\nab\ncd
487:
488: /^ab\n/Img+
489: ab\nab\ncd
490:
491: /abc/I
492:
493: /abc|bac/I
494:
495: /(abc|bac)/I
496:
497: /(abc|(c|dc))/I
498:
499: /(abc|(d|de)c)/I
500:
501: /a*/I
502:
503: /a+/I
504:
505: /(baa|a+)/I
506:
507: /a{0,3}/I
508:
509: /baa{3,}/I
510:
511: /"([^\\"]+|\\.)*"/I
512:
513: /(abc|ab[cd])/I
514:
515: /(a|.)/I
516:
517: /a|ba|\w/I
518:
519: /abc(?=pqr)/I
520:
521: /...(?<=abc)/I
522:
523: /abc(?!pqr)/I
524:
525: /ab./I
526:
527: /ab[xyz]/I
528:
529: /abc*/I
530:
531: /ab.c*/I
532:
533: /a.c*/I
534:
535: /.c*/I
536:
537: /ac*/I
538:
539: /(a.c*|b.c*)/I
540:
541: /a.c*|aba/I
542:
543: /.+a/I
544:
545: /(?=abcda)a.*/I
546:
547: /(?=a)a.*/I
548:
549: /a(b)*/I
550:
551: /a\d*/I
552:
553: /ab\d*/I
554:
555: /a(\d)*/I
556:
557: /abcde{0,0}/I
558:
559: /ab\d+/I
560:
561: /a(?(1)b)(.)/I
562:
563: /a(?(1)bag|big)(.)/I
564:
565: /a(?(1)bag|big)*(.)/I
566:
567: /a(?(1)bag|big)+(.)/I
568:
569: /a(?(1)b..|b..)(.)/I
570:
571: /ab\d{0}e/I
572:
573: /a?b?/I
574: a
575: b
576: ab
577: \
578: *** Failers
579: \N
580:
581: /|-/I
582: abcd
583: -abc
584: \Nab-c
585: *** Failers
586: \Nabc
587:
588: /^.?abcd/IS
589:
590: /\( # ( at start
591: (?: # Non-capturing bracket
592: (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
593: | # Or
594: (?R) # Recurse - i.e. nested bracketed string
595: )* # Zero or more contents
596: \) # Closing )
597: /Ix
598: (abcd)
599: (abcd)xyz
600: xyz(abcd)
601: (ab(xy)cd)pqr
602: (ab(xycd)pqr
603: () abc ()
604: 12(abcde(fsh)xyz(foo(bar))lmno)89
605: *** Failers
606: abcd
607: abcd)
608: (abcd
609:
610: /\( ( (?>[^()]+) | (?R) )* \) /Ixg
611: (ab(xy)cd)pqr
612: 1(abcd)(x(y)z)pqr
613:
614: /\( (?: (?>[^()]+) | (?R) ) \) /Ix
615: (abcd)
616: (ab(xy)cd)
617: (a(b(c)d)e)
618: ((ab))
619: *** Failers
620: ()
621:
622: /\( (?: (?>[^()]+) | (?R) )? \) /Ix
623: ()
624: 12(abcde(fsh)xyz(foo(bar))lmno)89
625:
626: /\( ( (?>[^()]+) | (?R) )* \) /Ix
627: (ab(xy)cd)
628:
629: /\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
630: (ab(xy)cd)
631:
632: /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
633: (ab(xy)cd)
634: (123ab(xy)cd)
635:
636: /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
637: (ab(xy)cd)
638: (123ab(xy)cd)
639:
640: /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
641: (ab(xy)cd)
642:
643: /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
644: (abcd(xyz<p>qrs)123)
645:
646: /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
647: (ab(cd)ef)
648: (ab(cd(ef)gh)ij)
649:
650: /^[[:alnum:]]/DZ
651:
652: /^[[:^alnum:]]/DZ
653:
654: /^[[:alpha:]]/DZ
655:
656: /^[[:^alpha:]]/DZ
657:
658: /[_[:alpha:]]/IS
659:
660: /^[[:ascii:]]/DZ
661:
662: /^[[:^ascii:]]/DZ
663:
664: /^[[:blank:]]/DZ
665:
666: /^[[:^blank:]]/DZ
667:
668: /[\n\x0b\x0c\x0d[:blank:]]/IS
669:
670: /^[[:cntrl:]]/DZ
671:
672: /^[[:digit:]]/DZ
673:
674: /^[[:graph:]]/DZ
675:
676: /^[[:lower:]]/DZ
677:
678: /^[[:print:]]/DZ
679:
680: /^[[:punct:]]/DZ
681:
682: /^[[:space:]]/DZ
683:
684: /^[[:upper:]]/DZ
685:
686: /^[[:xdigit:]]/DZ
687:
688: /^[[:word:]]/DZ
689:
690: /^[[:^cntrl:]]/DZ
691:
692: /^[12[:^digit:]]/DZ
693:
694: /^[[:^blank:]]/DZ
695:
696: /[01[:alpha:]%]/DZ
697:
698: /[[.ch.]]/I
699:
700: /[[=ch=]]/I
701:
702: /[[:rhubarb:]]/I
703:
704: /[[:upper:]]/Ii
705: A
706: a
707:
708: /[[:lower:]]/Ii
709: A
710: a
711:
712: /((?-i)[[:lower:]])[[:lower:]]/Ii
713: ab
714: aB
715: *** Failers
716: Ab
717: AB
718:
719: /[\200-\110]/I
720:
721: /^(?(0)f|b)oo/I
722:
723: /This one's here because of the large output vector needed/I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?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/I
726: \O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC
727:
728: /This one's here because Perl does this differently and PCRE can't at present/I
729:
730: /(main(O)?)+/I
731: mainmain
732: mainOmain
733:
734: /These are all cases where Perl does it differently (nested captures)/I
735:
736: /^(a(b)?)+$/I
737: aba
738:
739: /^(aa(bb)?)+$/I
740: aabbaa
741:
742: /^(aa|aa(bb))+$/I
743: aabbaa
744:
745: /^(aa(bb)??)+$/I
746: aabbaa
747:
748: /^(?:aa(bb)?)+$/I
749: aabbaa
750:
751: /^(aa(b(b))?)+$/I
752: aabbaa
753:
754: /^(?:aa(b(b))?)+$/I
755: aabbaa
756:
757: /^(?:aa(b(?:b))?)+$/I
758: aabbaa
759:
760: /^(?:aa(bb(?:b))?)+$/I
761: aabbbaa
762:
763: /^(?:aa(b(?:bb))?)+$/I
764: aabbbaa
765:
766: /^(?:aa(?:b(b))?)+$/I
767: aabbaa
768:
769: /^(?:aa(?:b(bb))?)+$/I
770: aabbbaa
771:
772: /^(aa(b(bb))?)+$/I
773: aabbbaa
774:
775: /^(aa(bb(bb))?)+$/I
776: aabbbbaa
777:
778: /--------------------------------------------------------------------/I
779:
780: /#/IxDZ
781:
782: /a#/IxDZ
783:
784: /[\s]/DZ
785:
786: /[\S]/DZ
787:
788: /a(?i)b/DZ
789: ab
790: aB
791: *** Failers
792: AB
793:
794: /(a(?i)b)/DZ
795: ab
796: aB
797: *** Failers
798: AB
799:
800: / (?i)abc/IxDZ
801:
802: /#this is a comment
803: (?i)abc/IxDZ
804:
805: /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
806:
807: /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
808:
809: /\Q\E/DZ
810: \
811:
812: /\Q\Ex/DZ
813:
814: / \Q\E/DZ
815:
816: /a\Q\E/DZ
817: abc
818: bca
819: bac
820:
821: /a\Q\Eb/DZ
822: abc
823:
824: /\Q\Eabc/DZ
825:
826: /x*+\w/DZ
827: *** Failers
828: xxxxx
829:
830: /x?+/DZ
831:
832: /x++/DZ
833:
1.1.1.5 ! misho 834: /x{1,3}+/BZO
! 835:
! 836: /x{1,3}+/BZOi
! 837:
! 838: /[^x]{1,3}+/BZO
! 839:
! 840: /[^x]{1,3}+/BZOi
1.1 misho 841:
842: /(x)*+/DZ
843:
844: /^(\w++|\s++)*$/I
845: now is the time for all good men to come to the aid of the party
846: *** Failers
847: this is not a line with only words and spaces!
848:
849: /(\d++)(\w)/I
850: 12345a
851: *** Failers
852: 12345+
853:
854: /a++b/I
855: aaab
856:
857: /(a++b)/I
858: aaab
859:
860: /(a++)b/I
861: aaab
862:
863: /([^()]++|\([^()]*\))+/I
864: ((abc(ade)ufh()()x
865:
866: /\(([^()]++|\([^()]+\))+\)/I
867: (abc)
868: (abc(def)xyz)
869: *** Failers
870: ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
871:
872: /(abc){1,3}+/DZ
873:
874: /a+?+/I
875:
876: /a{2,3}?+b/I
877:
878: /(?U)a+?+/I
879:
880: /a{2,3}?+b/IU
881:
882: /x(?U)a++b/DZ
883: xaaaab
884:
885: /(?U)xa++b/DZ
886: xaaaab
887:
888: /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
889:
890: /^x(?U)a+b/DZ
891:
892: /^x(?U)(a+)b/DZ
893:
894: /[.x.]/I
895:
896: /[=x=]/I
897:
898: /[:x:]/I
899:
900: /\l/I
901:
902: /\L/I
903:
904: /\N{name}/I
905:
906: /\u/I
907:
908: /\U/I
909:
910: /[/I
911:
912: /[a-/I
913:
914: /[[:space:]/I
915:
916: /[\s]/IDZ
917:
918: /[[:space:]]/IDZ
919:
920: /[[:space:]abcde]/IDZ
921:
922: /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix
923: <>
924: <abcd>
925: <abc <123> hij>
926: <abc <def> hij>
927: <abc<>def>
928: <abc<>
929: *** Failers
930: <abc
931:
932: |8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\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
955: /(?=abc)(?i).xyz/I
956:
957: /(?=a)(?=b)/I
958:
959: /(?=.)a/I
960:
961: /((?=abcda)a)/I
962:
963: /((?=abcda)ab)/I
964:
965: /()a/I
966:
967: /(?(1)ab|ac)(.)/I
968:
969: /(?(1)abz|acz)(.)/I
970:
971: /(?(1)abz)(.)/I
972:
973: /(?(1)abz)(1)23/I
974:
975: /(a)+/I
976:
977: /(a){2,3}/I
978:
979: /(a)*/I
980:
981: /[a]/I
982:
983: /[ab]/I
984:
985: /[ab]/IS
986:
987: /[^a]/I
988:
989: /\d456/I
990:
991: /\d456/IS
992:
993: /a^b/I
994:
995: /^a/Im
996: abcde
997: xy\nabc
998: *** Failers
999: xyabc
1000:
1001: /c|abc/I
1002:
1003: /(?i)[ab]/IS
1004:
1005: /[ab](?i)cd/IS
1006:
1007: /abc(?C)def/I
1008: abcdef
1009: 1234abcdef
1010: *** Failers
1011: abcxyz
1012: abcxyzf
1013:
1014: /abc(?C)de(?C1)f/I
1015: 123abcdef
1016:
1017: /(?C1)\dabc(?C2)def/IS
1018: 1234abcdef
1019: *** Failers
1020: abcdef
1021:
1022: /(?C1)\dabc(?C2)def/ISS
1023: 1234abcdef
1024: *** Failers
1025: abcdef
1026:
1027: /(?C255)ab/I
1028:
1029: /(?C256)ab/I
1030:
1031: /(?Cab)xx/I
1032:
1033: /(?C12vr)x/I
1034:
1035: /abc(?C)def/I
1036: *** Failers
1037: \x83\x0\x61bcdef
1038:
1039: /(abc)(?C)de(?C1)f/I
1040: 123abcdef
1041: 123abcdef\C+
1042: 123abcdef\C-
1043: *** Failers
1044: 123abcdef\C!1
1045:
1046: /(?C0)(abc(?C1))*/I
1047: abcabcabc
1048: abcabc\C!1!3
1049: *** Failers
1050: abcabcabc\C!1!3
1051:
1052: /(\d{3}(?C))*/I
1053: 123\C+
1054: 123456\C+
1055: 123456789\C+
1056:
1057: /((xyz)(?C)p|(?C1)xyzabc)/I
1058: xyzabc\C+
1059:
1060: /(X)((xyz)(?C)p|(?C1)xyzabc)/I
1061: Xxyzabc\C+
1062:
1063: /(?=(abc))(?C)abcdef/I
1064: abcdef\C+
1065:
1066: /(?!(abc)(?C1)d)(?C2)abcxyz/I
1067: abcxyz\C+
1068:
1069: /(?<=(abc)(?C))xyz/I
1070: abcxyz\C+
1071:
1072: /a(b+)(c*)(?C1)/I
1073: abbbbbccc\C*1
1074:
1075: /a(b+?)(c*?)(?C1)/I
1076: abbbbbccc\C*1
1077:
1078: /(?C)abc/I
1079:
1080: /(?C)^abc/I
1081:
1082: /(?C)a|b/IS
1083:
1084: /(?R)/I
1085:
1086: /(a|(?R))/I
1087:
1088: /(ab|(bc|(de|(?R))))/I
1089:
1090: /x(ab|(bc|(de|(?R))))/I
1091: xab
1092: xbc
1093: xde
1094: xxab
1095: xxxab
1096: *** Failers
1097: xyab
1098:
1099: /(ab|(bc|(de|(?1))))/I
1100:
1101: /x(ab|(bc|(de|(?1)x)x)x)/I
1102:
1103: /^([^()]|\((?1)*\))*$/I
1104: abc
1105: a(b)c
1106: a(b(c))d
1107: *** Failers)
1108: a(b(c)d
1109:
1110: /^>abc>([^()]|\((?1)*\))*<xyz<$/I
1111: >abc>123<xyz<
1112: >abc>1(2)3<xyz<
1113: >abc>(1(2)3)<xyz<
1114:
1115: /(a(?1)b)/DZ
1116:
1117: /(a(?1)+b)/DZ
1118:
1119: /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
1120: 12
1121: (((2+2)*-3)-7)
1122: -12
1123: *** Failers
1124: ((2+2)*-3)-7)
1125:
1126: /^(x(y|(?1){2})z)/I
1127: xyz
1128: xxyzxyzz
1129: *** Failers
1130: xxyzz
1131: xxyzxyzxyzz
1132:
1133: /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix
1134: <>
1135: <abcd>
1136: <abc <123> hij>
1137: <abc <def> hij>
1138: <abc<>def>
1139: <abc<>
1140: *** Failers
1141: <abc
1142:
1143: /(?1)/I
1144:
1145: /((?2)(abc)/I
1146:
1147: /^(abc)def(?1)/I
1148: abcdefabc
1149:
1150: /^(a|b|c)=(?1)+/I
1151: a=a
1152: a=b
1153: a=bc
1154:
1155: /^(a|b|c)=((?1))+/I
1156: a=a
1157: a=b
1158: a=bc
1159:
1160: /a(?P<name1>b|c)d(?P<longername2>e)/DZ
1161: abde
1162: acde
1163:
1164: /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
1165:
1166: /(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
1167:
1168: /^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/Ii
1169: 1221
1170: Satan, oscillate my metallic sonatas!
1171: A man, a plan, a canal: Panama!
1172: Able was I ere I saw Elba.
1173: *** Failers
1174: The quick brown fox
1175:
1176: /((?(R)a|b))\1(?1)?/I
1177: bb
1178: bbaa
1179:
1180: /(.*)a/Is
1181:
1182: /(.*)a\1/Is
1183:
1184: /(.*)a(b)\2/Is
1185:
1186: /((.*)a|(.*)b)z/Is
1187:
1188: /((.*)a|(.*)b)z\1/Is
1189:
1190: /((.*)a|(.*)b)z\2/Is
1191:
1192: /((.*)a|(.*)b)z\3/Is
1193:
1194: /((.*)a|^(.*)b)z\3/Is
1195:
1196: /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
1197:
1198: /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
1199:
1200: /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
1201:
1202: /(a)(bc)/INDZ
1203: abc
1204:
1205: /(?P<one>a)(bc)/INDZ
1206: abc
1207:
1208: /(a)(?P<named>bc)/INDZ
1209:
1210: /(a+)*zz/I
1211: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
1212: aaaaaaaaaaaaaz\M
1213:
1214: /(aaa(?C1)bbb|ab)/I
1215: aaabbb
1216: aaabbb\C*0
1217: aaabbb\C*1
1218: aaabbb\C*-1
1219:
1220: /ab(?P<one>cd)ef(?P<two>gh)/I
1221: abcdefgh
1222: abcdefgh\C1\Gtwo
1223: abcdefgh\Cone\Ctwo
1224: abcdefgh\Cthree
1225:
1226: /(?P<Tes>)(?P<Test>)/DZ
1227:
1228: /(?P<Test>)(?P<Tes>)/DZ
1229:
1230: /(?P<Z>zz)(?P<A>aa)/I
1231: zzaa\CZ
1232: zzaa\CA
1233:
1234: /(?P<x>eks)(?P<x>eccs)/I
1235:
1236: /(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
1237:
1238: "\[((?P<elem>\d+)(,(?P>elem))*)\]"I
1239: [10,20,30,5,5,4,4,2,43,23,4234]
1240: *** Failers
1241: []
1242:
1243: "\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
1244: [10,20,30,5,5,4,4,2,43,23,4234]
1245: []
1246:
1247: /(a(b(?2)c))?/DZ
1248:
1249: /(a(b(?2)c))*/DZ
1250:
1251: /(a(b(?2)c)){0,2}/DZ
1252:
1253: /[ab]{1}+/DZ
1254:
1255: /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
1256: Baby Bjorn Active Carrier - With free SHIPPING!!
1257:
1258: /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
1259: Baby Bjorn Active Carrier - With free SHIPPING!!
1260:
1261: /a*.*b/ISDZ
1262:
1263: /(a|b)*.?c/ISDZ
1264:
1265: /abc(?C255)de(?C)f/DZ
1266:
1267: /abcde/ICDZ
1268: abcde
1269: abcdfe
1270:
1271: /a*b/ICDZS
1272: ab
1273: aaaab
1274: aaaacb
1275:
1276: /a*b/ICDZSS
1277: ab
1278: aaaab
1279: aaaacb
1280:
1281: /a+b/ICDZ
1282: ab
1283: aaaab
1284: aaaacb
1285:
1286: /(abc|def)x/ICDZS
1287: abcx
1288: defx
1289: ** Failers
1290: abcdefzx
1291:
1292: /(abc|def)x/ICDZSS
1293: abcx
1294: defx
1295: ** Failers
1296: abcdefzx
1297:
1298: /(ab|cd){3,4}/IC
1299: ababab
1300: abcdabcd
1301: abcdcdcdcdcd
1302:
1303: /([ab]{,4}c|xy)/ICDZS
1304: Note: that { does NOT introduce a quantifier
1305:
1306: /([ab]{,4}c|xy)/ICDZSS
1307: Note: that { does NOT introduce a quantifier
1308:
1309: /([ab]{1,4}c|xy){4,5}?123/ICDZ
1310: aacaacaacaacaac123
1311:
1312: /\b.*/I
1313: ab cd\>1
1314:
1315: /\b.*/Is
1316: ab cd\>1
1317:
1318: /(?!.bcd).*/I
1319: Xbcd12345
1320:
1321: /abcde/I
1322: ab\P
1323: abc\P
1324: abcd\P
1325: abcde\P
1326: the quick brown abc\P
1327: ** Failers\P
1328: the quick brown abxyz fox\P
1329:
1330: "^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
1331: 13/05/04\P
1332: 13/5/2004\P
1333: 02/05/09\P
1334: 1\P
1335: 1/2\P
1336: 1/2/0\P
1337: 1/2/04\P
1338: 0\P
1339: 02/\P
1340: 02/0\P
1341: 02/1\P
1342: ** Failers\P
1343: \P
1344: 123\P
1345: 33/4/04\P
1346: 3/13/04\P
1347: 0/1/2003\P
1348: 0/\P
1349: 02/0/\P
1350: 02/13\P
1351:
1352: /0{0,2}ABC/I
1353:
1354: /\d{3,}ABC/I
1355:
1356: /\d*ABC/I
1357:
1358: /[abc]+DE/I
1359:
1360: /[abc]?123/I
1361: 123\P
1362: a\P
1363: b\P
1364: c\P
1365: c12\P
1366: c123\P
1367:
1368: /^(?:\d){3,5}X/I
1369: 1\P
1370: 123\P
1371: 123X
1372: 1234\P
1373: 1234X
1374: 12345\P
1375: 12345X
1376: *** Failers
1377: 1X
1378: 123456\P
1379:
1380: /abc/IS>testsavedregex
1381: <testsavedregex
1382: abc
1383: ** Failers
1384: bca
1385:
1386: /abc/ISS>testsavedregex
1387: <testsavedregex
1388: abc
1389: ** Failers
1390: bca
1391:
1392: /abc/IFS>testsavedregex
1393: <testsavedregex
1394: abc
1395: ** Failers
1396: bca
1397:
1398: /abc/IFSS>testsavedregex
1399: <testsavedregex
1400: abc
1401: ** Failers
1402: bca
1403:
1404: /(a|b)/IS>testsavedregex
1405: <testsavedregex
1406: abc
1407: ** Failers
1408: def
1409:
1410: /(a|b)/ISS>testsavedregex
1411: <testsavedregex
1412: abc
1413: ** Failers
1414: def
1415:
1416: /(a|b)/ISF>testsavedregex
1417: <testsavedregex
1418: abc
1419: ** Failers
1420: def
1421:
1422: /(a|b)/ISSF>testsavedregex
1423: <testsavedregex
1424: abc
1425: ** Failers
1426: def
1427:
1428: ~<(\w+)/?>(.)*</(\1)>~smgI
1429: \J1024<!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
1430:
1431: /^a/IF
1432:
1433: /line\nbreak/I
1434: this is a line\nbreak
1435: line one\nthis is a line\nbreak in the second line
1436:
1437: /line\nbreak/If
1438: this is a line\nbreak
1439: ** Failers
1440: line one\nthis is a line\nbreak in the second line
1441:
1442: /line\nbreak/Imf
1443: this is a line\nbreak
1444: ** Failers
1445: line one\nthis is a line\nbreak in the second line
1446:
1447: /(?i)(?-i)AbCd/I
1448: AbCd
1449: ** Failers
1450: abcd
1451:
1452: /a{11111111111111111111}/I
1453:
1454: /(){64294967295}/I
1455:
1456: /(){2,4294967295}/I
1457:
1458: "(?i:a)(?i:b)(?i:c)(?i:d)(?i:e)(?i:f)(?i:g)(?i:h)(?i:i)(?i:j)(k)(?i:l)A\1B"I
1459: abcdefghijklAkB
1460:
1461: "(?P<n0>a)(?P<n1>b)(?P<n2>c)(?P<n3>d)(?P<n4>e)(?P<n5>f)(?P<n6>g)(?P<n7>h)(?P<n8>i)(?P<n9>j)(?P<n10>k)(?P<n11>l)A\11B"I
1462: abcdefghijklAkB
1463:
1464: "(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
1465: abcdefghijklAkB
1466:
1467: "(?P<name0>a)(?P<name1>a)(?P<name2>a)(?P<name3>a)(?P<name4>a)(?P<name5>a)(?P<name6>a)(?P<name7>a)(?P<name8>a)(?P<name9>a)(?P<name10>a)(?P<name11>a)(?P<name12>a)(?P<name13>a)(?P<name14>a)(?P<name15>a)(?P<name16>a)(?P<name17>a)(?P<name18>a)(?P<name19>a)(?P<name20>a)(?P<name21>a)(?P<name22>a)(?P<name23>a)(?P<name24>a)(?P<name25>a)(?P<name26>a)(?P<name27>a)(?P<name28>a)(?P<name29>a)(?P<name30>a)(?P<name31>a)(?P<name32>a)(?P<name33>a)(?P<name34>a)(?P<name35>a)(?P<name36>a)(?P<name37>a)(?P<name38>a)(?P<name39>a)(?P<name40>a)(?P<name41>a)(?P<name42>a)(?P<name43>a)(?P<name44>a)(?P<name45>a)(?P<name46>a)(?P<name47>a)(?P<name48>a)(?P<name49>a)(?P<name50>a)(?P<name51>a)(?P<name52>a)(?P<name53>a)(?P<name54>a)(?P<name55>a)(?P<name56>a)(?P<name57>a)(?P<name58>a)(?P<name59>a)(?P<name60>a)(?P<name61>a)(?P<name62>a)(?P<name63>a)(?P<name64>a)(?P<name65>a)(?P<name66>a)(?P<name67>a)(?P<name68>a)(?P<name69>a)(?P<name70>a)(?P<name71>a)(?P<name72>a)(?P<name73>a)(?P<name74>a)(?P<name75>a)(?P<name76>a)(?P<name77>a)(?P<name78>a)(?P<name79>a)(?P<name80>a)(?P<name81>a)(?P<name82>a)(?P<name83>a)(?P<name84>a)(?P<name85>a)(?P<name86>a)(?P<name87>a)(?P<name88>a)(?P<name89>a)(?P<name90>a)(?P<name91>a)(?P<name92>a)(?P<name93>a)(?P<name94>a)(?P<name95>a)(?P<name96>a)(?P<name97>a)(?P<name98>a)(?P<name99>a)(?P<name100>a)"I
1468: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1469:
1470: "(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)"I
1471: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1472:
1473: /[^()]*(?:\((?R)\)[^()]*)*/I
1474: (this(and)that
1475: (this(and)that)
1476: (this(and)that)stuff
1477:
1478: /[^()]*(?:\((?>(?R))\)[^()]*)*/I
1479: (this(and)that
1480: (this(and)that)
1481:
1482: /[^()]*(?:\((?R)\))*[^()]*/I
1483: (this(and)that
1484: (this(and)that)
1485:
1486: /(?:\((?R)\))*[^()]*/I
1487: (this(and)that
1488: (this(and)that)
1489: ((this))
1490:
1491: /(?:\((?R)\))|[^()]*/I
1492: (this(and)that
1493: (this(and)that)
1494: (this)
1495: ((this))
1496:
1497: /\x{0000ff}/I
1498:
1499: /^((?P<A>a1)|(?P<A>a2)b)/I
1500:
1501: /^((?P<A>a1)|(?P<A>a2)b)/IJ
1502: a1b\CA
1503: a2b\CA
1504: ** Failers
1505: a1b\CZ\CA
1.1.1.5 ! misho 1506:
! 1507: /(?|(?<a>)(?<b>)(?<a>)|(?<a>)(?<b>)(?<a>))/IJ
1.1 misho 1508:
1509: /^(?P<A>a)(?P<A>b)/IJ
1510: ab\CA
1511:
1512: /^(?P<A>a)(?P<A>b)|cd/IJ
1513: ab\CA
1514: cd\CA
1515:
1516: /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1517: cdefgh\CA
1518:
1519: /^((?P<A>a1)|(?P<A>a2)b)/IJ
1520: a1b\GA
1521: a2b\GA
1522: ** Failers
1523: a1b\GZ\GA
1524:
1525: /^(?P<A>a)(?P<A>b)/IJ
1526: ab\GA
1527:
1528: /^(?P<A>a)(?P<A>b)|cd/IJ
1529: ab\GA
1530: cd\GA
1531:
1532: /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1533: cdefgh\GA
1534:
1535: /(?J)^((?P<A>a1)|(?P<A>a2)b)/I
1536: a1b\CA
1537: a2b\CA
1538:
1539: /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
1540:
1541: / In this next test, J is not set at the outer level; consequently it isn't
1542: set in the pattern's options; consequently pcre_get_named_substring() produces
1543: a random value. /Ix
1544:
1545: /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
1546: a bc d\CA\CB\CC
1547:
1548: /^(?P<A>a)?(?(A)a|b)/I
1549: aabc
1550: bc
1551: ** Failers
1552: abc
1553:
1554: /(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
1555: bXaX
1556:
1557: /(?:(?(2y)a|b)(X))+/I
1558:
1559: /(?:(?(ZA)a|b)(?P<ZZ>X))+/I
1560:
1561: /(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
1562: bbXaaX
1563:
1564: /(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
1565: (b)\\Xa\\X
1566:
1567: /(?P<ABC/I
1568:
1569: /(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1570: bXXaYYaY
1571: bXYaXXaX
1572:
1573: /()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1574: bXXaYYaY
1575:
1576: /\s*,\s*/IS
1577: \x0b,\x0b
1578: \x0c,\x0d
1579:
1580: /^abc/Im
1581: xyz\nabc
1582: xyz\nabc\<lf>
1583: xyz\r\nabc\<lf>
1584: xyz\rabc\<cr>
1585: xyz\r\nabc\<crlf>
1586: ** Failers
1587: xyz\nabc\<cr>
1588: xyz\r\nabc\<cr>
1589: xyz\nabc\<crlf>
1590: xyz\rabc\<crlf>
1591: xyz\rabc\<lf>
1592:
1593: /abc$/Im<lf>
1594: xyzabc
1595: xyzabc\n
1596: xyzabc\npqr
1597: xyzabc\r\<cr>
1598: xyzabc\rpqr\<cr>
1599: xyzabc\r\n\<crlf>
1600: xyzabc\r\npqr\<crlf>
1601: ** Failers
1602: xyzabc\r
1603: xyzabc\rpqr
1604: xyzabc\r\n
1605: xyzabc\r\npqr
1606:
1607: /^abc/Im<cr>
1608: xyz\rabcdef
1609: xyz\nabcdef\<lf>
1610: ** Failers
1611: xyz\nabcdef
1612:
1613: /^abc/Im<lf>
1614: xyz\nabcdef
1615: xyz\rabcdef\<cr>
1616: ** Failers
1617: xyz\rabcdef
1618:
1619: /^abc/Im<crlf>
1620: xyz\r\nabcdef
1621: xyz\rabcdef\<cr>
1622: ** Failers
1623: xyz\rabcdef
1624:
1625: /^abc/Im<bad>
1626:
1627: /abc/I
1628: xyz\rabc\<bad>
1629: abc
1630:
1631: /.*/I<lf>
1632: abc\ndef
1633: abc\rdef
1634: abc\r\ndef
1635: \<cr>abc\ndef
1636: \<cr>abc\rdef
1637: \<cr>abc\r\ndef
1638: \<crlf>abc\ndef
1639: \<crlf>abc\rdef
1640: \<crlf>abc\r\ndef
1641:
1642: /\w+(.)(.)?def/Is
1643: abc\ndef
1644: abc\rdef
1645: abc\r\ndef
1646:
1647: +((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
1648: /* this is a C style comment */\M
1649:
1650: /(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
1651:
1652: /()()()()()()()()()()()()()()()()()()()()
1653: ()()()()()()()()()()()()()()()()()()()()
1654: ()()()()()()()()()()()()()()()()()()()()
1655: ()()()()()()()()()()()()()()()()()()()()
1656: ()()()()()()()()()()()()()()()()()()()()
1657: (.(.))/Ix
1658: XY\O400
1659:
1660: /(a*b|(?i:c*(?-i)d))/IS
1661:
1662: /()[ab]xyz/IS
1663:
1664: /(|)[ab]xyz/IS
1665:
1666: /(|c)[ab]xyz/IS
1667:
1668: /(|c?)[ab]xyz/IS
1669:
1670: /(d?|c?)[ab]xyz/IS
1671:
1672: /(d?|c)[ab]xyz/IS
1673:
1674: /^a*b\d/DZ
1675:
1676: /^a*+b\d/DZ
1677:
1678: /^a*?b\d/DZ
1679:
1680: /^a+A\d/DZ
1681: aaaA5
1682: ** Failers
1683: aaaa5
1684:
1685: /^a*A\d/IiDZ
1686: aaaA5
1687: aaaa5
1688:
1689: /(a*|b*)[cd]/IS
1690:
1691: /(a+|b*)[cd]/IS
1692:
1693: /(a*|b+)[cd]/IS
1694:
1695: /(a+|b+)[cd]/IS
1696:
1697: /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1698: ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1699: (((
1700: a
1701: ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1702: ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1703: )))
1704: /Ix
1705: large nest
1706:
1707: /a*\d/BZ
1708:
1709: /a*\D/BZ
1710:
1711: /0*\d/BZ
1712:
1713: /0*\D/BZ
1714:
1715: /a*\s/BZ
1716:
1717: /a*\S/BZ
1718:
1719: / *\s/BZ
1720:
1721: / *\S/BZ
1722:
1723: /a*\w/BZ
1724:
1725: /a*\W/BZ
1726:
1727: /=*\w/BZ
1728:
1729: /=*\W/BZ
1730:
1731: /\d*a/BZ
1732:
1733: /\d*2/BZ
1734:
1735: /\d*\d/BZ
1736:
1737: /\d*\D/BZ
1738:
1739: /\d*\s/BZ
1740:
1741: /\d*\S/BZ
1742:
1743: /\d*\w/BZ
1744:
1745: /\d*\W/BZ
1746:
1747: /\D*a/BZ
1748:
1749: /\D*2/BZ
1750:
1751: /\D*\d/BZ
1752:
1753: /\D*\D/BZ
1754:
1755: /\D*\s/BZ
1756:
1757: /\D*\S/BZ
1758:
1759: /\D*\w/BZ
1760:
1761: /\D*\W/BZ
1762:
1763: /\s*a/BZ
1764:
1765: /\s*2/BZ
1766:
1767: /\s*\d/BZ
1768:
1769: /\s*\D/BZ
1770:
1771: /\s*\s/BZ
1772:
1773: /\s*\S/BZ
1774:
1775: /\s*\w/BZ
1776:
1777: /\s*\W/BZ
1778:
1779: /\S*a/BZ
1780:
1781: /\S*2/BZ
1782:
1783: /\S*\d/BZ
1784:
1785: /\S*\D/BZ
1786:
1787: /\S*\s/BZ
1788:
1789: /\S*\S/BZ
1790:
1791: /\S*\w/BZ
1792:
1793: /\S*\W/BZ
1794:
1795: /\w*a/BZ
1796:
1797: /\w*2/BZ
1798:
1799: /\w*\d/BZ
1800:
1801: /\w*\D/BZ
1802:
1803: /\w*\s/BZ
1804:
1805: /\w*\S/BZ
1806:
1807: /\w*\w/BZ
1808:
1809: /\w*\W/BZ
1810:
1811: /\W*a/BZ
1812:
1813: /\W*2/BZ
1814:
1815: /\W*\d/BZ
1816:
1817: /\W*\D/BZ
1818:
1819: /\W*\s/BZ
1820:
1821: /\W*\S/BZ
1822:
1823: /\W*\w/BZ
1824:
1825: /\W*\W/BZ
1826:
1827: /[^a]+a/BZ
1828:
1829: /[^a]+a/BZi
1830:
1831: /[^a]+A/BZi
1832:
1833: /[^a]+b/BZ
1834:
1835: /[^a]+\d/BZ
1836:
1837: /a*[^a]/BZ
1838:
1839: /(?P<abc>x)(?P<xyz>y)/I
1840: xy\Cabc\Cxyz
1841:
1842: /(?<abc>x)(?'xyz'y)/I
1843: xy\Cabc\Cxyz
1844:
1845: /(?<abc'x)(?'xyz'y)/I
1846:
1847: /(?<abc>x)(?'xyz>y)/I
1848:
1849: /(?P'abc'x)(?P<xyz>y)/I
1850:
1851: /^(?:(?(ZZ)a|b)(?<ZZ>X))+/
1852: bXaX
1853: bXbX
1854: ** Failers
1855: aXaX
1856: aXbX
1857:
1858: /^(?P>abc)(?<abcd>xxx)/
1859:
1860: /^(?P>abc)(?<abc>x|y)/
1861: xx
1862: xy
1863: yy
1864: yx
1865:
1866: /^(?P>abc)(?P<abc>x|y)/
1867: xx
1868: xy
1869: yy
1870: yx
1871:
1872: /^((?(abc)a|b)(?<abc>x|y))+/
1873: bxay
1874: bxby
1875: ** Failers
1876: axby
1877:
1878: /^(((?P=abc)|X)(?<abc>x|y))+/
1879: XxXxxx
1880: XxXyyx
1881: XxXyxx
1882: ** Failers
1883: x
1884:
1885: /^(?1)(abc)/
1886: abcabc
1887:
1888: /^(?:(?:\1|X)(a|b))+/
1889: Xaaa
1890: Xaba
1891:
1892: /^[\E\Qa\E-\Qz\E]+/BZ
1893:
1894: /^[a\Q]bc\E]/BZ
1895:
1896: /^[a-\Q\E]/BZ
1897:
1898: /^(?P>abc)[()](?<abc>)/BZ
1899:
1900: /^((?(abc)y)[()](?P<abc>x))+/BZ
1901: (xy)x
1902:
1903: /^(?P>abc)\Q()\E(?<abc>)/BZ
1904:
1905: /^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
1906:
1907: /^(?P>abc) # this is (a comment)
1908: (?<abc>)/BZx
1909:
1910: /^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
1911: 1221
1912: Satan, oscillate my metallic sonatas!
1913: A man, a plan, a canal: Panama!
1914: Able was I ere I saw Elba.
1915: *** Failers
1916: The quick brown fox
1917:
1918: /(?=(\w+))\1:/I
1919: abcd:
1920:
1921: /(?=(?'abc'\w+))\k<abc>:/I
1922: abcd:
1923:
1924: /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
1925: adaa
1926: ** Failers
1927: addd
1928: adbb
1929:
1930: /(?'abc'a|b)(?<abc>d|e)(?&abc){2}/J
1931: bdaa
1932: bdab
1933: ** Failers
1934: bddd
1935:
1936: /(?(<bc))/
1937:
1938: /(?(''))/
1939:
1940: /(?('R')stuff)/
1941:
1942: /((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) /x
1943: abcabc1Xabc2XabcXabcabc
1944:
1945: /(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1946: abcabc1Xabc2XabcXabcabc
1947:
1.1.1.5 ! misho 1948: /(?<A> (?'B' abc (?(R) (?(R&C)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1.1 misho 1949:
1950: /^(?(DEFINE) abc | xyz ) /x
1951:
1952: /(?(DEFINE) abc) xyz/xI
1953:
1954: /(a|)*\d/
1955: \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1956: \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
1957:
1958: /^a.b/<lf>
1959: a\rb
1960: a\nb\<cr>
1961: a\x85b\<anycrlf>
1962: ** Failers
1963: a\nb
1964: a\nb\<any>
1965: a\rb\<cr>
1966: a\rb\<any>
1967: a\x85b\<any>
1968: a\rb\<anycrlf>
1969:
1970: /^abc./mgx<any>
1971: abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
1972:
1973: /abc.$/mgx<any>
1974: abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
1975:
1976: /a/<cr><any>
1977:
1978: /a/<any><crlf>
1979:
1980: /^a\Rb/<bsr_unicode>
1981: a\nb
1982: a\rb
1983: a\r\nb
1984: a\x0bb
1985: a\x0cb
1986: a\x85b
1987: ** Failers
1988: a\n\rb
1989:
1990: /^a\R*b/<bsr_unicode>
1991: ab
1992: a\nb
1993: a\rb
1994: a\r\nb
1995: a\x0bb
1996: a\x0cb
1997: a\x85b
1998: a\n\rb
1999: a\n\r\x85\x0cb
2000:
2001: /^a\R+b/<bsr_unicode>
2002: a\nb
2003: a\rb
2004: a\r\nb
2005: a\x0bb
2006: a\x0cb
2007: a\x85b
2008: a\n\rb
2009: a\n\r\x85\x0cb
2010: ** Failers
2011: ab
2012:
2013: /^a\R{1,3}b/<bsr_unicode>
2014: a\nb
2015: a\n\rb
2016: a\n\r\x85b
2017: a\r\n\r\nb
2018: a\r\n\r\n\r\nb
2019: a\n\r\n\rb
2020: a\n\n\r\nb
2021: ** Failers
2022: a\n\n\n\rb
2023: a\r
2024:
2025: /^a[\R]b/<bsr_unicode>
2026: aRb
2027: ** Failers
2028: a\nb
2029:
2030: /(?&abc)X(?<abc>P)/I
2031: abcPXP123
2032:
2033: /(?1)X(?<abc>P)/I
2034: abcPXP123
2035:
2036: /(?:a(?&abc)b)*(?<abc>x)/
2037: 123axbaxbaxbx456
2038: 123axbaxbaxb456
2039:
2040: /(?:a(?&abc)b){1,5}(?<abc>x)/
2041: 123axbaxbaxbx456
2042:
2043: /(?:a(?&abc)b){2,5}(?<abc>x)/
2044: 123axbaxbaxbx456
2045:
2046: /(?:a(?&abc)b){2,}(?<abc>x)/
2047: 123axbaxbaxbx456
2048:
2049: /(abc)(?i:(?1))/
2050: defabcabcxyz
2051: DEFabcABCXYZ
2052:
2053: /(abc)(?:(?i)(?1))/
2054: defabcabcxyz
2055: DEFabcABCXYZ
2056:
2057: /^(a)\g-2/
2058:
2059: /^(a)\g/
2060:
2061: /^(a)\g{0}/
2062:
2063: /^(a)\g{3/
2064:
1.1.1.5 ! misho 2065: /^(a)\g{aa}/
1.1 misho 2066:
2067: /^a.b/<lf>
2068: a\rb
2069: *** Failers
2070: a\nb
2071:
2072: /.+foo/
2073: afoo
2074: ** Failers
2075: \r\nfoo
2076: \nfoo
2077:
2078: /.+foo/<crlf>
2079: afoo
2080: \nfoo
2081: ** Failers
2082: \r\nfoo
2083:
2084: /.+foo/<any>
2085: afoo
2086: ** Failers
2087: \nfoo
2088: \r\nfoo
2089:
2090: /.+foo/s
2091: afoo
2092: \r\nfoo
2093: \nfoo
2094:
2095: /^$/mg<any>
2096: abc\r\rxyz
2097: abc\n\rxyz
2098: ** Failers
2099: abc\r\nxyz
2100:
2101: /(?m)^$/<any>g+
2102: abc\r\n\r\n
2103:
2104: /(?m)^$|^\r\n/<any>g+
2105: abc\r\n\r\n
2106:
2107: /(?m)$/<any>g+
2108: abc\r\n\r\n
2109:
2110: /abc.$/mgx<anycrlf>
2111: abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
2112:
2113: /^X/m
2114: XABC
2115: ** Failers
2116: XABC\B
2117:
2118: /(ab|c)(?-1)/BZ
2119: abc
2120:
2121: /xy(?+1)(abc)/BZ
2122: xyabcabc
2123: ** Failers
2124: xyabc
2125:
2126: /x(?-0)y/
2127:
2128: /x(?-1)y/
2129:
2130: /x(?+0)y/
2131:
2132: /x(?+1)y/
2133:
2134: /^(abc)?(?(-1)X|Y)/BZ
2135: abcX
2136: Y
2137: ** Failers
2138: abcY
2139:
2140: /^((?(+1)X|Y)(abc))+/BZ
2141: YabcXabc
2142: YabcXabcXabc
2143: ** Failers
2144: XabcXabc
2145:
2146: /(?(-1)a)/BZ
2147:
2148: /((?(-1)a))/BZ
2149:
2150: /((?(-2)a))/BZ
2151:
2152: /^(?(+1)X|Y)(.)/BZ
2153: Y!
2154:
2155: /(?<A>tom|bon)-\k{A}/
2156: tom-tom
2157: bon-bon
2158: ** Failers
2159: tom-bon
2160:
2161: /\g{A/
2162:
2163: /(?|(abc)|(xyz))/BZ
2164: >abc<
2165: >xyz<
2166:
2167: /(x)(?|(abc)|(xyz))(x)/BZ
2168: xabcx
2169: xxyzx
2170:
2171: /(x)(?|(abc)(pqr)|(xyz))(x)/BZ
2172: xabcpqrx
2173: xxyzx
2174:
2175: /\H++X/BZ
2176: ** Failers
2177: XXXX
2178:
2179: /\H+\hY/BZ
2180: XXXX Y
2181:
2182: /\H+ Y/BZ
2183:
2184: /\h+A/BZ
2185:
2186: /\v*B/BZ
2187:
2188: /\V+\x0a/BZ
2189:
2190: /A+\h/BZ
2191:
2192: / *\H/BZ
2193:
2194: /A*\v/BZ
2195:
2196: /\x0b*\V/BZ
2197:
2198: /\d+\h/BZ
2199:
2200: /\d*\v/BZ
2201:
2202: /S+\h\S+\v/BZ
2203:
2204: /\w{3,}\h\w+\v/BZ
2205:
2206: /\h+\d\h+\w\h+\S\h+\H/BZ
2207:
2208: /\v+\d\v+\w\v+\S\v+\V/BZ
2209:
2210: /\H+\h\H+\d/BZ
2211:
2212: /\V+\v\V+\w/BZ
2213:
2214: /\( (?: [^()]* | (?R) )* \)/x
2215: \J1024(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0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IP)c+(*FAIL)/C
2244: aaabcccaaabccc
2245:
2246: /a+b?(*THEN)c+(*FAIL)/C
2247: aaabccc
2248:
2249: /a(*MARK)b/
2250:
2251: /(?i:A{1,}\6666666666)/
2252:
2253: /\g6666666666/
2254:
2255: /[\g6666666666]/BZ
2256:
2257: /(?1)\c[/
2258:
2259: /.+A/<crlf>
2260: \r\nA
2261:
2262: /\nA/<crlf>
2263: \r\nA
2264:
2265: /[\r\n]A/<crlf>
2266: \r\nA
2267:
2268: /(\r|\n)A/<crlf>
2269: \r\nA
2270:
2271: /a(*CR)b/
2272:
2273: /(*CR)a.b/
2274: a\nb
2275: ** Failers
2276: a\rb
2277:
2278: /(*CR)a.b/<lf>
2279: a\nb
2280: ** Failers
2281: a\rb
2282:
2283: /(*LF)a.b/<CRLF>
2284: a\rb
2285: ** Failers
2286: a\nb
2287:
2288: /(*CRLF)a.b/
2289: a\rb
2290: a\nb
2291: ** Failers
2292: a\r\nb
2293:
2294: /(*ANYCRLF)a.b/<CR>
2295: ** Failers
2296: a\rb
2297: a\nb
2298: a\r\nb
2299:
2300: /(*ANY)a.b/<cr>
2301: ** Failers
2302: a\rb
2303: a\nb
2304: a\r\nb
2305: a\x85b
2306:
2307: /(*ANY).*/g
2308: abc\r\ndef
2309:
2310: /(*ANYCRLF).*/g
2311: abc\r\ndef
2312:
2313: /(*CRLF).*/g
2314: abc\r\ndef
2315:
2316: /a\Rb/I<bsr_anycrlf>
2317: a\rb
2318: a\nb
2319: a\r\nb
2320: ** Failers
2321: a\x85b
2322: a\x0bb
2323:
2324: /a\Rb/I<bsr_unicode>
2325: a\rb
2326: a\nb
2327: a\r\nb
2328: a\x85b
2329: a\x0bb
2330: ** Failers
2331: a\x85b\<bsr_anycrlf>
2332: a\x0bb\<bsr_anycrlf>
2333:
2334: /a\R?b/I<bsr_anycrlf>
2335: a\rb
2336: a\nb
2337: a\r\nb
2338: ** Failers
2339: a\x85b
2340: a\x0bb
2341:
2342: /a\R?b/I<bsr_unicode>
2343: a\rb
2344: a\nb
2345: a\r\nb
2346: a\x85b
2347: a\x0bb
2348: ** Failers
2349: a\x85b\<bsr_anycrlf>
2350: a\x0bb\<bsr_anycrlf>
2351:
2352: /a\R{2,4}b/I<bsr_anycrlf>
2353: a\r\n\nb
2354: a\n\r\rb
2355: a\r\n\r\n\r\n\r\nb
2356: ** Failers
2357: a\x85\85b
2358: a\x0b\0bb
2359:
2360: /a\R{2,4}b/I<bsr_unicode>
2361: a\r\rb
2362: a\n\n\nb
2363: a\r\n\n\r\rb
2364: a\x85\85b
2365: a\x0b\0bb
2366: ** Failers
2367: a\r\r\r\r\rb
2368: a\x85\85b\<bsr_anycrlf>
2369: a\x0b\0bb\<bsr_anycrlf>
2370:
2371: /(*BSR_ANYCRLF)a\Rb/I
2372: a\nb
2373: a\rb
2374:
2375: /(*BSR_UNICODE)a\Rb/I
2376: a\x85b
2377:
2378: /(*BSR_ANYCRLF)(*CRLF)a\Rb/I
2379: a\nb
2380: a\rb
2381:
2382: /(*CRLF)(*BSR_UNICODE)a\Rb/I
2383: a\x85b
2384:
2385: /(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
2386:
2387: /(?<a>)(?&)/
2388:
2389: /(?<abc>)(?&a)/
2390:
2391: /(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
2392:
2393: /(?+-a)/
2394:
2395: /(?-+a)/
2396:
2397: /(?(-1))/
2398:
2399: /(?(+10))/
2400:
2401: /(?(10))/
2402:
2403: /(?(+2))()()/
2404:
2405: /(?(2))()()/
2406:
2407: /\k''/
2408:
2409: /\k<>/
2410:
2411: /\k{}/
2412:
2413: /\k/
2414:
2415: /\kabc/
2416:
2417: /(?P=)/
2418:
2419: /(?P>)/
2420:
2421: /(?!\w)(?R)/
2422:
2423: /(?=\w)(?R)/
2424:
2425: /(?<!\w)(?R)/
2426:
2427: /(?<=\w)(?R)/
2428:
2429: /[[:foo:]]/
2430:
2431: /[[:1234:]]/
2432:
2433: /[[:f\oo:]]/
2434:
2435: /[[: :]]/
2436:
2437: /[[:...:]]/
2438:
2439: /[[:l\ower:]]/
2440:
2441: /[[:abc\:]]/
2442:
2443: /[abc[:x\]pqr:]]/
2444:
2445: /[[:a\dz:]]/
2446:
2447: /(^(a|b\g<-1'c))/
2448:
2449: /^(?+1)(?<a>x|y){0}z/
2450: xzxx
2451: yzyy
2452: ** Failers
2453: xxz
2454:
2455: /(\3)(\1)(a)/
2456: cat
2457:
2458: /(\3)(\1)(a)/<JS>
2459: cat
2460:
2461: /TA]/
2462: The ACTA] comes
2463:
2464: /TA]/<JS>
2465: The ACTA] comes
2466:
2467: /(?2)[]a()b](abc)/
2468: abcbabc
2469:
2470: /(?2)[^]a()b](abc)/
2471: abcbabc
2472:
2473: /(?1)[]a()b](abc)/
2474: abcbabc
2475: ** Failers
2476: abcXabc
2477:
2478: /(?1)[^]a()b](abc)/
2479: abcXabc
2480: ** Failers
2481: abcbabc
2482:
2483: /(?2)[]a()b](abc)(xyz)/
2484: xyzbabcxyz
2485:
2486: /(?&N)[]a(?<N>)](?<M>abc)/
2487: abc<abc
2488:
2489: /(?&N)[]a(?<N>)](abc)/
2490: abc<abc
2491:
2492: /a[]b/
2493:
2494: /a[^]b/
2495:
2496: /a[]b/<JS>
2497: ** Failers
2498: ab
2499:
2500: /a[]+b/<JS>
2501: ** Failers
2502: ab
2503:
2504: /a[]*+b/<JS>
2505: ** Failers
2506: ab
2507:
2508: /a[^]b/<JS>
2509: aXb
2510: a\nb
2511: ** Failers
2512: ab
2513:
2514: /a[^]+b/<JS>
2515: aXb
2516: a\nX\nXb
2517: ** Failers
2518: ab
2519:
1.1.1.5 ! misho 2520: /a(?!)b/BZ
! 2521:
! 2522: /(?!)?a/BZ
! 2523: ab
1.1 misho 2524:
2525: /a(*FAIL)+b/
2526:
2527: /(abc|pqr|123){0}[xyz]/SI
2528:
2529: /(?(?=.*b)b|^)/CI
2530: adc
2531: abc
2532:
2533: /(?(?=b).*b|^d)/I
2534:
2535: /(?(?=.*b).*b|^d)/I
2536:
2537: /xyz/C
2538: xyz
2539: abcxyz
2540: abcxyz\Y
2541: ** Failers
2542: abc
2543: abc\Y
2544: abcxypqr
2545: abcxypqr\Y
2546:
2547: /(*NO_START_OPT)xyz/C
1.1.1.5 ! misho 2548: abcxyz
! 2549:
! 2550: /(*NO_AUTO_POSSESS)a+b/BZ
1.1 misho 2551:
2552: /xyz/CY
2553: abcxyz
2554:
2555: /^"((?(?=[a])[^"])|b)*"$/C
2556: "ab"
2557:
2558: /^"((?(?=[a])[^"])|b)*"$/
2559: "ab"
2560:
2561: /^X(?5)(a)(?|(b)|(q))(c)(d)Y/
2562: XYabcdY
2563:
2564: /^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
2565: XYabcdY
2566:
2567: /Xa{2,4}b/
2568: X\P
2569: Xa\P
2570: Xaa\P
2571: Xaaa\P
2572: Xaaaa\P
2573:
2574: /Xa{2,4}?b/
2575: X\P
2576: Xa\P
2577: Xaa\P
2578: Xaaa\P
2579: Xaaaa\P
2580:
2581: /Xa{2,4}+b/
2582: X\P
2583: Xa\P
2584: Xaa\P
2585: Xaaa\P
2586: Xaaaa\P
2587:
2588: /X\d{2,4}b/
2589: X\P
2590: X3\P
2591: X33\P
2592: X333\P
2593: X3333\P
2594:
2595: /X\d{2,4}?b/
2596: X\P
2597: X3\P
2598: X33\P
2599: X333\P
2600: X3333\P
2601:
2602: /X\d{2,4}+b/
2603: X\P
2604: X3\P
2605: X33\P
2606: X333\P
2607: X3333\P
2608:
2609: /X\D{2,4}b/
2610: X\P
2611: Xa\P
2612: Xaa\P
2613: Xaaa\P
2614: Xaaaa\P
2615:
2616: /X\D{2,4}?b/
2617: X\P
2618: Xa\P
2619: Xaa\P
2620: Xaaa\P
2621: Xaaaa\P
2622:
2623: /X\D{2,4}+b/
2624: X\P
2625: Xa\P
2626: Xaa\P
2627: Xaaa\P
2628: Xaaaa\P
2629:
2630: /X[abc]{2,4}b/
2631: X\P
2632: Xa\P
2633: Xaa\P
2634: Xaaa\P
2635: Xaaaa\P
2636:
2637: /X[abc]{2,4}?b/
2638: X\P
2639: Xa\P
2640: Xaa\P
2641: Xaaa\P
2642: Xaaaa\P
2643:
2644: /X[abc]{2,4}+b/
2645: X\P
2646: Xa\P
2647: Xaa\P
2648: Xaaa\P
2649: Xaaaa\P
2650:
2651: /X[^a]{2,4}b/
2652: X\P
2653: Xz\P
2654: Xzz\P
2655: Xzzz\P
2656: Xzzzz\P
2657:
2658: /X[^a]{2,4}?b/
2659: X\P
2660: Xz\P
2661: Xzz\P
2662: Xzzz\P
2663: Xzzzz\P
2664:
2665: /X[^a]{2,4}+b/
2666: X\P
2667: Xz\P
2668: Xzz\P
2669: Xzzz\P
2670: Xzzzz\P
2671:
2672: /(Y)X\1{2,4}b/
2673: YX\P
2674: YXY\P
2675: YXYY\P
2676: YXYYY\P
2677: YXYYYY\P
2678:
2679: /(Y)X\1{2,4}?b/
2680: YX\P
2681: YXY\P
2682: YXYY\P
2683: YXYYY\P
2684: YXYYYY\P
2685:
2686: /(Y)X\1{2,4}+b/
2687: YX\P
2688: YXY\P
2689: YXYY\P
2690: YXYYY\P
2691: YXYYYY\P
2692:
2693: /\++\KZ|\d+X|9+Y/
2694: ++++123999\P
2695: ++++123999Y\P
2696: ++++Z1234\P
2697:
2698: /Z(*F)/
2699: Z\P
2700: ZA\P
2701:
2702: /Z(?!)/
2703: Z\P
2704: ZA\P
2705:
2706: /dog(sbody)?/
2707: dogs\P
2708: dogs\P\P
2709:
2710: /dog(sbody)??/
2711: dogs\P
2712: dogs\P\P
2713:
2714: /dog|dogsbody/
2715: dogs\P
2716: dogs\P\P
2717:
2718: /dogsbody|dog/
2719: dogs\P
2720: dogs\P\P
2721:
2722: /\bthe cat\b/
2723: the cat\P
2724: the cat\P\P
2725:
2726: /abc/
2727: abc\P
2728: abc\P\P
2729:
2730: /abc\K123/
2731: xyzabc123pqr
2732: xyzabc12\P
2733: xyzabc12\P\P
2734:
2735: /(?<=abc)123/
2736: xyzabc123pqr
2737: xyzabc12\P
2738: xyzabc12\P\P
2739:
2740: /\babc\b/
2741: +++abc+++
2742: +++ab\P
2743: +++ab\P\P
2744:
2745: /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
2746:
2747: /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
2748:
2749: /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
2750:
2751: /abc\K/+
2752: abcdef
2753: abcdef\N\N
2754: xyzabcdef\N\N
2755: ** Failers
2756: abcdef\N
2757: xyzabcdef\N
2758:
2759: /^(?:(?=abc)|abc\K)/+
2760: abcdef
2761: abcdef\N\N
2762: ** Failers
2763: abcdef\N
2764:
2765: /a?b?/+
2766: xyz
2767: xyzabc
2768: xyzabc\N
2769: xyzabc\N\N
2770: xyz\N\N
2771: ** Failers
2772: xyz\N
2773:
2774: /^a?b?/+
2775: xyz
2776: xyzabc
2777: ** Failers
2778: xyzabc\N
2779: xyzabc\N\N
2780: xyz\N\N
2781: xyz\N
2782:
2783: /^(?<name>a|b\g<name>c)/
2784: aaaa
2785: bacxxx
2786: bbaccxxx
2787: bbbacccxx
2788:
2789: /^(?<name>a|b\g'name'c)/
2790: aaaa
2791: bacxxx
2792: bbaccxxx
2793: bbbacccxx
2794:
2795: /^(a|b\g<1>c)/
2796: aaaa
2797: bacxxx
2798: bbaccxxx
2799: bbbacccxx
2800:
2801: /^(a|b\g'1'c)/
2802: aaaa
2803: bacxxx
2804: bbaccxxx
2805: bbbacccxx
2806:
2807: /^(a|b\g'-1'c)/
2808: aaaa
2809: bacxxx
2810: bbaccxxx
2811: bbbacccxx
2812:
2813: /(^(a|b\g<-1>c))/
2814: aaaa
2815: bacxxx
2816: bbaccxxx
2817: bbbacccxx
2818:
2819: /(?-i:\g<name>)(?i:(?<name>a))/
2820: XaaX
2821: XAAX
2822:
2823: /(?i:\g<name>)(?-i:(?<name>a))/
2824: XaaX
2825: ** Failers
2826: XAAX
2827:
2828: /(?-i:\g<+1>)(?i:(a))/
2829: XaaX
2830: XAAX
2831:
2832: /(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/
2833:
2834: /(?<n>a|b|c)\g<n>*/
2835: abc
2836: accccbbb
2837:
2838: /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
2839: XYabcdY
2840:
2841: /(?<=b(?1)|zzz)(a)/
2842: xbaax
2843: xzzzax
2844:
2845: /(a)(?<=b\1)/
2846:
2847: /(a)(?<=b+(?1))/
2848:
2849: /(a+)(?<=b(?1))/
2850:
2851: /(a(?<=b(?1)))/
2852:
2853: /(?<=b(?1))xyz/
2854:
2855: /(?<=b(?1))xyz(b+)pqrstuvew/
2856:
2857: /(a|bc)\1/SI
2858:
2859: /(a|bc)\1{2,3}/SI
2860:
2861: /(a|bc)(?1)/SI
2862:
2863: /(a|b\1)(a|b\1)/SI
2864:
2865: /(a|b\1){2}/SI
2866:
2867: /(a|bbbb\1)(a|bbbb\1)/SI
2868:
2869: /(a|bbbb\1){2}/SI
2870:
2871: /^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]/SI
2872:
2873: /<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>/isIS
2874:
2875: "(?>.*/)foo"SI
2876:
2877: /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /xSI
2878:
2879: /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
2880:
2881: /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
2882:
2883: /<a[\s]+href[\s]*=[\s]* # find <a href=
2884: ([\"\'])? # find single or double quote
2885: (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
2886: # quote, otherwise match up to next space
2887: /isxSI
2888:
2889: /^(?!:) # colon disallowed at start
2890: (?: # start of item
2891: (?: [0-9a-f]{1,4} | # 1-4 hex digits or
2892: (?(1)0 | () ) ) # if null previously matched, fail; else null
2893: : # followed by colon
2894: ){1,7} # end item; 1-7 of them required
2895: [0-9a-f]{1,4} $ # final hex number at end of string
2896: (?(1)|.) # check that there was an empty component
2897: /xiIS
2898:
2899: /(?|(?<a>A)|(?<a>B))/I
2900: AB\Ca
2901: BA\Ca
2902:
2903: /(?|(?<a>A)|(?<b>B))/
2904:
2905: /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
2906: b(?<quote> (?<apostrophe>')|(?<realquote>")) )
2907: (?('quote')[a-z]+|[0-9]+)/JIx
2908: a"aaaaa
2909: b"aaaaa
2910: ** Failers
2911: b"11111
2912: a"11111
2913:
2914: /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
2915: abcdX
2916: eX
2917: ** Failers
2918: abcdY
2919: ey
2920:
2921: /(?<A>a) (b)(c) (?<A>d (?(R&A)$ | (?4)) )/JDZx
2922: abcdd
2923: ** Failers
2924: abcdde
2925:
2926: /abcd*/
2927: xxxxabcd\P
2928: xxxxabcd\P\P
2929:
2930: /abcd*/i
2931: xxxxabcd\P
2932: xxxxabcd\P\P
2933: XXXXABCD\P
2934: XXXXABCD\P\P
2935:
2936: /abc\d*/
2937: xxxxabc1\P
2938: xxxxabc1\P\P
2939:
2940: /(a)bc\1*/
2941: xxxxabca\P
2942: xxxxabca\P\P
2943:
2944: /abc[de]*/
2945: xxxxabcde\P
2946: xxxxabcde\P\P
2947:
1.1.1.4 misho 2948: /-- This is not in the Perl-compatible test because Perl seems currently to be
1.1 misho 2949: broken and not behaving as specified in that it *does* bumpalong after
2950: hitting (*COMMIT). --/
2951:
2952: /(?1)(A(*COMMIT)|B)D/
2953: ABD
2954: XABD
2955: BAD
2956: ABXABD
2957: ** Failers
2958: ABX
2959: BAXBAD
2960:
2961: /(\3)(\1)(a)/<JS>
2962: cat
2963:
2964: /(\3)(\1)(a)/SI<JS>
2965: cat
2966:
2967: /(\3)(\1)(a)/SI
2968: cat
2969:
2970: /i(?(DEFINE)(?<s>a))/SI
2971: i
2972:
2973: /()i(?(1)a)/SI
2974: ia
2975:
2976: /(?i)a(?-i)b|c/BZ
2977: XabX
2978: XAbX
2979: CcC
2980: ** Failers
2981: XABX
2982:
2983: /(?i)a(?s)b|c/BZ
2984:
2985: /(?i)a(?s-i)b|c/BZ
2986:
2987: /^(ab(c\1)d|x){2}$/BZ
2988: xabcxd
2989:
2990: /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
2991:
2992: /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
2993:
1.1.1.4 misho 2994: / -- This one is here because Perl gives the match as "b" rather than "ab". I
1.1 misho 2995: believe this to be a Perl bug. --/
2996:
2997: /(?>a\Kb)z|(ab)/
2998: ab
2999:
3000: /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
3001:
3002: /abc(*MARK:)pqr/
3003:
3004: /abc(*:)pqr/
3005:
3006: /abc(*FAIL:123)xyz/
3007:
3008: /--- This should, and does, fail. In Perl, it does not, which I think is a
3009: bug because replacing the B in the pattern by (B|D) does make it fail. ---/
3010:
3011: /A(*COMMIT)B/+K
3012: ACABX
3013:
1.1.1.4 misho 3014: /--- These should be different, but in Perl they are not, which I think
1.1 misho 3015: is a bug in Perl. ---/
3016:
3017: /A(*THEN)B|A(*THEN)C/K
3018: AC
3019:
3020: /A(*PRUNE)B|A(*PRUNE)C/K
3021: AC
3022:
3023: /--- Mark names can be duplicated. Perl doesn't give a mark for this one,
3024: though PCRE does. ---/
3025:
3026: /^A(*:A)B|^X(*:A)Y/K
3027: ** Failers
3028: XAQQ
3029:
3030: /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
3031: optimizations defeat this. So does the PCRE optimization unless we disable it
3032: with \Y. ---/
3033:
3034: /(*COMMIT)ABC/
3035: ABCDEFG
3036: ** Failers
3037: DEFGABC\Y
3038:
3039: /^(ab (c+(*THEN)cd) | xyz)/x
3040: abcccd
3041:
3042: /^(ab (c+(*PRUNE)cd) | xyz)/x
3043: abcccd
3044:
3045: /^(ab (c+(*FAIL)cd) | xyz)/x
3046: abcccd
3047:
1.1.1.4 misho 3048: /--- Perl gets some of these wrong ---/
1.1 misho 3049:
3050: /(?>.(*ACCEPT))*?5/
3051: abcde
3052:
3053: /(.(*ACCEPT))*?5/
3054: abcde
3055:
3056: /(.(*ACCEPT))5/
3057: abcde
3058:
3059: /(.(*ACCEPT))*5/
3060: abcde
3061:
3062: /A\NB./BZ
3063: ACBD
3064: *** Failers
3065: A\nB
3066: ACB\n
3067:
3068: /A\NB./sBZ
3069: ACBD
3070: ACB\n
3071: *** Failers
3072: A\nB
3073:
3074: /A\NB/<crlf>
3075: A\nB
3076: A\rB
3077: ** Failers
3078: A\r\nB
3079:
3080: /\R+b/BZ
3081:
3082: /\R+\n/BZ
3083:
3084: /\R+\d/BZ
3085:
3086: /\d*\R/BZ
3087:
3088: /\s*\R/BZ
1.1.1.3 misho 3089: \x20\x0a
3090: \x20\x0d
3091: \x20\x0d\x0a
3092:
3093: /\S*\R/BZ
3094: a\x0a
3095:
3096: /X\h*\R/BZ
3097: X\x20\x0a
3098:
3099: /X\H*\R/BZ
3100: X\x0d\x0a
3101:
3102: /X\H+\R/BZ
3103: X\x0d\x0a
3104:
3105: /X\H++\R/BZ
3106: X\x0d\x0a
1.1 misho 3107:
3108: /(?<=abc)def/
3109: abc\P\P
3110:
3111: /abc$/
3112: abc
3113: abc\P
3114: abc\P\P
3115:
3116: /abc$/m
3117: abc
3118: abc\n
3119: abc\P\P
3120: abc\n\P\P
3121: abc\P
3122: abc\n\P
3123:
3124: /abc\z/
3125: abc
3126: abc\P
3127: abc\P\P
3128:
3129: /abc\Z/
3130: abc
3131: abc\P
3132: abc\P\P
3133:
3134: /abc\b/
3135: abc
3136: abc\P
3137: abc\P\P
3138:
3139: /abc\B/
3140: abc
3141: abc\P
3142: abc\P\P
3143:
3144: /.+/
3145: abc\>0
3146: abc\>1
3147: abc\>2
3148: abc\>3
3149: abc\>4
3150: abc\>-4
3151:
3152: /^\cģ/
3153:
3154: /(?P<abn>(?P=abn)xxx)/BZ
3155:
3156: /(a\1z)/BZ
3157:
3158: /(?P<abn>(?P=abn)(?<badstufxxx)/BZ
3159:
3160: /(?P<abn>(?P=axn)xxx)/BZ
3161:
3162: /(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
3163:
3164: /-- These tests are here because Perl gets the first one wrong. --/
3165:
3166: /(\R*)(.)/s
3167: \r\n
3168: \r\r\n\n\r
3169: \r\r\n\n\r\n
3170:
3171: /(\R)*(.)/s
3172: \r\n
3173: \r\r\n\n\r
3174: \r\r\n\n\r\n
3175:
3176: /((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
3177: \r\n
3178: \r\r\n\n\r
3179: \r\r\n\n\r\n
3180:
3181: /-- --/
3182:
3183: /^abc$/BZ
3184:
3185: /^abc$/BZm
3186:
3187: /^(a)*+(\w)/S
3188: aaaaX
3189: ** Failers
3190: aaaa
3191:
3192: /^(?:a)*+(\w)/S
3193: aaaaX
3194: ** Failers
3195: aaaa
3196:
3197: /(a)++1234/SDZ
3198:
3199: /([abc])++1234/SI
3200:
3201: /(?<=(abc)+)X/
3202:
3203: /(^ab)/I
3204:
3205: /(^ab)++/I
3206:
3207: /(^ab|^)+/I
3208:
3209: /(^ab|^)++/I
3210:
3211: /(?:^ab)/I
3212:
3213: /(?:^ab)++/I
3214:
3215: /(?:^ab|^)+/I
3216:
3217: /(?:^ab|^)++/I
3218:
3219: /(.*ab)/I
3220:
3221: /(.*ab)++/I
3222:
3223: /(.*ab|.*)+/I
3224:
3225: /(.*ab|.*)++/I
3226:
3227: /(?:.*ab)/I
3228:
3229: /(?:.*ab)++/I
3230:
3231: /(?:.*ab|.*)+/I
3232:
3233: /(?:.*ab|.*)++/I
3234:
3235: /(?=a)[bcd]/I
3236:
3237: /((?=a))[bcd]/I
3238:
3239: /((?=a))+[bcd]/I
3240:
3241: /((?=a))++[bcd]/I
3242:
3243: /(?=a+)[bcd]/iI
3244:
3245: /(?=a+?)[bcd]/iI
3246:
3247: /(?=a++)[bcd]/iI
3248:
3249: /(?=a{3})[bcd]/iI
3250:
3251: /(abc)\1+/S
3252:
3253: /-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
3254:
3255: /(?1)(?:(b(*ACCEPT))){0}/
3256: b
3257:
3258: /(?1)(?:(b(*ACCEPT))){0}c/
3259: bc
3260: ** Failers
3261: b
3262:
3263: /(?1)(?:((*ACCEPT))){0}c/
3264: c
3265: c\N
3266:
3267: /^.*?(?(?=a)a|b(*THEN)c)/
3268: ba
3269:
3270: /^.*?(?(?=a)a|bc)/
3271: ba
3272:
3273: /^.*?(?(?=a)a(*THEN)b|c)/
3274: ac
3275:
3276: /^.*?(?(?=a)a(*THEN)b)c/
3277: ac
3278:
3279: /^.*?(a(*THEN)b)c/
3280: aabc
3281:
3282: /^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
3283: aabc
3284:
3285: /^.*?(a(*THEN)b|z)c/
3286: aabc
3287:
3288: /^.*?(z|a(*THEN)b)c/
3289: aabc
3290:
3291: /-- --/
3292:
3293: /-- These studied versions are here because they are not Perl-compatible; the
3294: studying means the mark is not seen. --/
3295:
3296: /(*MARK:A)(*SKIP:B)(C|X)/KS
3297: C
3298: D
3299:
3300: /(*:A)A+(*SKIP:A)(B|Z)/KS
3301: AAAC
3302:
3303: /-- --/
3304:
3305: "(?=a*(*ACCEPT)b)c"
3306: c
3307: c\N
3308:
3309: /(?1)c(?(DEFINE)((*ACCEPT)b))/
3310: c
3311: c\N
3312:
3313: /(?>(*ACCEPT)b)c/
3314: c
3315: c\N
3316:
3317: /(?:(?>(a)))+a%/++
3318: %aa%
3319:
3320: /(a)b|ac/++SS
3321: ac\O3
3322:
3323: /(a)(b)x|abc/++
3324: abc\O6
3325:
3326: /(a)bc|(a)(b)\2/
3327: \O3abc
3328: \O4abc
3329:
3330: /(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
3331:
3332: /(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
3333:
3334: /(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
3335:
3336: /(abc)(?1)/SI
3337:
3338: /^(?>a)++/
3339: aa\M
3340: aaaaaaaaa\M
3341:
3342: /(a)(?1)++/
3343: aa\M
3344: aaaaaaaaa\M
3345:
3346: /(?:(foo)|(bar)|(baz))X/SS=
3347: bazfooX
3348: foobazbarX
3349: barfooX
3350: bazX
3351: foobarbazX
3352: bazfooX\O0
3353: bazfooX\O2
3354: bazfooX\O4
3355: bazfooX\O6
3356: bazfooX\O8
3357: bazfooX\O10
3358:
3359: /(?=abc){3}abc/BZ
3360:
3361: /(?=abc)+abc/BZ
3362:
3363: /(?=abc)++abc/BZ
3364:
3365: /(?=abc){0}xyz/BZ
3366:
3367: /(?=(a))?./BZ
3368:
3369: /(?=(a))??./BZ
3370:
3371: /^(?=(a)){0}b(?1)/BZ
3372:
3373: /(?(DEFINE)(a))?b(?1)/BZ
3374:
3375: /^(?=(?1))?[az]([abc])d/BZ
3376:
3377: /^(?!a){0}\w+/BZ
3378:
3379: /(?<=(abc))?xyz/BZ
3380:
3381: /[:a[:abc]b:]/BZ
3382:
3383: /((?2))((?1))/SS
3384: abc
3385:
3386: /((?(R2)a+|(?1)b))/SS
3387: aaaabcde
3388:
3389: /(?(R)a*(?1)|((?R))b)/SS
3390: aaaabcde
3391:
3392: /(a+|(?R)b)/
3393:
3394: /^(a(*:A)(d|e(*:B))z|aeq)/C
3395: adz
3396: aez
3397: aeqwerty
3398:
3399: /.(*F)/
3400: \P\Pabc
3401:
3402: /\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
3403:
3404: /\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
3405:
1.1.1.4 misho 3406: /a(*SKIP)c|b(*ACCEPT)|/+S!I
1.1 misho 3407: a
3408:
3409: /a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
3410: ax
3411:
3412: 'a*(*ACCEPT)b'+
3413: \N\N
3414: abc\N\N
3415: bbb\N\N
3416:
3417: /(*ACCEPT)a/+I
3418: bax
3419:
3420: /z(*ACCEPT)a/+I
3421: baxzbx
3422:
3423: /a(?:.)*?a/ims
3424: \Mabbbbbbbbbbbbbbbbbbbbba
3425:
3426: /a(?:.(*THEN))*?a/ims
3427: \Mabbbbbbbbbbbbbbbbbbbbba
3428:
3429: /a(?:.(*THEN:ABC))*?a/ims
3430: \Mabbbbbbbbbbbbbbbbbbbbba
3431:
3432: /^(?>a+)(?>(z+))\w/BZ
3433: aaaazzzzb
3434: ** Failers
3435: aazz
3436:
3437: /(.)(\1|a(?2))/
3438: bab
3439:
3440: /\1|(.)(?R)\1/
3441: cbbbc
3442:
3443: /(.)((?(1)c|a)|a(?2))/
3444: baa
3445:
3446: /(?P<abn>(?P=abn)xxx)/BZ
3447:
3448: /(a\1z)/BZ
3449:
3450: /^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
3451: \Maabbccddee
3452:
3453: /^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
3454: \Maabbccddee
3455:
3456: /^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
3457: \Maabbccddee
3458:
3459: /^a\x41z/<JS>
3460: aAz
3461: *** Failers
3462: ax41z
3463:
3464: /^a[m\x41]z/<JS>
3465: aAz
3466:
3467: /^a\x1z/<JS>
3468: ax1z
3469:
3470: /^a\u0041z/<JS>
3471: aAz
3472: *** Failers
3473: au0041z
3474:
3475: /^a[m\u0041]z/<JS>
3476: aAz
3477:
3478: /^a\u041z/<JS>
3479: au041z
3480: *** Failers
3481: aAz
3482:
3483: /^a\U0041z/<JS>
3484: aU0041z
3485: *** Failers
3486: aAz
3487:
3488: /(?(?=c)c|d)++Y/BZ
3489:
3490: /(?(?=c)c|d)*+Y/BZ
3491:
3492: /a[\NB]c/
3493: aNc
3494:
3495: /a[B-\Nc]/
3496:
1.1.1.5 ! misho 3497: /a[B\Nc]/
! 3498:
1.1 misho 3499: /(a)(?2){0,1999}?(b)/
3500:
3501: /(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
3502:
3503: /--- This test, with something more complicated than individual letters, causes
3504: different behaviour in Perl. Perhaps it disables some optimization; no tag is
3505: passed back for the failures, whereas in PCRE there is a tag. ---/
3506:
3507: /(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
3508: AABC
3509: XXYZ
3510: ** Failers
3511: XAQQ
3512: XAQQXZZ
3513: AXQQQ
3514: AXXQQQ
3515:
3516: /-- Perl doesn't give marks for these, though it does if the alternatives are
3517: replaced by single letters. --/
3518:
3519: /(b|q)(*:m)f|a(*:n)w/K
3520: aw
3521: ** Failers
3522: abc
3523:
3524: /(q|b)(*:m)f|a(*:n)w/K
3525: aw
3526: ** Failers
3527: abc
3528:
3529: /-- After a partial match, the behaviour is as for a failure. --/
3530:
3531: /^a(*:X)bcde/K
3532: abc\P
1.1.1.2 misho 3533:
3534: /-- These are here because Perl doesn't return a mark, except for the first --/
3535:
3536: /(?=(*:x))(q|)/K+
3537: abc
3538:
3539: /(?=(*:x))((*:y)q|)/K+
3540: abc
3541:
3542: /(?=(*:x))(?:(*:y)q|)/K+
3543: abc
3544:
3545: /(?=(*:x))(?>(*:y)q|)/K+
3546: abc
3547:
3548: /(?=a(*:x))(?!a(*:y)c)/K+
3549: ab
3550:
3551: /(?=a(*:x))(?=a(*:y)c|)/K+
3552: ab
1.1 misho 3553:
1.1.1.3 misho 3554: /(..)\1/
3555: ab\P
3556: aba\P
3557: abab\P
3558:
3559: /(..)\1/i
3560: ab\P
3561: abA\P
3562: aBAb\P
3563:
3564: /(..)\1{2,}/
3565: ab\P
3566: aba\P
3567: abab\P
3568: ababa\P
3569: ababab\P
3570: ababab\P\P
3571: abababa\P
3572: abababa\P\P
3573:
3574: /(..)\1{2,}/i
3575: ab\P
3576: aBa\P
3577: aBAb\P
3578: AbaBA\P
3579: abABAb\P
3580: aBAbaB\P\P
3581: abABabA\P
3582: abaBABa\P\P
3583:
3584: /(..)\1{2,}?x/i
3585: ab\P
3586: abA\P
3587: aBAb\P
3588: abaBA\P
3589: abAbaB\P
3590: abaBabA\P
3591: abAbABaBx\P
3592:
3593: /^(..)\1/
3594: aba\P
3595:
3596: /^(..)\1{2,3}x/
3597: aba\P
3598: ababa\P
3599: ababa\P\P
3600: abababx
3601: ababababx
3602:
3603: /^(..)\1{2,3}?x/
3604: aba\P
3605: ababa\P
3606: ababa\P\P
3607: abababx
3608: ababababx
3609:
3610: /^(..)(\1{2,3})ab/
3611: abababab
3612:
3613: /^\R/
3614: \r\P
3615: \r\P\P
3616:
3617: /^\R{2,3}x/
3618: \r\P
3619: \r\P\P
3620: \r\r\P
3621: \r\r\P\P
3622: \r\r\r\P
3623: \r\r\r\P\P
3624: \r\rx
3625: \r\r\rx
3626:
3627: /^\R{2,3}?x/
3628: \r\P
3629: \r\P\P
3630: \r\r\P
3631: \r\r\P\P
3632: \r\r\r\P
3633: \r\r\r\P\P
3634: \r\rx
3635: \r\r\rx
3636:
3637: /^\R?x/
3638: \r\P
3639: \r\P\P
3640: x
3641: \rx
3642:
3643: /^\R+x/
3644: \r\P
3645: \r\P\P
3646: \r\n\P
3647: \r\n\P\P
3648: \rx
3649:
3650: /^a$/<CRLF>
3651: a\r\P
3652: a\r\P\P
3653:
3654: /^a$/m<CRLF>
3655: a\r\P
3656: a\r\P\P
3657:
3658: /^(a$|a\r)/<CRLF>
3659: a\r\P
3660: a\r\P\P
3661:
3662: /^(a$|a\r)/m<CRLF>
3663: a\r\P
3664: a\r\P\P
3665:
3666: /./<CRLF>
3667: \r\P
3668: \r\P\P
3669:
3670: /.{2,3}/<CRLF>
3671: \r\P
3672: \r\P\P
3673: \r\r\P
3674: \r\r\P\P
3675: \r\r\r\P
3676: \r\r\r\P\P
3677:
3678: /.{2,3}?/<CRLF>
3679: \r\P
3680: \r\P\P
3681: \r\r\P
3682: \r\r\P\P
3683: \r\r\r\P
3684: \r\r\r\P\P
3685:
1.1.1.4 misho 3686: "AB(C(D))(E(F))?(?(?=\2)(?=\4))"
3687: ABCDGHI\O03
3688:
3689: /-- These are all run as real matches in test 1; here we are just checking the
3690: settings of the anchored and startline bits. --/
1.1.1.3 misho 3691:
1.1.1.4 misho 3692: /(?>.*?a)(?<=ba)/I
1.1.1.3 misho 3693:
1.1.1.4 misho 3694: /(?:.*?a)(?<=ba)/I
1.1.1.3 misho 3695:
1.1.1.4 misho 3696: /.*?a(*PRUNE)b/I
3697:
3698: /.*?a(*PRUNE)b/sI
3699:
3700: /^a(*PRUNE)b/sI
3701:
3702: /.*?a(*SKIP)b/I
3703:
3704: /(?>.*?a)b/sI
3705:
3706: /(?>.*?a)b/I
3707:
3708: /(?>^a)b/sI
3709:
3710: /(?>.*?)(?<=(abcd)|(wxyz))/I
3711:
3712: /(?>.*)(?<=(abcd)|(wxyz))/I
3713:
3714: "(?>.*)foo"I
3715:
3716: "(?>.*?)foo"I
3717:
3718: /(?>^abc)/mI
3719:
3720: /(?>.*abc)/mI
3721:
3722: /(?:.*abc)/mI
3723:
3724: /-- Check PCRE_STUDY_EXTRA_NEEDED --/
3725:
3726: /.?/S-I
3727:
3728: /.?/S!I
3729:
3730: /(?:(a)+(?C1)bb|aa(?C2)b)/
3731: aab\C+
3732:
3733: /(?:(a)++(?C1)bb|aa(?C2)b)/
3734: aab\C+
1.1.1.3 misho 3735:
1.1.1.4 misho 3736: /(?:(?>(a))(?C1)bb|aa(?C2)b)/
3737: aab\C+
3738:
3739: /(?:(?1)(?C1)x|ab(?C2))((a)){0}/
3740: aab\C+
3741:
3742: /(?1)(?C1)((a)(?C2)){0}/
3743: aab\C+
3744:
3745: /(?:(a)+(?C1)bb|aa(?C2)b)++/
3746: aab\C+
3747: aab\C+\O2
3748:
3749: /(ab)x|ab/
3750: ab\O3
3751: ab\O2
3752:
3753: /(ab)/
3754: ab\O3
3755: ab\O2
3756:
3757: /(?<=123)(*MARK:xx)abc/K
3758: xxxx123a\P\P
3759: xxxx123a\P
3760:
3761: /123\Kabc/
3762: xxxx123a\P\P
3763: xxxx123a\P
3764:
3765: /^(?(?=a)aa|bb)/C
3766: bb
3767:
3768: /(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/
3769: bb
3770:
3771: /-- Perl seems to have a bug with this one --/
3772:
3773: /aaaaa(*COMMIT)(*PRUNE)b|a+c/
3774: aaaaaac
3775:
3776: /-- Here are some that Perl treats differently because of the way it handles
3777: backtracking verbs. --/
3778:
3779: /(?!a(*COMMIT)b)ac|ad/
3780: ac
3781: ad
3782:
3783: /^(?!a(*THEN)b|ac)../
3784: ac
3785: ad
3786:
3787: /^(?=a(*THEN)b|ac)/
3788: ac
1.1.1.3 misho 3789:
1.1.1.4 misho 3790: /\A.*?(?:a|b(*THEN)c)/
3791: ba
3792:
3793: /\A.*?(?:a|b(*THEN)c)++/
3794: ba
3795:
3796: /\A.*?(?:a|b(*THEN)c|d)/
3797: ba
3798:
3799: /(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/
3800: aac
3801:
3802: /\A.*?(a|b(*THEN)c)/
3803: ba
3804:
3805: /^(A(*THEN)B|A(*THEN)D)/
3806: AD
3807:
3808: /(?!b(*THEN)a)bn|bnn/
3809: bnn
3810:
3811: /(?(?=b(*SKIP)a)bn|bnn)/
3812: bnn
3813:
3814: /(?=b(*THEN)a|)bn|bnn/
3815: bnn
3816:
3817: /-------------------------/
3818:
3819: /(*LIMIT_MATCH=12bc)abc/
3820:
3821: /(*LIMIT_MATCH=4294967290)abc/
3822:
3823: /(*LIMIT_RECURSION=4294967280)abc/I
3824:
3825: /(a+)*zz/
3826: aaaaaaaaaaaaaz
3827: aaaaaaaaaaaaaz\q3000
3828:
3829: /(a+)*zz/S-
3830: aaaaaaaaaaaaaz\Q10
3831:
3832: /(*LIMIT_MATCH=3000)(a+)*zz/I
3833: aaaaaaaaaaaaaz
3834: aaaaaaaaaaaaaz\q60000
3835:
3836: /(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
3837: aaaaaaaaaaaaaz
3838:
3839: /(*LIMIT_MATCH=60000)(a+)*zz/I
3840: aaaaaaaaaaaaaz
3841: aaaaaaaaaaaaaz\q3000
3842:
3843: /(*LIMIT_RECURSION=10)(a+)*zz/IS-
3844: aaaaaaaaaaaaaz
3845: aaaaaaaaaaaaaz\Q1000
3846:
3847: /(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/IS-
3848: aaaaaaaaaaaaaz
3849:
3850: /(*LIMIT_RECURSION=1000)(a+)*zz/IS-
3851: aaaaaaaaaaaaaz
3852: aaaaaaaaaaaaaz\Q10
1.1.1.3 misho 3853:
1.1.1.5 ! misho 3854: /-- This test causes a segfault with Perl 5.18.0 --/
! 3855:
! 3856: /^(?=(a)){0}b(?1)/
! 3857: backgammon
! 3858:
! 3859: /(?|(?<n>f)|(?<n>b))/JI
! 3860:
! 3861: /(?<a>abc)(?<a>z)\k<a>()/JDZS
! 3862:
! 3863: /a*[bcd]/BZ
! 3864:
! 3865: /[bcd]*a/BZ
! 3866:
! 3867: /-- A complete set of tests for auto-possessification of character types --/
! 3868:
! 3869: /\D+\D \D+\d \D+\S \D+\s \D+\W \D+\w \D+. \D+\C \D+\R \D+\H \D+\h \D+\V \D+\v \D+\Z \D+\z \D+$/BZx
! 3870:
! 3871: /\d+\D \d+\d \d+\S \d+\s \d+\W \d+\w \d+. \d+\C \d+\R \d+\H \d+\h \d+\V \d+\v \d+\Z \d+\z \d+$/BZx
! 3872:
! 3873: /\S+\D \S+\d \S+\S \S+\s \S+\W \S+\w \S+. \S+\C \S+\R \S+\H \S+\h \S+\V \S+\v \S+\Z \S+\z \S+$/BZx
! 3874:
! 3875: /\s+\D \s+\d \s+\S \s+\s \s+\W \s+\w \s+. \s+\C \s+\R \s+\H \s+\h \s+\V \s+\v \s+\Z \s+\z \s+$/BZx
! 3876:
! 3877: /\W+\D \W+\d \W+\S \W+\s \W+\W \W+\w \W+. \W+\C \W+\R \W+\H \W+\h \W+\V \W+\v \W+\Z \W+\z \W+$/BZx
! 3878:
! 3879: /\w+\D \w+\d \w+\S \w+\s \w+\W \w+\w \w+. \w+\C \w+\R \w+\H \w+\h \w+\V \w+\v \w+\Z \w+\z \w+$/BZx
! 3880:
! 3881: /\C+\D \C+\d \C+\S \C+\s \C+\W \C+\w \C+. \C+\C \C+\R \C+\H \C+\h \C+\V \C+\v \C+\Z \C+\z \C+$/BZx
! 3882:
! 3883: /\R+\D \R+\d \R+\S \R+\s \R+\W \R+\w \R+. \R+\C \R+\R \R+\H \R+\h \R+\V \R+\v \R+\Z \R+\z \R+$/BZx
! 3884:
! 3885: /\H+\D \H+\d \H+\S \H+\s \H+\W \H+\w \H+. \H+\C \H+\R \H+\H \H+\h \H+\V \H+\v \H+\Z \H+\z \H+$/BZx
! 3886:
! 3887: /\h+\D \h+\d \h+\S \h+\s \h+\W \h+\w \h+. \h+\C \h+\R \h+\H \h+\h \h+\V \h+\v \h+\Z \h+\z \h+$/BZx
! 3888:
! 3889: /\V+\D \V+\d \V+\S \V+\s \V+\W \V+\w \V+. \V+\C \V+\R \V+\H \V+\h \V+\V \V+\v \V+\Z \V+\z \V+$/BZx
! 3890:
! 3891: /\v+\D \v+\d \v+\S \v+\s \v+\W \v+\w \v+. \v+\C \v+\R \v+\H \v+\h \v+\V \v+\v \v+\Z \v+\z \v+$/BZx
! 3892:
! 3893: / a+\D a+\d a+\S a+\s a+\W a+\w a+. a+\C a+\R a+\H a+\h a+\V a+\v a+\Z a+\z a+$/BZx
! 3894:
! 3895: /\n+\D \n+\d \n+\S \n+\s \n+\W \n+\w \n+. \n+\C \n+\R \n+\H \n+\h \n+\V \n+\v \n+\Z \n+\z \n+$/BZx
! 3896:
! 3897: / .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\C .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/BZx
! 3898:
! 3899: / .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\C .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/BZxs
! 3900:
! 3901: /\D+$ \d+$ \S+$ \s+$ \W+$ \w+$ \C+$ \R+$ \H+$ \h+$ \V+$ \v+$ a+$ \n+$ .+$ .+$/BZxm
! 3902:
! 3903: /(?=a+)a(a+)++a/BZ
! 3904:
! 3905: /a+(bb|cc)a+(?:bb|cc)a+(?>bb|cc)a+(?:bb|cc)+a+(aa)a+(?:bb|aa)/BZ
! 3906:
! 3907: /a+(bb|cc)?#a+(?:bb|cc)??#a+(?:bb|cc)?+#a+(?:bb|cc)*#a+(bb|cc)?a#a+(?:aa)?/BZ
! 3908:
! 3909: /a+(?:bb)?a#a+(?:|||)#a+(?:|b)a#a+(?:|||)?a/BZ
! 3910:
! 3911: /[ab]*/BZ
! 3912: aaaa
! 3913:
! 3914: /[ab]*?/BZ
! 3915: aaaa
! 3916:
! 3917: /[ab]?/BZ
! 3918: aaaa
! 3919:
! 3920: /[ab]??/BZ
! 3921: aaaa
! 3922:
! 3923: /[ab]+/BZ
! 3924: aaaa
! 3925:
! 3926: /[ab]+?/BZ
! 3927: aaaa
! 3928:
! 3929: /[ab]{2,3}/BZ
! 3930: aaaa
! 3931:
! 3932: /[ab]{2,3}?/BZ
! 3933: aaaa
! 3934:
! 3935: /[ab]{2,}/BZ
! 3936: aaaa
! 3937:
! 3938: /[ab]{2,}?/BZ
! 3939: aaaa
! 3940:
! 3941: /\d+\s{0,5}=\s*\S?=\w{0,4}\W*/BZ
! 3942:
! 3943: /[a-d]{5,12}[e-z0-9]*#[^a-z]+[b-y]*a[2-7]?[^0-9a-z]+/BZ
! 3944:
! 3945: /[a-z]*\s#[ \t]?\S#[a-c]*\S#[C-G]+?\d#[4-8]*\D#[4-9,]*\D#[!$]{0,5}\w#[M-Xf-l]+\W#[a-c,]?\W/BZ
! 3946:
! 3947: /a+(aa|bb)*c#a*(bb|cc)*a#a?(bb|cc)*d#[a-f]*(g|hh)*f/BZ
! 3948:
! 3949: /[a-f]*(g|hh|i)*i#[a-x]{4,}(y{0,6})*y#[a-k]+(ll|mm)+n/BZ
! 3950:
! 3951: /[a-f]*(?>gg|hh)+#[a-f]*(?>gg|hh)?#[a-f]*(?>gg|hh)*a#[a-f]*(?>gg|hh)*h/BZ
! 3952:
! 3953: /[a-c]*d/DZS
! 3954:
! 3955: /[a-c]+d/DZS
! 3956:
! 3957: /[a-c]?d/DZS
! 3958:
! 3959: /[a-c]{4,6}d/DZS
! 3960:
! 3961: /[a-c]{0,6}d/DZS
! 3962:
! 3963: /-- End of special auto-possessive tests --/
! 3964:
! 3965: /^A\o{1239}B/
! 3966: A\123B
! 3967:
! 3968: /^A\oB/
! 3969:
! 3970: /^A\x{zz}B/
! 3971:
! 3972: /^A\x{12Z/
! 3973:
! 3974: /^A\x{/
! 3975:
! 3976: /[ab]++/BZO
! 3977:
! 3978: /[^ab]*+/BZO
! 3979:
! 3980: /a{4}+/BZO
! 3981:
! 3982: /a{4}+/BZOi
! 3983:
! 3984: /[a-[:digit:]]+/
! 3985:
! 3986: /[A-[:digit:]]+/
! 3987:
! 3988: /[a-[.xxx.]]+/
! 3989:
! 3990: /[a-[=xxx=]]+/
! 3991:
! 3992: /[a-[!xxx!]]+/
! 3993:
! 3994: /[A-[!xxx!]]+/
! 3995: A]]]
! 3996:
! 3997: /[a-\d]+/
! 3998:
! 3999: /(?<0abc>xx)/
! 4000:
! 4001: /(?&1abc)xx(?<1abc>y)/
! 4002:
! 4003: /(?<ab-cd>xx)/
! 4004:
! 4005: /(?'0abc'xx)/
! 4006:
! 4007: /(?P<0abc>xx)/
! 4008:
! 4009: /\k<5ghj>/
! 4010:
! 4011: /\k'5ghj'/
! 4012:
! 4013: /\k{2fgh}/
! 4014:
! 4015: /(?P=8yuki)/
! 4016:
! 4017: /\g{4df}/
! 4018:
! 4019: /(?&1abc)xx(?<1abc>y)/
! 4020:
! 4021: /(?P>1abc)xx(?<1abc>y)/
! 4022:
! 4023: /\g'3gh'/
! 4024:
! 4025: /\g<5fg>/
! 4026:
! 4027: /(?(<4gh>)abc)/
! 4028:
! 4029: /(?('4gh')abc)/
! 4030:
! 4031: /(?(4gh)abc)/
! 4032:
! 4033: /(?(R&6yh)abc)/
! 4034:
! 4035: /-- Test the ugly "start or end of word" compatibility syntax --/
! 4036:
! 4037: /[[:<:]]red[[:>:]]/BZ
! 4038: little red riding hood
! 4039: a /red/ thing
! 4040: red is a colour
! 4041: put it all on red
! 4042: ** Failers
! 4043: no reduction
! 4044: Alfred Winifred
! 4045:
! 4046: /[a[:<:]] should give error/
! 4047:
1.1 misho 4048: /-- End of testinput2 --/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>