xref: /PHP-7.0/ext/pcre/pcrelib/testdata/testinput2 (revision 5f9df47e)
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
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. --/
10
11< forbid 8W
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
724
725/(\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|$))(\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|$))(\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|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|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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|$))(\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|$))(\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|$))(\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|$))(\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
834/x{1,3}+/BZO
835
836/x{1,3}+/BZOi
837
838/[^x]{1,3}+/BZO
839
840/[^x]{1,3}+/BZOi
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/a{1,3}b/U
911    ab
912
913/[/I
914
915/[a-/I
916
917/[[:space:]/I
918
919/[\s]/IDZ
920
921/[[:space:]]/IDZ
922
923/[[:space:]abcde]/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\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
938
939/(.*)\d+\1/I
940
941/(.*)\d+/I
942
943/(.*)\d+\1/Is
944
945/(.*)\d+/Is
946
947/(.*(xyz))\d+\2/I
948
949/((.*))\d+\1/I
950    abc123bc
951
952/a[b]/I
953
954/(?=a).*/I
955
956/(?=abc).xyz/IiI
957
958/(?=abc)(?i).xyz/I
959
960/(?=a)(?=b)/I
961
962/(?=.)a/I
963
964/((?=abcda)a)/I
965
966/((?=abcda)ab)/I
967
968/()a/I
969
970/(?(1)ab|ac)(.)/I
971
972/(?(1)abz|acz)(.)/I
973
974/(?(1)abz)(.)/I
975
976/(?(1)abz)(1)23/I
977
978/(a)+/I
979
980/(a){2,3}/I
981
982/(a)*/I
983
984/[a]/I
985
986/[ab]/I
987
988/[ab]/IS
989
990/[^a]/I
991
992/\d456/I
993
994/\d456/IS
995
996/a^b/I
997
998/^a/Im
999  abcde
1000  xy\nabc
1001  *** Failers
1002  xyabc
1003
1004/c|abc/I
1005
1006/(?i)[ab]/IS
1007
1008/[ab](?i)cd/IS
1009
1010/abc(?C)def/I
1011    abcdef
1012    1234abcdef
1013    *** Failers
1014    abcxyz
1015    abcxyzf
1016
1017/abc(?C)de(?C1)f/I
1018    123abcdef
1019
1020/(?C1)\dabc(?C2)def/IS
1021    1234abcdef
1022    *** Failers
1023    abcdef
1024
1025/(?C1)\dabc(?C2)def/ISS
1026    1234abcdef
1027    *** Failers
1028    abcdef
1029
1030/(?C255)ab/I
1031
1032/(?C256)ab/I
1033
1034/(?Cab)xx/I
1035
1036/(?C12vr)x/I
1037
1038/abc(?C)def/I
1039    *** Failers
1040    \x83\x0\x61bcdef
1041
1042/(abc)(?C)de(?C1)f/I
1043    123abcdef
1044    123abcdef\C+
1045    123abcdef\C-
1046    *** Failers
1047    123abcdef\C!1
1048
1049/(?C0)(abc(?C1))*/I
1050    abcabcabc
1051    abcabc\C!1!3
1052    *** Failers
1053    abcabcabc\C!1!3
1054
1055/(\d{3}(?C))*/I
1056    123\C+
1057    123456\C+
1058    123456789\C+
1059
1060/((xyz)(?C)p|(?C1)xyzabc)/I
1061    xyzabc\C+
1062
1063/(X)((xyz)(?C)p|(?C1)xyzabc)/I
1064    Xxyzabc\C+
1065
1066/(?=(abc))(?C)abcdef/I
1067    abcdef\C+
1068
1069/(?!(abc)(?C1)d)(?C2)abcxyz/I
1070    abcxyz\C+
1071
1072/(?<=(abc)(?C))xyz/I
1073   abcxyz\C+
1074
1075/a(b+)(c*)(?C1)/I
1076    abbbbbccc\C*1
1077
1078/a(b+?)(c*?)(?C1)/I
1079    abbbbbccc\C*1
1080
1081/(?C)abc/I
1082
1083/(?C)^abc/I
1084
1085/(?C)a|b/IS
1086
1087/(?R)/I
1088
1089/(a|(?R))/I
1090
1091/(ab|(bc|(de|(?R))))/I
1092
1093/x(ab|(bc|(de|(?R))))/I
1094    xab
1095    xbc
1096    xde
1097    xxab
1098    xxxab
1099    *** Failers
1100    xyab
1101
1102/(ab|(bc|(de|(?1))))/I
1103
1104/x(ab|(bc|(de|(?1)x)x)x)/I
1105
1106/^([^()]|\((?1)*\))*$/I
1107    abc
1108    a(b)c
1109    a(b(c))d
1110    *** Failers)
1111    a(b(c)d
1112
1113/^>abc>([^()]|\((?1)*\))*<xyz<$/I
1114   >abc>123<xyz<
1115   >abc>1(2)3<xyz<
1116   >abc>(1(2)3)<xyz<
1117
1118/(a(?1)b)/DZ
1119
1120/(a(?1)+b)/DZ
1121
1122/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
1123    12
1124    (((2+2)*-3)-7)
1125    -12
1126    *** Failers
1127    ((2+2)*-3)-7)
1128
1129/^(x(y|(?1){2})z)/I
1130    xyz
1131    xxyzxyzz
1132    *** Failers
1133    xxyzz
1134    xxyzxyzxyzz
1135
1136/((< (?: (?(R) \d++  | [^<>]*+) | (?2)) * >))/Ix
1137    <>
1138    <abcd>
1139    <abc <123> hij>
1140    <abc <def> hij>
1141    <abc<>def>
1142    <abc<>
1143    *** Failers
1144    <abc
1145
1146/(?1)/I
1147
1148/((?2)(abc)/I
1149
1150/^(abc)def(?1)/I
1151    abcdefabc
1152
1153/^(a|b|c)=(?1)+/I
1154    a=a
1155    a=b
1156    a=bc
1157
1158/^(a|b|c)=((?1))+/I
1159    a=a
1160    a=b
1161    a=bc
1162
1163/a(?P<name1>b|c)d(?P<longername2>e)/DZ
1164    abde
1165    acde
1166
1167/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
1168
1169/(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
1170
1171/^\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
1172    1221
1173    Satan, oscillate my metallic sonatas!
1174    A man, a plan, a canal: Panama!
1175    Able was I ere I saw Elba.
1176    *** Failers
1177    The quick brown fox
1178
1179/((?(R)a|b))\1(?1)?/I
1180  bb
1181  bbaa
1182
1183/(.*)a/Is
1184
1185/(.*)a\1/Is
1186
1187/(.*)a(b)\2/Is
1188
1189/((.*)a|(.*)b)z/Is
1190
1191/((.*)a|(.*)b)z\1/Is
1192
1193/((.*)a|(.*)b)z\2/Is
1194
1195/((.*)a|(.*)b)z\3/Is
1196
1197/((.*)a|^(.*)b)z\3/Is
1198
1199/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
1200
1201/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
1202
1203/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
1204
1205/(a)(bc)/INDZ
1206  abc
1207
1208/(?P<one>a)(bc)/INDZ
1209  abc
1210
1211/(a)(?P<named>bc)/INDZ
1212
1213/(a+)*zz/I
1214  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
1215  aaaaaaaaaaaaaz\M
1216
1217/(aaa(?C1)bbb|ab)/I
1218   aaabbb
1219   aaabbb\C*0
1220   aaabbb\C*1
1221   aaabbb\C*-1
1222
1223/ab(?P<one>cd)ef(?P<two>gh)/I
1224    abcdefgh
1225    abcdefgh\C1\Gtwo
1226    abcdefgh\Cone\Ctwo
1227    abcdefgh\Cthree
1228
1229/(?P<Tes>)(?P<Test>)/DZ
1230
1231/(?P<Test>)(?P<Tes>)/DZ
1232
1233/(?P<Z>zz)(?P<A>aa)/I
1234    zzaa\CZ
1235    zzaa\CA
1236
1237/(?P<x>eks)(?P<x>eccs)/I
1238
1239/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
1240
1241"\[((?P<elem>\d+)(,(?P>elem))*)\]"I
1242    [10,20,30,5,5,4,4,2,43,23,4234]
1243    *** Failers
1244    []
1245
1246"\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
1247    [10,20,30,5,5,4,4,2,43,23,4234]
1248    []
1249
1250/(a(b(?2)c))?/DZ
1251
1252/(a(b(?2)c))*/DZ
1253
1254/(a(b(?2)c)){0,2}/DZ
1255
1256/[ab]{1}+/DZ
1257
1258/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
1259     Baby Bjorn Active Carrier - With free SHIPPING!!
1260
1261/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
1262     Baby Bjorn Active Carrier - With free SHIPPING!!
1263
1264/a*.*b/ISDZ
1265
1266/(a|b)*.?c/ISDZ
1267
1268/abc(?C255)de(?C)f/DZ
1269
1270/abcde/ICDZ
1271  abcde
1272  abcdfe
1273
1274/a*b/ICDZS
1275  ab
1276  aaaab
1277  aaaacb
1278
1279/a*b/ICDZSS
1280  ab
1281  aaaab
1282  aaaacb
1283
1284/a+b/ICDZ
1285  ab
1286  aaaab
1287  aaaacb
1288
1289/(abc|def)x/ICDZS
1290  abcx
1291  defx
1292  ** Failers
1293  abcdefzx
1294
1295/(abc|def)x/ICDZSS
1296  abcx
1297  defx
1298  ** Failers
1299  abcdefzx
1300
1301/(ab|cd){3,4}/IC
1302  ababab
1303  abcdabcd
1304  abcdcdcdcdcd
1305
1306/([ab]{,4}c|xy)/ICDZS
1307    Note: that { does NOT introduce a quantifier
1308
1309/([ab]{,4}c|xy)/ICDZSS
1310    Note: that { does NOT introduce a quantifier
1311
1312/([ab]{1,4}c|xy){4,5}?123/ICDZ
1313    aacaacaacaacaac123
1314
1315/\b.*/I
1316  ab cd\>1
1317
1318/\b.*/Is
1319  ab cd\>1
1320
1321/(?!.bcd).*/I
1322  Xbcd12345
1323
1324/abcde/I
1325    ab\P
1326    abc\P
1327    abcd\P
1328    abcde\P
1329    the quick brown abc\P
1330    ** Failers\P
1331    the quick brown abxyz fox\P
1332
1333"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
1334    13/05/04\P
1335    13/5/2004\P
1336    02/05/09\P
1337    1\P
1338    1/2\P
1339    1/2/0\P
1340    1/2/04\P
1341    0\P
1342    02/\P
1343    02/0\P
1344    02/1\P
1345    ** Failers\P
1346    \P
1347    123\P
1348    33/4/04\P
1349    3/13/04\P
1350    0/1/2003\P
1351    0/\P
1352    02/0/\P
1353    02/13\P
1354
1355/0{0,2}ABC/I
1356
1357/\d{3,}ABC/I
1358
1359/\d*ABC/I
1360
1361/[abc]+DE/I
1362
1363/[abc]?123/I
1364    123\P
1365    a\P
1366    b\P
1367    c\P
1368    c12\P
1369    c123\P
1370
1371/^(?:\d){3,5}X/I
1372    1\P
1373    123\P
1374    123X
1375    1234\P
1376    1234X
1377    12345\P
1378    12345X
1379    *** Failers
1380    1X
1381    123456\P
1382
1383//KF>testsavedregex
1384
1385/abc/IS>testsavedregex
1386<testsavedregex
1387    abc
1388    ** Failers
1389    bca
1390
1391/abc/ISS>testsavedregex
1392<testsavedregex
1393    abc
1394    ** Failers
1395    bca
1396
1397/abc/IFS>testsavedregex
1398<testsavedregex
1399    abc
1400    ** Failers
1401    bca
1402
1403/abc/IFSS>testsavedregex
1404<testsavedregex
1405    abc
1406    ** Failers
1407    bca
1408
1409/(a|b)/IS>testsavedregex
1410<testsavedregex
1411    abc
1412    ** Failers
1413    def
1414
1415/(a|b)/ISS>testsavedregex
1416<testsavedregex
1417    abc
1418    ** Failers
1419    def
1420
1421/(a|b)/ISF>testsavedregex
1422<testsavedregex
1423    abc
1424    ** Failers
1425    def
1426
1427/(a|b)/ISSF>testsavedregex
1428<testsavedregex
1429    abc
1430    ** Failers
1431    def
1432
1433~<(\w+)/?>(.)*</(\1)>~smgI
1434    \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>
1435
1436/^a/IF
1437
1438/line\nbreak/I
1439    this is a line\nbreak
1440    line one\nthis is a line\nbreak in the second line
1441
1442/line\nbreak/If
1443    this is a line\nbreak
1444    ** Failers
1445    line one\nthis is a line\nbreak in the second line
1446
1447/line\nbreak/Imf
1448    this is a line\nbreak
1449    ** Failers
1450    line one\nthis is a line\nbreak in the second line
1451
1452/(?i)(?-i)AbCd/I
1453    AbCd
1454    ** Failers
1455    abcd
1456
1457/a{11111111111111111111}/I
1458
1459/(){64294967295}/I
1460
1461/(){2,4294967295}/I
1462
1463"(?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
1464    abcdefghijklAkB
1465
1466"(?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
1467    abcdefghijklAkB
1468
1469"(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
1470    abcdefghijklAkB
1471
1472"(?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
1473    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1474
1475"(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
1476    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1477
1478/[^()]*(?:\((?R)\)[^()]*)*/I
1479    (this(and)that
1480    (this(and)that)
1481    (this(and)that)stuff
1482
1483/[^()]*(?:\((?>(?R))\)[^()]*)*/I
1484    (this(and)that
1485    (this(and)that)
1486
1487/[^()]*(?:\((?R)\))*[^()]*/I
1488    (this(and)that
1489    (this(and)that)
1490
1491/(?:\((?R)\))*[^()]*/I
1492    (this(and)that
1493    (this(and)that)
1494    ((this))
1495
1496/(?:\((?R)\))|[^()]*/I
1497    (this(and)that
1498    (this(and)that)
1499    (this)
1500    ((this))
1501
1502/\x{0000ff}/I
1503
1504/^((?P<A>a1)|(?P<A>a2)b)/I
1505
1506/^((?P<A>a1)|(?P<A>a2)b)/IJ
1507    a1b\CA
1508    a2b\CA
1509    ** Failers
1510    a1b\CZ\CA
1511
1512/(?|(?<a>)(?<b>)(?<a>)|(?<a>)(?<b>)(?<a>))/IJ
1513
1514/^(?P<A>a)(?P<A>b)/IJ
1515    ab\CA
1516
1517/^(?P<A>a)(?P<A>b)|cd/IJ
1518    ab\CA
1519    cd\CA
1520
1521/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1522    cdefgh\CA
1523
1524/^((?P<A>a1)|(?P<A>a2)b)/IJ
1525    a1b\GA
1526    a2b\GA
1527    ** Failers
1528    a1b\GZ\GA
1529
1530/^(?P<A>a)(?P<A>b)/IJ
1531    ab\GA
1532
1533/^(?P<A>a)(?P<A>b)|cd/IJ
1534    ab\GA
1535    cd\GA
1536
1537/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1538    cdefgh\GA
1539
1540/(?J)^((?P<A>a1)|(?P<A>a2)b)/I
1541    a1b\CA
1542    a2b\CA
1543
1544/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
1545
1546/ In this next test, J is not set at the outer level; consequently it isn't
1547set in the pattern's options; consequently pcre_get_named_substring() produces
1548a random value. /Ix
1549
1550/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
1551    a bc d\CA\CB\CC
1552
1553/^(?P<A>a)?(?(A)a|b)/I
1554    aabc
1555    bc
1556    ** Failers
1557    abc
1558
1559/(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
1560    bXaX
1561
1562/(?:(?(2y)a|b)(X))+/I
1563
1564/(?:(?(ZA)a|b)(?P<ZZ>X))+/I
1565
1566/(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
1567    bbXaaX
1568
1569/(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
1570    (b)\\Xa\\X
1571
1572/(?P<ABC/I
1573
1574/(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1575    bXXaYYaY
1576    bXYaXXaX
1577
1578/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1579    bXXaYYaY
1580
1581/\s*,\s*/IS
1582    \x0b,\x0b
1583    \x0c,\x0d
1584
1585/^abc/Im
1586    xyz\nabc
1587    xyz\nabc\<lf>
1588    xyz\r\nabc\<lf>
1589    xyz\rabc\<cr>
1590    xyz\r\nabc\<crlf>
1591    ** Failers
1592    xyz\nabc\<cr>
1593    xyz\r\nabc\<cr>
1594    xyz\nabc\<crlf>
1595    xyz\rabc\<crlf>
1596    xyz\rabc\<lf>
1597
1598/abc$/Im<lf>
1599    xyzabc
1600    xyzabc\n
1601    xyzabc\npqr
1602    xyzabc\r\<cr>
1603    xyzabc\rpqr\<cr>
1604    xyzabc\r\n\<crlf>
1605    xyzabc\r\npqr\<crlf>
1606    ** Failers
1607    xyzabc\r
1608    xyzabc\rpqr
1609    xyzabc\r\n
1610    xyzabc\r\npqr
1611
1612/^abc/Im<cr>
1613    xyz\rabcdef
1614    xyz\nabcdef\<lf>
1615    ** Failers
1616    xyz\nabcdef
1617
1618/^abc/Im<lf>
1619    xyz\nabcdef
1620    xyz\rabcdef\<cr>
1621    ** Failers
1622    xyz\rabcdef
1623
1624/^abc/Im<crlf>
1625    xyz\r\nabcdef
1626    xyz\rabcdef\<cr>
1627    ** Failers
1628    xyz\rabcdef
1629
1630/^abc/Im<bad>
1631
1632/abc/I
1633    xyz\rabc\<bad>
1634    abc
1635
1636/.*/I<lf>
1637    abc\ndef
1638    abc\rdef
1639    abc\r\ndef
1640    \<cr>abc\ndef
1641    \<cr>abc\rdef
1642    \<cr>abc\r\ndef
1643    \<crlf>abc\ndef
1644    \<crlf>abc\rdef
1645    \<crlf>abc\r\ndef
1646
1647/\w+(.)(.)?def/Is
1648    abc\ndef
1649    abc\rdef
1650    abc\r\ndef
1651
1652+((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
1653   /* this is a C style comment */\M
1654
1655/(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
1656
1657/()()()()()()()()()()()()()()()()()()()()
1658 ()()()()()()()()()()()()()()()()()()()()
1659 ()()()()()()()()()()()()()()()()()()()()
1660 ()()()()()()()()()()()()()()()()()()()()
1661 ()()()()()()()()()()()()()()()()()()()()
1662 (.(.))/Ix
1663    XY\O400
1664
1665/(a*b|(?i:c*(?-i)d))/IS
1666
1667/()[ab]xyz/IS
1668
1669/(|)[ab]xyz/IS
1670
1671/(|c)[ab]xyz/IS
1672
1673/(|c?)[ab]xyz/IS
1674
1675/(d?|c?)[ab]xyz/IS
1676
1677/(d?|c)[ab]xyz/IS
1678
1679/^a*b\d/DZ
1680
1681/^a*+b\d/DZ
1682
1683/^a*?b\d/DZ
1684
1685/^a+A\d/DZ
1686    aaaA5
1687    ** Failers
1688    aaaa5
1689
1690/^a*A\d/IiDZ
1691    aaaA5
1692    aaaa5
1693
1694/(a*|b*)[cd]/IS
1695
1696/(a+|b*)[cd]/IS
1697
1698/(a*|b+)[cd]/IS
1699
1700/(a+|b+)[cd]/IS
1701
1702/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1703 ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1704 (((
1705 a
1706 ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1707 ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1708 )))
1709/Ix
1710  large nest
1711
1712/a*\d/BZ
1713
1714/a*\D/BZ
1715
1716/0*\d/BZ
1717
1718/0*\D/BZ
1719
1720/a*\s/BZ
1721
1722/a*\S/BZ
1723
1724/ *\s/BZ
1725
1726/ *\S/BZ
1727
1728/a*\w/BZ
1729
1730/a*\W/BZ
1731
1732/=*\w/BZ
1733
1734/=*\W/BZ
1735
1736/\d*a/BZ
1737
1738/\d*2/BZ
1739
1740/\d*\d/BZ
1741
1742/\d*\D/BZ
1743
1744/\d*\s/BZ
1745
1746/\d*\S/BZ
1747
1748/\d*\w/BZ
1749
1750/\d*\W/BZ
1751
1752/\D*a/BZ
1753
1754/\D*2/BZ
1755
1756/\D*\d/BZ
1757
1758/\D*\D/BZ
1759
1760/\D*\s/BZ
1761
1762/\D*\S/BZ
1763
1764/\D*\w/BZ
1765
1766/\D*\W/BZ
1767
1768/\s*a/BZ
1769
1770/\s*2/BZ
1771
1772/\s*\d/BZ
1773
1774/\s*\D/BZ
1775
1776/\s*\s/BZ
1777
1778/\s*\S/BZ
1779
1780/\s*\w/BZ
1781
1782/\s*\W/BZ
1783
1784/\S*a/BZ
1785
1786/\S*2/BZ
1787
1788/\S*\d/BZ
1789
1790/\S*\D/BZ
1791
1792/\S*\s/BZ
1793
1794/\S*\S/BZ
1795
1796/\S*\w/BZ
1797
1798/\S*\W/BZ
1799
1800/\w*a/BZ
1801
1802/\w*2/BZ
1803
1804/\w*\d/BZ
1805
1806/\w*\D/BZ
1807
1808/\w*\s/BZ
1809
1810/\w*\S/BZ
1811
1812/\w*\w/BZ
1813
1814/\w*\W/BZ
1815
1816/\W*a/BZ
1817
1818/\W*2/BZ
1819
1820/\W*\d/BZ
1821
1822/\W*\D/BZ
1823
1824/\W*\s/BZ
1825
1826/\W*\S/BZ
1827
1828/\W*\w/BZ
1829
1830/\W*\W/BZ
1831
1832/[^a]+a/BZ
1833
1834/[^a]+a/BZi
1835
1836/[^a]+A/BZi
1837
1838/[^a]+b/BZ
1839
1840/[^a]+\d/BZ
1841
1842/a*[^a]/BZ
1843
1844/(?P<abc>x)(?P<xyz>y)/I
1845    xy\Cabc\Cxyz
1846
1847/(?<abc>x)(?'xyz'y)/I
1848    xy\Cabc\Cxyz
1849
1850/(?<abc'x)(?'xyz'y)/I
1851
1852/(?<abc>x)(?'xyz>y)/I
1853
1854/(?P'abc'x)(?P<xyz>y)/I
1855
1856/^(?:(?(ZZ)a|b)(?<ZZ>X))+/
1857    bXaX
1858    bXbX
1859    ** Failers
1860    aXaX
1861    aXbX
1862
1863/^(?P>abc)(?<abcd>xxx)/
1864
1865/^(?P>abc)(?<abc>x|y)/
1866    xx
1867    xy
1868    yy
1869    yx
1870
1871/^(?P>abc)(?P<abc>x|y)/
1872    xx
1873    xy
1874    yy
1875    yx
1876
1877/^((?(abc)a|b)(?<abc>x|y))+/
1878    bxay
1879    bxby
1880    ** Failers
1881    axby
1882
1883/^(((?P=abc)|X)(?<abc>x|y))+/
1884    XxXxxx
1885    XxXyyx
1886    XxXyxx
1887    ** Failers
1888    x
1889
1890/^(?1)(abc)/
1891    abcabc
1892
1893/^(?:(?:\1|X)(a|b))+/
1894    Xaaa
1895    Xaba
1896
1897/^[\E\Qa\E-\Qz\E]+/BZ
1898
1899/^[a\Q]bc\E]/BZ
1900
1901/^[a-\Q\E]/BZ
1902
1903/^(?P>abc)[()](?<abc>)/BZ
1904
1905/^((?(abc)y)[()](?P<abc>x))+/BZ
1906    (xy)x
1907
1908/^(?P>abc)\Q()\E(?<abc>)/BZ
1909
1910/^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
1911
1912/^(?P>abc) # this is (a comment)
1913  (?<abc>)/BZx
1914
1915/^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
1916    1221
1917    Satan, oscillate my metallic sonatas!
1918    A man, a plan, a canal: Panama!
1919    Able was I ere I saw Elba.
1920    *** Failers
1921    The quick brown fox
1922
1923/(?=(\w+))\1:/I
1924    abcd:
1925
1926/(?=(?'abc'\w+))\k<abc>:/I
1927    abcd:
1928
1929/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
1930    adaa
1931    ** Failers
1932    addd
1933    adbb
1934
1935/(?'abc'a|b)(?<abc>d|e)(?&abc){2}/J
1936    bdaa
1937    bdab
1938    ** Failers
1939    bddd
1940
1941/(?(<bc))/
1942
1943/(?(''))/
1944
1945/(?('R')stuff)/
1946
1947/((abc (?(R) (?(R1)1) (?(R2)2) X  |  (?1)  (?2)   (?R) ))) /x
1948    abcabc1Xabc2XabcXabcabc
1949
1950/(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
1951    abcabc1Xabc2XabcXabcabc
1952
1953/(?<A> (?'B' abc (?(R) (?(R&C)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
1954
1955/^(?(DEFINE) abc | xyz ) /x
1956
1957/(?(DEFINE) abc) xyz/xI
1958
1959/(a|)*\d/
1960  \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1961  \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
1962
1963/^a.b/<lf>
1964    a\rb
1965    a\nb\<cr>
1966    a\x85b\<anycrlf>
1967    ** Failers
1968    a\nb
1969    a\nb\<any>
1970    a\rb\<cr>
1971    a\rb\<any>
1972    a\x85b\<any>
1973    a\rb\<anycrlf>
1974
1975/^abc./mgx<any>
1976    abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
1977
1978/abc.$/mgx<any>
1979    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
1980
1981/a/<cr><any>
1982
1983/a/<any><crlf>
1984
1985/^a\Rb/<bsr_unicode>
1986    a\nb
1987    a\rb
1988    a\r\nb
1989    a\x0bb
1990    a\x0cb
1991    a\x85b
1992    ** Failers
1993    a\n\rb
1994
1995/^a\R*b/<bsr_unicode>
1996    ab
1997    a\nb
1998    a\rb
1999    a\r\nb
2000    a\x0bb
2001    a\x0cb
2002    a\x85b
2003    a\n\rb
2004    a\n\r\x85\x0cb
2005
2006/^a\R+b/<bsr_unicode>
2007    a\nb
2008    a\rb
2009    a\r\nb
2010    a\x0bb
2011    a\x0cb
2012    a\x85b
2013    a\n\rb
2014    a\n\r\x85\x0cb
2015    ** Failers
2016    ab
2017
2018/^a\R{1,3}b/<bsr_unicode>
2019    a\nb
2020    a\n\rb
2021    a\n\r\x85b
2022    a\r\n\r\nb
2023    a\r\n\r\n\r\nb
2024    a\n\r\n\rb
2025    a\n\n\r\nb
2026    ** Failers
2027    a\n\n\n\rb
2028    a\r
2029
2030/^a[\R]b/<bsr_unicode>
2031    aRb
2032    ** Failers
2033    a\nb
2034
2035/(?&abc)X(?<abc>P)/I
2036    abcPXP123
2037
2038/(?1)X(?<abc>P)/I
2039    abcPXP123
2040
2041/(?:a(?&abc)b)*(?<abc>x)/
2042    123axbaxbaxbx456
2043    123axbaxbaxb456
2044
2045/(?:a(?&abc)b){1,5}(?<abc>x)/
2046    123axbaxbaxbx456
2047
2048/(?:a(?&abc)b){2,5}(?<abc>x)/
2049    123axbaxbaxbx456
2050
2051/(?:a(?&abc)b){2,}(?<abc>x)/
2052    123axbaxbaxbx456
2053
2054/(abc)(?i:(?1))/
2055   defabcabcxyz
2056   DEFabcABCXYZ
2057
2058/(abc)(?:(?i)(?1))/
2059   defabcabcxyz
2060   DEFabcABCXYZ
2061
2062/^(a)\g-2/
2063
2064/^(a)\g/
2065
2066/^(a)\g{0}/
2067
2068/^(a)\g{3/
2069
2070/^(a)\g{aa}/
2071
2072/^a.b/<lf>
2073    a\rb
2074    *** Failers
2075    a\nb
2076
2077/.+foo/
2078    afoo
2079    ** Failers
2080    \r\nfoo
2081    \nfoo
2082
2083/.+foo/<crlf>
2084    afoo
2085    \nfoo
2086    ** Failers
2087    \r\nfoo
2088
2089/.+foo/<any>
2090    afoo
2091    ** Failers
2092    \nfoo
2093    \r\nfoo
2094
2095/.+foo/s
2096    afoo
2097    \r\nfoo
2098    \nfoo
2099
2100/^$/mg<any>
2101    abc\r\rxyz
2102    abc\n\rxyz
2103    ** Failers
2104    abc\r\nxyz
2105
2106/(?m)^$/<any>g+
2107    abc\r\n\r\n
2108
2109/(?m)^$|^\r\n/<any>g+
2110    abc\r\n\r\n
2111
2112/(?m)$/<any>g+
2113    abc\r\n\r\n
2114
2115/abc.$/mgx<anycrlf>
2116    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
2117
2118/^X/m
2119    XABC
2120    ** Failers
2121    XABC\B
2122
2123/(ab|c)(?-1)/BZ
2124    abc
2125
2126/xy(?+1)(abc)/BZ
2127    xyabcabc
2128    ** Failers
2129    xyabc
2130
2131/x(?-0)y/
2132
2133/x(?-1)y/
2134
2135/x(?+0)y/
2136
2137/x(?+1)y/
2138
2139/^(abc)?(?(-1)X|Y)/BZ
2140    abcX
2141    Y
2142    ** Failers
2143    abcY
2144
2145/^((?(+1)X|Y)(abc))+/BZ
2146    YabcXabc
2147    YabcXabcXabc
2148    ** Failers
2149    XabcXabc
2150
2151/(?(-1)a)/BZ
2152
2153/((?(-1)a))/BZ
2154
2155/((?(-2)a))/BZ
2156
2157/^(?(+1)X|Y)(.)/BZ
2158    Y!
2159
2160/(?<A>tom|bon)-\k{A}/
2161    tom-tom
2162    bon-bon
2163    ** Failers
2164    tom-bon
2165
2166/\g{A/
2167
2168/(?|(abc)|(xyz))/BZ
2169   >abc<
2170   >xyz<
2171
2172/(x)(?|(abc)|(xyz))(x)/BZ
2173    xabcx
2174    xxyzx
2175
2176/(x)(?|(abc)(pqr)|(xyz))(x)/BZ
2177    xabcpqrx
2178    xxyzx
2179
2180/\H++X/BZ
2181    ** Failers
2182    XXXX
2183
2184/\H+\hY/BZ
2185    XXXX Y
2186
2187/\H+ Y/BZ
2188
2189/\h+A/BZ
2190
2191/\v*B/BZ
2192
2193/\V+\x0a/BZ
2194
2195/A+\h/BZ
2196
2197/ *\H/BZ
2198
2199/A*\v/BZ
2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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)
2221
2222/[\E]AAA/
2223
2224/[\Q\E]AAA/
2225
2226/[^\E]AAA/
2227
2228/[^\Q\E]AAA/
2229
2230/[\E^]AAA/
2231
2232/[\Q\E^]AAA/
2233
2234/A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ
2235
2236/^a+(*FAIL)/C
2237    aaaaaa
2238
2239/a+b?c+(*FAIL)/C
2240    aaabccc
2241
2242/a+b?(*PRUNE)c+(*FAIL)/C
2243    aaabccc
2244
2245/a+b?(*COMMIT)c+(*FAIL)/C
2246    aaabccc
2247
2248/a+b?(*SKIP)c+(*FAIL)/C
2249    aaabcccaaabccc
2250
2251/a+b?(*THEN)c+(*FAIL)/C
2252    aaabccc
2253
2254/a(*MARK)b/
2255
2256/(?i:A{1,}\6666666666)/
2257
2258/\g6666666666/
2259
2260/[\g6666666666]/BZ
2261
2262/(?1)\c[/
2263
2264/.+A/<crlf>
2265    \r\nA
2266
2267/\nA/<crlf>
2268    \r\nA
2269
2270/[\r\n]A/<crlf>
2271    \r\nA
2272
2273/(\r|\n)A/<crlf>
2274    \r\nA
2275
2276/a(*CR)b/
2277
2278/(*CR)a.b/
2279    a\nb
2280    ** Failers
2281    a\rb
2282
2283/(*CR)a.b/<lf>
2284    a\nb
2285    ** Failers
2286    a\rb
2287
2288/(*LF)a.b/<CRLF>
2289    a\rb
2290    ** Failers
2291    a\nb
2292
2293/(*CRLF)a.b/
2294    a\rb
2295    a\nb
2296    ** Failers
2297    a\r\nb
2298
2299/(*ANYCRLF)a.b/<CR>
2300    ** Failers
2301    a\rb
2302    a\nb
2303    a\r\nb
2304
2305/(*ANY)a.b/<cr>
2306    ** Failers
2307    a\rb
2308    a\nb
2309    a\r\nb
2310    a\x85b
2311
2312/(*ANY).*/g
2313    abc\r\ndef
2314
2315/(*ANYCRLF).*/g
2316    abc\r\ndef
2317
2318/(*CRLF).*/g
2319    abc\r\ndef
2320
2321/a\Rb/I<bsr_anycrlf>
2322    a\rb
2323    a\nb
2324    a\r\nb
2325    ** Failers
2326    a\x85b
2327    a\x0bb
2328
2329/a\Rb/I<bsr_unicode>
2330    a\rb
2331    a\nb
2332    a\r\nb
2333    a\x85b
2334    a\x0bb
2335    ** Failers
2336    a\x85b\<bsr_anycrlf>
2337    a\x0bb\<bsr_anycrlf>
2338
2339/a\R?b/I<bsr_anycrlf>
2340    a\rb
2341    a\nb
2342    a\r\nb
2343    ** Failers
2344    a\x85b
2345    a\x0bb
2346
2347/a\R?b/I<bsr_unicode>
2348    a\rb
2349    a\nb
2350    a\r\nb
2351    a\x85b
2352    a\x0bb
2353    ** Failers
2354    a\x85b\<bsr_anycrlf>
2355    a\x0bb\<bsr_anycrlf>
2356
2357/a\R{2,4}b/I<bsr_anycrlf>
2358    a\r\n\nb
2359    a\n\r\rb
2360    a\r\n\r\n\r\n\r\nb
2361    ** Failers
2362    a\x85\85b
2363    a\x0b\0bb
2364
2365/a\R{2,4}b/I<bsr_unicode>
2366    a\r\rb
2367    a\n\n\nb
2368    a\r\n\n\r\rb
2369    a\x85\85b
2370    a\x0b\0bb
2371    ** Failers
2372    a\r\r\r\r\rb
2373    a\x85\85b\<bsr_anycrlf>
2374    a\x0b\0bb\<bsr_anycrlf>
2375
2376/(*BSR_ANYCRLF)a\Rb/I
2377    a\nb
2378    a\rb
2379
2380/(*BSR_UNICODE)a\Rb/I
2381    a\x85b
2382
2383/(*BSR_ANYCRLF)(*CRLF)a\Rb/I
2384    a\nb
2385    a\rb
2386
2387/(*CRLF)(*BSR_UNICODE)a\Rb/I
2388    a\x85b
2389
2390/(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
2391
2392/(?<a>)(?&)/
2393
2394/(?<abc>)(?&a)/
2395
2396/(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
2397
2398/(?+-a)/
2399
2400/(?-+a)/
2401
2402/(?(-1))/
2403
2404/(?(+10))/
2405
2406/(?(10))/
2407
2408/(?(+2))()()/
2409
2410/(?(2))()()/
2411
2412/\k''/
2413
2414/\k<>/
2415
2416/\k{}/
2417
2418/\k/
2419
2420/\kabc/
2421
2422/(?P=)/
2423
2424/(?P>)/
2425
2426/(?!\w)(?R)/
2427
2428/(?=\w)(?R)/
2429
2430/(?<!\w)(?R)/
2431
2432/(?<=\w)(?R)/
2433
2434/[[:foo:]]/
2435
2436/[[:1234:]]/
2437
2438/[[:f\oo:]]/
2439
2440/[[: :]]/
2441
2442/[[:...:]]/
2443
2444/[[:l\ower:]]/
2445
2446/[[:abc\:]]/
2447
2448/[abc[:x\]pqr:]]/
2449
2450/[[:a\dz:]]/
2451
2452/(^(a|b\g<-1'c))/
2453
2454/^(?+1)(?<a>x|y){0}z/
2455    xzxx
2456    yzyy
2457    ** Failers
2458    xxz
2459
2460/(\3)(\1)(a)/
2461    cat
2462
2463/(\3)(\1)(a)/<JS>
2464    cat
2465
2466/TA]/
2467    The ACTA] comes
2468
2469/TA]/<JS>
2470    The ACTA] comes
2471
2472/(?2)[]a()b](abc)/
2473    abcbabc
2474
2475/(?2)[^]a()b](abc)/
2476    abcbabc
2477
2478/(?1)[]a()b](abc)/
2479    abcbabc
2480    ** Failers
2481    abcXabc
2482
2483/(?1)[^]a()b](abc)/
2484    abcXabc
2485    ** Failers
2486    abcbabc
2487
2488/(?2)[]a()b](abc)(xyz)/
2489    xyzbabcxyz
2490
2491/(?&N)[]a(?<N>)](?<M>abc)/
2492   abc<abc
2493
2494/(?&N)[]a(?<N>)](abc)/
2495   abc<abc
2496
2497/a[]b/
2498
2499/a[^]b/
2500
2501/a[]b/<JS>
2502    ** Failers
2503    ab
2504
2505/a[]+b/<JS>
2506    ** Failers
2507    ab
2508
2509/a[]*+b/<JS>
2510    ** Failers
2511    ab
2512
2513/a[^]b/<JS>
2514    aXb
2515    a\nb
2516    ** Failers
2517    ab
2518
2519/a[^]+b/<JS>
2520    aXb
2521    a\nX\nXb
2522    ** Failers
2523    ab
2524
2525/a(?!)b/BZ
2526
2527/(?!)?a/BZ
2528    ab
2529
2530/a(*FAIL)+b/
2531
2532/(abc|pqr|123){0}[xyz]/SI
2533
2534/(?(?=.*b)b|^)/CI
2535   adc
2536   abc
2537
2538/(?(?=b).*b|^d)/I
2539
2540/(?(?=.*b).*b|^d)/I
2541
2542/xyz/C
2543  xyz
2544  abcxyz
2545  abcxyz\Y
2546  ** Failers
2547  abc
2548  abc\Y
2549  abcxypqr
2550  abcxypqr\Y
2551
2552/(*NO_START_OPT)xyz/C
2553  abcxyz
2554
2555/(*NO_AUTO_POSSESS)a+b/BZ
2556
2557/xyz/CY
2558  abcxyz
2559
2560/^"((?(?=[a])[^"])|b)*"$/C
2561    "ab"
2562
2563/^"((?(?=[a])[^"])|b)*"$/
2564    "ab"
2565
2566/^X(?5)(a)(?|(b)|(q))(c)(d)Y/
2567    XYabcdY
2568
2569/^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
2570    XYabcdY
2571
2572/Xa{2,4}b/
2573    X\P
2574    Xa\P
2575    Xaa\P
2576    Xaaa\P
2577    Xaaaa\P
2578
2579/Xa{2,4}?b/
2580    X\P
2581    Xa\P
2582    Xaa\P
2583    Xaaa\P
2584    Xaaaa\P
2585
2586/Xa{2,4}+b/
2587    X\P
2588    Xa\P
2589    Xaa\P
2590    Xaaa\P
2591    Xaaaa\P
2592
2593/X\d{2,4}b/
2594    X\P
2595    X3\P
2596    X33\P
2597    X333\P
2598    X3333\P
2599
2600/X\d{2,4}?b/
2601    X\P
2602    X3\P
2603    X33\P
2604    X333\P
2605    X3333\P
2606
2607/X\d{2,4}+b/
2608    X\P
2609    X3\P
2610    X33\P
2611    X333\P
2612    X3333\P
2613
2614/X\D{2,4}b/
2615    X\P
2616    Xa\P
2617    Xaa\P
2618    Xaaa\P
2619    Xaaaa\P
2620
2621/X\D{2,4}?b/
2622    X\P
2623    Xa\P
2624    Xaa\P
2625    Xaaa\P
2626    Xaaaa\P
2627
2628/X\D{2,4}+b/
2629    X\P
2630    Xa\P
2631    Xaa\P
2632    Xaaa\P
2633    Xaaaa\P
2634
2635/X[abc]{2,4}b/
2636    X\P
2637    Xa\P
2638    Xaa\P
2639    Xaaa\P
2640    Xaaaa\P
2641
2642/X[abc]{2,4}?b/
2643    X\P
2644    Xa\P
2645    Xaa\P
2646    Xaaa\P
2647    Xaaaa\P
2648
2649/X[abc]{2,4}+b/
2650    X\P
2651    Xa\P
2652    Xaa\P
2653    Xaaa\P
2654    Xaaaa\P
2655
2656/X[^a]{2,4}b/
2657    X\P
2658    Xz\P
2659    Xzz\P
2660    Xzzz\P
2661    Xzzzz\P
2662
2663/X[^a]{2,4}?b/
2664    X\P
2665    Xz\P
2666    Xzz\P
2667    Xzzz\P
2668    Xzzzz\P
2669
2670/X[^a]{2,4}+b/
2671    X\P
2672    Xz\P
2673    Xzz\P
2674    Xzzz\P
2675    Xzzzz\P
2676
2677/(Y)X\1{2,4}b/
2678    YX\P
2679    YXY\P
2680    YXYY\P
2681    YXYYY\P
2682    YXYYYY\P
2683
2684/(Y)X\1{2,4}?b/
2685    YX\P
2686    YXY\P
2687    YXYY\P
2688    YXYYY\P
2689    YXYYYY\P
2690
2691/(Y)X\1{2,4}+b/
2692    YX\P
2693    YXY\P
2694    YXYY\P
2695    YXYYY\P
2696    YXYYYY\P
2697
2698/\++\KZ|\d+X|9+Y/
2699    ++++123999\P
2700    ++++123999Y\P
2701    ++++Z1234\P
2702
2703/Z(*F)/
2704    Z\P
2705    ZA\P
2706
2707/Z(?!)/
2708    Z\P
2709    ZA\P
2710
2711/dog(sbody)?/
2712    dogs\P
2713    dogs\P\P
2714
2715/dog(sbody)??/
2716    dogs\P
2717    dogs\P\P
2718
2719/dog|dogsbody/
2720    dogs\P
2721    dogs\P\P
2722
2723/dogsbody|dog/
2724    dogs\P
2725    dogs\P\P
2726
2727/\bthe cat\b/
2728    the cat\P
2729    the cat\P\P
2730
2731/abc/
2732   abc\P
2733   abc\P\P
2734
2735/abc\K123/
2736    xyzabc123pqr
2737    xyzabc12\P
2738    xyzabc12\P\P
2739
2740/(?<=abc)123/
2741    xyzabc123pqr
2742    xyzabc12\P
2743    xyzabc12\P\P
2744
2745/\babc\b/
2746    +++abc+++
2747    +++ab\P
2748    +++ab\P\P
2749
2750/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
2751
2752/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
2753
2754/(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
2755
2756/abc\K/+
2757    abcdef
2758    abcdef\N\N
2759    xyzabcdef\N\N
2760    ** Failers
2761    abcdef\N
2762    xyzabcdef\N
2763
2764/^(?:(?=abc)|abc\K)/+
2765    abcdef
2766    abcdef\N\N
2767    ** Failers
2768    abcdef\N
2769
2770/a?b?/+
2771    xyz
2772    xyzabc
2773    xyzabc\N
2774    xyzabc\N\N
2775    xyz\N\N
2776    ** Failers
2777    xyz\N
2778
2779/^a?b?/+
2780    xyz
2781    xyzabc
2782    ** Failers
2783    xyzabc\N
2784    xyzabc\N\N
2785    xyz\N\N
2786    xyz\N
2787
2788/^(?<name>a|b\g<name>c)/
2789    aaaa
2790    bacxxx
2791    bbaccxxx
2792    bbbacccxx
2793
2794/^(?<name>a|b\g'name'c)/
2795    aaaa
2796    bacxxx
2797    bbaccxxx
2798    bbbacccxx
2799
2800/^(a|b\g<1>c)/
2801    aaaa
2802    bacxxx
2803    bbaccxxx
2804    bbbacccxx
2805
2806/^(a|b\g'1'c)/
2807    aaaa
2808    bacxxx
2809    bbaccxxx
2810    bbbacccxx
2811
2812/^(a|b\g'-1'c)/
2813    aaaa
2814    bacxxx
2815    bbaccxxx
2816    bbbacccxx
2817
2818/(^(a|b\g<-1>c))/
2819    aaaa
2820    bacxxx
2821    bbaccxxx
2822    bbbacccxx
2823
2824/(?-i:\g<name>)(?i:(?<name>a))/
2825    XaaX
2826    XAAX
2827
2828/(?i:\g<name>)(?-i:(?<name>a))/
2829    XaaX
2830    ** Failers
2831    XAAX
2832
2833/(?-i:\g<+1>)(?i:(a))/
2834    XaaX
2835    XAAX
2836
2837/(?=(?<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>\})\}))\{/
2838
2839/(?<n>a|b|c)\g<n>*/
2840   abc
2841   accccbbb
2842
2843/^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
2844    XYabcdY
2845
2846/(?<=b(?1)|zzz)(a)/
2847    xbaax
2848    xzzzax
2849
2850/(a)(?<=b\1)/
2851
2852/(a)(?<=b+(?1))/
2853
2854/(a+)(?<=b(?1))/
2855
2856/(a(?<=b(?1)))/
2857
2858/(?<=b(?1))xyz/
2859
2860/(?<=b(?1))xyz(b+)pqrstuvew/
2861
2862/(a|bc)\1/SI
2863
2864/(a|bc)\1{2,3}/SI
2865
2866/(a|bc)(?1)/SI
2867
2868/(a|b\1)(a|b\1)/SI
2869
2870/(a|b\1){2}/SI
2871
2872/(a|bbbb\1)(a|bbbb\1)/SI
2873
2874/(a|bbbb\1){2}/SI
2875
2876/^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
2877
2878/<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
2879
2880"(?>.*/)foo"SI
2881
2882/(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /xSI
2883
2884/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
2885
2886/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
2887
2888/<a[\s]+href[\s]*=[\s]*          # find <a href=
2889 ([\"\'])?                       # find single or double quote
2890 (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
2891                                 # quote, otherwise match up to next space
2892/isxSI
2893
2894/^(?!:)                       # colon disallowed at start
2895  (?:                         # start of item
2896    (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
2897    (?(1)0 | () ) )           # if null previously matched, fail; else null
2898    :                         # followed by colon
2899  ){1,7}                      # end item; 1-7 of them required
2900  [0-9a-f]{1,4} $             # final hex number at end of string
2901  (?(1)|.)                    # check that there was an empty component
2902  /xiIS
2903
2904/(?|(?<a>A)|(?<a>B))/I
2905    AB\Ca
2906    BA\Ca
2907
2908/(?|(?<a>A)|(?<b>B))/
2909
2910/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
2911    b(?<quote> (?<apostrophe>')|(?<realquote>")) )
2912    (?('quote')[a-z]+|[0-9]+)/JIx
2913    a"aaaaa
2914    b"aaaaa
2915    ** Failers
2916    b"11111
2917    a"11111
2918
2919/^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
2920    abcdX
2921    eX
2922    ** Failers
2923    abcdY
2924    ey
2925
2926/(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
2927    abcdd
2928    ** Failers
2929    abcdde
2930
2931/abcd*/
2932    xxxxabcd\P
2933    xxxxabcd\P\P
2934
2935/abcd*/i
2936    xxxxabcd\P
2937    xxxxabcd\P\P
2938    XXXXABCD\P
2939    XXXXABCD\P\P
2940
2941/abc\d*/
2942    xxxxabc1\P
2943    xxxxabc1\P\P
2944
2945/(a)bc\1*/
2946    xxxxabca\P
2947    xxxxabca\P\P
2948
2949/abc[de]*/
2950    xxxxabcde\P
2951    xxxxabcde\P\P
2952
2953/-- This is not in the Perl-compatible test because Perl seems currently to be
2954    broken and not behaving as specified in that it *does* bumpalong after
2955    hitting (*COMMIT). --/
2956
2957/(?1)(A(*COMMIT)|B)D/
2958    ABD
2959    XABD
2960    BAD
2961    ABXABD
2962    ** Failers
2963    ABX
2964    BAXBAD
2965
2966/(\3)(\1)(a)/<JS>
2967    cat
2968
2969/(\3)(\1)(a)/SI<JS>
2970    cat
2971
2972/(\3)(\1)(a)/SI
2973    cat
2974
2975/i(?(DEFINE)(?<s>a))/SI
2976    i
2977
2978/()i(?(1)a)/SI
2979    ia
2980
2981/(?i)a(?-i)b|c/BZ
2982    XabX
2983    XAbX
2984    CcC
2985    ** Failers
2986    XABX
2987
2988/(?i)a(?s)b|c/BZ
2989
2990/(?i)a(?s-i)b|c/BZ
2991
2992/^(ab(c\1)d|x){2}$/BZ
2993    xabcxd
2994
2995/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
2996
2997/^(?&t)*(?(DEFINE)(?<t>.))$/BZ
2998
2999/ -- This one is here because Perl gives the match as "b" rather than "ab". I
3000     believe this to be a Perl bug. --/
3001
3002/(?>a\Kb)z|(ab)/
3003    ab
3004
3005/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
3006
3007/abc(*MARK:)pqr/
3008
3009/abc(*:)pqr/
3010
3011/abc(*FAIL:123)xyz/
3012
3013/--- This should, and does, fail. In Perl, it does not, which I think is a
3014     bug because replacing the B in the pattern by (B|D) does make it fail. ---/
3015
3016/A(*COMMIT)B/+K
3017    ACABX
3018
3019/--- These should be different, but in Perl they are not, which I think
3020     is a bug in Perl. ---/
3021
3022/A(*THEN)B|A(*THEN)C/K
3023    AC
3024
3025/A(*PRUNE)B|A(*PRUNE)C/K
3026    AC
3027
3028/--- Mark names can be duplicated. Perl doesn't give a mark for this one,
3029though PCRE does. ---/
3030
3031/^A(*:A)B|^X(*:A)Y/K
3032    ** Failers
3033    XAQQ
3034
3035/--- COMMIT at the start of a pattern should be the same as an anchor. Perl
3036optimizations defeat this. So does the PCRE optimization unless we disable it
3037with \Y. ---/
3038
3039/(*COMMIT)ABC/
3040    ABCDEFG
3041    ** Failers
3042    DEFGABC\Y
3043
3044/^(ab (c+(*THEN)cd) | xyz)/x
3045    abcccd
3046
3047/^(ab (c+(*PRUNE)cd) | xyz)/x
3048    abcccd
3049
3050/^(ab (c+(*FAIL)cd) | xyz)/x
3051    abcccd
3052
3053/--- Perl gets some of these wrong ---/
3054
3055/(?>.(*ACCEPT))*?5/
3056    abcde
3057
3058/(.(*ACCEPT))*?5/
3059    abcde
3060
3061/(.(*ACCEPT))5/
3062    abcde
3063
3064/(.(*ACCEPT))*5/
3065    abcde
3066
3067/A\NB./BZ
3068    ACBD
3069    *** Failers
3070    A\nB
3071    ACB\n
3072
3073/A\NB./sBZ
3074    ACBD
3075    ACB\n
3076    *** Failers
3077    A\nB
3078
3079/A\NB/<crlf>
3080    A\nB
3081    A\rB
3082    ** Failers
3083    A\r\nB
3084
3085/\R+b/BZ
3086
3087/\R+\n/BZ
3088
3089/\R+\d/BZ
3090
3091/\d*\R/BZ
3092
3093/\s*\R/BZ
3094    \x20\x0a
3095    \x20\x0d
3096    \x20\x0d\x0a
3097
3098/\S*\R/BZ
3099    a\x0a
3100
3101/X\h*\R/BZ
3102    X\x20\x0a
3103
3104/X\H*\R/BZ
3105    X\x0d\x0a
3106
3107/X\H+\R/BZ
3108    X\x0d\x0a
3109
3110/X\H++\R/BZ
3111    X\x0d\x0a
3112
3113/(?<=abc)def/
3114    abc\P\P
3115
3116/abc$/
3117    abc
3118    abc\P
3119    abc\P\P
3120
3121/abc$/m
3122    abc
3123    abc\n
3124    abc\P\P
3125    abc\n\P\P
3126    abc\P
3127    abc\n\P
3128
3129/abc\z/
3130    abc
3131    abc\P
3132    abc\P\P
3133
3134/abc\Z/
3135    abc
3136    abc\P
3137    abc\P\P
3138
3139/abc\b/
3140    abc
3141    abc\P
3142    abc\P\P
3143
3144/abc\B/
3145    abc
3146    abc\P
3147    abc\P\P
3148
3149/.+/
3150    abc\>0
3151    abc\>1
3152    abc\>2
3153    abc\>3
3154    abc\>4
3155    abc\>-4
3156
3157/^\cģ/
3158
3159/(?P<abn>(?P=abn)xxx)/BZ
3160
3161/(a\1z)/BZ
3162
3163/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
3164
3165/(?P<abn>(?P=axn)xxx)/BZ
3166
3167/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
3168
3169/-- These tests are here because Perl gets the first one wrong. --/
3170
3171/(\R*)(.)/s
3172    \r\n
3173    \r\r\n\n\r
3174    \r\r\n\n\r\n
3175
3176/(\R)*(.)/s
3177    \r\n
3178    \r\r\n\n\r
3179    \r\r\n\n\r\n
3180
3181/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
3182    \r\n
3183    \r\r\n\n\r
3184    \r\r\n\n\r\n
3185
3186/-- --/
3187
3188/^abc$/BZ
3189
3190/^abc$/BZm
3191
3192/^(a)*+(\w)/S
3193    aaaaX
3194    ** Failers
3195    aaaa
3196
3197/^(?:a)*+(\w)/S
3198    aaaaX
3199    ** Failers
3200    aaaa
3201
3202/(a)++1234/SDZ
3203
3204/([abc])++1234/SI
3205
3206/(?<=(abc)+)X/
3207
3208/(^ab)/I
3209
3210/(^ab)++/I
3211
3212/(^ab|^)+/I
3213
3214/(^ab|^)++/I
3215
3216/(?:^ab)/I
3217
3218/(?:^ab)++/I
3219
3220/(?:^ab|^)+/I
3221
3222/(?:^ab|^)++/I
3223
3224/(.*ab)/I
3225
3226/(.*ab)++/I
3227
3228/(.*ab|.*)+/I
3229
3230/(.*ab|.*)++/I
3231
3232/(?:.*ab)/I
3233
3234/(?:.*ab)++/I
3235
3236/(?:.*ab|.*)+/I
3237
3238/(?:.*ab|.*)++/I
3239
3240/(?=a)[bcd]/I
3241
3242/((?=a))[bcd]/I
3243
3244/((?=a))+[bcd]/I
3245
3246/((?=a))++[bcd]/I
3247
3248/(?=a+)[bcd]/iI
3249
3250/(?=a+?)[bcd]/iI
3251
3252/(?=a++)[bcd]/iI
3253
3254/(?=a{3})[bcd]/iI
3255
3256/(abc)\1+/S
3257
3258/-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
3259
3260/(?1)(?:(b(*ACCEPT))){0}/
3261    b
3262
3263/(?1)(?:(b(*ACCEPT))){0}c/
3264    bc
3265    ** Failers
3266    b
3267
3268/(?1)(?:((*ACCEPT))){0}c/
3269    c
3270    c\N
3271
3272/^.*?(?(?=a)a|b(*THEN)c)/
3273    ba
3274
3275/^.*?(?(?=a)a|bc)/
3276    ba
3277
3278/^.*?(?(?=a)a(*THEN)b|c)/
3279    ac
3280
3281/^.*?(?(?=a)a(*THEN)b)c/
3282    ac
3283
3284/^.*?(a(*THEN)b)c/
3285    aabc
3286
3287/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
3288    aabc
3289
3290/^.*?(a(*THEN)b|z)c/
3291    aabc
3292
3293/^.*?(z|a(*THEN)b)c/
3294    aabc
3295
3296/-- --/
3297
3298/-- These studied versions are here because they are not Perl-compatible; the
3299    studying means the mark is not seen. --/
3300
3301/(*MARK:A)(*SKIP:B)(C|X)/KS
3302    C
3303    D
3304
3305/(*:A)A+(*SKIP:A)(B|Z)/KS
3306    AAAC
3307
3308/-- --/
3309
3310"(?=a*(*ACCEPT)b)c"
3311    c
3312    c\N
3313
3314/(?1)c(?(DEFINE)((*ACCEPT)b))/
3315    c
3316    c\N
3317
3318/(?>(*ACCEPT)b)c/
3319    c
3320    c\N
3321
3322/(?:(?>(a)))+a%/++
3323    %aa%
3324
3325/(a)b|ac/++SS
3326    ac\O3
3327
3328/(a)(b)x|abc/++
3329     abc\O6
3330
3331/(a)bc|(a)(b)\2/
3332    \O3abc
3333    \O4abc
3334
3335/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
3336
3337/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
3338
3339/(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
3340
3341/(abc)(?1)/SI
3342
3343/^(?>a)++/
3344    aa\M
3345    aaaaaaaaa\M
3346
3347/(a)(?1)++/
3348    aa\M
3349    aaaaaaaaa\M
3350
3351/(?:(foo)|(bar)|(baz))X/SS=
3352    bazfooX
3353    foobazbarX
3354    barfooX
3355    bazX
3356    foobarbazX
3357    bazfooX\O0
3358    bazfooX\O2
3359    bazfooX\O4
3360    bazfooX\O6
3361    bazfooX\O8
3362    bazfooX\O10
3363
3364/(?=abc){3}abc/BZ
3365
3366/(?=abc)+abc/BZ
3367
3368/(?=abc)++abc/BZ
3369
3370/(?=abc){0}xyz/BZ
3371
3372/(?=(a))?./BZ
3373
3374/(?=(a))??./BZ
3375
3376/^(?=(a)){0}b(?1)/BZ
3377
3378/(?(DEFINE)(a))?b(?1)/BZ
3379
3380/^(?=(?1))?[az]([abc])d/BZ
3381
3382/^(?!a){0}\w+/BZ
3383
3384/(?<=(abc))?xyz/BZ
3385
3386/[:a[:abc]b:]/BZ
3387
3388/((?2))((?1))/SS
3389    abc
3390
3391/((?(R2)a+|(?1)b))/SS
3392    aaaabcde
3393
3394/(?(R)a*(?1)|((?R))b)/SS
3395    aaaabcde
3396
3397/(a+|(?R)b)/
3398
3399/^(a(*:A)(d|e(*:B))z|aeq)/C
3400    adz
3401    aez
3402    aeqwerty
3403
3404/.(*F)/
3405    \P\Pabc
3406
3407/\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
3408
3409/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
3410
3411/a(*SKIP)c|b(*ACCEPT)|/+S!I
3412    a
3413
3414/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
3415    ax
3416
3417'a*(*ACCEPT)b'+
3418    \N\N
3419    abc\N\N
3420    bbb\N\N
3421
3422/(*ACCEPT)a/+I
3423    bax
3424
3425/z(*ACCEPT)a/+I
3426    baxzbx
3427
3428/a(?:.)*?a/ims
3429    \Mabbbbbbbbbbbbbbbbbbbbba
3430
3431/a(?:.(*THEN))*?a/ims
3432    \Mabbbbbbbbbbbbbbbbbbbbba
3433
3434/a(?:.(*THEN:ABC))*?a/ims
3435    \Mabbbbbbbbbbbbbbbbbbbbba
3436
3437/^(?>a+)(?>(z+))\w/BZ
3438    aaaazzzzb
3439    ** Failers
3440    aazz
3441
3442/(.)(\1|a(?2))/
3443    bab
3444
3445/\1|(.)(?R)\1/
3446    cbbbc
3447
3448/(.)((?(1)c|a)|a(?2))/
3449    baa
3450
3451/(?P<abn>(?P=abn)xxx)/BZ
3452
3453/(a\1z)/BZ
3454
3455/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
3456     \Maabbccddee
3457
3458/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
3459     \Maabbccddee
3460
3461/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
3462     \Maabbccddee
3463
3464/^a\x41z/<JS>
3465    aAz
3466    *** Failers
3467    ax41z
3468
3469/^a[m\x41]z/<JS>
3470    aAz
3471
3472/^a\x1z/<JS>
3473    ax1z
3474
3475/^a\u0041z/<JS>
3476    aAz
3477    *** Failers
3478    au0041z
3479
3480/^a[m\u0041]z/<JS>
3481    aAz
3482
3483/^a\u041z/<JS>
3484    au041z
3485    *** Failers
3486    aAz
3487
3488/^a\U0041z/<JS>
3489    aU0041z
3490    *** Failers
3491    aAz
3492
3493/(?(?=c)c|d)++Y/BZ
3494
3495/(?(?=c)c|d)*+Y/BZ
3496
3497/a[\NB]c/
3498    aNc
3499
3500/a[B-\Nc]/
3501
3502/a[B\Nc]/
3503
3504/(a)(?2){0,1999}?(b)/
3505
3506/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
3507
3508/--- This test, with something more complicated than individual letters, causes
3509different behaviour in Perl. Perhaps it disables some optimization; no tag is
3510passed back for the failures, whereas in PCRE there is a tag. ---/
3511
3512/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
3513    AABC
3514    XXYZ
3515    ** Failers
3516    XAQQ
3517    XAQQXZZ
3518    AXQQQ
3519    AXXQQQ
3520
3521/-- Perl doesn't give marks for these, though it does if the alternatives are
3522replaced by single letters. --/
3523
3524/(b|q)(*:m)f|a(*:n)w/K
3525    aw
3526    ** Failers
3527    abc
3528
3529/(q|b)(*:m)f|a(*:n)w/K
3530    aw
3531    ** Failers
3532    abc
3533
3534/-- After a partial match, the behaviour is as for a failure. --/
3535
3536/^a(*:X)bcde/K
3537   abc\P
3538
3539/-- These are here because Perl doesn't return a mark, except for the first --/
3540
3541/(?=(*:x))(q|)/K+
3542    abc
3543
3544/(?=(*:x))((*:y)q|)/K+
3545    abc
3546
3547/(?=(*:x))(?:(*:y)q|)/K+
3548    abc
3549
3550/(?=(*:x))(?>(*:y)q|)/K+
3551    abc
3552
3553/(?=a(*:x))(?!a(*:y)c)/K+
3554    ab
3555
3556/(?=a(*:x))(?=a(*:y)c|)/K+
3557    ab
3558
3559/(..)\1/
3560    ab\P
3561    aba\P
3562    abab\P
3563
3564/(..)\1/i
3565    ab\P
3566    abA\P
3567    aBAb\P
3568
3569/(..)\1{2,}/
3570    ab\P
3571    aba\P
3572    abab\P
3573    ababa\P
3574    ababab\P
3575    ababab\P\P
3576    abababa\P
3577    abababa\P\P
3578
3579/(..)\1{2,}/i
3580    ab\P
3581    aBa\P
3582    aBAb\P
3583    AbaBA\P
3584    abABAb\P
3585    aBAbaB\P\P
3586    abABabA\P
3587    abaBABa\P\P
3588
3589/(..)\1{2,}?x/i
3590    ab\P
3591    abA\P
3592    aBAb\P
3593    abaBA\P
3594    abAbaB\P
3595    abaBabA\P
3596    abAbABaBx\P
3597
3598/^(..)\1/
3599    aba\P
3600
3601/^(..)\1{2,3}x/
3602    aba\P
3603    ababa\P
3604    ababa\P\P
3605    abababx
3606    ababababx
3607
3608/^(..)\1{2,3}?x/
3609    aba\P
3610    ababa\P
3611    ababa\P\P
3612    abababx
3613    ababababx
3614
3615/^(..)(\1{2,3})ab/
3616    abababab
3617
3618/^\R/
3619    \r\P
3620    \r\P\P
3621
3622/^\R{2,3}x/
3623    \r\P
3624    \r\P\P
3625    \r\r\P
3626    \r\r\P\P
3627    \r\r\r\P
3628    \r\r\r\P\P
3629    \r\rx
3630    \r\r\rx
3631
3632/^\R{2,3}?x/
3633    \r\P
3634    \r\P\P
3635    \r\r\P
3636    \r\r\P\P
3637    \r\r\r\P
3638    \r\r\r\P\P
3639    \r\rx
3640    \r\r\rx
3641
3642/^\R?x/
3643    \r\P
3644    \r\P\P
3645    x
3646    \rx
3647
3648/^\R+x/
3649    \r\P
3650    \r\P\P
3651    \r\n\P
3652    \r\n\P\P
3653    \rx
3654
3655/^a$/<CRLF>
3656    a\r\P
3657    a\r\P\P
3658
3659/^a$/m<CRLF>
3660    a\r\P
3661    a\r\P\P
3662
3663/^(a$|a\r)/<CRLF>
3664    a\r\P
3665    a\r\P\P
3666
3667/^(a$|a\r)/m<CRLF>
3668    a\r\P
3669    a\r\P\P
3670
3671/./<CRLF>
3672    \r\P
3673    \r\P\P
3674
3675/.{2,3}/<CRLF>
3676    \r\P
3677    \r\P\P
3678    \r\r\P
3679    \r\r\P\P
3680    \r\r\r\P
3681    \r\r\r\P\P
3682
3683/.{2,3}?/<CRLF>
3684    \r\P
3685    \r\P\P
3686    \r\r\P
3687    \r\r\P\P
3688    \r\r\r\P
3689    \r\r\r\P\P
3690
3691"AB(C(D))(E(F))?(?(?=\2)(?=\4))"
3692    ABCDGHI\O03
3693
3694/-- These are all run as real matches in test 1; here we are just checking the
3695settings of the anchored and startline bits. --/
3696
3697/(?>.*?a)(?<=ba)/I
3698
3699/(?:.*?a)(?<=ba)/I
3700
3701/.*?a(*PRUNE)b/I
3702
3703/.*?a(*PRUNE)b/sI
3704
3705/^a(*PRUNE)b/sI
3706
3707/.*?a(*SKIP)b/I
3708
3709/(?>.*?a)b/sI
3710
3711/(?>.*?a)b/I
3712
3713/(?>^a)b/sI
3714
3715/(?>.*?)(?<=(abcd)|(wxyz))/I
3716
3717/(?>.*)(?<=(abcd)|(wxyz))/I
3718
3719"(?>.*)foo"I
3720
3721"(?>.*?)foo"I
3722
3723/(?>^abc)/mI
3724
3725/(?>.*abc)/mI
3726
3727/(?:.*abc)/mI
3728
3729/-- Check PCRE_STUDY_EXTRA_NEEDED --/
3730
3731/.?/S-I
3732
3733/.?/S!I
3734
3735/(?:(a)+(?C1)bb|aa(?C2)b)/
3736    aab\C+
3737
3738/(?:(a)++(?C1)bb|aa(?C2)b)/
3739    aab\C+
3740
3741/(?:(?>(a))(?C1)bb|aa(?C2)b)/
3742    aab\C+
3743
3744/(?:(?1)(?C1)x|ab(?C2))((a)){0}/
3745    aab\C+
3746
3747/(?1)(?C1)((a)(?C2)){0}/
3748    aab\C+
3749
3750/(?:(a)+(?C1)bb|aa(?C2)b)++/
3751    aab\C+
3752    aab\C+\O2
3753
3754/(ab)x|ab/
3755    ab\O3
3756    ab\O2
3757
3758/(ab)/
3759    ab\O3
3760    ab\O2
3761
3762/(?<=123)(*MARK:xx)abc/K
3763    xxxx123a\P\P
3764    xxxx123a\P
3765
3766/123\Kabc/
3767    xxxx123a\P\P
3768    xxxx123a\P
3769
3770/^(?(?=a)aa|bb)/C
3771    bb
3772
3773/(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/
3774    bb
3775
3776/-- Perl seems to have a bug with this one --/
3777
3778/aaaaa(*COMMIT)(*PRUNE)b|a+c/
3779    aaaaaac
3780
3781/-- Here are some that Perl treats differently because of the way it handles
3782backtracking verbs. --/
3783
3784 /(?!a(*COMMIT)b)ac|ad/
3785     ac
3786     ad
3787
3788/^(?!a(*THEN)b|ac)../
3789     ac
3790     ad
3791
3792/^(?=a(*THEN)b|ac)/
3793    ac
3794
3795/\A.*?(?:a|b(*THEN)c)/
3796    ba
3797
3798/\A.*?(?:a|b(*THEN)c)++/
3799    ba
3800
3801/\A.*?(?:a|b(*THEN)c|d)/
3802    ba
3803
3804/(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/
3805    aac
3806
3807/\A.*?(a|b(*THEN)c)/
3808    ba
3809
3810/^(A(*THEN)B|A(*THEN)D)/
3811    AD
3812
3813/(?!b(*THEN)a)bn|bnn/
3814    bnn
3815
3816/(?(?=b(*SKIP)a)bn|bnn)/
3817    bnn
3818
3819/(?=b(*THEN)a|)bn|bnn/
3820    bnn
3821
3822/-------------------------/
3823
3824/(*LIMIT_MATCH=12bc)abc/
3825
3826/(*LIMIT_MATCH=4294967290)abc/
3827
3828/(*LIMIT_RECURSION=4294967280)abc/I
3829
3830/(a+)*zz/
3831    aaaaaaaaaaaaaz
3832    aaaaaaaaaaaaaz\q3000
3833
3834/(a+)*zz/S-
3835    aaaaaaaaaaaaaz\Q10
3836
3837/(*LIMIT_MATCH=3000)(a+)*zz/I
3838    aaaaaaaaaaaaaz
3839    aaaaaaaaaaaaaz\q60000
3840
3841/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
3842    aaaaaaaaaaaaaz
3843
3844/(*LIMIT_MATCH=60000)(a+)*zz/I
3845    aaaaaaaaaaaaaz
3846    aaaaaaaaaaaaaz\q3000
3847
3848/(*LIMIT_RECURSION=10)(a+)*zz/IS-
3849    aaaaaaaaaaaaaz
3850    aaaaaaaaaaaaaz\Q1000
3851
3852/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/IS-
3853    aaaaaaaaaaaaaz
3854
3855/(*LIMIT_RECURSION=1000)(a+)*zz/IS-
3856    aaaaaaaaaaaaaz
3857    aaaaaaaaaaaaaz\Q10
3858
3859/-- This test causes a segfault with Perl 5.18.0 --/
3860
3861/^(?=(a)){0}b(?1)/
3862    backgammon
3863
3864/(?|(?<n>f)|(?<n>b))/JI
3865
3866/(?<a>abc)(?<a>z)\k<a>()/JDZS
3867
3868/a*[bcd]/BZ
3869
3870/[bcd]*a/BZ
3871
3872/-- A complete set of tests for auto-possessification of character types --/
3873
3874/\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
3875
3876/\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
3877
3878/\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
3879
3880/\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
3881
3882/\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
3883
3884/\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
3885
3886/\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
3887
3888/\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
3889
3890/\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
3891
3892/\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
3893
3894/\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
3895
3896/\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
3897
3898/ 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
3899
3900/\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
3901
3902/ .+\D  .+\d  .+\S  .+\s  .+\W  .+\w  .+.  .+\C  .+\R  .+\H  .+\h  .+\V  .+\v  .+\Z  .+\z  .+$/BZx
3903
3904/ .+\D  .+\d  .+\S  .+\s  .+\W  .+\w  .+.  .+\C  .+\R  .+\H  .+\h  .+\V  .+\v  .+\Z  .+\z  .+$/BZxs
3905
3906/\D+$  \d+$  \S+$  \s+$  \W+$  \w+$  \C+$  \R+$  \H+$  \h+$  \V+$  \v+$   a+$  \n+$   .+$  .+$/BZxm
3907
3908/(?=a+)a(a+)++a/BZ
3909
3910/a+(bb|cc)a+(?:bb|cc)a+(?>bb|cc)a+(?:bb|cc)+a+(aa)a+(?:bb|aa)/BZ
3911
3912/a+(bb|cc)?#a+(?:bb|cc)??#a+(?:bb|cc)?+#a+(?:bb|cc)*#a+(bb|cc)?a#a+(?:aa)?/BZ
3913
3914/a+(?:bb)?a#a+(?:|||)#a+(?:|b)a#a+(?:|||)?a/BZ
3915
3916/[ab]*/BZ
3917    aaaa
3918
3919/[ab]*?/BZ
3920    aaaa
3921
3922/[ab]?/BZ
3923    aaaa
3924
3925/[ab]??/BZ
3926    aaaa
3927
3928/[ab]+/BZ
3929    aaaa
3930
3931/[ab]+?/BZ
3932    aaaa
3933
3934/[ab]{2,3}/BZ
3935    aaaa
3936
3937/[ab]{2,3}?/BZ
3938    aaaa
3939
3940/[ab]{2,}/BZ
3941    aaaa
3942
3943/[ab]{2,}?/BZ
3944    aaaa
3945
3946/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/BZ
3947
3948/[a-d]{5,12}[e-z0-9]*#[^a-z]+[b-y]*a[2-7]?[^0-9a-z]+/BZ
3949
3950/[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
3951
3952/a+(aa|bb)*c#a*(bb|cc)*a#a?(bb|cc)*d#[a-f]*(g|hh)*f/BZ
3953
3954/[a-f]*(g|hh|i)*i#[a-x]{4,}(y{0,6})*y#[a-k]+(ll|mm)+n/BZ
3955
3956/[a-f]*(?>gg|hh)+#[a-f]*(?>gg|hh)?#[a-f]*(?>gg|hh)*a#[a-f]*(?>gg|hh)*h/BZ
3957
3958/[a-c]*d/DZS
3959
3960/[a-c]+d/DZS
3961
3962/[a-c]?d/DZS
3963
3964/[a-c]{4,6}d/DZS
3965
3966/[a-c]{0,6}d/DZS
3967
3968/-- End of special auto-possessive tests --/
3969
3970/^A\o{1239}B/
3971    A\123B
3972
3973/^A\oB/
3974
3975/^A\x{zz}B/
3976
3977/^A\x{12Z/
3978
3979/^A\x{/
3980
3981/[ab]++/BZO
3982
3983/[^ab]*+/BZO
3984
3985/a{4}+/BZO
3986
3987/a{4}+/BZOi
3988
3989/[a-[:digit:]]+/
3990
3991/[A-[:digit:]]+/
3992
3993/[a-[.xxx.]]+/
3994
3995/[a-[=xxx=]]+/
3996
3997/[a-[!xxx!]]+/
3998
3999/[A-[!xxx!]]+/
4000    A]]]
4001
4002/[a-\d]+/
4003
4004/(?<0abc>xx)/
4005
4006/(?&1abc)xx(?<1abc>y)/
4007
4008/(?<ab-cd>xx)/
4009
4010/(?'0abc'xx)/
4011
4012/(?P<0abc>xx)/
4013
4014/\k<5ghj>/
4015
4016/\k'5ghj'/
4017
4018/\k{2fgh}/
4019
4020/(?P=8yuki)/
4021
4022/\g{4df}/
4023
4024/(?&1abc)xx(?<1abc>y)/
4025
4026/(?P>1abc)xx(?<1abc>y)/
4027
4028/\g'3gh'/
4029
4030/\g<5fg>/
4031
4032/(?(<4gh>)abc)/
4033
4034/(?('4gh')abc)/
4035
4036/(?(4gh)abc)/
4037
4038/(?(R&6yh)abc)/
4039
4040/(((a\2)|(a*)\g<-1>))*a?/BZ
4041
4042/-- Test the ugly "start or end of word" compatibility syntax --/
4043
4044/[[:<:]]red[[:>:]]/BZ
4045    little red riding hood
4046    a /red/ thing
4047    red is a colour
4048    put it all on red
4049    ** Failers
4050    no reduction
4051    Alfred Winifred
4052
4053/[a[:<:]] should give error/
4054
4055/(?=ab\K)/+
4056    abcd
4057
4058/abcd/f<lf>
4059    xx\nxabcd
4060
4061/ -- Test stack check external calls --/
4062
4063/(((((a)))))/Q0
4064
4065/(((((a)))))/Q1
4066
4067/(((((a)))))/Q
4068
4069/^\w+(?>\s*)(?<=\w)/BZ
4070
4071/\othing/
4072
4073/\o{}/
4074
4075/\o{whatever}/
4076
4077/\xthing/
4078
4079/\x{}/
4080
4081/\x{whatever}/
4082
4083"((?=(?(?=(?(?=(?(?=()))))))))"
4084    a
4085
4086"(?(?=)==)(((((((((?=)))))))))"
4087    a
4088
4089/^(?:(a)|b)(?(1)A|B)/I
4090    aA123\O3
4091    aA123\O6
4092
4093'^(?:(?<AA>a)|b)(?(<AA>)A|B)'
4094    aA123\O3
4095    aA123\O6
4096
4097'^(?<AA>)(?:(?<AA>a)|b)(?(<AA>)A|B)'J
4098    aA123\O3
4099    aA123\O6
4100
4101'^(?:(?<AA>X)|)(?:(?<AA>a)|b)\k{AA}'J
4102    aa123\O3
4103    aa123\O6
4104
4105/(?<N111>(?J)(?<N111>1(111111)11|)1|1|)(?(<N111>)1)/
4106
4107/(?(?=0)?)+/
4108
4109/(?(?=0)(?=00)?00765)/
4110     00765
4111
4112/(?(?=0)(?=00)?00765|(?!3).56)/
4113     00765
4114     456
4115     ** Failers
4116     356
4117
4118'^(a)*+(\w)'
4119    g
4120    g\O3
4121
4122'^(?:a)*+(\w)'
4123    g
4124    g\O3
4125
4126//C
4127    \O\C+
4128
4129"((?2){0,1999}())?"
4130
4131/((?+1)(\1))/BZ
4132
4133/(?(?!)a|b)/
4134    bbb
4135    aaa
4136
4137"((?2)+)((?1))"
4138
4139"(?(?<E>.*!.*)?)"
4140
4141"X((?2)()*+){2}+"BZ
4142
4143"X((?2)()*+){2}"BZ
4144
4145"(?<=((?2))((?1)))"
4146
4147/(?<=\Ka)/g+
4148    aaaaa
4149
4150/(?<=\Ka)/G+
4151    aaaaa
4152
4153/((?2){73}(?2))((?1))/
4154
4155/.((?2)(?R)\1)()/BZ
4156
4157/(?1)()((((((\1++))\x85)+)|))/
4158
4159/(\9*+(?2);\3++()2|)++{/
4160
4161/\V\x85\9*+((?2)\3++()2)*:2/
4162
4163/(((?(R)){0,2}) (?''((?'R')((?'R')))))/J
4164
4165/(((?(X)){0,2}) (?''((?'X')((?'X')))))/J
4166
4167/(((?(R)){0,2}) (?''((?'X')((?'R')))))/
4168
4169"(?J)(?'d'(?'d'\g{d}))"
4170
4171".*?\h.+.\.+\R*?\xd(?i)(?=!(?=b`b`b`\`b\xa9b!)`\a`bbbbbbbbbbbbb`bbbbbbbbbbbb*R\x85bbbbbbb\C?{((?2)(?))((
4172\H){8(?<=(?1){29}\xa8bbbb\x16\xd\xc6^($(?<! )(\xa9H4){4}h}1)B))\x15')"
4173
4174"(?J:(?|(?'R')(\k'R')|((?'R'))))"
4175
4176/(?<=|(\,\$(?73591620449005828816)\xa8.{7}){6}\x09)/
4177
4178//
4179\O1
4180
4181/^(?:(?(1)x|)+)+$()/BZ
4182
4183/(?=di(?<=(?1))|(?=(.))))/
4184
4185/(?(R))*+/BZ
4186
4187/[[:\\](?'abc')[a:]/
4188
4189"[[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[:::::::::::::::::[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[[[:::E[[[:[:[[:[:::[[:::E[[[:[:[[:'[:::::E[[[:[::::::[[[:[[[[[[[::E[[[:[::::::[[[:[[[[[[[[:[[::[::::[[:::::::[[:[[[[[[[:[[::[:[[:[~"
4190
4191/()(?(R)0)*+/BZ
4192
4193/(?R-:(?</
4194
4195/(?1){3918}(((((0(\k'R'))))(?J)(?'R'(?'R'\3){99})))/I
4196
4197/(?J:(?|(:(?|(?'R')(\k'R')|((?'R')))H'Rk'Rf)|s(?'R')))/
4198
4199/0(?0)|(1)(*THEN)(*SKIP:0)(*FAIL)/
4200    01
4201
4202/((?(R8000000000)))/
4203
4204/(?(8000000000/
4205
4206/(?:ab)?(?:ab)(?:ab)/
4207    abab
4208    ababab
4209    aba
4210
4211/((*MARK:A))++a(*SKIP:B)b/
4212    aacb
4213
4214/(?J:(?|(:(?|(?'R')(\z(?|(?'R')(\k'R')|((?'R')))k'R')|((?'R')))H'Ak'Rf)|s(?'R')))/
4215
4216/(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&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