xref: /PHP-5.3/ext/pcre/pcrelib/testdata/testoutput2 (revision 357ab3cb)
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/(a)b|/I
12Capturing subpattern count = 1
13No options
14No first char
15No need char
16
17/abc/I
18Capturing subpattern count = 0
19No options
20First char = 'a'
21Need char = 'c'
22    abc
23 0: abc
24    defabc
25 0: abc
26    \Aabc
27 0: abc
28    *** Failers
29No match
30    \Adefabc
31No match
32    ABC
33No match
34
35/^abc/I
36Capturing subpattern count = 0
37Options: anchored
38No first char
39No need char
40    abc
41 0: abc
42    \Aabc
43 0: abc
44    *** Failers
45No match
46    defabc
47No match
48    \Adefabc
49No match
50
51/a+bc/I
52Capturing subpattern count = 0
53No options
54First char = 'a'
55Need char = 'c'
56
57/a*bc/I
58Capturing subpattern count = 0
59No options
60No first char
61Need char = 'c'
62
63/a{3}bc/I
64Capturing subpattern count = 0
65No options
66First char = 'a'
67Need char = 'c'
68
69/(abc|a+z)/I
70Capturing subpattern count = 1
71No options
72First char = 'a'
73No need char
74
75/^abc$/I
76Capturing subpattern count = 0
77Options: anchored
78No first char
79No need char
80    abc
81 0: abc
82    *** Failers
83No match
84    def\nabc
85No match
86
87/ab\idef/X
88Failed: unrecognized character follows \ at offset 3
89
90/(?X)ab\idef/X
91Failed: unrecognized character follows \ at offset 7
92
93/x{5,4}/
94Failed: numbers out of order in {} quantifier at offset 5
95
96/z{65536}/
97Failed: number too big in {} quantifier at offset 7
98
99/[abcd/
100Failed: missing terminating ] for character class at offset 5
101
102/(?X)[\B]/
103Failed: invalid escape sequence in character class at offset 6
104
105/(?X)[\R]/
106Failed: invalid escape sequence in character class at offset 6
107
108/(?X)[\X]/
109Failed: invalid escape sequence in character class at offset 6
110
111/[\B]/BZ
112------------------------------------------------------------------
113        Bra
114        B
115        Ket
116        End
117------------------------------------------------------------------
118
119/[\R]/BZ
120------------------------------------------------------------------
121        Bra
122        R
123        Ket
124        End
125------------------------------------------------------------------
126
127/[\X]/BZ
128------------------------------------------------------------------
129        Bra
130        X
131        Ket
132        End
133------------------------------------------------------------------
134
135/[z-a]/
136Failed: range out of order in character class at offset 3
137
138/^*/
139Failed: nothing to repeat at offset 1
140
141/(abc/
142Failed: missing ) at offset 4
143
144/(?# abc/
145Failed: missing ) after comment at offset 7
146
147/(?z)abc/
148Failed: unrecognized character after (? or (?- at offset 2
149
150/.*b/I
151Capturing subpattern count = 0
152No options
153First char at start or follows newline
154Need char = 'b'
155
156/.*?b/I
157Capturing subpattern count = 0
158No options
159First char at start or follows newline
160Need char = 'b'
161
162/cat|dog|elephant/I
163Capturing subpattern count = 0
164No options
165No first char
166No need char
167    this sentence eventually mentions a cat
168 0: cat
169    this sentences rambles on and on for a while and then reaches elephant
170 0: elephant
171
172/cat|dog|elephant/IS
173Capturing subpattern count = 0
174No options
175No first char
176No need char
177Subject length lower bound = 3
178Starting byte set: c d e
179    this sentence eventually mentions a cat
180 0: cat
181    this sentences rambles on and on for a while and then reaches elephant
182 0: elephant
183
184/cat|dog|elephant/IiS
185Capturing subpattern count = 0
186Options: caseless
187No first char
188No need char
189Subject length lower bound = 3
190Starting byte set: C D E c d e
191    this sentence eventually mentions a CAT cat
192 0: CAT
193    this sentences rambles on and on for a while to elephant ElePhant
194 0: elephant
195
196/a|[bcd]/IS
197Capturing subpattern count = 0
198No options
199No first char
200No need char
201Subject length lower bound = 1
202Starting byte set: a b c d
203
204/(a|[^\dZ])/IS
205Capturing subpattern count = 1
206No options
207No first char
208No need char
209Subject length lower bound = 1
210Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
211  \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
212  \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
213  ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y [ \ ] ^ _ ` a b c d
214  e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \x80 \x81 \x82 \x83
215  \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92
216  \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1
217  \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0
218  \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf
219  \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce
220  \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd
221  \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec
222  \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb
223  \xfc \xfd \xfe \xff
224
225/(a|b)*[\s]/IS
226Capturing subpattern count = 1
227No options
228No first char
229No need char
230Subject length lower bound = 1
231Starting byte set: \x09 \x0a \x0c \x0d \x20 a b
232
233/(ab\2)/
234Failed: reference to non-existent subpattern at offset 6
235
236/{4,5}abc/
237Failed: nothing to repeat at offset 4
238
239/(a)(b)(c)\2/I
240Capturing subpattern count = 3
241Max back reference = 2
242No options
243First char = 'a'
244Need char = 'c'
245    abcb
246 0: abcb
247 1: a
248 2: b
249 3: c
250    \O0abcb
251Matched, but too many substrings
252    \O3abcb
253Matched, but too many substrings
254 0: abcb
255    \O6abcb
256Matched, but too many substrings
257 0: abcb
258 1: a
259    \O9abcb
260Matched, but too many substrings
261 0: abcb
262 1: a
263 2: b
264    \O12abcb
265 0: abcb
266 1: a
267 2: b
268 3: c
269
270/(a)bc|(a)(b)\2/I
271Capturing subpattern count = 3
272Max back reference = 2
273No options
274First char = 'a'
275No need char
276    abc
277 0: abc
278 1: a
279    \O0abc
280Matched, but too many substrings
281    \O3abc
282Matched, but too many substrings
283 0: abc
284    \O6abc
285 0: abc
286 1: a
287    aba
288 0: aba
289 1: <unset>
290 2: a
291 3: b
292    \O0aba
293Matched, but too many substrings
294    \O3aba
295Matched, but too many substrings
296 0: aba
297    \O6aba
298Matched, but too many substrings
299 0: aba
300 1: <unset>
301    \O9aba
302Matched, but too many substrings
303 0: aba
304 1: <unset>
305 2: a
306    \O12aba
307 0: aba
308 1: <unset>
309 2: a
310 3: b
311
312/abc$/IE
313Capturing subpattern count = 0
314Options: dollar_endonly
315First char = 'a'
316Need char = 'c'
317    abc
318 0: abc
319    *** Failers
320No match
321    abc\n
322No match
323    abc\ndef
324No match
325
326/(a)(b)(c)(d)(e)\6/
327Failed: reference to non-existent subpattern at offset 17
328
329/the quick brown fox/I
330Capturing subpattern count = 0
331No options
332First char = 't'
333Need char = 'x'
334    the quick brown fox
335 0: the quick brown fox
336    this is a line with the quick brown fox
337 0: the quick brown fox
338
339/the quick brown fox/IA
340Capturing subpattern count = 0
341Options: anchored
342No first char
343No need char
344    the quick brown fox
345 0: the quick brown fox
346    *** Failers
347No match
348    this is a line with the quick brown fox
349No match
350
351/ab(?z)cd/
352Failed: unrecognized character after (? or (?- at offset 4
353
354/^abc|def/I
355Capturing subpattern count = 0
356No options
357No first char
358No need char
359    abcdef
360 0: abc
361    abcdef\B
362 0: def
363
364/.*((abc)$|(def))/I
365Capturing subpattern count = 3
366No options
367First char at start or follows newline
368No need char
369    defabc
370 0: defabc
371 1: abc
372 2: abc
373    \Zdefabc
374 0: def
375 1: def
376 2: <unset>
377 3: def
378
379/)/
380Failed: unmatched parentheses at offset 0
381
382/a[]b/
383Failed: missing terminating ] for character class at offset 4
384
385/[^aeiou ]{3,}/I
386Capturing subpattern count = 0
387No options
388No first char
389No need char
390    co-processors, and for
391 0: -pr
392
393/<.*>/I
394Capturing subpattern count = 0
395No options
396First char = '<'
397Need char = '>'
398    abc<def>ghi<klm>nop
399 0: <def>ghi<klm>
400
401/<.*?>/I
402Capturing subpattern count = 0
403No options
404First char = '<'
405Need char = '>'
406    abc<def>ghi<klm>nop
407 0: <def>
408
409/<.*>/IU
410Capturing subpattern count = 0
411Options: ungreedy
412First char = '<'
413Need char = '>'
414    abc<def>ghi<klm>nop
415 0: <def>
416
417/(?U)<.*>/I
418Capturing subpattern count = 0
419Options: ungreedy
420First char = '<'
421Need char = '>'
422    abc<def>ghi<klm>nop
423 0: <def>
424
425/<.*?>/IU
426Capturing subpattern count = 0
427Options: ungreedy
428First char = '<'
429Need char = '>'
430    abc<def>ghi<klm>nop
431 0: <def>ghi<klm>
432
433/={3,}/IU
434Capturing subpattern count = 0
435Options: ungreedy
436First char = '='
437Need char = '='
438    abc========def
439 0: ===
440
441/(?U)={3,}?/I
442Capturing subpattern count = 0
443Options: ungreedy
444First char = '='
445Need char = '='
446    abc========def
447 0: ========
448
449/(?<!bar|cattle)foo/I
450Capturing subpattern count = 0
451No options
452First char = 'f'
453Need char = 'o'
454Max lookbehind = 6
455    foo
456 0: foo
457    catfoo
458 0: foo
459    *** Failers
460No match
461    the barfoo
462No match
463    and cattlefoo
464No match
465
466/(?<=a+)b/
467Failed: lookbehind assertion is not fixed length at offset 6
468
469/(?<=aaa|b{0,3})b/
470Failed: lookbehind assertion is not fixed length at offset 14
471
472/(?<!(foo)a\1)bar/
473Failed: lookbehind assertion is not fixed length at offset 12
474
475/(?i)abc/I
476Capturing subpattern count = 0
477Options: caseless
478First char = 'a' (caseless)
479Need char = 'c' (caseless)
480
481/(a|(?m)a)/I
482Capturing subpattern count = 1
483No options
484First char = 'a'
485No need char
486
487/(?i)^1234/I
488Capturing subpattern count = 0
489Options: anchored caseless
490No first char
491No need char
492
493/(^b|(?i)^d)/I
494Capturing subpattern count = 1
495Options: anchored
496No first char
497No need char
498
499/(?s).*/I
500Capturing subpattern count = 0
501Options: anchored dotall
502No first char
503No need char
504
505/[abcd]/IS
506Capturing subpattern count = 0
507No options
508No first char
509No need char
510Subject length lower bound = 1
511Starting byte set: a b c d
512
513/(?i)[abcd]/IS
514Capturing subpattern count = 0
515Options: caseless
516No first char
517No need char
518Subject length lower bound = 1
519Starting byte set: A B C D a b c d
520
521/(?m)[xy]|(b|c)/IS
522Capturing subpattern count = 1
523Options: multiline
524No first char
525No need char
526Subject length lower bound = 1
527Starting byte set: b c x y
528
529/(^a|^b)/Im
530Capturing subpattern count = 1
531Options: multiline
532First char at start or follows newline
533No need char
534
535/(?i)(^a|^b)/Im
536Capturing subpattern count = 1
537Options: caseless multiline
538First char at start or follows newline
539No need char
540
541/(a)(?(1)a|b|c)/
542Failed: conditional group contains more than two branches at offset 13
543
544/(?(?=a)a|b|c)/
545Failed: conditional group contains more than two branches at offset 12
546
547/(?(1a)/
548Failed: missing ) at offset 6
549
550/(?(1a))/
551Failed: reference to non-existent subpattern at offset 6
552
553/(?(?i))/
554Failed: assertion expected after (?( at offset 3
555
556/(?(abc))/
557Failed: reference to non-existent subpattern at offset 7
558
559/(?(?<ab))/
560Failed: syntax error in subpattern name (missing terminator) at offset 7
561
562/((?s)blah)\s+\1/I
563Capturing subpattern count = 1
564Max back reference = 1
565No options
566First char = 'b'
567Need char = 'h'
568
569/((?i)blah)\s+\1/I
570Capturing subpattern count = 1
571Max back reference = 1
572No options
573First char = 'b' (caseless)
574Need char = 'h' (caseless)
575
576/((?i)b)/IDZS
577------------------------------------------------------------------
578        Bra
579        CBra 1
580     /i b
581        Ket
582        Ket
583        End
584------------------------------------------------------------------
585Capturing subpattern count = 1
586No options
587First char = 'b' (caseless)
588No need char
589Subject length lower bound = 1
590No set of starting bytes
591
592/(a*b|(?i:c*(?-i)d))/IS
593Capturing subpattern count = 1
594No options
595No first char
596No need char
597Subject length lower bound = 1
598Starting byte set: C a b c d
599
600/a$/I
601Capturing subpattern count = 0
602No options
603First char = 'a'
604No need char
605    a
606 0: a
607    a\n
608 0: a
609    *** Failers
610No match
611    \Za
612No match
613    \Za\n
614No match
615
616/a$/Im
617Capturing subpattern count = 0
618Options: multiline
619First char = 'a'
620No need char
621    a
622 0: a
623    a\n
624 0: a
625    \Za\n
626 0: a
627    *** Failers
628No match
629    \Za
630No match
631
632/\Aabc/Im
633Capturing subpattern count = 0
634Options: anchored multiline
635No first char
636No need char
637
638/^abc/Im
639Capturing subpattern count = 0
640Options: multiline
641First char at start or follows newline
642Need char = 'c'
643
644/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
645Capturing subpattern count = 5
646Options: anchored
647No first char
648No need char
649  aaaaabbbbbcccccdef
650 0: aaaaabbbbbcccccdef
651 1: aaaaabbbbbcccccdef
652 2: aaaaa
653 3: b
654 4: bbbbccccc
655 5: def
656
657/(?<=foo)[ab]/IS
658Capturing subpattern count = 0
659No options
660No first char
661No need char
662Max lookbehind = 3
663Subject length lower bound = 1
664Starting byte set: a b
665
666/(?<!foo)(alpha|omega)/IS
667Capturing subpattern count = 1
668No options
669No first char
670Need char = 'a'
671Max lookbehind = 3
672Subject length lower bound = 5
673Starting byte set: a o
674
675/(?!alphabet)[ab]/IS
676Capturing subpattern count = 0
677No options
678No first char
679No need char
680Subject length lower bound = 1
681Starting byte set: a b
682
683/(?<=foo\n)^bar/Im
684Capturing subpattern count = 0
685Contains explicit CR or LF match
686Options: multiline
687No first char
688Need char = 'r'
689Max lookbehind = 4
690    foo\nbarbar
691 0: bar
692    ***Failers
693No match
694    rhubarb
695No match
696    barbell
697No match
698    abc\nbarton
699No match
700
701/^(?<=foo\n)bar/Im
702Capturing subpattern count = 0
703Contains explicit CR or LF match
704Options: multiline
705First char at start or follows newline
706Need char = 'r'
707Max lookbehind = 4
708    foo\nbarbar
709 0: bar
710    ***Failers
711No match
712    rhubarb
713No match
714    barbell
715No match
716    abc\nbarton
717No match
718
719/(?>^abc)/Im
720Capturing subpattern count = 0
721Options: multiline
722First char at start or follows newline
723Need char = 'c'
724    abc
725 0: abc
726    def\nabc
727 0: abc
728    *** Failers
729No match
730    defabc
731No match
732
733/(?<=ab(c+)d)ef/
734Failed: lookbehind assertion is not fixed length at offset 11
735
736/(?<=ab(?<=c+)d)ef/
737Failed: lookbehind assertion is not fixed length at offset 12
738
739/(?<=ab(c|de)f)g/
740Failed: lookbehind assertion is not fixed length at offset 13
741
742/The next three are in testinput2 because they have variable length branches/
743
744/(?<=bullock|donkey)-cart/I
745Capturing subpattern count = 0
746No options
747First char = '-'
748Need char = 't'
749Max lookbehind = 7
750    the bullock-cart
751 0: -cart
752    a donkey-cart race
753 0: -cart
754    *** Failers
755No match
756    cart
757No match
758    horse-and-cart
759No match
760
761/(?<=ab(?i)x|y|z)/I
762Capturing subpattern count = 0
763No options
764No first char
765No need char
766Max lookbehind = 3
767
768/(?>.*)(?<=(abcd)|(xyz))/I
769Capturing subpattern count = 2
770No options
771No first char
772No need char
773Max lookbehind = 4
774    alphabetabcd
775 0: alphabetabcd
776 1: abcd
777    endingxyz
778 0: endingxyz
779 1: <unset>
780 2: xyz
781
782/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
783Capturing subpattern count = 0
784No options
785First char = 'Z'
786Need char = 'Z'
787Max lookbehind = 4
788    abxyZZ
789 0: ZZ
790    abXyZZ
791 0: ZZ
792    ZZZ
793 0: ZZ
794    zZZ
795 0: ZZ
796    bZZ
797 0: ZZ
798    BZZ
799 0: ZZ
800    *** Failers
801No match
802    ZZ
803No match
804    abXYZZ
805No match
806    zzz
807No match
808    bzz
809No match
810
811/(?<!(foo)a)bar/I
812Capturing subpattern count = 1
813No options
814First char = 'b'
815Need char = 'r'
816Max lookbehind = 4
817    bar
818 0: bar
819    foobbar
820 0: bar
821    *** Failers
822No match
823    fooabar
824No match
825
826/This one is here because Perl 5.005_02 doesn't fail it/I
827Capturing subpattern count = 0
828No options
829First char = 'T'
830Need char = 't'
831
832/^(a)?(?(1)a|b)+$/I
833Capturing subpattern count = 1
834Options: anchored
835No first char
836No need char
837    *** Failers
838No match
839    a
840No match
841
842/This one is here because Perl behaves differently; see also the following/I
843Capturing subpattern count = 0
844No options
845First char = 'T'
846Need char = 'g'
847
848/^(a\1?){4}$/I
849Capturing subpattern count = 1
850Max back reference = 1
851Options: anchored
852No first char
853No need char
854    aaaa
855No match
856    aaaaaa
857No match
858
859/Perl does not fail these two for the final subjects. Neither did PCRE until/
860/release 8.01. The problem is in backtracking into a subpattern that contains/
861No match
862/a recursive reference to itself. PCRE has now made these into atomic patterns./
863No match
864
865/^(xa|=?\1a){2}$/
866    xa=xaa
867 0: xa=xaa
868 1: =xaa
869    ** Failers
870No match
871    xa=xaaa
872No match
873
874/^(xa|=?\1a)+$/
875    xa=xaa
876 0: xa=xaa
877 1: =xaa
878    ** Failers
879No match
880    xa=xaaa
881No match
882
883/These are syntax tests from Perl 5.005/I
884Capturing subpattern count = 0
885No options
886First char = 'T'
887Need char = '5'
888
889/a[b-a]/
890Failed: range out of order in character class at offset 4
891
892/a[]b/
893Failed: missing terminating ] for character class at offset 4
894
895/a[/
896Failed: missing terminating ] for character class at offset 2
897
898/*a/
899Failed: nothing to repeat at offset 0
900
901/(*)b/
902Failed: nothing to repeat at offset 1
903
904/abc)/
905Failed: unmatched parentheses at offset 3
906
907/(abc/
908Failed: missing ) at offset 4
909
910/a**/
911Failed: nothing to repeat at offset 2
912
913/)(/
914Failed: unmatched parentheses at offset 0
915
916/\1/
917Failed: reference to non-existent subpattern at offset 2
918
919/\2/
920Failed: reference to non-existent subpattern at offset 2
921
922/(a)|\2/
923Failed: reference to non-existent subpattern at offset 6
924
925/a[b-a]/Ii
926Failed: range out of order in character class at offset 4
927
928/a[]b/Ii
929Failed: missing terminating ] for character class at offset 4
930
931/a[/Ii
932Failed: missing terminating ] for character class at offset 2
933
934/*a/Ii
935Failed: nothing to repeat at offset 0
936
937/(*)b/Ii
938Failed: nothing to repeat at offset 1
939
940/abc)/Ii
941Failed: unmatched parentheses at offset 3
942
943/(abc/Ii
944Failed: missing ) at offset 4
945
946/a**/Ii
947Failed: nothing to repeat at offset 2
948
949/)(/Ii
950Failed: unmatched parentheses at offset 0
951
952/:(?:/
953Failed: missing ) at offset 4
954
955/(?<%)b/
956Failed: unrecognized character after (?< at offset 3
957
958/a(?{)b/
959Failed: unrecognized character after (? or (?- at offset 3
960
961/a(?{{})b/
962Failed: unrecognized character after (? or (?- at offset 3
963
964/a(?{}})b/
965Failed: unrecognized character after (? or (?- at offset 3
966
967/a(?{"{"})b/
968Failed: unrecognized character after (? or (?- at offset 3
969
970/a(?{"{"}})b/
971Failed: unrecognized character after (? or (?- at offset 3
972
973/(?(1?)a|b)/
974Failed: malformed number or name after (?( at offset 4
975
976/[a[:xyz:/
977Failed: missing terminating ] for character class at offset 8
978
979/(?<=x+)y/
980Failed: lookbehind assertion is not fixed length at offset 6
981
982/a{37,17}/
983Failed: numbers out of order in {} quantifier at offset 7
984
985/abc/\
986Failed: \ at end of pattern at offset 4
987
988/abc/\i
989Failed: \ at end of pattern at offset 4
990
991/(a)bc(d)/I
992Capturing subpattern count = 2
993No options
994First char = 'a'
995Need char = 'd'
996    abcd
997 0: abcd
998 1: a
999 2: d
1000    abcd\C2
1001 0: abcd
1002 1: a
1003 2: d
1004 2C d (1)
1005    abcd\C5
1006 0: abcd
1007 1: a
1008 2: d
1009copy substring 5 failed -7
1010
1011/(.{20})/I
1012Capturing subpattern count = 1
1013No options
1014No first char
1015No need char
1016    abcdefghijklmnopqrstuvwxyz
1017 0: abcdefghijklmnopqrst
1018 1: abcdefghijklmnopqrst
1019    abcdefghijklmnopqrstuvwxyz\C1
1020 0: abcdefghijklmnopqrst
1021 1: abcdefghijklmnopqrst
1022 1C abcdefghijklmnopqrst (20)
1023    abcdefghijklmnopqrstuvwxyz\G1
1024 0: abcdefghijklmnopqrst
1025 1: abcdefghijklmnopqrst
1026 1G abcdefghijklmnopqrst (20)
1027
1028/(.{15})/I
1029Capturing subpattern count = 1
1030No options
1031No first char
1032No need char
1033    abcdefghijklmnopqrstuvwxyz
1034 0: abcdefghijklmno
1035 1: abcdefghijklmno
1036    abcdefghijklmnopqrstuvwxyz\C1\G1
1037 0: abcdefghijklmno
1038 1: abcdefghijklmno
1039 1C abcdefghijklmno (15)
1040 1G abcdefghijklmno (15)
1041
1042/(.{16})/I
1043Capturing subpattern count = 1
1044No options
1045No first char
1046No need char
1047    abcdefghijklmnopqrstuvwxyz
1048 0: abcdefghijklmnop
1049 1: abcdefghijklmnop
1050    abcdefghijklmnopqrstuvwxyz\C1\G1\L
1051 0: abcdefghijklmnop
1052 1: abcdefghijklmnop
1053 1C abcdefghijklmnop (16)
1054 1G abcdefghijklmnop (16)
1055 0L abcdefghijklmnop
1056 1L abcdefghijklmnop
1057
1058/^(a|(bc))de(f)/I
1059Capturing subpattern count = 3
1060Options: anchored
1061No first char
1062No need char
1063    adef\G1\G2\G3\G4\L
1064 0: adef
1065 1: a
1066 2: <unset>
1067 3: f
1068 1G a (1)
1069 2G  (0)
1070 3G f (1)
1071get substring 4 failed -7
1072 0L adef
1073 1L a
1074 2L
1075 3L f
1076    bcdef\G1\G2\G3\G4\L
1077 0: bcdef
1078 1: bc
1079 2: bc
1080 3: f
1081 1G bc (2)
1082 2G bc (2)
1083 3G f (1)
1084get substring 4 failed -7
1085 0L bcdef
1086 1L bc
1087 2L bc
1088 3L f
1089    adefghijk\C0
1090 0: adef
1091 1: a
1092 2: <unset>
1093 3: f
1094 0C adef (4)
1095
1096/^abc\00def/I
1097Capturing subpattern count = 0
1098Options: anchored
1099No first char
1100No need char
1101    abc\00def\L\C0
1102 0: abc\x00def
1103 0C abc\x00def (7)
1104 0L abc
1105
1106/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
1107)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
1108)?)?)?)?)?)?)?)?)?otherword/I
1109Capturing subpattern count = 8
1110Contains explicit CR or LF match
1111No options
1112First char = 'w'
1113Need char = 'd'
1114
1115/.*X/IDZ
1116------------------------------------------------------------------
1117        Bra
1118        Any*
1119        X
1120        Ket
1121        End
1122------------------------------------------------------------------
1123Capturing subpattern count = 0
1124No options
1125First char at start or follows newline
1126Need char = 'X'
1127
1128/.*X/IDZs
1129------------------------------------------------------------------
1130        Bra
1131        AllAny*
1132        X
1133        Ket
1134        End
1135------------------------------------------------------------------
1136Capturing subpattern count = 0
1137Options: anchored dotall
1138No first char
1139Need char = 'X'
1140
1141/(.*X|^B)/IDZ
1142------------------------------------------------------------------
1143        Bra
1144        CBra 1
1145        Any*
1146        X
1147        Alt
1148        ^
1149        B
1150        Ket
1151        Ket
1152        End
1153------------------------------------------------------------------
1154Capturing subpattern count = 1
1155No options
1156First char at start or follows newline
1157No need char
1158
1159/(.*X|^B)/IDZs
1160------------------------------------------------------------------
1161        Bra
1162        CBra 1
1163        AllAny*
1164        X
1165        Alt
1166        ^
1167        B
1168        Ket
1169        Ket
1170        End
1171------------------------------------------------------------------
1172Capturing subpattern count = 1
1173Options: anchored dotall
1174No first char
1175No need char
1176
1177/(?s)(.*X|^B)/IDZ
1178------------------------------------------------------------------
1179        Bra
1180        CBra 1
1181        AllAny*
1182        X
1183        Alt
1184        ^
1185        B
1186        Ket
1187        Ket
1188        End
1189------------------------------------------------------------------
1190Capturing subpattern count = 1
1191Options: anchored dotall
1192No first char
1193No need char
1194
1195/(?s:.*X|^B)/IDZ
1196------------------------------------------------------------------
1197        Bra
1198        Bra
1199        AllAny*
1200        X
1201        Alt
1202        ^
1203        B
1204        Ket
1205        Ket
1206        End
1207------------------------------------------------------------------
1208Capturing subpattern count = 0
1209Options: anchored
1210No first char
1211No need char
1212
1213/\Biss\B/I+
1214Capturing subpattern count = 0
1215No options
1216First char = 'i'
1217Need char = 's'
1218Max lookbehind = 1
1219    Mississippi
1220 0: iss
1221 0+ issippi
1222
1223/iss/IG+
1224Capturing subpattern count = 0
1225No options
1226First char = 'i'
1227Need char = 's'
1228    Mississippi
1229 0: iss
1230 0+ issippi
1231 0: iss
1232 0+ ippi
1233
1234/\Biss\B/IG+
1235Capturing subpattern count = 0
1236No options
1237First char = 'i'
1238Need char = 's'
1239Max lookbehind = 1
1240    Mississippi
1241 0: iss
1242 0+ issippi
1243
1244/\Biss\B/Ig+
1245Capturing subpattern count = 0
1246No options
1247First char = 'i'
1248Need char = 's'
1249Max lookbehind = 1
1250    Mississippi
1251 0: iss
1252 0+ issippi
1253 0: iss
1254 0+ ippi
1255    *** Failers
1256No match
1257    Mississippi\A
1258No match
1259
1260/(?<=[Ms])iss/Ig+
1261Capturing subpattern count = 0
1262No options
1263First char = 'i'
1264Need char = 's'
1265Max lookbehind = 1
1266    Mississippi
1267 0: iss
1268 0+ issippi
1269 0: iss
1270 0+ ippi
1271
1272/(?<=[Ms])iss/IG+
1273Capturing subpattern count = 0
1274No options
1275First char = 'i'
1276Need char = 's'
1277Max lookbehind = 1
1278    Mississippi
1279 0: iss
1280 0+ issippi
1281
1282/^iss/Ig+
1283Capturing subpattern count = 0
1284Options: anchored
1285No first char
1286No need char
1287    ississippi
1288 0: iss
1289 0+ issippi
1290
1291/.*iss/Ig+
1292Capturing subpattern count = 0
1293No options
1294First char at start or follows newline
1295Need char = 's'
1296    abciss\nxyzisspqr
1297 0: abciss
1298 0+ \x0axyzisspqr
1299 0: xyziss
1300 0+ pqr
1301
1302/.i./I+g
1303Capturing subpattern count = 0
1304No options
1305No first char
1306Need char = 'i'
1307    Mississippi
1308 0: Mis
1309 0+ sissippi
1310 0: sis
1311 0+ sippi
1312 0: sip
1313 0+ pi
1314    Mississippi\A
1315 0: Mis
1316 0+ sissippi
1317 0: sis
1318 0+ sippi
1319 0: sip
1320 0+ pi
1321    Missouri river
1322 0: Mis
1323 0+ souri river
1324 0: ri
1325 0+ river
1326 0: riv
1327 0+ er
1328    Missouri river\A
1329 0: Mis
1330 0+ souri river
1331
1332/^.is/I+g
1333Capturing subpattern count = 0
1334Options: anchored
1335No first char
1336No need char
1337    Mississippi
1338 0: Mis
1339 0+ sissippi
1340
1341/^ab\n/Ig+
1342Capturing subpattern count = 0
1343Contains explicit CR or LF match
1344Options: anchored
1345No first char
1346No need char
1347    ab\nab\ncd
1348 0: ab\x0a
1349 0+ ab\x0acd
1350
1351/^ab\n/Img+
1352Capturing subpattern count = 0
1353Contains explicit CR or LF match
1354Options: multiline
1355First char at start or follows newline
1356Need char = \x0a
1357    ab\nab\ncd
1358 0: ab\x0a
1359 0+ ab\x0acd
1360 0: ab\x0a
1361 0+ cd
1362
1363/abc/I
1364Capturing subpattern count = 0
1365No options
1366First char = 'a'
1367Need char = 'c'
1368
1369/abc|bac/I
1370Capturing subpattern count = 0
1371No options
1372No first char
1373Need char = 'c'
1374
1375/(abc|bac)/I
1376Capturing subpattern count = 1
1377No options
1378No first char
1379Need char = 'c'
1380
1381/(abc|(c|dc))/I
1382Capturing subpattern count = 2
1383No options
1384No first char
1385Need char = 'c'
1386
1387/(abc|(d|de)c)/I
1388Capturing subpattern count = 2
1389No options
1390No first char
1391Need char = 'c'
1392
1393/a*/I
1394Capturing subpattern count = 0
1395No options
1396No first char
1397No need char
1398
1399/a+/I
1400Capturing subpattern count = 0
1401No options
1402First char = 'a'
1403No need char
1404
1405/(baa|a+)/I
1406Capturing subpattern count = 1
1407No options
1408No first char
1409Need char = 'a'
1410
1411/a{0,3}/I
1412Capturing subpattern count = 0
1413No options
1414No first char
1415No need char
1416
1417/baa{3,}/I
1418Capturing subpattern count = 0
1419No options
1420First char = 'b'
1421Need char = 'a'
1422
1423/"([^\\"]+|\\.)*"/I
1424Capturing subpattern count = 1
1425No options
1426First char = '"'
1427Need char = '"'
1428
1429/(abc|ab[cd])/I
1430Capturing subpattern count = 1
1431No options
1432First char = 'a'
1433No need char
1434
1435/(a|.)/I
1436Capturing subpattern count = 1
1437No options
1438No first char
1439No need char
1440
1441/a|ba|\w/I
1442Capturing subpattern count = 0
1443No options
1444No first char
1445No need char
1446
1447/abc(?=pqr)/I
1448Capturing subpattern count = 0
1449No options
1450First char = 'a'
1451Need char = 'r'
1452
1453/...(?<=abc)/I
1454Capturing subpattern count = 0
1455No options
1456No first char
1457No need char
1458Max lookbehind = 3
1459
1460/abc(?!pqr)/I
1461Capturing subpattern count = 0
1462No options
1463First char = 'a'
1464Need char = 'c'
1465
1466/ab./I
1467Capturing subpattern count = 0
1468No options
1469First char = 'a'
1470Need char = 'b'
1471
1472/ab[xyz]/I
1473Capturing subpattern count = 0
1474No options
1475First char = 'a'
1476Need char = 'b'
1477
1478/abc*/I
1479Capturing subpattern count = 0
1480No options
1481First char = 'a'
1482Need char = 'b'
1483
1484/ab.c*/I
1485Capturing subpattern count = 0
1486No options
1487First char = 'a'
1488Need char = 'b'
1489
1490/a.c*/I
1491Capturing subpattern count = 0
1492No options
1493First char = 'a'
1494No need char
1495
1496/.c*/I
1497Capturing subpattern count = 0
1498No options
1499No first char
1500No need char
1501
1502/ac*/I
1503Capturing subpattern count = 0
1504No options
1505First char = 'a'
1506No need char
1507
1508/(a.c*|b.c*)/I
1509Capturing subpattern count = 1
1510No options
1511No first char
1512No need char
1513
1514/a.c*|aba/I
1515Capturing subpattern count = 0
1516No options
1517First char = 'a'
1518No need char
1519
1520/.+a/I
1521Capturing subpattern count = 0
1522No options
1523No first char
1524Need char = 'a'
1525
1526/(?=abcda)a.*/I
1527Capturing subpattern count = 0
1528No options
1529First char = 'a'
1530Need char = 'a'
1531
1532/(?=a)a.*/I
1533Capturing subpattern count = 0
1534No options
1535First char = 'a'
1536No need char
1537
1538/a(b)*/I
1539Capturing subpattern count = 1
1540No options
1541First char = 'a'
1542No need char
1543
1544/a\d*/I
1545Capturing subpattern count = 0
1546No options
1547First char = 'a'
1548No need char
1549
1550/ab\d*/I
1551Capturing subpattern count = 0
1552No options
1553First char = 'a'
1554Need char = 'b'
1555
1556/a(\d)*/I
1557Capturing subpattern count = 1
1558No options
1559First char = 'a'
1560No need char
1561
1562/abcde{0,0}/I
1563Capturing subpattern count = 0
1564No options
1565First char = 'a'
1566Need char = 'd'
1567
1568/ab\d+/I
1569Capturing subpattern count = 0
1570No options
1571First char = 'a'
1572Need char = 'b'
1573
1574/a(?(1)b)(.)/I
1575Capturing subpattern count = 1
1576No options
1577First char = 'a'
1578No need char
1579
1580/a(?(1)bag|big)(.)/I
1581Capturing subpattern count = 1
1582No options
1583First char = 'a'
1584Need char = 'g'
1585
1586/a(?(1)bag|big)*(.)/I
1587Capturing subpattern count = 1
1588No options
1589First char = 'a'
1590No need char
1591
1592/a(?(1)bag|big)+(.)/I
1593Capturing subpattern count = 1
1594No options
1595First char = 'a'
1596Need char = 'g'
1597
1598/a(?(1)b..|b..)(.)/I
1599Capturing subpattern count = 1
1600No options
1601First char = 'a'
1602Need char = 'b'
1603
1604/ab\d{0}e/I
1605Capturing subpattern count = 0
1606No options
1607First char = 'a'
1608Need char = 'e'
1609
1610/a?b?/I
1611Capturing subpattern count = 0
1612No options
1613No first char
1614No need char
1615    a
1616 0: a
1617    b
1618 0: b
1619    ab
1620 0: ab
1621    \
1622 0:
1623    *** Failers
1624 0:
1625    \N
1626No match
1627
1628/|-/I
1629Capturing subpattern count = 0
1630No options
1631No first char
1632No need char
1633    abcd
1634 0:
1635    -abc
1636 0:
1637    \Nab-c
1638 0: -
1639    *** Failers
1640 0:
1641    \Nabc
1642No match
1643
1644/^.?abcd/IS
1645Capturing subpattern count = 0
1646Options: anchored
1647No first char
1648Need char = 'd'
1649Subject length lower bound = 4
1650No set of starting bytes
1651
1652/\(             # ( at start
1653  (?:           # Non-capturing bracket
1654  (?>[^()]+)    # Either a sequence of non-brackets (no backtracking)
1655  |             # Or
1656  (?R)          # Recurse - i.e. nested bracketed string
1657  )*            # Zero or more contents
1658  \)            # Closing )
1659  /Ix
1660Capturing subpattern count = 0
1661Options: extended
1662First char = '('
1663Need char = ')'
1664    (abcd)
1665 0: (abcd)
1666    (abcd)xyz
1667 0: (abcd)
1668    xyz(abcd)
1669 0: (abcd)
1670    (ab(xy)cd)pqr
1671 0: (ab(xy)cd)
1672    (ab(xycd)pqr
1673 0: (xycd)
1674    () abc ()
1675 0: ()
1676    12(abcde(fsh)xyz(foo(bar))lmno)89
1677 0: (abcde(fsh)xyz(foo(bar))lmno)
1678    *** Failers
1679No match
1680    abcd
1681No match
1682    abcd)
1683No match
1684    (abcd
1685No match
1686
1687/\(  ( (?>[^()]+) | (?R) )* \) /Ixg
1688Capturing subpattern count = 1
1689Options: extended
1690First char = '('
1691Need char = ')'
1692    (ab(xy)cd)pqr
1693 0: (ab(xy)cd)
1694 1: cd
1695    1(abcd)(x(y)z)pqr
1696 0: (abcd)
1697 1: abcd
1698 0: (x(y)z)
1699 1: z
1700
1701/\(  (?: (?>[^()]+) | (?R) ) \) /Ix
1702Capturing subpattern count = 0
1703Options: extended
1704First char = '('
1705Need char = ')'
1706    (abcd)
1707 0: (abcd)
1708    (ab(xy)cd)
1709 0: (xy)
1710    (a(b(c)d)e)
1711 0: (c)
1712    ((ab))
1713 0: ((ab))
1714    *** Failers
1715No match
1716    ()
1717No match
1718
1719/\(  (?: (?>[^()]+) | (?R) )? \) /Ix
1720Capturing subpattern count = 0
1721Options: extended
1722First char = '('
1723Need char = ')'
1724    ()
1725 0: ()
1726    12(abcde(fsh)xyz(foo(bar))lmno)89
1727 0: (fsh)
1728
1729/\(  ( (?>[^()]+) | (?R) )* \) /Ix
1730Capturing subpattern count = 1
1731Options: extended
1732First char = '('
1733Need char = ')'
1734    (ab(xy)cd)
1735 0: (ab(xy)cd)
1736 1: cd
1737
1738/\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
1739Capturing subpattern count = 2
1740Options: extended
1741First char = '('
1742Need char = ')'
1743    (ab(xy)cd)
1744 0: (ab(xy)cd)
1745 1: ab(xy)cd
1746 2: cd
1747
1748/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
1749Capturing subpattern count = 3
1750Options: extended
1751First char = '('
1752Need char = ')'
1753    (ab(xy)cd)
1754 0: (ab(xy)cd)
1755 1: <unset>
1756 2: ab(xy)cd
1757 3: cd
1758    (123ab(xy)cd)
1759 0: (123ab(xy)cd)
1760 1: 123
1761 2: ab(xy)cd
1762 3: cd
1763
1764/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
1765Capturing subpattern count = 3
1766Options: extended
1767First char = '('
1768Need char = ')'
1769    (ab(xy)cd)
1770 0: (ab(xy)cd)
1771 1: ab(xy)cd
1772 2: <unset>
1773 3: cd
1774    (123ab(xy)cd)
1775 0: (123ab(xy)cd)
1776 1: 123ab(xy)cd
1777 2: 123
1778 3: cd
1779
1780/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
1781Capturing subpattern count = 11
1782Options: extended
1783First char = '('
1784Need char = ')'
1785    (ab(xy)cd)
1786 0: (ab(xy)cd)
1787 1: ab(xy)cd
1788 2: ab(xy)cd
1789 3: ab(xy)cd
1790 4: ab(xy)cd
1791 5: ab(xy)cd
1792 6: ab(xy)cd
1793 7: ab(xy)cd
1794 8: ab(xy)cd
1795 9: ab(xy)cd
179610: ab(xy)cd
179711: cd
1798
1799/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
1800Capturing subpattern count = 3
1801Options: extended
1802First char = '('
1803Need char = ')'
1804    (abcd(xyz<p>qrs)123)
1805 0: (abcd(xyz<p>qrs)123)
1806 1: abcd(xyz<p>qrs)123
1807 2: 123
1808
1809/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
1810Capturing subpattern count = 3
1811Options: extended
1812First char = '('
1813Need char = ')'
1814    (ab(cd)ef)
1815 0: (ab(cd)ef)
1816 1: ab(cd)ef
1817 2: ef
1818 3: (cd)
1819    (ab(cd(ef)gh)ij)
1820 0: (ab(cd(ef)gh)ij)
1821 1: ab(cd(ef)gh)ij
1822 2: ij
1823 3: (cd(ef)gh)
1824
1825/^[[:alnum:]]/DZ
1826------------------------------------------------------------------
1827        Bra
1828        ^
1829        [0-9A-Za-z]
1830        Ket
1831        End
1832------------------------------------------------------------------
1833Capturing subpattern count = 0
1834Options: anchored
1835No first char
1836No need char
1837
1838/^[[:^alnum:]]/DZ
1839------------------------------------------------------------------
1840        Bra
1841        ^
1842        [\x00-/:-@[-`{-\xff] (neg)
1843        Ket
1844        End
1845------------------------------------------------------------------
1846Capturing subpattern count = 0
1847Options: anchored
1848No first char
1849No need char
1850
1851/^[[:alpha:]]/DZ
1852------------------------------------------------------------------
1853        Bra
1854        ^
1855        [A-Za-z]
1856        Ket
1857        End
1858------------------------------------------------------------------
1859Capturing subpattern count = 0
1860Options: anchored
1861No first char
1862No need char
1863
1864/^[[:^alpha:]]/DZ
1865------------------------------------------------------------------
1866        Bra
1867        ^
1868        [\x00-@[-`{-\xff] (neg)
1869        Ket
1870        End
1871------------------------------------------------------------------
1872Capturing subpattern count = 0
1873Options: anchored
1874No first char
1875No need char
1876
1877/[_[:alpha:]]/IS
1878Capturing subpattern count = 0
1879No options
1880No first char
1881No need char
1882Subject length lower bound = 1
1883Starting byte set: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
1884  _ a b c d e f g h i j k l m n o p q r s t u v w x y z
1885
1886/^[[:ascii:]]/DZ
1887------------------------------------------------------------------
1888        Bra
1889        ^
1890        [\x00-\x7f]
1891        Ket
1892        End
1893------------------------------------------------------------------
1894Capturing subpattern count = 0
1895Options: anchored
1896No first char
1897No need char
1898
1899/^[[:^ascii:]]/DZ
1900------------------------------------------------------------------
1901        Bra
1902        ^
1903        [\x80-\xff] (neg)
1904        Ket
1905        End
1906------------------------------------------------------------------
1907Capturing subpattern count = 0
1908Options: anchored
1909No first char
1910No need char
1911
1912/^[[:blank:]]/DZ
1913------------------------------------------------------------------
1914        Bra
1915        ^
1916        [\x09 ]
1917        Ket
1918        End
1919------------------------------------------------------------------
1920Capturing subpattern count = 0
1921Options: anchored
1922No first char
1923No need char
1924
1925/^[[:^blank:]]/DZ
1926------------------------------------------------------------------
1927        Bra
1928        ^
1929        [\x00-\x08\x0a-\x1f!-\xff] (neg)
1930        Ket
1931        End
1932------------------------------------------------------------------
1933Capturing subpattern count = 0
1934Options: anchored
1935No first char
1936No need char
1937
1938/[\n\x0b\x0c\x0d[:blank:]]/IS
1939Capturing subpattern count = 0
1940Contains explicit CR or LF match
1941No options
1942No first char
1943No need char
1944Subject length lower bound = 1
1945Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
1946
1947/^[[:cntrl:]]/DZ
1948------------------------------------------------------------------
1949        Bra
1950        ^
1951        [\x00-\x1f\x7f]
1952        Ket
1953        End
1954------------------------------------------------------------------
1955Capturing subpattern count = 0
1956Options: anchored
1957No first char
1958No need char
1959
1960/^[[:digit:]]/DZ
1961------------------------------------------------------------------
1962        Bra
1963        ^
1964        [0-9]
1965        Ket
1966        End
1967------------------------------------------------------------------
1968Capturing subpattern count = 0
1969Options: anchored
1970No first char
1971No need char
1972
1973/^[[:graph:]]/DZ
1974------------------------------------------------------------------
1975        Bra
1976        ^
1977        [!-~]
1978        Ket
1979        End
1980------------------------------------------------------------------
1981Capturing subpattern count = 0
1982Options: anchored
1983No first char
1984No need char
1985
1986/^[[:lower:]]/DZ
1987------------------------------------------------------------------
1988        Bra
1989        ^
1990        [a-z]
1991        Ket
1992        End
1993------------------------------------------------------------------
1994Capturing subpattern count = 0
1995Options: anchored
1996No first char
1997No need char
1998
1999/^[[:print:]]/DZ
2000------------------------------------------------------------------
2001        Bra
2002        ^
2003        [ -~]
2004        Ket
2005        End
2006------------------------------------------------------------------
2007Capturing subpattern count = 0
2008Options: anchored
2009No first char
2010No need char
2011
2012/^[[:punct:]]/DZ
2013------------------------------------------------------------------
2014        Bra
2015        ^
2016        [!-/:-@[-`{-~]
2017        Ket
2018        End
2019------------------------------------------------------------------
2020Capturing subpattern count = 0
2021Options: anchored
2022No first char
2023No need char
2024
2025/^[[:space:]]/DZ
2026------------------------------------------------------------------
2027        Bra
2028        ^
2029        [\x09-\x0d ]
2030        Ket
2031        End
2032------------------------------------------------------------------
2033Capturing subpattern count = 0
2034Options: anchored
2035No first char
2036No need char
2037
2038/^[[:upper:]]/DZ
2039------------------------------------------------------------------
2040        Bra
2041        ^
2042        [A-Z]
2043        Ket
2044        End
2045------------------------------------------------------------------
2046Capturing subpattern count = 0
2047Options: anchored
2048No first char
2049No need char
2050
2051/^[[:xdigit:]]/DZ
2052------------------------------------------------------------------
2053        Bra
2054        ^
2055        [0-9A-Fa-f]
2056        Ket
2057        End
2058------------------------------------------------------------------
2059Capturing subpattern count = 0
2060Options: anchored
2061No first char
2062No need char
2063
2064/^[[:word:]]/DZ
2065------------------------------------------------------------------
2066        Bra
2067        ^
2068        [0-9A-Z_a-z]
2069        Ket
2070        End
2071------------------------------------------------------------------
2072Capturing subpattern count = 0
2073Options: anchored
2074No first char
2075No need char
2076
2077/^[[:^cntrl:]]/DZ
2078------------------------------------------------------------------
2079        Bra
2080        ^
2081        [ -~\x80-\xff] (neg)
2082        Ket
2083        End
2084------------------------------------------------------------------
2085Capturing subpattern count = 0
2086Options: anchored
2087No first char
2088No need char
2089
2090/^[12[:^digit:]]/DZ
2091------------------------------------------------------------------
2092        Bra
2093        ^
2094        [\x00-/12:-\xff] (neg)
2095        Ket
2096        End
2097------------------------------------------------------------------
2098Capturing subpattern count = 0
2099Options: anchored
2100No first char
2101No need char
2102
2103/^[[:^blank:]]/DZ
2104------------------------------------------------------------------
2105        Bra
2106        ^
2107        [\x00-\x08\x0a-\x1f!-\xff] (neg)
2108        Ket
2109        End
2110------------------------------------------------------------------
2111Capturing subpattern count = 0
2112Options: anchored
2113No first char
2114No need char
2115
2116/[01[:alpha:]%]/DZ
2117------------------------------------------------------------------
2118        Bra
2119        [%01A-Za-z]
2120        Ket
2121        End
2122------------------------------------------------------------------
2123Capturing subpattern count = 0
2124No options
2125No first char
2126No need char
2127
2128/[[.ch.]]/I
2129Failed: POSIX collating elements are not supported at offset 1
2130
2131/[[=ch=]]/I
2132Failed: POSIX collating elements are not supported at offset 1
2133
2134/[[:rhubarb:]]/I
2135Failed: unknown POSIX class name at offset 3
2136
2137/[[:upper:]]/Ii
2138Capturing subpattern count = 0
2139Options: caseless
2140No first char
2141No need char
2142    A
2143 0: A
2144    a
2145 0: a
2146
2147/[[:lower:]]/Ii
2148Capturing subpattern count = 0
2149Options: caseless
2150No first char
2151No need char
2152    A
2153 0: A
2154    a
2155 0: a
2156
2157/((?-i)[[:lower:]])[[:lower:]]/Ii
2158Capturing subpattern count = 1
2159Options: caseless
2160No first char
2161No need char
2162    ab
2163 0: ab
2164 1: a
2165    aB
2166 0: aB
2167 1: a
2168    *** Failers
2169 0: ai
2170 1: a
2171    Ab
2172No match
2173    AB
2174No match
2175
2176/[\200-\110]/I
2177Failed: range out of order in character class at offset 9
2178
2179/^(?(0)f|b)oo/I
2180Failed: invalid condition (?(0) at offset 6
2181
2182/This one's here because of the large output vector needed/I
2183Capturing subpattern count = 0
2184No options
2185First char = 'T'
2186Need char = 'd'
2187
2188/(\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|$))(\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|$))(\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|$))(\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|$))(\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
2189Capturing subpattern count = 271
2190Max back reference = 270
2191No options
2192No first char
2193No need char
2194    \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
2195 0: 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
2196 1: 1
2197 2: 2
2198 3: 3
2199 4: 4
2200 5: 5
2201 6: 6
2202 7: 7
2203 8: 8
2204 9: 9
220510: 10
220611: 11
220712: 12
220813: 13
220914: 14
221015: 15
221116: 16
221217: 17
221318: 18
221419: 19
221520: 20
221621: 21
221722: 22
221823: 23
221924: 24
222025: 25
222126: 26
222227: 27
222328: 28
222429: 29
222530: 30
222631: 31
222732: 32
222833: 33
222934: 34
223035: 35
223136: 36
223237: 37
223338: 38
223439: 39
223540: 40
223641: 41
223742: 42
223843: 43
223944: 44
224045: 45
224146: 46
224247: 47
224348: 48
224449: 49
224550: 50
224651: 51
224752: 52
224853: 53
224954: 54
225055: 55
225156: 56
225257: 57
225358: 58
225459: 59
225560: 60
225661: 61
225762: 62
225863: 63
225964: 64
226065: 65
226166: 66
226267: 67
226368: 68
226469: 69
226570: 70
226671: 71
226772: 72
226873: 73
226974: 74
227075: 75
227176: 76
227277: 77
227378: 78
227479: 79
227580: 80
227681: 81
227782: 82
227883: 83
227984: 84
228085: 85
228186: 86
228287: 87
228388: 88
228489: 89
228590: 90
228691: 91
228792: 92
228893: 93
228994: 94
229095: 95
229196: 96
229297: 97
229398: 98
229499: 99
2295100: 100
2296101: 101
2297102: 102
2298103: 103
2299104: 104
2300105: 105
2301106: 106
2302107: 107
2303108: 108
2304109: 109
2305110: 110
2306111: 111
2307112: 112
2308113: 113
2309114: 114
2310115: 115
2311116: 116
2312117: 117
2313118: 118
2314119: 119
2315120: 120
2316121: 121
2317122: 122
2318123: 123
2319124: 124
2320125: 125
2321126: 126
2322127: 127
2323128: 128
2324129: 129
2325130: 130
2326131: 131
2327132: 132
2328133: 133
2329134: 134
2330135: 135
2331136: 136
2332137: 137
2333138: 138
2334139: 139
2335140: 140
2336141: 141
2337142: 142
2338143: 143
2339144: 144
2340145: 145
2341146: 146
2342147: 147
2343148: 148
2344149: 149
2345150: 150
2346151: 151
2347152: 152
2348153: 153
2349154: 154
2350155: 155
2351156: 156
2352157: 157
2353158: 158
2354159: 159
2355160: 160
2356161: 161
2357162: 162
2358163: 163
2359164: 164
2360165: 165
2361166: 166
2362167: 167
2363168: 168
2364169: 169
2365170: 170
2366171: 171
2367172: 172
2368173: 173
2369174: 174
2370175: 175
2371176: 176
2372177: 177
2373178: 178
2374179: 179
2375180: 180
2376181: 181
2377182: 182
2378183: 183
2379184: 184
2380185: 185
2381186: 186
2382187: 187
2383188: 188
2384189: 189
2385190: 190
2386191: 191
2387192: 192
2388193: 193
2389194: 194
2390195: 195
2391196: 196
2392197: 197
2393198: 198
2394199: 199
2395200: 200
2396201: 201
2397202: 202
2398203: 203
2399204: 204
2400205: 205
2401206: 206
2402207: 207
2403208: 208
2404209: 209
2405210: 210
2406211: 211
2407212: 212
2408213: 213
2409214: 214
2410215: 215
2411216: 216
2412217: 217
2413218: 218
2414219: 219
2415220: 220
2416221: 221
2417222: 222
2418223: 223
2419224: 224
2420225: 225
2421226: 226
2422227: 227
2423228: 228
2424229: 229
2425230: 230
2426231: 231
2427232: 232
2428233: 233
2429234: 234
2430235: 235
2431236: 236
2432237: 237
2433238: 238
2434239: 239
2435240: 240
2436241: 241
2437242: 242
2438243: 243
2439244: 244
2440245: 245
2441246: 246
2442247: 247
2443248: 248
2444249: 249
2445250: 250
2446251: 251
2447252: 252
2448253: 253
2449254: 254
2450255: 255
2451256: 256
2452257: 257
2453258: 258
2454259: 259
2455260: 260
2456261: 261
2457262: 262
2458263: 263
2459264: 264
2460265: 265
2461266: 266
2462267: 267
2463268: 268
2464269: 269
2465270: ABC
2466271: ABC
2467
2468/This one's here because Perl does this differently and PCRE can't at present/I
2469Capturing subpattern count = 0
2470No options
2471First char = 'T'
2472Need char = 't'
2473
2474/(main(O)?)+/I
2475Capturing subpattern count = 2
2476No options
2477First char = 'm'
2478Need char = 'n'
2479    mainmain
2480 0: mainmain
2481 1: main
2482    mainOmain
2483 0: mainOmain
2484 1: main
2485 2: O
2486
2487/These are all cases where Perl does it differently (nested captures)/I
2488Capturing subpattern count = 1
2489No options
2490First char = 'T'
2491Need char = 's'
2492
2493/^(a(b)?)+$/I
2494Capturing subpattern count = 2
2495Options: anchored
2496No first char
2497No need char
2498    aba
2499 0: aba
2500 1: a
2501 2: b
2502
2503/^(aa(bb)?)+$/I
2504Capturing subpattern count = 2
2505Options: anchored
2506No first char
2507No need char
2508    aabbaa
2509 0: aabbaa
2510 1: aa
2511 2: bb
2512
2513/^(aa|aa(bb))+$/I
2514Capturing subpattern count = 2
2515Options: anchored
2516No first char
2517No need char
2518    aabbaa
2519 0: aabbaa
2520 1: aa
2521 2: bb
2522
2523/^(aa(bb)??)+$/I
2524Capturing subpattern count = 2
2525Options: anchored
2526No first char
2527No need char
2528    aabbaa
2529 0: aabbaa
2530 1: aa
2531 2: bb
2532
2533/^(?:aa(bb)?)+$/I
2534Capturing subpattern count = 1
2535Options: anchored
2536No first char
2537No need char
2538    aabbaa
2539 0: aabbaa
2540 1: bb
2541
2542/^(aa(b(b))?)+$/I
2543Capturing subpattern count = 3
2544Options: anchored
2545No first char
2546No need char
2547    aabbaa
2548 0: aabbaa
2549 1: aa
2550 2: bb
2551 3: b
2552
2553/^(?:aa(b(b))?)+$/I
2554Capturing subpattern count = 2
2555Options: anchored
2556No first char
2557No need char
2558    aabbaa
2559 0: aabbaa
2560 1: bb
2561 2: b
2562
2563/^(?:aa(b(?:b))?)+$/I
2564Capturing subpattern count = 1
2565Options: anchored
2566No first char
2567No need char
2568    aabbaa
2569 0: aabbaa
2570 1: bb
2571
2572/^(?:aa(bb(?:b))?)+$/I
2573Capturing subpattern count = 1
2574Options: anchored
2575No first char
2576No need char
2577    aabbbaa
2578 0: aabbbaa
2579 1: bbb
2580
2581/^(?:aa(b(?:bb))?)+$/I
2582Capturing subpattern count = 1
2583Options: anchored
2584No first char
2585No need char
2586    aabbbaa
2587 0: aabbbaa
2588 1: bbb
2589
2590/^(?:aa(?:b(b))?)+$/I
2591Capturing subpattern count = 1
2592Options: anchored
2593No first char
2594No need char
2595    aabbaa
2596 0: aabbaa
2597 1: b
2598
2599/^(?:aa(?:b(bb))?)+$/I
2600Capturing subpattern count = 1
2601Options: anchored
2602No first char
2603No need char
2604    aabbbaa
2605 0: aabbbaa
2606 1: bb
2607
2608/^(aa(b(bb))?)+$/I
2609Capturing subpattern count = 3
2610Options: anchored
2611No first char
2612No need char
2613    aabbbaa
2614 0: aabbbaa
2615 1: aa
2616 2: bbb
2617 3: bb
2618
2619/^(aa(bb(bb))?)+$/I
2620Capturing subpattern count = 3
2621Options: anchored
2622No first char
2623No need char
2624    aabbbbaa
2625 0: aabbbbaa
2626 1: aa
2627 2: bbbb
2628 3: bb
2629
2630/--------------------------------------------------------------------/I
2631Capturing subpattern count = 0
2632No options
2633First char = '-'
2634Need char = '-'
2635
2636/#/IxDZ
2637------------------------------------------------------------------
2638        Bra
2639        Ket
2640        End
2641------------------------------------------------------------------
2642Capturing subpattern count = 0
2643Options: extended
2644No first char
2645No need char
2646
2647/a#/IxDZ
2648------------------------------------------------------------------
2649        Bra
2650        a
2651        Ket
2652        End
2653------------------------------------------------------------------
2654Capturing subpattern count = 0
2655Options: extended
2656First char = 'a'
2657No need char
2658
2659/[\s]/DZ
2660------------------------------------------------------------------
2661        Bra
2662        [\x09\x0a\x0c\x0d ]
2663        Ket
2664        End
2665------------------------------------------------------------------
2666Capturing subpattern count = 0
2667No options
2668No first char
2669No need char
2670
2671/[\S]/DZ
2672------------------------------------------------------------------
2673        Bra
2674        [\x00-\x08\x0b\x0e-\x1f!-\xff] (neg)
2675        Ket
2676        End
2677------------------------------------------------------------------
2678Capturing subpattern count = 0
2679No options
2680No first char
2681No need char
2682
2683/a(?i)b/DZ
2684------------------------------------------------------------------
2685        Bra
2686        a
2687     /i b
2688        Ket
2689        End
2690------------------------------------------------------------------
2691Capturing subpattern count = 0
2692No options
2693First char = 'a'
2694Need char = 'b' (caseless)
2695    ab
2696 0: ab
2697    aB
2698 0: aB
2699    *** Failers
2700No match
2701    AB
2702No match
2703
2704/(a(?i)b)/DZ
2705------------------------------------------------------------------
2706        Bra
2707        CBra 1
2708        a
2709     /i b
2710        Ket
2711        Ket
2712        End
2713------------------------------------------------------------------
2714Capturing subpattern count = 1
2715No options
2716First char = 'a'
2717Need char = 'b' (caseless)
2718    ab
2719 0: ab
2720 1: ab
2721    aB
2722 0: aB
2723 1: aB
2724    *** Failers
2725No match
2726    AB
2727No match
2728
2729/   (?i)abc/IxDZ
2730------------------------------------------------------------------
2731        Bra
2732     /i abc
2733        Ket
2734        End
2735------------------------------------------------------------------
2736Capturing subpattern count = 0
2737Options: caseless extended
2738First char = 'a' (caseless)
2739Need char = 'c' (caseless)
2740
2741/#this is a comment
2742  (?i)abc/IxDZ
2743------------------------------------------------------------------
2744        Bra
2745     /i abc
2746        Ket
2747        End
2748------------------------------------------------------------------
2749Capturing subpattern count = 0
2750Options: caseless extended
2751First char = 'a' (caseless)
2752Need char = 'c' (caseless)
2753
2754/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
2755------------------------------------------------------------------
2756        Bra
2757        123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2758        Ket
2759        End
2760------------------------------------------------------------------
2761Capturing subpattern count = 0
2762No options
2763First char = '1'
2764Need char = '0'
2765
2766/\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
2767------------------------------------------------------------------
2768        Bra
2769        123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2770        Ket
2771        End
2772------------------------------------------------------------------
2773Capturing subpattern count = 0
2774No options
2775First char = '1'
2776Need char = '0'
2777
2778/\Q\E/DZ
2779------------------------------------------------------------------
2780        Bra
2781        Ket
2782        End
2783------------------------------------------------------------------
2784Capturing subpattern count = 0
2785No options
2786No first char
2787No need char
2788    \
2789 0:
2790
2791/\Q\Ex/DZ
2792------------------------------------------------------------------
2793        Bra
2794        x
2795        Ket
2796        End
2797------------------------------------------------------------------
2798Capturing subpattern count = 0
2799No options
2800First char = 'x'
2801No need char
2802
2803/ \Q\E/DZ
2804------------------------------------------------------------------
2805        Bra
2806
2807        Ket
2808        End
2809------------------------------------------------------------------
2810Capturing subpattern count = 0
2811No options
2812First char = ' '
2813No need char
2814
2815/a\Q\E/DZ
2816------------------------------------------------------------------
2817        Bra
2818        a
2819        Ket
2820        End
2821------------------------------------------------------------------
2822Capturing subpattern count = 0
2823No options
2824First char = 'a'
2825No need char
2826  abc
2827 0: a
2828  bca
2829 0: a
2830  bac
2831 0: a
2832
2833/a\Q\Eb/DZ
2834------------------------------------------------------------------
2835        Bra
2836        ab
2837        Ket
2838        End
2839------------------------------------------------------------------
2840Capturing subpattern count = 0
2841No options
2842First char = 'a'
2843Need char = 'b'
2844  abc
2845 0: ab
2846
2847/\Q\Eabc/DZ
2848------------------------------------------------------------------
2849        Bra
2850        abc
2851        Ket
2852        End
2853------------------------------------------------------------------
2854Capturing subpattern count = 0
2855No options
2856First char = 'a'
2857Need char = 'c'
2858
2859/x*+\w/DZ
2860------------------------------------------------------------------
2861        Bra
2862        x*+
2863        \w
2864        Ket
2865        End
2866------------------------------------------------------------------
2867Capturing subpattern count = 0
2868No options
2869No first char
2870No need char
2871    *** Failers
2872 0: F
2873    xxxxx
2874No match
2875
2876/x?+/DZ
2877------------------------------------------------------------------
2878        Bra
2879        x?+
2880        Ket
2881        End
2882------------------------------------------------------------------
2883Capturing subpattern count = 0
2884No options
2885No first char
2886No need char
2887
2888/x++/DZ
2889------------------------------------------------------------------
2890        Bra
2891        x++
2892        Ket
2893        End
2894------------------------------------------------------------------
2895Capturing subpattern count = 0
2896No options
2897First char = 'x'
2898No need char
2899
2900/x{1,3}+/DZ
2901------------------------------------------------------------------
2902        Bra
2903        Once
2904        x
2905        x{0,2}
2906        Ket
2907        Ket
2908        End
2909------------------------------------------------------------------
2910Capturing subpattern count = 0
2911No options
2912First char = 'x'
2913No need char
2914
2915/(x)*+/DZ
2916------------------------------------------------------------------
2917        Bra
2918        Braposzero
2919        CBraPos 1
2920        x
2921        KetRpos
2922        Ket
2923        End
2924------------------------------------------------------------------
2925Capturing subpattern count = 1
2926No options
2927No first char
2928No need char
2929
2930/^(\w++|\s++)*$/I
2931Capturing subpattern count = 1
2932Options: anchored
2933No first char
2934No need char
2935    now is the time for all good men to come to the aid of the party
2936 0: now is the time for all good men to come to the aid of the party
2937 1: party
2938    *** Failers
2939No match
2940    this is not a line with only words and spaces!
2941No match
2942
2943/(\d++)(\w)/I
2944Capturing subpattern count = 2
2945No options
2946No first char
2947No need char
2948    12345a
2949 0: 12345a
2950 1: 12345
2951 2: a
2952    *** Failers
2953No match
2954    12345+
2955No match
2956
2957/a++b/I
2958Capturing subpattern count = 0
2959No options
2960First char = 'a'
2961Need char = 'b'
2962    aaab
2963 0: aaab
2964
2965/(a++b)/I
2966Capturing subpattern count = 1
2967No options
2968First char = 'a'
2969Need char = 'b'
2970    aaab
2971 0: aaab
2972 1: aaab
2973
2974/(a++)b/I
2975Capturing subpattern count = 1
2976No options
2977First char = 'a'
2978Need char = 'b'
2979    aaab
2980 0: aaab
2981 1: aaa
2982
2983/([^()]++|\([^()]*\))+/I
2984Capturing subpattern count = 1
2985No options
2986No first char
2987No need char
2988    ((abc(ade)ufh()()x
2989 0: abc(ade)ufh()()x
2990 1: x
2991
2992/\(([^()]++|\([^()]+\))+\)/I
2993Capturing subpattern count = 1
2994No options
2995First char = '('
2996Need char = ')'
2997    (abc)
2998 0: (abc)
2999 1: abc
3000    (abc(def)xyz)
3001 0: (abc(def)xyz)
3002 1: xyz
3003    *** Failers
3004No match
3005    ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3006No match
3007
3008/(abc){1,3}+/DZ
3009------------------------------------------------------------------
3010        Bra
3011        Once
3012        CBra 1
3013        abc
3014        Ket
3015        Brazero
3016        Bra
3017        CBra 1
3018        abc
3019        Ket
3020        Brazero
3021        CBra 1
3022        abc
3023        Ket
3024        Ket
3025        Ket
3026        Ket
3027        End
3028------------------------------------------------------------------
3029Capturing subpattern count = 1
3030No options
3031First char = 'a'
3032Need char = 'c'
3033
3034/a+?+/I
3035Failed: nothing to repeat at offset 3
3036
3037/a{2,3}?+b/I
3038Failed: nothing to repeat at offset 7
3039
3040/(?U)a+?+/I
3041Failed: nothing to repeat at offset 7
3042
3043/a{2,3}?+b/IU
3044Failed: nothing to repeat at offset 7
3045
3046/x(?U)a++b/DZ
3047------------------------------------------------------------------
3048        Bra
3049        x
3050        a++
3051        b
3052        Ket
3053        End
3054------------------------------------------------------------------
3055Capturing subpattern count = 0
3056No options
3057First char = 'x'
3058Need char = 'b'
3059    xaaaab
3060 0: xaaaab
3061
3062/(?U)xa++b/DZ
3063------------------------------------------------------------------
3064        Bra
3065        x
3066        a++
3067        b
3068        Ket
3069        End
3070------------------------------------------------------------------
3071Capturing subpattern count = 0
3072Options: ungreedy
3073First char = 'x'
3074Need char = 'b'
3075    xaaaab
3076 0: xaaaab
3077
3078/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
3079------------------------------------------------------------------
3080        Bra
3081        ^
3082        CBra 1
3083        CBra 2
3084        a+
3085        Ket
3086        CBra 3
3087        [ab]+?
3088        Ket
3089        CBra 4
3090        [bc]+
3091        Ket
3092        CBra 5
3093        \w*
3094        Ket
3095        Ket
3096        Ket
3097        End
3098------------------------------------------------------------------
3099Capturing subpattern count = 5
3100Options: anchored
3101No first char
3102No need char
3103
3104/^x(?U)a+b/DZ
3105------------------------------------------------------------------
3106        Bra
3107        ^
3108        x
3109        a++
3110        b
3111        Ket
3112        End
3113------------------------------------------------------------------
3114Capturing subpattern count = 0
3115Options: anchored
3116No first char
3117Need char = 'b'
3118
3119/^x(?U)(a+)b/DZ
3120------------------------------------------------------------------
3121        Bra
3122        ^
3123        x
3124        CBra 1
3125        a+?
3126        Ket
3127        b
3128        Ket
3129        End
3130------------------------------------------------------------------
3131Capturing subpattern count = 1
3132Options: anchored
3133No first char
3134Need char = 'b'
3135
3136/[.x.]/I
3137Failed: POSIX collating elements are not supported at offset 0
3138
3139/[=x=]/I
3140Failed: POSIX collating elements are not supported at offset 0
3141
3142/[:x:]/I
3143Failed: POSIX named classes are supported only within a class at offset 0
3144
3145/\l/I
3146Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3147
3148/\L/I
3149Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3150
3151/\N{name}/I
3152Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3153
3154/\u/I
3155Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3156
3157/\U/I
3158Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3159
3160/[/I
3161Failed: missing terminating ] for character class at offset 1
3162
3163/[a-/I
3164Failed: missing terminating ] for character class at offset 3
3165
3166/[[:space:]/I
3167Failed: missing terminating ] for character class at offset 10
3168
3169/[\s]/IDZ
3170------------------------------------------------------------------
3171        Bra
3172        [\x09\x0a\x0c\x0d ]
3173        Ket
3174        End
3175------------------------------------------------------------------
3176Capturing subpattern count = 0
3177No options
3178No first char
3179No need char
3180
3181/[[:space:]]/IDZ
3182------------------------------------------------------------------
3183        Bra
3184        [\x09-\x0d ]
3185        Ket
3186        End
3187------------------------------------------------------------------
3188Capturing subpattern count = 0
3189No options
3190No first char
3191No need char
3192
3193/[[:space:]abcde]/IDZ
3194------------------------------------------------------------------
3195        Bra
3196        [\x09-\x0d a-e]
3197        Ket
3198        End
3199------------------------------------------------------------------
3200Capturing subpattern count = 0
3201No options
3202No first char
3203No need char
3204
3205/< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/Ix
3206Capturing subpattern count = 0
3207Options: extended
3208First char = '<'
3209Need char = '>'
3210    <>
3211 0: <>
3212    <abcd>
3213 0: <abcd>
3214    <abc <123> hij>
3215 0: <abc <123> hij>
3216    <abc <def> hij>
3217 0: <def>
3218    <abc<>def>
3219 0: <abc<>def>
3220    <abc<>
3221 0: <>
3222    *** Failers
3223No match
3224    <abc
3225No match
3226
3227|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\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*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
3228------------------------------------------------------------------
3229        Bra
3230        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$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*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
3231        \b
3232        Ket
3233        End
3234------------------------------------------------------------------
3235Capturing subpattern count = 0
3236No options
3237First char = '8'
3238Need char = 'X'
3239Max lookbehind = 1
3240
3241|\$\<\.X\+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\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*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
3242------------------------------------------------------------------
3243        Bra
3244        $<.X+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$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*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
3245        \b
3246        Ket
3247        End
3248------------------------------------------------------------------
3249Capturing subpattern count = 0
3250No options
3251First char = '$'
3252Need char = 'X'
3253Max lookbehind = 1
3254
3255/(.*)\d+\1/I
3256Capturing subpattern count = 1
3257Max back reference = 1
3258No options
3259No first char
3260No need char
3261
3262/(.*)\d+/I
3263Capturing subpattern count = 1
3264No options
3265First char at start or follows newline
3266No need char
3267
3268/(.*)\d+\1/Is
3269Capturing subpattern count = 1
3270Max back reference = 1
3271Options: dotall
3272No first char
3273No need char
3274
3275/(.*)\d+/Is
3276Capturing subpattern count = 1
3277Options: anchored dotall
3278No first char
3279No need char
3280
3281/(.*(xyz))\d+\2/I
3282Capturing subpattern count = 2
3283Max back reference = 2
3284No options
3285First char at start or follows newline
3286Need char = 'z'
3287
3288/((.*))\d+\1/I
3289Capturing subpattern count = 2
3290Max back reference = 1
3291No options
3292No first char
3293No need char
3294    abc123bc
3295 0: bc123bc
3296 1: bc
3297 2: bc
3298
3299/a[b]/I
3300Capturing subpattern count = 0
3301No options
3302First char = 'a'
3303Need char = 'b'
3304
3305/(?=a).*/I
3306Capturing subpattern count = 0
3307No options
3308First char = 'a'
3309No need char
3310
3311/(?=abc).xyz/IiI
3312Capturing subpattern count = 0
3313Options: caseless
3314First char = 'a' (caseless)
3315Need char = 'z' (caseless)
3316
3317/(?=abc)(?i).xyz/I
3318Capturing subpattern count = 0
3319No options
3320First char = 'a'
3321Need char = 'z' (caseless)
3322
3323/(?=a)(?=b)/I
3324Capturing subpattern count = 0
3325No options
3326First char = 'a'
3327No need char
3328
3329/(?=.)a/I
3330Capturing subpattern count = 0
3331No options
3332First char = 'a'
3333No need char
3334
3335/((?=abcda)a)/I
3336Capturing subpattern count = 1
3337No options
3338First char = 'a'
3339Need char = 'a'
3340
3341/((?=abcda)ab)/I
3342Capturing subpattern count = 1
3343No options
3344First char = 'a'
3345Need char = 'b'
3346
3347/()a/I
3348Capturing subpattern count = 1
3349No options
3350No first char
3351Need char = 'a'
3352
3353/(?(1)ab|ac)(.)/I
3354Capturing subpattern count = 1
3355No options
3356First char = 'a'
3357No need char
3358
3359/(?(1)abz|acz)(.)/I
3360Capturing subpattern count = 1
3361No options
3362First char = 'a'
3363Need char = 'z'
3364
3365/(?(1)abz)(.)/I
3366Capturing subpattern count = 1
3367No options
3368No first char
3369No need char
3370
3371/(?(1)abz)(1)23/I
3372Capturing subpattern count = 1
3373No options
3374No first char
3375Need char = '3'
3376
3377/(a)+/I
3378Capturing subpattern count = 1
3379No options
3380First char = 'a'
3381No need char
3382
3383/(a){2,3}/I
3384Capturing subpattern count = 1
3385No options
3386First char = 'a'
3387Need char = 'a'
3388
3389/(a)*/I
3390Capturing subpattern count = 1
3391No options
3392No first char
3393No need char
3394
3395/[a]/I
3396Capturing subpattern count = 0
3397No options
3398First char = 'a'
3399No need char
3400
3401/[ab]/I
3402Capturing subpattern count = 0
3403No options
3404No first char
3405No need char
3406
3407/[ab]/IS
3408Capturing subpattern count = 0
3409No options
3410No first char
3411No need char
3412Subject length lower bound = 1
3413Starting byte set: a b
3414
3415/[^a]/I
3416Capturing subpattern count = 0
3417No options
3418No first char
3419No need char
3420
3421/\d456/I
3422Capturing subpattern count = 0
3423No options
3424No first char
3425Need char = '6'
3426
3427/\d456/IS
3428Capturing subpattern count = 0
3429No options
3430No first char
3431Need char = '6'
3432Subject length lower bound = 4
3433Starting byte set: 0 1 2 3 4 5 6 7 8 9
3434
3435/a^b/I
3436Capturing subpattern count = 0
3437No options
3438First char = 'a'
3439Need char = 'b'
3440
3441/^a/Im
3442Capturing subpattern count = 0
3443Options: multiline
3444First char at start or follows newline
3445Need char = 'a'
3446  abcde
3447 0: a
3448  xy\nabc
3449 0: a
3450  *** Failers
3451No match
3452  xyabc
3453No match
3454
3455/c|abc/I
3456Capturing subpattern count = 0
3457No options
3458No first char
3459Need char = 'c'
3460
3461/(?i)[ab]/IS
3462Capturing subpattern count = 0
3463Options: caseless
3464No first char
3465No need char
3466Subject length lower bound = 1
3467Starting byte set: A B a b
3468
3469/[ab](?i)cd/IS
3470Capturing subpattern count = 0
3471No options
3472No first char
3473Need char = 'd' (caseless)
3474Subject length lower bound = 3
3475Starting byte set: a b
3476
3477/abc(?C)def/I
3478Capturing subpattern count = 0
3479No options
3480First char = 'a'
3481Need char = 'f'
3482    abcdef
3483--->abcdef
3484  0 ^  ^       d
3485 0: abcdef
3486    1234abcdef
3487--->1234abcdef
3488  0     ^  ^       d
3489 0: abcdef
3490    *** Failers
3491No match
3492    abcxyz
3493No match
3494    abcxyzf
3495--->abcxyzf
3496  0 ^  ^        d
3497No match
3498
3499/abc(?C)de(?C1)f/I
3500Capturing subpattern count = 0
3501No options
3502First char = 'a'
3503Need char = 'f'
3504    123abcdef
3505--->123abcdef
3506  0    ^  ^       d
3507  1    ^    ^     f
3508 0: abcdef
3509
3510/(?C1)\dabc(?C2)def/IS
3511Capturing subpattern count = 0
3512No options
3513No first char
3514Need char = 'f'
3515Subject length lower bound = 7
3516Starting byte set: 0 1 2 3 4 5 6 7 8 9
3517    1234abcdef
3518--->1234abcdef
3519  1 ^              \d
3520  1  ^             \d
3521  1   ^            \d
3522  1    ^           \d
3523  2    ^   ^       d
3524 0: 4abcdef
3525    *** Failers
3526No match
3527    abcdef
3528No match
3529
3530/(?C1)\dabc(?C2)def/ISS
3531Capturing subpattern count = 0
3532No options
3533No first char
3534Need char = 'f'
3535    1234abcdef
3536--->1234abcdef
3537  1 ^              \d
3538  1  ^             \d
3539  1   ^            \d
3540  1    ^           \d
3541  2    ^   ^       d
3542 0: 4abcdef
3543    *** Failers
3544No match
3545    abcdef
3546--->abcdef
3547  1 ^          \d
3548  1  ^         \d
3549  1   ^        \d
3550  1    ^       \d
3551  1     ^      \d
3552  1      ^     \d
3553No match
3554
3555/(?C255)ab/I
3556Capturing subpattern count = 0
3557No options
3558First char = 'a'
3559Need char = 'b'
3560
3561/(?C256)ab/I
3562Failed: number after (?C is > 255 at offset 6
3563
3564/(?Cab)xx/I
3565Failed: closing ) for (?C expected at offset 3
3566
3567/(?C12vr)x/I
3568Failed: closing ) for (?C expected at offset 5
3569
3570/abc(?C)def/I
3571Capturing subpattern count = 0
3572No options
3573First char = 'a'
3574Need char = 'f'
3575    *** Failers
3576No match
3577    \x83\x0\x61bcdef
3578--->\x83\x00abcdef
3579  0         ^  ^       d
3580 0: abcdef
3581
3582/(abc)(?C)de(?C1)f/I
3583Capturing subpattern count = 1
3584No options
3585First char = 'a'
3586Need char = 'f'
3587    123abcdef
3588--->123abcdef
3589  0    ^  ^       d
3590  1    ^    ^     f
3591 0: abcdef
3592 1: abc
3593    123abcdef\C+
3594Callout 0: last capture = 1
3595 0: <unset>
3596 1: abc
3597--->123abcdef
3598       ^  ^       d
3599Callout 1: last capture = 1
3600 0: <unset>
3601 1: abc
3602--->123abcdef
3603       ^    ^     f
3604 0: abcdef
3605 1: abc
3606    123abcdef\C-
3607 0: abcdef
3608 1: abc
3609    *** Failers
3610No match
3611    123abcdef\C!1
3612--->123abcdef
3613  0    ^  ^       d
3614  1    ^    ^     f
3615No match
3616
3617/(?C0)(abc(?C1))*/I
3618Capturing subpattern count = 1
3619No options
3620No first char
3621No need char
3622    abcabcabc
3623--->abcabcabc
3624  0 ^             (abc(?C1))*
3625  1 ^  ^          )
3626  1 ^     ^       )
3627  1 ^        ^    )
3628 0: abcabcabc
3629 1: abc
3630    abcabc\C!1!3
3631--->abcabc
3632  0 ^          (abc(?C1))*
3633  1 ^  ^       )
3634  1 ^     ^    )
3635 0: abcabc
3636 1: abc
3637    *** Failers
3638--->*** Failers
3639  0 ^               (abc(?C1))*
3640 0:
3641    abcabcabc\C!1!3
3642--->abcabcabc
3643  0 ^             (abc(?C1))*
3644  1 ^  ^          )
3645  1 ^     ^       )
3646  1 ^        ^    )
3647 0: abcabc
3648 1: abc
3649
3650/(\d{3}(?C))*/I
3651Capturing subpattern count = 1
3652No options
3653No first char
3654No need char
3655    123\C+
3656Callout 0: last capture = -1
3657 0: <unset>
3658--->123
3659    ^  ^    )
3660 0: 123
3661 1: 123
3662    123456\C+
3663Callout 0: last capture = -1
3664 0: <unset>
3665--->123456
3666    ^  ^       )
3667Callout 0: last capture = 1
3668 0: <unset>
3669 1: 123
3670--->123456
3671    ^     ^    )
3672 0: 123456
3673 1: 456
3674    123456789\C+
3675Callout 0: last capture = -1
3676 0: <unset>
3677--->123456789
3678    ^  ^          )
3679Callout 0: last capture = 1
3680 0: <unset>
3681 1: 123
3682--->123456789
3683    ^     ^       )
3684Callout 0: last capture = 1
3685 0: <unset>
3686 1: 456
3687--->123456789
3688    ^        ^    )
3689 0: 123456789
3690 1: 789
3691
3692/((xyz)(?C)p|(?C1)xyzabc)/I
3693Capturing subpattern count = 2
3694No options
3695First char = 'x'
3696No need char
3697    xyzabc\C+
3698Callout 0: last capture = 2
3699 0: <unset>
3700 1: <unset>
3701 2: xyz
3702--->xyzabc
3703    ^  ^       p
3704Callout 1: last capture = -1
3705 0: <unset>
3706--->xyzabc
3707    ^          x
3708 0: xyzabc
3709 1: xyzabc
3710
3711/(X)((xyz)(?C)p|(?C1)xyzabc)/I
3712Capturing subpattern count = 3
3713No options
3714First char = 'X'
3715Need char = 'x'
3716    Xxyzabc\C+
3717Callout 0: last capture = 3
3718 0: <unset>
3719 1: X
3720 2: <unset>
3721 3: xyz
3722--->Xxyzabc
3723    ^   ^       p
3724Callout 1: last capture = 1
3725 0: <unset>
3726 1: X
3727--->Xxyzabc
3728    ^^          x
3729 0: Xxyzabc
3730 1: X
3731 2: xyzabc
3732
3733/(?=(abc))(?C)abcdef/I
3734Capturing subpattern count = 1
3735No options
3736First char = 'a'
3737Need char = 'f'
3738    abcdef\C+
3739Callout 0: last capture = 1
3740 0: <unset>
3741 1: abc
3742--->abcdef
3743    ^          a
3744 0: abcdef
3745 1: abc
3746
3747/(?!(abc)(?C1)d)(?C2)abcxyz/I
3748Capturing subpattern count = 1
3749No options
3750First char = 'a'
3751Need char = 'z'
3752    abcxyz\C+
3753Callout 1: last capture = 1
3754 0: <unset>
3755 1: abc
3756--->abcxyz
3757    ^  ^       d
3758Callout 2: last capture = -1
3759 0: <unset>
3760--->abcxyz
3761    ^          a
3762 0: abcxyz
3763
3764/(?<=(abc)(?C))xyz/I
3765Capturing subpattern count = 1
3766No options
3767First char = 'x'
3768Need char = 'z'
3769Max lookbehind = 3
3770   abcxyz\C+
3771Callout 0: last capture = 1
3772 0: <unset>
3773 1: abc
3774--->abcxyz
3775       ^       )
3776 0: xyz
3777 1: abc
3778
3779/a(b+)(c*)(?C1)/I
3780Capturing subpattern count = 2
3781No options
3782First char = 'a'
3783Need char = 'b'
3784    abbbbbccc\C*1
3785--->abbbbbccc
3786  1 ^        ^
3787Callout data = 1
3788  1 ^       ^
3789Callout data = 1
3790  1 ^      ^
3791Callout data = 1
3792  1 ^     ^
3793Callout data = 1
3794  1 ^    ^
3795Callout data = 1
3796  1 ^   ^
3797Callout data = 1
3798  1 ^  ^
3799Callout data = 1
3800  1 ^ ^
3801Callout data = 1
3802No match
3803
3804/a(b+?)(c*?)(?C1)/I
3805Capturing subpattern count = 2
3806No options
3807First char = 'a'
3808Need char = 'b'
3809    abbbbbccc\C*1
3810--->abbbbbccc
3811  1 ^ ^
3812Callout data = 1
3813  1 ^  ^
3814Callout data = 1
3815  1 ^   ^
3816Callout data = 1
3817  1 ^    ^
3818Callout data = 1
3819  1 ^     ^
3820Callout data = 1
3821  1 ^      ^
3822Callout data = 1
3823  1 ^       ^
3824Callout data = 1
3825  1 ^        ^
3826Callout data = 1
3827No match
3828
3829/(?C)abc/I
3830Capturing subpattern count = 0
3831No options
3832First char = 'a'
3833Need char = 'c'
3834
3835/(?C)^abc/I
3836Capturing subpattern count = 0
3837Options: anchored
3838No first char
3839No need char
3840
3841/(?C)a|b/IS
3842Capturing subpattern count = 0
3843No options
3844No first char
3845No need char
3846Subject length lower bound = 1
3847Starting byte set: a b
3848
3849/(?R)/I
3850Failed: recursive call could loop indefinitely at offset 3
3851
3852/(a|(?R))/I
3853Failed: recursive call could loop indefinitely at offset 6
3854
3855/(ab|(bc|(de|(?R))))/I
3856Failed: recursive call could loop indefinitely at offset 15
3857
3858/x(ab|(bc|(de|(?R))))/I
3859Capturing subpattern count = 3
3860No options
3861First char = 'x'
3862No need char
3863    xab
3864 0: xab
3865 1: ab
3866    xbc
3867 0: xbc
3868 1: bc
3869 2: bc
3870    xde
3871 0: xde
3872 1: de
3873 2: de
3874 3: de
3875    xxab
3876 0: xxab
3877 1: xab
3878 2: xab
3879 3: xab
3880    xxxab
3881 0: xxxab
3882 1: xxab
3883 2: xxab
3884 3: xxab
3885    *** Failers
3886No match
3887    xyab
3888No match
3889
3890/(ab|(bc|(de|(?1))))/I
3891Failed: recursive call could loop indefinitely at offset 15
3892
3893/x(ab|(bc|(de|(?1)x)x)x)/I
3894Failed: recursive call could loop indefinitely at offset 16
3895
3896/^([^()]|\((?1)*\))*$/I
3897Capturing subpattern count = 1
3898Options: anchored
3899No first char
3900No need char
3901    abc
3902 0: abc
3903 1: c
3904    a(b)c
3905 0: a(b)c
3906 1: c
3907    a(b(c))d
3908 0: a(b(c))d
3909 1: d
3910    *** Failers)
3911No match
3912    a(b(c)d
3913No match
3914
3915/^>abc>([^()]|\((?1)*\))*<xyz<$/I
3916Capturing subpattern count = 1
3917Options: anchored
3918No first char
3919Need char = '<'
3920   >abc>123<xyz<
3921 0: >abc>123<xyz<
3922 1: 3
3923   >abc>1(2)3<xyz<
3924 0: >abc>1(2)3<xyz<
3925 1: 3
3926   >abc>(1(2)3)<xyz<
3927 0: >abc>(1(2)3)<xyz<
3928 1: (1(2)3)
3929
3930/(a(?1)b)/DZ
3931------------------------------------------------------------------
3932        Bra
3933        CBra 1
3934        a
3935        Recurse
3936        b
3937        Ket
3938        Ket
3939        End
3940------------------------------------------------------------------
3941Capturing subpattern count = 1
3942No options
3943First char = 'a'
3944Need char = 'b'
3945
3946/(a(?1)+b)/DZ
3947------------------------------------------------------------------
3948        Bra
3949        CBra 1
3950        a
3951        Once
3952        Recurse
3953        KetRmax
3954        b
3955        Ket
3956        Ket
3957        End
3958------------------------------------------------------------------
3959Capturing subpattern count = 1
3960No options
3961First char = 'a'
3962Need char = 'b'
3963
3964/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
3965Capturing subpattern count = 2
3966Options: anchored
3967No first char
3968No need char
3969    12
3970 0: 12
3971 1: 12
3972    (((2+2)*-3)-7)
3973 0: (((2+2)*-3)-7)
3974 1: (((2+2)*-3)-7)
3975 2: -
3976    -12
3977 0: -12
3978 1: -12
3979    *** Failers
3980No match
3981    ((2+2)*-3)-7)
3982No match
3983
3984/^(x(y|(?1){2})z)/I
3985Capturing subpattern count = 2
3986Options: anchored
3987No first char
3988No need char
3989    xyz
3990 0: xyz
3991 1: xyz
3992 2: y
3993    xxyzxyzz
3994 0: xxyzxyzz
3995 1: xxyzxyzz
3996 2: xyzxyz
3997    *** Failers
3998No match
3999    xxyzz
4000No match
4001    xxyzxyzxyzz
4002No match
4003
4004/((< (?: (?(R) \d++  | [^<>]*+) | (?2)) * >))/Ix
4005Capturing subpattern count = 2
4006Options: extended
4007First char = '<'
4008Need char = '>'
4009    <>
4010 0: <>
4011 1: <>
4012 2: <>
4013    <abcd>
4014 0: <abcd>
4015 1: <abcd>
4016 2: <abcd>
4017    <abc <123> hij>
4018 0: <abc <123> hij>
4019 1: <abc <123> hij>
4020 2: <abc <123> hij>
4021    <abc <def> hij>
4022 0: <def>
4023 1: <def>
4024 2: <def>
4025    <abc<>def>
4026 0: <abc<>def>
4027 1: <abc<>def>
4028 2: <abc<>def>
4029    <abc<>
4030 0: <>
4031 1: <>
4032 2: <>
4033    *** Failers
4034No match
4035    <abc
4036No match
4037
4038/(?1)/I
4039Failed: reference to non-existent subpattern at offset 3
4040
4041/((?2)(abc)/I
4042Failed: missing ) at offset 10
4043
4044/^(abc)def(?1)/I
4045Capturing subpattern count = 1
4046Options: anchored
4047No first char
4048No need char
4049    abcdefabc
4050 0: abcdefabc
4051 1: abc
4052
4053/^(a|b|c)=(?1)+/I
4054Capturing subpattern count = 1
4055Options: anchored
4056No first char
4057No need char
4058    a=a
4059 0: a=a
4060 1: a
4061    a=b
4062 0: a=b
4063 1: a
4064    a=bc
4065 0: a=bc
4066 1: a
4067
4068/^(a|b|c)=((?1))+/I
4069Capturing subpattern count = 2
4070Options: anchored
4071No first char
4072No need char
4073    a=a
4074 0: a=a
4075 1: a
4076 2: a
4077    a=b
4078 0: a=b
4079 1: a
4080 2: b
4081    a=bc
4082 0: a=bc
4083 1: a
4084 2: c
4085
4086/a(?P<name1>b|c)d(?P<longername2>e)/DZ
4087------------------------------------------------------------------
4088        Bra
4089        a
4090        CBra 1
4091        b
4092        Alt
4093        c
4094        Ket
4095        d
4096        CBra 2
4097        e
4098        Ket
4099        Ket
4100        End
4101------------------------------------------------------------------
4102Capturing subpattern count = 2
4103Named capturing subpatterns:
4104  longername2   2
4105  name1         1
4106No options
4107First char = 'a'
4108Need char = 'e'
4109    abde
4110 0: abde
4111 1: b
4112 2: e
4113    acde
4114 0: acde
4115 1: c
4116 2: e
4117
4118/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
4119------------------------------------------------------------------
4120        Bra
4121        Bra
4122        a
4123        CBra 1
4124        c
4125        CBra 2
4126        d
4127        Ket
4128        Ket
4129        Ket
4130        CBra 3
4131        a
4132        Ket
4133        Ket
4134        End
4135------------------------------------------------------------------
4136Capturing subpattern count = 3
4137Named capturing subpatterns:
4138  a   3
4139  c   1
4140  d   2
4141No options
4142First char = 'a'
4143Need char = 'a'
4144
4145/(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
4146------------------------------------------------------------------
4147        Bra
4148        CBra 1
4149        a
4150        Ket
4151        Any
4152        Any
4153        Any
4154        \1
4155        bbb
4156        Recurse
4157        d
4158        Ket
4159        End
4160------------------------------------------------------------------
4161Capturing subpattern count = 1
4162Max back reference = 1
4163Named capturing subpatterns:
4164  a   1
4165No options
4166First char = 'a'
4167Need char = 'd'
4168
4169/^\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
4170Capturing subpattern count = 4
4171Max back reference = 4
4172Named capturing subpatterns:
4173  four    4
4174  one     1
4175  three   3
4176  two     2
4177Options: anchored caseless
4178No first char
4179No need char
4180    1221
4181 0: 1221
4182 1: 1221
4183 2: 1
4184    Satan, oscillate my metallic sonatas!
4185 0: Satan, oscillate my metallic sonatas!
4186 1: <unset>
4187 2: <unset>
4188 3: Satan, oscillate my metallic sonatas
4189 4: S
4190    A man, a plan, a canal: Panama!
4191 0: A man, a plan, a canal: Panama!
4192 1: <unset>
4193 2: <unset>
4194 3: A man, a plan, a canal: Panama
4195 4: A
4196    Able was I ere I saw Elba.
4197 0: Able was I ere I saw Elba.
4198 1: <unset>
4199 2: <unset>
4200 3: Able was I ere I saw Elba
4201 4: A
4202    *** Failers
4203No match
4204    The quick brown fox
4205No match
4206
4207/((?(R)a|b))\1(?1)?/I
4208Capturing subpattern count = 1
4209Max back reference = 1
4210No options
4211No first char
4212No need char
4213  bb
4214 0: bb
4215 1: b
4216  bbaa
4217 0: bba
4218 1: b
4219
4220/(.*)a/Is
4221Capturing subpattern count = 1
4222Options: anchored dotall
4223No first char
4224Need char = 'a'
4225
4226/(.*)a\1/Is
4227Capturing subpattern count = 1
4228Max back reference = 1
4229Options: dotall
4230No first char
4231Need char = 'a'
4232
4233/(.*)a(b)\2/Is
4234Capturing subpattern count = 2
4235Max back reference = 2
4236Options: anchored dotall
4237No first char
4238Need char = 'b'
4239
4240/((.*)a|(.*)b)z/Is
4241Capturing subpattern count = 3
4242Options: anchored dotall
4243No first char
4244Need char = 'z'
4245
4246/((.*)a|(.*)b)z\1/Is
4247Capturing subpattern count = 3
4248Max back reference = 1
4249Options: dotall
4250No first char
4251Need char = 'z'
4252
4253/((.*)a|(.*)b)z\2/Is
4254Capturing subpattern count = 3
4255Max back reference = 2
4256Options: dotall
4257No first char
4258Need char = 'z'
4259
4260/((.*)a|(.*)b)z\3/Is
4261Capturing subpattern count = 3
4262Max back reference = 3
4263Options: dotall
4264No first char
4265Need char = 'z'
4266
4267/((.*)a|^(.*)b)z\3/Is
4268Capturing subpattern count = 3
4269Max back reference = 3
4270Options: anchored dotall
4271No first char
4272Need char = 'z'
4273
4274/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
4275Capturing subpattern count = 31
4276Options: anchored dotall
4277No first char
4278No need char
4279
4280/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
4281Capturing subpattern count = 31
4282Max back reference = 31
4283Options: dotall
4284No first char
4285No need char
4286
4287/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
4288Capturing subpattern count = 32
4289Max back reference = 32
4290Options: dotall
4291No first char
4292No need char
4293
4294/(a)(bc)/INDZ
4295------------------------------------------------------------------
4296        Bra
4297        Bra
4298        a
4299        Ket
4300        Bra
4301        bc
4302        Ket
4303        Ket
4304        End
4305------------------------------------------------------------------
4306Capturing subpattern count = 0
4307Options: no_auto_capture
4308First char = 'a'
4309Need char = 'c'
4310  abc
4311 0: abc
4312
4313/(?P<one>a)(bc)/INDZ
4314------------------------------------------------------------------
4315        Bra
4316        CBra 1
4317        a
4318        Ket
4319        Bra
4320        bc
4321        Ket
4322        Ket
4323        End
4324------------------------------------------------------------------
4325Capturing subpattern count = 1
4326Named capturing subpatterns:
4327  one   1
4328Options: no_auto_capture
4329First char = 'a'
4330Need char = 'c'
4331  abc
4332 0: abc
4333 1: a
4334
4335/(a)(?P<named>bc)/INDZ
4336------------------------------------------------------------------
4337        Bra
4338        Bra
4339        a
4340        Ket
4341        CBra 1
4342        bc
4343        Ket
4344        Ket
4345        End
4346------------------------------------------------------------------
4347Capturing subpattern count = 1
4348Named capturing subpatterns:
4349  named   1
4350Options: no_auto_capture
4351First char = 'a'
4352Need char = 'c'
4353
4354/(a+)*zz/I
4355Capturing subpattern count = 1
4356No options
4357No first char
4358Need char = 'z'
4359  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
4360Minimum match() limit = 8
4361Minimum match() recursion limit = 6
4362 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
4363 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4364  aaaaaaaaaaaaaz\M
4365Minimum match() limit = 32768
4366Minimum match() recursion limit = 42
4367No match
4368
4369/(aaa(?C1)bbb|ab)/I
4370Capturing subpattern count = 1
4371No options
4372First char = 'a'
4373Need char = 'b'
4374   aaabbb
4375--->aaabbb
4376  1 ^  ^       b
4377 0: aaabbb
4378 1: aaabbb
4379   aaabbb\C*0
4380--->aaabbb
4381  1 ^  ^       b
4382 0: aaabbb
4383 1: aaabbb
4384   aaabbb\C*1
4385--->aaabbb
4386  1 ^  ^       b
4387Callout data = 1
4388 0: ab
4389 1: ab
4390   aaabbb\C*-1
4391--->aaabbb
4392  1 ^  ^       b
4393Callout data = -1
4394No match
4395
4396/ab(?P<one>cd)ef(?P<two>gh)/I
4397Capturing subpattern count = 2
4398Named capturing subpatterns:
4399  one   1
4400  two   2
4401No options
4402First char = 'a'
4403Need char = 'h'
4404    abcdefgh
4405 0: abcdefgh
4406 1: cd
4407 2: gh
4408    abcdefgh\C1\Gtwo
4409 0: abcdefgh
4410 1: cd
4411 2: gh
4412 1C cd (2)
4413  G gh (2) two
4414    abcdefgh\Cone\Ctwo
4415 0: abcdefgh
4416 1: cd
4417 2: gh
4418  C cd (2) one
4419  C gh (2) two
4420    abcdefgh\Cthree
4421no parentheses with name "three"
4422 0: abcdefgh
4423 1: cd
4424 2: gh
4425copy substring three failed -7
4426
4427/(?P<Tes>)(?P<Test>)/DZ
4428------------------------------------------------------------------
4429        Bra
4430        CBra 1
4431        Ket
4432        CBra 2
4433        Ket
4434        Ket
4435        End
4436------------------------------------------------------------------
4437Capturing subpattern count = 2
4438Named capturing subpatterns:
4439  Tes    1
4440  Test   2
4441No options
4442No first char
4443No need char
4444
4445/(?P<Test>)(?P<Tes>)/DZ
4446------------------------------------------------------------------
4447        Bra
4448        CBra 1
4449        Ket
4450        CBra 2
4451        Ket
4452        Ket
4453        End
4454------------------------------------------------------------------
4455Capturing subpattern count = 2
4456Named capturing subpatterns:
4457  Tes    2
4458  Test   1
4459No options
4460No first char
4461No need char
4462
4463/(?P<Z>zz)(?P<A>aa)/I
4464Capturing subpattern count = 2
4465Named capturing subpatterns:
4466  A   2
4467  Z   1
4468No options
4469First char = 'z'
4470Need char = 'a'
4471    zzaa\CZ
4472 0: zzaa
4473 1: zz
4474 2: aa
4475  C zz (2) Z
4476    zzaa\CA
4477 0: zzaa
4478 1: zz
4479 2: aa
4480  C aa (2) A
4481
4482/(?P<x>eks)(?P<x>eccs)/I
4483Failed: two named subpatterns have the same name at offset 15
4484
4485/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
4486Failed: two named subpatterns have the same name at offset 30
4487
4488"\[((?P<elem>\d+)(,(?P>elem))*)\]"I
4489Capturing subpattern count = 3
4490Named capturing subpatterns:
4491  elem   2
4492No options
4493First char = '['
4494Need char = ']'
4495    [10,20,30,5,5,4,4,2,43,23,4234]
4496 0: [10,20,30,5,5,4,4,2,43,23,4234]
4497 1: 10,20,30,5,5,4,4,2,43,23,4234
4498 2: 10
4499 3: ,4234
4500    *** Failers
4501No match
4502    []
4503No match
4504
4505"\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
4506Capturing subpattern count = 3
4507Named capturing subpatterns:
4508  elem   2
4509No options
4510First char = '['
4511Need char = ']'
4512    [10,20,30,5,5,4,4,2,43,23,4234]
4513 0: [10,20,30,5,5,4,4,2,43,23,4234]
4514 1: 10,20,30,5,5,4,4,2,43,23,4234
4515 2: 10
4516 3: ,4234
4517    []
4518 0: []
4519
4520/(a(b(?2)c))?/DZ
4521------------------------------------------------------------------
4522        Bra
4523        Brazero
4524        CBra 1
4525        a
4526        CBra 2
4527        b
4528        Recurse
4529        c
4530        Ket
4531        Ket
4532        Ket
4533        End
4534------------------------------------------------------------------
4535Capturing subpattern count = 2
4536No options
4537No first char
4538No need char
4539
4540/(a(b(?2)c))*/DZ
4541------------------------------------------------------------------
4542        Bra
4543        Brazero
4544        CBra 1
4545        a
4546        CBra 2
4547        b
4548        Recurse
4549        c
4550        Ket
4551        KetRmax
4552        Ket
4553        End
4554------------------------------------------------------------------
4555Capturing subpattern count = 2
4556No options
4557No first char
4558No need char
4559
4560/(a(b(?2)c)){0,2}/DZ
4561------------------------------------------------------------------
4562        Bra
4563        Brazero
4564        Bra
4565        CBra 1
4566        a
4567        CBra 2
4568        b
4569        Recurse
4570        c
4571        Ket
4572        Ket
4573        Brazero
4574        CBra 1
4575        a
4576        CBra 2
4577        b
4578        Recurse
4579        c
4580        Ket
4581        Ket
4582        Ket
4583        Ket
4584        End
4585------------------------------------------------------------------
4586Capturing subpattern count = 2
4587No options
4588No first char
4589No need char
4590
4591/[ab]{1}+/DZ
4592------------------------------------------------------------------
4593        Bra
4594        Once
4595        [ab]{1,1}
4596        Ket
4597        Ket
4598        End
4599------------------------------------------------------------------
4600Capturing subpattern count = 0
4601No options
4602No first char
4603No need char
4604
4605/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
4606Capturing subpattern count = 3
4607Options: caseless
4608No first char
4609Need char = 'g' (caseless)
4610     Baby Bjorn Active Carrier - With free SHIPPING!!
4611 0: Baby Bjorn Active Carrier - With free SHIPPING!!
4612 1: Baby Bjorn Active Carrier - With free SHIPPING!!
4613
4614/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
4615Capturing subpattern count = 3
4616Options: caseless
4617No first char
4618Need char = 'g' (caseless)
4619Subject length lower bound = 8
4620No set of starting bytes
4621     Baby Bjorn Active Carrier - With free SHIPPING!!
4622 0: Baby Bjorn Active Carrier - With free SHIPPING!!
4623 1: Baby Bjorn Active Carrier - With free SHIPPING!!
4624
4625/a*.*b/ISDZ
4626------------------------------------------------------------------
4627        Bra
4628        a*
4629        Any*
4630        b
4631        Ket
4632        End
4633------------------------------------------------------------------
4634Capturing subpattern count = 0
4635No options
4636No first char
4637Need char = 'b'
4638Subject length lower bound = 1
4639No set of starting bytes
4640
4641/(a|b)*.?c/ISDZ
4642------------------------------------------------------------------
4643        Bra
4644        Brazero
4645        CBra 1
4646        a
4647        Alt
4648        b
4649        KetRmax
4650        Any?
4651        c
4652        Ket
4653        End
4654------------------------------------------------------------------
4655Capturing subpattern count = 1
4656No options
4657No first char
4658Need char = 'c'
4659Subject length lower bound = 1
4660No set of starting bytes
4661
4662/abc(?C255)de(?C)f/DZ
4663------------------------------------------------------------------
4664        Bra
4665        abc
4666        Callout 255 10 1
4667        de
4668        Callout 0 16 1
4669        f
4670        Ket
4671        End
4672------------------------------------------------------------------
4673Capturing subpattern count = 0
4674No options
4675First char = 'a'
4676Need char = 'f'
4677
4678/abcde/ICDZ
4679------------------------------------------------------------------
4680        Bra
4681        Callout 255 0 1
4682        a
4683        Callout 255 1 1
4684        b
4685        Callout 255 2 1
4686        c
4687        Callout 255 3 1
4688        d
4689        Callout 255 4 1
4690        e
4691        Callout 255 5 0
4692        Ket
4693        End
4694------------------------------------------------------------------
4695Capturing subpattern count = 0
4696Options:
4697First char = 'a'
4698Need char = 'e'
4699  abcde
4700--->abcde
4701 +0 ^         a
4702 +1 ^^        b
4703 +2 ^ ^       c
4704 +3 ^  ^      d
4705 +4 ^   ^     e
4706 +5 ^    ^
4707 0: abcde
4708  abcdfe
4709--->abcdfe
4710 +0 ^          a
4711 +1 ^^         b
4712 +2 ^ ^        c
4713 +3 ^  ^       d
4714 +4 ^   ^      e
4715No match
4716
4717/a*b/ICDZS
4718------------------------------------------------------------------
4719        Bra
4720        Callout 255 0 2
4721        a*+
4722        Callout 255 2 1
4723        b
4724        Callout 255 3 0
4725        Ket
4726        End
4727------------------------------------------------------------------
4728Capturing subpattern count = 0
4729Options:
4730No first char
4731Need char = 'b'
4732Subject length lower bound = 1
4733Starting byte set: a b
4734  ab
4735--->ab
4736 +0 ^      a*
4737 +2 ^^     b
4738 +3 ^ ^
4739 0: ab
4740  aaaab
4741--->aaaab
4742 +0 ^         a*
4743 +2 ^   ^     b
4744 +3 ^    ^
4745 0: aaaab
4746  aaaacb
4747--->aaaacb
4748 +0 ^          a*
4749 +2 ^   ^      b
4750 +0  ^         a*
4751 +2  ^  ^      b
4752 +0   ^        a*
4753 +2   ^ ^      b
4754 +0    ^       a*
4755 +2    ^^      b
4756 +0      ^     a*
4757 +2      ^     b
4758 +3      ^^
4759 0: b
4760
4761/a*b/ICDZSS
4762------------------------------------------------------------------
4763        Bra
4764        Callout 255 0 2
4765        a*+
4766        Callout 255 2 1
4767        b
4768        Callout 255 3 0
4769        Ket
4770        End
4771------------------------------------------------------------------
4772Capturing subpattern count = 0
4773Options:
4774No first char
4775Need char = 'b'
4776  ab
4777--->ab
4778 +0 ^      a*
4779 +2 ^^     b
4780 +3 ^ ^
4781 0: ab
4782  aaaab
4783--->aaaab
4784 +0 ^         a*
4785 +2 ^   ^     b
4786 +3 ^    ^
4787 0: aaaab
4788  aaaacb
4789--->aaaacb
4790 +0 ^          a*
4791 +2 ^   ^      b
4792 +0  ^         a*
4793 +2  ^  ^      b
4794 +0   ^        a*
4795 +2   ^ ^      b
4796 +0    ^       a*
4797 +2    ^^      b
4798 +0     ^      a*
4799 +2     ^      b
4800 +0      ^     a*
4801 +2      ^     b
4802 +3      ^^
4803 0: b
4804
4805/a+b/ICDZ
4806------------------------------------------------------------------
4807        Bra
4808        Callout 255 0 2
4809        a++
4810        Callout 255 2 1
4811        b
4812        Callout 255 3 0
4813        Ket
4814        End
4815------------------------------------------------------------------
4816Capturing subpattern count = 0
4817Options:
4818First char = 'a'
4819Need char = 'b'
4820  ab
4821--->ab
4822 +0 ^      a+
4823 +2 ^^     b
4824 +3 ^ ^
4825 0: ab
4826  aaaab
4827--->aaaab
4828 +0 ^         a+
4829 +2 ^   ^     b
4830 +3 ^    ^
4831 0: aaaab
4832  aaaacb
4833--->aaaacb
4834 +0 ^          a+
4835 +2 ^   ^      b
4836 +0  ^         a+
4837 +2  ^  ^      b
4838 +0   ^        a+
4839 +2   ^ ^      b
4840 +0    ^       a+
4841 +2    ^^      b
4842No match
4843
4844/(abc|def)x/ICDZS
4845------------------------------------------------------------------
4846        Bra
4847        Callout 255 0 9
4848        CBra 1
4849        Callout 255 1 1
4850        a
4851        Callout 255 2 1
4852        b
4853        Callout 255 3 1
4854        c
4855        Callout 255 4 0
4856        Alt
4857        Callout 255 5 1
4858        d
4859        Callout 255 6 1
4860        e
4861        Callout 255 7 1
4862        f
4863        Callout 255 8 0
4864        Ket
4865        Callout 255 9 1
4866        x
4867        Callout 255 10 0
4868        Ket
4869        End
4870------------------------------------------------------------------
4871Capturing subpattern count = 1
4872Options:
4873No first char
4874Need char = 'x'
4875Subject length lower bound = 4
4876Starting byte set: a d
4877  abcx
4878--->abcx
4879 +0 ^        (abc|def)
4880 +1 ^        a
4881 +2 ^^       b
4882 +3 ^ ^      c
4883 +4 ^  ^     |
4884 +9 ^  ^     x
4885+10 ^   ^
4886 0: abcx
4887 1: abc
4888  defx
4889--->defx
4890 +0 ^        (abc|def)
4891 +1 ^        a
4892 +5 ^        d
4893 +6 ^^       e
4894 +7 ^ ^      f
4895 +8 ^  ^     )
4896 +9 ^  ^     x
4897+10 ^   ^
4898 0: defx
4899 1: def
4900  ** Failers
4901No match
4902  abcdefzx
4903--->abcdefzx
4904 +0 ^            (abc|def)
4905 +1 ^            a
4906 +2 ^^           b
4907 +3 ^ ^          c
4908 +4 ^  ^         |
4909 +9 ^  ^         x
4910 +5 ^            d
4911 +0    ^         (abc|def)
4912 +1    ^         a
4913 +5    ^         d
4914 +6    ^^        e
4915 +7    ^ ^       f
4916 +8    ^  ^      )
4917 +9    ^  ^      x
4918No match
4919
4920/(abc|def)x/ICDZSS
4921------------------------------------------------------------------
4922        Bra
4923        Callout 255 0 9
4924        CBra 1
4925        Callout 255 1 1
4926        a
4927        Callout 255 2 1
4928        b
4929        Callout 255 3 1
4930        c
4931        Callout 255 4 0
4932        Alt
4933        Callout 255 5 1
4934        d
4935        Callout 255 6 1
4936        e
4937        Callout 255 7 1
4938        f
4939        Callout 255 8 0
4940        Ket
4941        Callout 255 9 1
4942        x
4943        Callout 255 10 0
4944        Ket
4945        End
4946------------------------------------------------------------------
4947Capturing subpattern count = 1
4948Options:
4949No first char
4950Need char = 'x'
4951  abcx
4952--->abcx
4953 +0 ^        (abc|def)
4954 +1 ^        a
4955 +2 ^^       b
4956 +3 ^ ^      c
4957 +4 ^  ^     |
4958 +9 ^  ^     x
4959+10 ^   ^
4960 0: abcx
4961 1: abc
4962  defx
4963--->defx
4964 +0 ^        (abc|def)
4965 +1 ^        a
4966 +5 ^        d
4967 +6 ^^       e
4968 +7 ^ ^      f
4969 +8 ^  ^     )
4970 +9 ^  ^     x
4971+10 ^   ^
4972 0: defx
4973 1: def
4974  ** Failers
4975No match
4976  abcdefzx
4977--->abcdefzx
4978 +0 ^            (abc|def)
4979 +1 ^            a
4980 +2 ^^           b
4981 +3 ^ ^          c
4982 +4 ^  ^         |
4983 +9 ^  ^         x
4984 +5 ^            d
4985 +0  ^           (abc|def)
4986 +1  ^           a
4987 +5  ^           d
4988 +0   ^          (abc|def)
4989 +1   ^          a
4990 +5   ^          d
4991 +0    ^         (abc|def)
4992 +1    ^         a
4993 +5    ^         d
4994 +6    ^^        e
4995 +7    ^ ^       f
4996 +8    ^  ^      )
4997 +9    ^  ^      x
4998 +0     ^        (abc|def)
4999 +1     ^        a
5000 +5     ^        d
5001 +0      ^       (abc|def)
5002 +1      ^       a
5003 +5      ^       d
5004 +0       ^      (abc|def)
5005 +1       ^      a
5006 +5       ^      d
5007 +0        ^     (abc|def)
5008 +1        ^     a
5009 +5        ^     d
5010No match
5011
5012/(ab|cd){3,4}/IC
5013Capturing subpattern count = 1
5014Options:
5015No first char
5016No need char
5017  ababab
5018--->ababab
5019 +0 ^          (ab|cd){3,4}
5020 +1 ^          a
5021 +2 ^^         b
5022 +3 ^ ^        |
5023 +1 ^ ^        a
5024 +2 ^  ^       b
5025 +3 ^   ^      |
5026 +1 ^   ^      a
5027 +2 ^    ^     b
5028 +3 ^     ^    |
5029 +1 ^     ^    a
5030 +4 ^     ^    c
5031+12 ^     ^
5032 0: ababab
5033 1: ab
5034  abcdabcd
5035--->abcdabcd
5036 +0 ^            (ab|cd){3,4}
5037 +1 ^            a
5038 +2 ^^           b
5039 +3 ^ ^          |
5040 +1 ^ ^          a
5041 +4 ^ ^          c
5042 +5 ^  ^         d
5043 +6 ^   ^        )
5044 +1 ^   ^        a
5045 +2 ^    ^       b
5046 +3 ^     ^      |
5047 +1 ^     ^      a
5048 +4 ^     ^      c
5049 +5 ^      ^     d
5050 +6 ^       ^    )
5051+12 ^       ^
5052 0: abcdabcd
5053 1: cd
5054  abcdcdcdcdcd
5055--->abcdcdcdcdcd
5056 +0 ^                (ab|cd){3,4}
5057 +1 ^                a
5058 +2 ^^               b
5059 +3 ^ ^              |
5060 +1 ^ ^              a
5061 +4 ^ ^              c
5062 +5 ^  ^             d
5063 +6 ^   ^            )
5064 +1 ^   ^            a
5065 +4 ^   ^            c
5066 +5 ^    ^           d
5067 +6 ^     ^          )
5068 +1 ^     ^          a
5069 +4 ^     ^          c
5070 +5 ^      ^         d
5071 +6 ^       ^        )
5072+12 ^       ^
5073 0: abcdcdcd
5074 1: cd
5075
5076/([ab]{,4}c|xy)/ICDZS
5077------------------------------------------------------------------
5078        Bra
5079        Callout 255 0 14
5080        CBra 1
5081        Callout 255 1 4
5082        [ab]
5083        Callout 255 5 1
5084        {
5085        Callout 255 6 1
5086        ,
5087        Callout 255 7 1
5088        4
5089        Callout 255 8 1
5090        }
5091        Callout 255 9 1
5092        c
5093        Callout 255 10 0
5094        Alt
5095        Callout 255 11 1
5096        x
5097        Callout 255 12 1
5098        y
5099        Callout 255 13 0
5100        Ket
5101        Callout 255 14 0
5102        Ket
5103        End
5104------------------------------------------------------------------
5105Capturing subpattern count = 1
5106Options:
5107No first char
5108No need char
5109Subject length lower bound = 2
5110Starting byte set: a b x
5111    Note: that { does NOT introduce a quantifier
5112--->Note: that { does NOT introduce a quantifier
5113 +0         ^                                        ([ab]{,4}c|xy)
5114 +1         ^                                        [ab]
5115 +5         ^^                                       {
5116+11         ^                                        x
5117 +0                                 ^                ([ab]{,4}c|xy)
5118 +1                                 ^                [ab]
5119 +5                                 ^^               {
5120+11                                 ^                x
5121 +0                                     ^            ([ab]{,4}c|xy)
5122 +1                                     ^            [ab]
5123 +5                                     ^^           {
5124+11                                     ^            x
5125No match
5126
5127/([ab]{,4}c|xy)/ICDZSS
5128------------------------------------------------------------------
5129        Bra
5130        Callout 255 0 14
5131        CBra 1
5132        Callout 255 1 4
5133        [ab]
5134        Callout 255 5 1
5135        {
5136        Callout 255 6 1
5137        ,
5138        Callout 255 7 1
5139        4
5140        Callout 255 8 1
5141        }
5142        Callout 255 9 1
5143        c
5144        Callout 255 10 0
5145        Alt
5146        Callout 255 11 1
5147        x
5148        Callout 255 12 1
5149        y
5150        Callout 255 13 0
5151        Ket
5152        Callout 255 14 0
5153        Ket
5154        End
5155------------------------------------------------------------------
5156Capturing subpattern count = 1
5157Options:
5158No first char
5159No need char
5160    Note: that { does NOT introduce a quantifier
5161--->Note: that { does NOT introduce a quantifier
5162 +0 ^                                                ([ab]{,4}c|xy)
5163 +1 ^                                                [ab]
5164+11 ^                                                x
5165 +0  ^                                               ([ab]{,4}c|xy)
5166 +1  ^                                               [ab]
5167+11  ^                                               x
5168 +0   ^                                              ([ab]{,4}c|xy)
5169 +1   ^                                              [ab]
5170+11   ^                                              x
5171 +0    ^                                             ([ab]{,4}c|xy)
5172 +1    ^                                             [ab]
5173+11    ^                                             x
5174 +0     ^                                            ([ab]{,4}c|xy)
5175 +1     ^                                            [ab]
5176+11     ^                                            x
5177 +0      ^                                           ([ab]{,4}c|xy)
5178 +1      ^                                           [ab]
5179+11      ^                                           x
5180 +0       ^                                          ([ab]{,4}c|xy)
5181 +1       ^                                          [ab]
5182+11       ^                                          x
5183 +0        ^                                         ([ab]{,4}c|xy)
5184 +1        ^                                         [ab]
5185+11        ^                                         x
5186 +0         ^                                        ([ab]{,4}c|xy)
5187 +1         ^                                        [ab]
5188 +5         ^^                                       {
5189+11         ^                                        x
5190 +0          ^                                       ([ab]{,4}c|xy)
5191 +1          ^                                       [ab]
5192+11          ^                                       x
5193 +0           ^                                      ([ab]{,4}c|xy)
5194 +1           ^                                      [ab]
5195+11           ^                                      x
5196 +0            ^                                     ([ab]{,4}c|xy)
5197 +1            ^                                     [ab]
5198+11            ^                                     x
5199 +0             ^                                    ([ab]{,4}c|xy)
5200 +1             ^                                    [ab]
5201+11             ^                                    x
5202 +0              ^                                   ([ab]{,4}c|xy)
5203 +1              ^                                   [ab]
5204+11              ^                                   x
5205 +0               ^                                  ([ab]{,4}c|xy)
5206 +1               ^                                  [ab]
5207+11               ^                                  x
5208 +0                ^                                 ([ab]{,4}c|xy)
5209 +1                ^                                 [ab]
5210+11                ^                                 x
5211 +0                 ^                                ([ab]{,4}c|xy)
5212 +1                 ^                                [ab]
5213+11                 ^                                x
5214 +0                  ^                               ([ab]{,4}c|xy)
5215 +1                  ^                               [ab]
5216+11                  ^                               x
5217 +0                   ^                              ([ab]{,4}c|xy)
5218 +1                   ^                              [ab]
5219+11                   ^                              x
5220 +0                    ^                             ([ab]{,4}c|xy)
5221 +1                    ^                             [ab]
5222+11                    ^                             x
5223 +0                     ^                            ([ab]{,4}c|xy)
5224 +1                     ^                            [ab]
5225+11                     ^                            x
5226 +0                      ^                           ([ab]{,4}c|xy)
5227 +1                      ^                           [ab]
5228+11                      ^                           x
5229 +0                       ^                          ([ab]{,4}c|xy)
5230 +1                       ^                          [ab]
5231+11                       ^                          x
5232 +0                        ^                         ([ab]{,4}c|xy)
5233 +1                        ^                         [ab]
5234+11                        ^                         x
5235 +0                         ^                        ([ab]{,4}c|xy)
5236 +1                         ^                        [ab]
5237+11                         ^                        x
5238 +0                          ^                       ([ab]{,4}c|xy)
5239 +1                          ^                       [ab]
5240+11                          ^                       x
5241 +0                           ^                      ([ab]{,4}c|xy)
5242 +1                           ^                      [ab]
5243+11                           ^                      x
5244 +0                            ^                     ([ab]{,4}c|xy)
5245 +1                            ^                     [ab]
5246+11                            ^                     x
5247 +0                             ^                    ([ab]{,4}c|xy)
5248 +1                             ^                    [ab]
5249+11                             ^                    x
5250 +0                              ^                   ([ab]{,4}c|xy)
5251 +1                              ^                   [ab]
5252+11                              ^                   x
5253 +0                               ^                  ([ab]{,4}c|xy)
5254 +1                               ^                  [ab]
5255+11                               ^                  x
5256 +0                                ^                 ([ab]{,4}c|xy)
5257 +1                                ^                 [ab]
5258+11                                ^                 x
5259 +0                                 ^                ([ab]{,4}c|xy)
5260 +1                                 ^                [ab]
5261 +5                                 ^^               {
5262+11                                 ^                x
5263 +0                                  ^               ([ab]{,4}c|xy)
5264 +1                                  ^               [ab]
5265+11                                  ^               x
5266 +0                                   ^              ([ab]{,4}c|xy)
5267 +1                                   ^              [ab]
5268+11                                   ^              x
5269 +0                                    ^             ([ab]{,4}c|xy)
5270 +1                                    ^             [ab]
5271+11                                    ^             x
5272 +0                                     ^            ([ab]{,4}c|xy)
5273 +1                                     ^            [ab]
5274 +5                                     ^^           {
5275+11                                     ^            x
5276 +0                                      ^           ([ab]{,4}c|xy)
5277 +1                                      ^           [ab]
5278+11                                      ^           x
5279 +0                                       ^          ([ab]{,4}c|xy)
5280 +1                                       ^          [ab]
5281+11                                       ^          x
5282 +0                                        ^         ([ab]{,4}c|xy)
5283 +1                                        ^         [ab]
5284+11                                        ^         x
5285 +0                                         ^        ([ab]{,4}c|xy)
5286 +1                                         ^        [ab]
5287+11                                         ^        x
5288 +0                                          ^       ([ab]{,4}c|xy)
5289 +1                                          ^       [ab]
5290+11                                          ^       x
5291 +0                                           ^      ([ab]{,4}c|xy)
5292 +1                                           ^      [ab]
5293+11                                           ^      x
5294 +0                                            ^     ([ab]{,4}c|xy)
5295 +1                                            ^     [ab]
5296+11                                            ^     x
5297 +0                                             ^    ([ab]{,4}c|xy)
5298 +1                                             ^    [ab]
5299+11                                             ^    x
5300No match
5301
5302/([ab]{1,4}c|xy){4,5}?123/ICDZ
5303------------------------------------------------------------------
5304        Bra
5305        Callout 255 0 21
5306        CBra 1
5307        Callout 255 1 9
5308        [ab]{1,4}
5309        Callout 255 10 1
5310        c
5311        Callout 255 11 0
5312        Alt
5313        Callout 255 12 1
5314        x
5315        Callout 255 13 1
5316        y
5317        Callout 255 14 0
5318        Ket
5319        CBra 1
5320        Callout 255 1 9
5321        [ab]{1,4}
5322        Callout 255 10 1
5323        c
5324        Callout 255 11 0
5325        Alt
5326        Callout 255 12 1
5327        x
5328        Callout 255 13 1
5329        y
5330        Callout 255 14 0
5331        Ket
5332        CBra 1
5333        Callout 255 1 9
5334        [ab]{1,4}
5335        Callout 255 10 1
5336        c
5337        Callout 255 11 0
5338        Alt
5339        Callout 255 12 1
5340        x
5341        Callout 255 13 1
5342        y
5343        Callout 255 14 0
5344        Ket
5345        CBra 1
5346        Callout 255 1 9
5347        [ab]{1,4}
5348        Callout 255 10 1
5349        c
5350        Callout 255 11 0
5351        Alt
5352        Callout 255 12 1
5353        x
5354        Callout 255 13 1
5355        y
5356        Callout 255 14 0
5357        Ket
5358        Braminzero
5359        CBra 1
5360        Callout 255 1 9
5361        [ab]{1,4}
5362        Callout 255 10 1
5363        c
5364        Callout 255 11 0
5365        Alt
5366        Callout 255 12 1
5367        x
5368        Callout 255 13 1
5369        y
5370        Callout 255 14 0
5371        Ket
5372        Callout 255 21 1
5373        1
5374        Callout 255 22 1
5375        2
5376        Callout 255 23 1
5377        3
5378        Callout 255 24 0
5379        Ket
5380        End
5381------------------------------------------------------------------
5382Capturing subpattern count = 1
5383Options:
5384No first char
5385Need char = '3'
5386    aacaacaacaacaac123
5387--->aacaacaacaacaac123
5388 +0 ^                      ([ab]{1,4}c|xy){4,5}?
5389 +1 ^                      [ab]{1,4}
5390+10 ^ ^                    c
5391+11 ^  ^                   |
5392 +1 ^  ^                   [ab]{1,4}
5393+10 ^    ^                 c
5394+11 ^     ^                |
5395 +1 ^     ^                [ab]{1,4}
5396+10 ^       ^              c
5397+11 ^        ^             |
5398 +1 ^        ^             [ab]{1,4}
5399+10 ^          ^           c
5400+11 ^           ^          |
5401+21 ^           ^          1
5402 +1 ^           ^          [ab]{1,4}
5403+10 ^             ^        c
5404+11 ^              ^       |
5405+21 ^              ^       1
5406+22 ^               ^      2
5407+23 ^                ^     3
5408+24 ^                 ^
5409 0: aacaacaacaacaac123
5410 1: aac
5411
5412/\b.*/I
5413Capturing subpattern count = 0
5414No options
5415No first char
5416No need char
5417Max lookbehind = 1
5418  ab cd\>1
5419 0:  cd
5420
5421/\b.*/Is
5422Capturing subpattern count = 0
5423Options: dotall
5424No first char
5425No need char
5426Max lookbehind = 1
5427  ab cd\>1
5428 0:  cd
5429
5430/(?!.bcd).*/I
5431Capturing subpattern count = 0
5432No options
5433No first char
5434No need char
5435  Xbcd12345
5436 0: bcd12345
5437
5438/abcde/I
5439Capturing subpattern count = 0
5440No options
5441First char = 'a'
5442Need char = 'e'
5443    ab\P
5444Partial match: ab
5445    abc\P
5446Partial match: abc
5447    abcd\P
5448Partial match: abcd
5449    abcde\P
5450 0: abcde
5451    the quick brown abc\P
5452Partial match: abc
5453    ** Failers\P
5454No match
5455    the quick brown abxyz fox\P
5456No match
5457
5458"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
5459Capturing subpattern count = 3
5460Options: anchored
5461No first char
5462Need char = '/'
5463    13/05/04\P
5464 0: 13/05/04
5465 1: 13
5466 2: 05
5467    13/5/2004\P
5468 0: 13/5/2004
5469 1: 13
5470 2: 5
5471 3: 20
5472    02/05/09\P
5473 0: 02/05/09
5474 1: 02
5475 2: 05
5476    1\P
5477Partial match: 1
5478    1/2\P
5479Partial match: 1/2
5480    1/2/0\P
5481Partial match: 1/2/0
5482    1/2/04\P
5483 0: 1/2/04
5484 1: 1
5485 2: 2
5486    0\P
5487Partial match: 0
5488    02/\P
5489Partial match: 02/
5490    02/0\P
5491Partial match: 02/0
5492    02/1\P
5493Partial match: 02/1
5494    ** Failers\P
5495No match
5496    \P
5497No match
5498    123\P
5499No match
5500    33/4/04\P
5501No match
5502    3/13/04\P
5503No match
5504    0/1/2003\P
5505No match
5506    0/\P
5507No match
5508    02/0/\P
5509No match
5510    02/13\P
5511No match
5512
5513/0{0,2}ABC/I
5514Capturing subpattern count = 0
5515No options
5516No first char
5517Need char = 'C'
5518
5519/\d{3,}ABC/I
5520Capturing subpattern count = 0
5521No options
5522No first char
5523Need char = 'C'
5524
5525/\d*ABC/I
5526Capturing subpattern count = 0
5527No options
5528No first char
5529Need char = 'C'
5530
5531/[abc]+DE/I
5532Capturing subpattern count = 0
5533No options
5534No first char
5535Need char = 'E'
5536
5537/[abc]?123/I
5538Capturing subpattern count = 0
5539No options
5540No first char
5541Need char = '3'
5542    123\P
5543 0: 123
5544    a\P
5545Partial match: a
5546    b\P
5547Partial match: b
5548    c\P
5549Partial match: c
5550    c12\P
5551Partial match: c12
5552    c123\P
5553 0: c123
5554
5555/^(?:\d){3,5}X/I
5556Capturing subpattern count = 0
5557Options: anchored
5558No first char
5559Need char = 'X'
5560    1\P
5561Partial match: 1
5562    123\P
5563Partial match: 123
5564    123X
5565 0: 123X
5566    1234\P
5567Partial match: 1234
5568    1234X
5569 0: 1234X
5570    12345\P
5571Partial match: 12345
5572    12345X
5573 0: 12345X
5574    *** Failers
5575No match
5576    1X
5577No match
5578    123456\P
5579No match
5580
5581/abc/IS>testsavedregex
5582Capturing subpattern count = 0
5583No options
5584First char = 'a'
5585Need char = 'c'
5586Subject length lower bound = 3
5587No set of starting bytes
5588Compiled pattern written to testsavedregex
5589Study data written to testsavedregex
5590<testsavedregex
5591Compiled pattern loaded from testsavedregex
5592Study data loaded from testsavedregex
5593    abc
5594 0: abc
5595    ** Failers
5596No match
5597    bca
5598No match
5599
5600/abc/ISS>testsavedregex
5601Capturing subpattern count = 0
5602No options
5603First char = 'a'
5604Need char = 'c'
5605Compiled pattern written to testsavedregex
5606<testsavedregex
5607Compiled pattern loaded from testsavedregex
5608No study data
5609    abc
5610 0: abc
5611    ** Failers
5612No match
5613    bca
5614No match
5615
5616/abc/IFS>testsavedregex
5617Capturing subpattern count = 0
5618No options
5619First char = 'a'
5620Need char = 'c'
5621Subject length lower bound = 3
5622No set of starting bytes
5623Compiled pattern written to testsavedregex
5624Study data written to testsavedregex
5625<testsavedregex
5626Compiled pattern (byte-inverted) loaded from testsavedregex
5627Study data loaded from testsavedregex
5628    abc
5629 0: abc
5630    ** Failers
5631No match
5632    bca
5633No match
5634
5635/abc/IFSS>testsavedregex
5636Capturing subpattern count = 0
5637No options
5638First char = 'a'
5639Need char = 'c'
5640Compiled pattern written to testsavedregex
5641<testsavedregex
5642Compiled pattern (byte-inverted) loaded from testsavedregex
5643No study data
5644    abc
5645 0: abc
5646    ** Failers
5647No match
5648    bca
5649No match
5650
5651/(a|b)/IS>testsavedregex
5652Capturing subpattern count = 1
5653No options
5654No first char
5655No need char
5656Subject length lower bound = 1
5657Starting byte set: a b
5658Compiled pattern written to testsavedregex
5659Study data written to testsavedregex
5660<testsavedregex
5661Compiled pattern loaded from testsavedregex
5662Study data loaded from testsavedregex
5663    abc
5664 0: a
5665 1: a
5666    ** Failers
5667 0: a
5668 1: a
5669    def
5670No match
5671
5672/(a|b)/ISS>testsavedregex
5673Capturing subpattern count = 1
5674No options
5675No first char
5676No need char
5677Compiled pattern written to testsavedregex
5678<testsavedregex
5679Compiled pattern loaded from testsavedregex
5680No study data
5681    abc
5682 0: a
5683 1: a
5684    ** Failers
5685 0: a
5686 1: a
5687    def
5688No match
5689
5690/(a|b)/ISF>testsavedregex
5691Capturing subpattern count = 1
5692No options
5693No first char
5694No need char
5695Subject length lower bound = 1
5696Starting byte set: a b
5697Compiled pattern written to testsavedregex
5698Study data written to testsavedregex
5699<testsavedregex
5700Compiled pattern (byte-inverted) loaded from testsavedregex
5701Study data loaded from testsavedregex
5702    abc
5703 0: a
5704 1: a
5705    ** Failers
5706 0: a
5707 1: a
5708    def
5709No match
5710
5711/(a|b)/ISSF>testsavedregex
5712Capturing subpattern count = 1
5713No options
5714No first char
5715No need char
5716Compiled pattern written to testsavedregex
5717<testsavedregex
5718Compiled pattern (byte-inverted) loaded from testsavedregex
5719No study data
5720    abc
5721 0: a
5722 1: a
5723    ** Failers
5724 0: a
5725 1: a
5726    def
5727No match
5728
5729~<(\w+)/?>(.)*</(\1)>~smgI
5730Capturing subpattern count = 3
5731Max back reference = 1
5732Options: multiline dotall
5733First char = '<'
5734Need char = '>'
5735    \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>
5736 0: <seite>\x0a<dokumenteninformation>\x0a<seitentitel>Partner der LCO</seitentitel>\x0a<sprache>de</sprache>\x0a<seitenbeschreibung>Partner der LINEAS Consulting\x0aGmbH</seitenbeschreibung>\x0a<schluesselworte>LINEAS Consulting GmbH Hamburg\x0aPartnerfirmen</schluesselworte>\x0a<revisit>30 days</revisit>\x0a<robots>index,follow</robots>\x0a<menueinformation>\x0a<aktiv>ja</aktiv>\x0a<menueposition>3</menueposition>\x0a<menuetext>Partner</menuetext>\x0a</menueinformation>\x0a<lastedited>\x0a<autor>LCO</autor>\x0a<firma>LINEAS Consulting</firma>\x0a<datum>15.10.2003</datum>\x0a</lastedited>\x0a</dokumenteninformation>\x0a<inhalt>\x0a\x0a<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\x0aGmbH</absatzueberschrift>\x0a\x0a<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\x0a<bild name="logo_ca.gif" rahmen="no"/></link> <link\x0aziel="http://www.ey.com/" zielfenster="_blank"><bild\x0aname="logo_euy.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\x0a<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.atelion.de/"\x0azielfenster="_blank"><bild\x0aname="logo_atelion.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.line-information.de/"\x0azielfenster="_blank">\x0a<bild name="logo_line_information.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\x0a\x0a<absatz><link ziel="http://www.incognis.de/"\x0azielfenster="_blank"><bild\x0aname="logo_incognis.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.addcraft.com/"\x0azielfenster="_blank"><bild\x0aname="logo_addcraft.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.comendo.com/"\x0azielfenster="_blank"><bild\x0aname="logo_comendo.gif" rahmen="no"/></link></absatz>\x0a\x0a</inhalt>\x0a</seite>
5737 1: seite
5738 2: \x0a
5739 3: seite
5740
5741/^a/IF
5742Capturing subpattern count = 0
5743Options: anchored
5744No first char
5745No need char
5746
5747/line\nbreak/I
5748Capturing subpattern count = 0
5749Contains explicit CR or LF match
5750No options
5751First char = 'l'
5752Need char = 'k'
5753    this is a line\nbreak
5754 0: line\x0abreak
5755    line one\nthis is a line\nbreak in the second line
5756 0: line\x0abreak
5757
5758/line\nbreak/If
5759Capturing subpattern count = 0
5760Contains explicit CR or LF match
5761Options: firstline
5762First char = 'l'
5763Need char = 'k'
5764    this is a line\nbreak
5765 0: line\x0abreak
5766    ** Failers
5767No match
5768    line one\nthis is a line\nbreak in the second line
5769No match
5770
5771/line\nbreak/Imf
5772Capturing subpattern count = 0
5773Contains explicit CR or LF match
5774Options: multiline firstline
5775First char = 'l'
5776Need char = 'k'
5777    this is a line\nbreak
5778 0: line\x0abreak
5779    ** Failers
5780No match
5781    line one\nthis is a line\nbreak in the second line
5782No match
5783
5784/(?i)(?-i)AbCd/I
5785Capturing subpattern count = 0
5786No options
5787First char = 'A'
5788Need char = 'd'
5789    AbCd
5790 0: AbCd
5791    ** Failers
5792No match
5793    abcd
5794No match
5795
5796/a{11111111111111111111}/I
5797Failed: number too big in {} quantifier at offset 22
5798
5799/(){64294967295}/I
5800Failed: number too big in {} quantifier at offset 14
5801
5802/(){2,4294967295}/I
5803Failed: number too big in {} quantifier at offset 15
5804
5805"(?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
5806Capturing subpattern count = 1
5807Max back reference = 1
5808No options
5809First char = 'a' (caseless)
5810Need char = 'B'
5811    abcdefghijklAkB
5812 0: abcdefghijklAkB
5813 1: k
5814
5815"(?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
5816Capturing subpattern count = 12
5817Max back reference = 11
5818Named capturing subpatterns:
5819  n0    1
5820  n1    2
5821  n10  11
5822  n11  12
5823  n2    3
5824  n3    4
5825  n4    5
5826  n5    6
5827  n6    7
5828  n7    8
5829  n8    9
5830  n9   10
5831No options
5832First char = 'a'
5833Need char = 'B'
5834    abcdefghijklAkB
5835 0: abcdefghijklAkB
5836 1: a
5837 2: b
5838 3: c
5839 4: d
5840 5: e
5841 6: f
5842 7: g
5843 8: h
5844 9: i
584510: j
584611: k
584712: l
5848
5849"(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
5850Capturing subpattern count = 12
5851Max back reference = 11
5852No options
5853First char = 'a'
5854Need char = 'B'
5855    abcdefghijklAkB
5856 0: abcdefghijklAkB
5857 1: a
5858 2: b
5859 3: c
5860 4: d
5861 5: e
5862 6: f
5863 7: g
5864 8: h
5865 9: i
586610: j
586711: k
586812: l
5869
5870"(?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
5871Capturing subpattern count = 101
5872Named capturing subpatterns:
5873  name0     1
5874  name1     2
5875  name10   11
5876  name100 101
5877  name11   12
5878  name12   13
5879  name13   14
5880  name14   15
5881  name15   16
5882  name16   17
5883  name17   18
5884  name18   19
5885  name19   20
5886  name2     3
5887  name20   21
5888  name21   22
5889  name22   23
5890  name23   24
5891  name24   25
5892  name25   26
5893  name26   27
5894  name27   28
5895  name28   29
5896  name29   30
5897  name3     4
5898  name30   31
5899  name31   32
5900  name32   33
5901  name33   34
5902  name34   35
5903  name35   36
5904  name36   37
5905  name37   38
5906  name38   39
5907  name39   40
5908  name4     5
5909  name40   41
5910  name41   42
5911  name42   43
5912  name43   44
5913  name44   45
5914  name45   46
5915  name46   47
5916  name47   48
5917  name48   49
5918  name49   50
5919  name5     6
5920  name50   51
5921  name51   52
5922  name52   53
5923  name53   54
5924  name54   55
5925  name55   56
5926  name56   57
5927  name57   58
5928  name58   59
5929  name59   60
5930  name6     7
5931  name60   61
5932  name61   62
5933  name62   63
5934  name63   64
5935  name64   65
5936  name65   66
5937  name66   67
5938  name67   68
5939  name68   69
5940  name69   70
5941  name7     8
5942  name70   71
5943  name71   72
5944  name72   73
5945  name73   74
5946  name74   75
5947  name75   76
5948  name76   77
5949  name77   78
5950  name78   79
5951  name79   80
5952  name8     9
5953  name80   81
5954  name81   82
5955  name82   83
5956  name83   84
5957  name84   85
5958  name85   86
5959  name86   87
5960  name87   88
5961  name88   89
5962  name89   90
5963  name9    10
5964  name90   91
5965  name91   92
5966  name92   93
5967  name93   94
5968  name94   95
5969  name95   96
5970  name96   97
5971  name97   98
5972  name98   99
5973  name99  100
5974No options
5975First char = 'a'
5976Need char = 'a'
5977    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
5978Matched, but too many substrings
5979 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
5980 1: a
5981 2: a
5982 3: a
5983 4: a
5984 5: a
5985 6: a
5986 7: a
5987 8: a
5988 9: a
598910: a
599011: a
599112: a
599213: a
599314: a
5994
5995"(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
5996Capturing subpattern count = 101
5997No options
5998First char = 'a'
5999Need char = 'a'
6000    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
6001Matched, but too many substrings
6002 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
6003 1: a
6004 2: a
6005 3: a
6006 4: a
6007 5: a
6008 6: a
6009 7: a
6010 8: a
6011 9: a
601210: a
601311: a
601412: a
601513: a
601614: a
6017
6018/[^()]*(?:\((?R)\)[^()]*)*/I
6019Capturing subpattern count = 0
6020No options
6021No first char
6022No need char
6023    (this(and)that
6024 0:
6025    (this(and)that)
6026 0: (this(and)that)
6027    (this(and)that)stuff
6028 0: (this(and)that)stuff
6029
6030/[^()]*(?:\((?>(?R))\)[^()]*)*/I
6031Capturing subpattern count = 0
6032No options
6033No first char
6034No need char
6035    (this(and)that
6036 0:
6037    (this(and)that)
6038 0: (this(and)that)
6039
6040/[^()]*(?:\((?R)\))*[^()]*/I
6041Capturing subpattern count = 0
6042No options
6043No first char
6044No need char
6045    (this(and)that
6046 0:
6047    (this(and)that)
6048 0: (this(and)that)
6049
6050/(?:\((?R)\))*[^()]*/I
6051Capturing subpattern count = 0
6052No options
6053No first char
6054No need char
6055    (this(and)that
6056 0:
6057    (this(and)that)
6058 0:
6059    ((this))
6060 0: ((this))
6061
6062/(?:\((?R)\))|[^()]*/I
6063Capturing subpattern count = 0
6064No options
6065No first char
6066No need char
6067    (this(and)that
6068 0:
6069    (this(and)that)
6070 0:
6071    (this)
6072 0: (this)
6073    ((this))
6074 0: ((this))
6075
6076/\x{0000ff}/I
6077Capturing subpattern count = 0
6078No options
6079First char = \xff
6080No need char
6081
6082/^((?P<A>a1)|(?P<A>a2)b)/I
6083Failed: two named subpatterns have the same name at offset 17
6084
6085/^((?P<A>a1)|(?P<A>a2)b)/IJ
6086Capturing subpattern count = 3
6087Named capturing subpatterns:
6088  A   2
6089  A   3
6090Options: anchored dupnames
6091No first char
6092No need char
6093    a1b\CA
6094 0: a1
6095 1: a1
6096 2: a1
6097  C a1 (2) A
6098    a2b\CA
6099 0: a2b
6100 1: a2b
6101 2: <unset>
6102 3: a2
6103  C a2 (2) A
6104    ** Failers
6105No match
6106    a1b\CZ\CA
6107no parentheses with name "Z"
6108 0: a1
6109 1: a1
6110 2: a1
6111copy substring Z failed -7
6112  C a1 (2) A
6113
6114/^(?P<A>a)(?P<A>b)/IJ
6115Capturing subpattern count = 2
6116Named capturing subpatterns:
6117  A   1
6118  A   2
6119Options: anchored dupnames
6120No first char
6121No need char
6122    ab\CA
6123 0: ab
6124 1: a
6125 2: b
6126  C a (1) A
6127
6128/^(?P<A>a)(?P<A>b)|cd/IJ
6129Capturing subpattern count = 2
6130Named capturing subpatterns:
6131  A   1
6132  A   2
6133Options: dupnames
6134No first char
6135No need char
6136    ab\CA
6137 0: ab
6138 1: a
6139 2: b
6140  C a (1) A
6141    cd\CA
6142 0: cd
6143copy substring A failed -7
6144
6145/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
6146Capturing subpattern count = 4
6147Named capturing subpatterns:
6148  A   1
6149  A   2
6150  A   3
6151  A   4
6152Options: dupnames
6153No first char
6154No need char
6155    cdefgh\CA
6156 0: cdefgh
6157 1: <unset>
6158 2: <unset>
6159 3: ef
6160 4: gh
6161  C ef (2) A
6162
6163/^((?P<A>a1)|(?P<A>a2)b)/IJ
6164Capturing subpattern count = 3
6165Named capturing subpatterns:
6166  A   2
6167  A   3
6168Options: anchored dupnames
6169No first char
6170No need char
6171    a1b\GA
6172 0: a1
6173 1: a1
6174 2: a1
6175  G a1 (2) A
6176    a2b\GA
6177 0: a2b
6178 1: a2b
6179 2: <unset>
6180 3: a2
6181  G a2 (2) A
6182    ** Failers
6183No match
6184    a1b\GZ\GA
6185no parentheses with name "Z"
6186 0: a1
6187 1: a1
6188 2: a1
6189get substring Z failed -7
6190  G a1 (2) A
6191
6192/^(?P<A>a)(?P<A>b)/IJ
6193Capturing subpattern count = 2
6194Named capturing subpatterns:
6195  A   1
6196  A   2
6197Options: anchored dupnames
6198No first char
6199No need char
6200    ab\GA
6201 0: ab
6202 1: a
6203 2: b
6204  G a (1) A
6205
6206/^(?P<A>a)(?P<A>b)|cd/IJ
6207Capturing subpattern count = 2
6208Named capturing subpatterns:
6209  A   1
6210  A   2
6211Options: dupnames
6212No first char
6213No need char
6214    ab\GA
6215 0: ab
6216 1: a
6217 2: b
6218  G a (1) A
6219    cd\GA
6220 0: cd
6221get substring A failed -7
6222
6223/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
6224Capturing subpattern count = 4
6225Named capturing subpatterns:
6226  A   1
6227  A   2
6228  A   3
6229  A   4
6230Options: dupnames
6231No first char
6232No need char
6233    cdefgh\GA
6234 0: cdefgh
6235 1: <unset>
6236 2: <unset>
6237 3: ef
6238 4: gh
6239  G ef (2) A
6240
6241/(?J)^((?P<A>a1)|(?P<A>a2)b)/I
6242Capturing subpattern count = 3
6243Named capturing subpatterns:
6244  A   2
6245  A   3
6246Options: anchored dupnames
6247Duplicate name status changes
6248No first char
6249No need char
6250    a1b\CA
6251 0: a1
6252 1: a1
6253 2: a1
6254  C a1 (2) A
6255    a2b\CA
6256 0: a2b
6257 1: a2b
6258 2: <unset>
6259 3: a2
6260  C a2 (2) A
6261
6262/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
6263Failed: two named subpatterns have the same name at offset 37
6264
6265/ In this next test, J is not set at the outer level; consequently it isn't
6266set in the pattern's options; consequently pcre_get_named_substring() produces
6267a random value. /Ix
6268Capturing subpattern count = 1
6269Options: extended
6270First char = 'I'
6271Need char = 'e'
6272
6273/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
6274Capturing subpattern count = 4
6275Named capturing subpatterns:
6276  A   1
6277  B   2
6278  B   3
6279  C   4
6280Options: anchored
6281Duplicate name status changes
6282No first char
6283No need char
6284    a bc d\CA\CB\CC
6285 0: a bc d
6286 1: a
6287 2: b
6288 3: c
6289 4: d
6290  C a (1) A
6291  C b (1) B
6292  C d (1) C
6293
6294/^(?P<A>a)?(?(A)a|b)/I
6295Capturing subpattern count = 1
6296Named capturing subpatterns:
6297  A   1
6298Options: anchored
6299No first char
6300No need char
6301    aabc
6302 0: aa
6303 1: a
6304    bc
6305 0: b
6306    ** Failers
6307No match
6308    abc
6309No match
6310
6311/(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
6312Capturing subpattern count = 1
6313Named capturing subpatterns:
6314  ZZ   1
6315No options
6316No first char
6317Need char = 'X'
6318    bXaX
6319 0: bXaX
6320 1: X
6321
6322/(?:(?(2y)a|b)(X))+/I
6323Failed: reference to non-existent subpattern at offset 9
6324
6325/(?:(?(ZA)a|b)(?P<ZZ>X))+/I
6326Failed: reference to non-existent subpattern at offset 9
6327
6328/(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
6329Capturing subpattern count = 1
6330Named capturing subpatterns:
6331  ZZ   1
6332No options
6333No first char
6334Need char = 'X'
6335    bbXaaX
6336 0: bbXaaX
6337 1: X
6338
6339/(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
6340Capturing subpattern count = 1
6341Named capturing subpatterns:
6342  ZZ   1
6343No options
6344No first char
6345Need char = 'X'
6346    (b)\\Xa\\X
6347 0: (b)\Xa\X
6348 1: X
6349
6350/(?P<ABC/I
6351Failed: syntax error in subpattern name (missing terminator) at offset 7
6352
6353/(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
6354Capturing subpattern count = 1
6355Max back reference = 1
6356Named capturing subpatterns:
6357  A   1
6358No options
6359No first char
6360No need char
6361    bXXaYYaY
6362 0: bXXaYYaY
6363 1: Y
6364    bXYaXXaX
6365 0: bX
6366 1: X
6367
6368/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
6369Capturing subpattern count = 10
6370Max back reference = 10
6371Named capturing subpatterns:
6372  A  10
6373No options
6374No first char
6375No need char
6376    bXXaYYaY
6377 0: bXXaYYaY
6378 1:
6379 2:
6380 3:
6381 4:
6382 5:
6383 6:
6384 7:
6385 8:
6386 9:
638710: Y
6388
6389/\s*,\s*/IS
6390Capturing subpattern count = 0
6391No options
6392No first char
6393Need char = ','
6394Subject length lower bound = 1
6395Starting byte set: \x09 \x0a \x0c \x0d \x20 ,
6396    \x0b,\x0b
6397 0: ,
6398    \x0c,\x0d
6399 0: \x0c,\x0d
6400
6401/^abc/Im
6402Capturing subpattern count = 0
6403Options: multiline
6404First char at start or follows newline
6405Need char = 'c'
6406    xyz\nabc
6407 0: abc
6408    xyz\nabc\<lf>
6409 0: abc
6410    xyz\r\nabc\<lf>
6411 0: abc
6412    xyz\rabc\<cr>
6413 0: abc
6414    xyz\r\nabc\<crlf>
6415 0: abc
6416    ** Failers
6417No match
6418    xyz\nabc\<cr>
6419No match
6420    xyz\r\nabc\<cr>
6421No match
6422    xyz\nabc\<crlf>
6423No match
6424    xyz\rabc\<crlf>
6425No match
6426    xyz\rabc\<lf>
6427No match
6428
6429/abc$/Im<lf>
6430Capturing subpattern count = 0
6431Options: multiline
6432Forced newline sequence: LF
6433First char = 'a'
6434Need char = 'c'
6435    xyzabc
6436 0: abc
6437    xyzabc\n
6438 0: abc
6439    xyzabc\npqr
6440 0: abc
6441    xyzabc\r\<cr>
6442 0: abc
6443    xyzabc\rpqr\<cr>
6444 0: abc
6445    xyzabc\r\n\<crlf>
6446 0: abc
6447    xyzabc\r\npqr\<crlf>
6448 0: abc
6449    ** Failers
6450No match
6451    xyzabc\r
6452No match
6453    xyzabc\rpqr
6454No match
6455    xyzabc\r\n
6456No match
6457    xyzabc\r\npqr
6458No match
6459
6460/^abc/Im<cr>
6461Capturing subpattern count = 0
6462Options: multiline
6463Forced newline sequence: CR
6464First char at start or follows newline
6465Need char = 'c'
6466    xyz\rabcdef
6467 0: abc
6468    xyz\nabcdef\<lf>
6469 0: abc
6470    ** Failers
6471No match
6472    xyz\nabcdef
6473No match
6474
6475/^abc/Im<lf>
6476Capturing subpattern count = 0
6477Options: multiline
6478Forced newline sequence: LF
6479First char at start or follows newline
6480Need char = 'c'
6481    xyz\nabcdef
6482 0: abc
6483    xyz\rabcdef\<cr>
6484 0: abc
6485    ** Failers
6486No match
6487    xyz\rabcdef
6488No match
6489
6490/^abc/Im<crlf>
6491Capturing subpattern count = 0
6492Options: multiline
6493Forced newline sequence: CRLF
6494First char at start or follows newline
6495Need char = 'c'
6496    xyz\r\nabcdef
6497 0: abc
6498    xyz\rabcdef\<cr>
6499 0: abc
6500    ** Failers
6501No match
6502    xyz\rabcdef
6503No match
6504
6505/^abc/Im<bad>
6506Unknown newline type at: <bad>
6507
6508
6509/abc/I
6510Capturing subpattern count = 0
6511No options
6512First char = 'a'
6513Need char = 'c'
6514    xyz\rabc\<bad>
6515Unknown newline type at: <bad>
6516    abc
6517 0: abc
6518
6519/.*/I<lf>
6520Capturing subpattern count = 0
6521Options:
6522Forced newline sequence: LF
6523First char at start or follows newline
6524No need char
6525    abc\ndef
6526 0: abc
6527    abc\rdef
6528 0: abc\x0ddef
6529    abc\r\ndef
6530 0: abc\x0d
6531    \<cr>abc\ndef
6532 0: abc\x0adef
6533    \<cr>abc\rdef
6534 0: abc
6535    \<cr>abc\r\ndef
6536 0: abc
6537    \<crlf>abc\ndef
6538 0: abc\x0adef
6539    \<crlf>abc\rdef
6540 0: abc\x0ddef
6541    \<crlf>abc\r\ndef
6542 0: abc
6543
6544/\w+(.)(.)?def/Is
6545Capturing subpattern count = 2
6546Options: dotall
6547No first char
6548Need char = 'f'
6549    abc\ndef
6550 0: abc\x0adef
6551 1: \x0a
6552    abc\rdef
6553 0: abc\x0ddef
6554 1: \x0d
6555    abc\r\ndef
6556 0: abc\x0d\x0adef
6557 1: \x0d
6558 2: \x0a
6559
6560+((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
6561Capturing subpattern count = 1
6562No options
6563No first char
6564No need char
6565   /* this is a C style comment */\M
6566Minimum match() limit = 120
6567Minimum match() recursion limit = 6
6568 0: /* this is a C style comment */
6569 1: /* this is a C style comment */
6570
6571/(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
6572Capturing subpattern count = 1
6573Named capturing subpatterns:
6574  B   1
6575No options
6576No first char
6577Need char = '.'
6578
6579/()()()()()()()()()()()()()()()()()()()()
6580 ()()()()()()()()()()()()()()()()()()()()
6581 ()()()()()()()()()()()()()()()()()()()()
6582 ()()()()()()()()()()()()()()()()()()()()
6583 ()()()()()()()()()()()()()()()()()()()()
6584 (.(.))/Ix
6585Capturing subpattern count = 102
6586Options: extended
6587No first char
6588No need char
6589    XY\O400
6590 0: XY
6591 1:
6592 2:
6593 3:
6594 4:
6595 5:
6596 6:
6597 7:
6598 8:
6599 9:
660010:
660111:
660212:
660313:
660414:
660515:
660616:
660717:
660818:
660919:
661020:
661121:
661222:
661323:
661424:
661525:
661626:
661727:
661828:
661929:
662030:
662131:
662232:
662333:
662434:
662535:
662636:
662737:
662838:
662939:
663040:
663141:
663242:
663343:
663444:
663545:
663646:
663747:
663848:
663949:
664050:
664151:
664252:
664353:
664454:
664555:
664656:
664757:
664858:
664959:
665060:
665161:
665262:
665363:
665464:
665565:
665666:
665767:
665868:
665969:
666070:
666171:
666272:
666373:
666474:
666575:
666676:
666777:
666878:
666979:
667080:
667181:
667282:
667383:
667484:
667585:
667686:
667787:
667888:
667989:
668090:
668191:
668292:
668393:
668494:
668595:
668696:
668797:
668898:
668999:
6690100:
6691101: XY
6692102: Y
6693
6694/(a*b|(?i:c*(?-i)d))/IS
6695Capturing subpattern count = 1
6696No options
6697No first char
6698No need char
6699Subject length lower bound = 1
6700Starting byte set: C a b c d
6701
6702/()[ab]xyz/IS
6703Capturing subpattern count = 1
6704No options
6705No first char
6706Need char = 'z'
6707Subject length lower bound = 4
6708Starting byte set: a b
6709
6710/(|)[ab]xyz/IS
6711Capturing subpattern count = 1
6712No options
6713No first char
6714Need char = 'z'
6715Subject length lower bound = 4
6716Starting byte set: a b
6717
6718/(|c)[ab]xyz/IS
6719Capturing subpattern count = 1
6720No options
6721No first char
6722Need char = 'z'
6723Subject length lower bound = 4
6724Starting byte set: a b c
6725
6726/(|c?)[ab]xyz/IS
6727Capturing subpattern count = 1
6728No options
6729No first char
6730Need char = 'z'
6731Subject length lower bound = 4
6732Starting byte set: a b c
6733
6734/(d?|c?)[ab]xyz/IS
6735Capturing subpattern count = 1
6736No options
6737No first char
6738Need char = 'z'
6739Subject length lower bound = 4
6740Starting byte set: a b c d
6741
6742/(d?|c)[ab]xyz/IS
6743Capturing subpattern count = 1
6744No options
6745No first char
6746Need char = 'z'
6747Subject length lower bound = 4
6748Starting byte set: a b c d
6749
6750/^a*b\d/DZ
6751------------------------------------------------------------------
6752        Bra
6753        ^
6754        a*+
6755        b
6756        \d
6757        Ket
6758        End
6759------------------------------------------------------------------
6760Capturing subpattern count = 0
6761Options: anchored
6762No first char
6763Need char = 'b'
6764
6765/^a*+b\d/DZ
6766------------------------------------------------------------------
6767        Bra
6768        ^
6769        a*+
6770        b
6771        \d
6772        Ket
6773        End
6774------------------------------------------------------------------
6775Capturing subpattern count = 0
6776Options: anchored
6777No first char
6778Need char = 'b'
6779
6780/^a*?b\d/DZ
6781------------------------------------------------------------------
6782        Bra
6783        ^
6784        a*+
6785        b
6786        \d
6787        Ket
6788        End
6789------------------------------------------------------------------
6790Capturing subpattern count = 0
6791Options: anchored
6792No first char
6793Need char = 'b'
6794
6795/^a+A\d/DZ
6796------------------------------------------------------------------
6797        Bra
6798        ^
6799        a++
6800        A
6801        \d
6802        Ket
6803        End
6804------------------------------------------------------------------
6805Capturing subpattern count = 0
6806Options: anchored
6807No first char
6808Need char = 'A'
6809    aaaA5
6810 0: aaaA5
6811    ** Failers
6812No match
6813    aaaa5
6814No match
6815
6816/^a*A\d/IiDZ
6817------------------------------------------------------------------
6818        Bra
6819        ^
6820     /i a*
6821     /i A
6822        \d
6823        Ket
6824        End
6825------------------------------------------------------------------
6826Capturing subpattern count = 0
6827Options: anchored caseless
6828No first char
6829Need char = 'A' (caseless)
6830    aaaA5
6831 0: aaaA5
6832    aaaa5
6833 0: aaaa5
6834
6835/(a*|b*)[cd]/IS
6836Capturing subpattern count = 1
6837No options
6838No first char
6839No need char
6840Subject length lower bound = 1
6841Starting byte set: a b c d
6842
6843/(a+|b*)[cd]/IS
6844Capturing subpattern count = 1
6845No options
6846No first char
6847No need char
6848Subject length lower bound = 1
6849Starting byte set: a b c d
6850
6851/(a*|b+)[cd]/IS
6852Capturing subpattern count = 1
6853No options
6854No first char
6855No need char
6856Subject length lower bound = 1
6857Starting byte set: a b c d
6858
6859/(a+|b+)[cd]/IS
6860Capturing subpattern count = 1
6861No options
6862No first char
6863No need char
6864Subject length lower bound = 2
6865Starting byte set: a b
6866
6867/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
6868 ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
6869 (((
6870 a
6871 ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
6872 ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
6873 )))
6874/Ix
6875Capturing subpattern count = 203
6876Options: extended
6877First char = 'a'
6878No need char
6879  large nest
6880Matched, but too many substrings
6881 0: a
6882 1: a
6883 2: a
6884 3: a
6885 4: a
6886 5: a
6887 6: a
6888 7: a
6889 8: a
6890 9: a
689110: a
689211: a
689312: a
689413: a
689514: a
6896
6897/a*\d/BZ
6898------------------------------------------------------------------
6899        Bra
6900        a*+
6901        \d
6902        Ket
6903        End
6904------------------------------------------------------------------
6905
6906/a*\D/BZ
6907------------------------------------------------------------------
6908        Bra
6909        a*
6910        \D
6911        Ket
6912        End
6913------------------------------------------------------------------
6914
6915/0*\d/BZ
6916------------------------------------------------------------------
6917        Bra
6918        0*
6919        \d
6920        Ket
6921        End
6922------------------------------------------------------------------
6923
6924/0*\D/BZ
6925------------------------------------------------------------------
6926        Bra
6927        0*+
6928        \D
6929        Ket
6930        End
6931------------------------------------------------------------------
6932
6933/a*\s/BZ
6934------------------------------------------------------------------
6935        Bra
6936        a*+
6937        \s
6938        Ket
6939        End
6940------------------------------------------------------------------
6941
6942/a*\S/BZ
6943------------------------------------------------------------------
6944        Bra
6945        a*
6946        \S
6947        Ket
6948        End
6949------------------------------------------------------------------
6950
6951/ *\s/BZ
6952------------------------------------------------------------------
6953        Bra
6954         *
6955        \s
6956        Ket
6957        End
6958------------------------------------------------------------------
6959
6960/ *\S/BZ
6961------------------------------------------------------------------
6962        Bra
6963         *+
6964        \S
6965        Ket
6966        End
6967------------------------------------------------------------------
6968
6969/a*\w/BZ
6970------------------------------------------------------------------
6971        Bra
6972        a*
6973        \w
6974        Ket
6975        End
6976------------------------------------------------------------------
6977
6978/a*\W/BZ
6979------------------------------------------------------------------
6980        Bra
6981        a*+
6982        \W
6983        Ket
6984        End
6985------------------------------------------------------------------
6986
6987/=*\w/BZ
6988------------------------------------------------------------------
6989        Bra
6990        =*+
6991        \w
6992        Ket
6993        End
6994------------------------------------------------------------------
6995
6996/=*\W/BZ
6997------------------------------------------------------------------
6998        Bra
6999        =*
7000        \W
7001        Ket
7002        End
7003------------------------------------------------------------------
7004
7005/\d*a/BZ
7006------------------------------------------------------------------
7007        Bra
7008        \d*+
7009        a
7010        Ket
7011        End
7012------------------------------------------------------------------
7013
7014/\d*2/BZ
7015------------------------------------------------------------------
7016        Bra
7017        \d*
7018        2
7019        Ket
7020        End
7021------------------------------------------------------------------
7022
7023/\d*\d/BZ
7024------------------------------------------------------------------
7025        Bra
7026        \d*
7027        \d
7028        Ket
7029        End
7030------------------------------------------------------------------
7031
7032/\d*\D/BZ
7033------------------------------------------------------------------
7034        Bra
7035        \d*+
7036        \D
7037        Ket
7038        End
7039------------------------------------------------------------------
7040
7041/\d*\s/BZ
7042------------------------------------------------------------------
7043        Bra
7044        \d*+
7045        \s
7046        Ket
7047        End
7048------------------------------------------------------------------
7049
7050/\d*\S/BZ
7051------------------------------------------------------------------
7052        Bra
7053        \d*
7054        \S
7055        Ket
7056        End
7057------------------------------------------------------------------
7058
7059/\d*\w/BZ
7060------------------------------------------------------------------
7061        Bra
7062        \d*
7063        \w
7064        Ket
7065        End
7066------------------------------------------------------------------
7067
7068/\d*\W/BZ
7069------------------------------------------------------------------
7070        Bra
7071        \d*+
7072        \W
7073        Ket
7074        End
7075------------------------------------------------------------------
7076
7077/\D*a/BZ
7078------------------------------------------------------------------
7079        Bra
7080        \D*
7081        a
7082        Ket
7083        End
7084------------------------------------------------------------------
7085
7086/\D*2/BZ
7087------------------------------------------------------------------
7088        Bra
7089        \D*+
7090        2
7091        Ket
7092        End
7093------------------------------------------------------------------
7094
7095/\D*\d/BZ
7096------------------------------------------------------------------
7097        Bra
7098        \D*+
7099        \d
7100        Ket
7101        End
7102------------------------------------------------------------------
7103
7104/\D*\D/BZ
7105------------------------------------------------------------------
7106        Bra
7107        \D*
7108        \D
7109        Ket
7110        End
7111------------------------------------------------------------------
7112
7113/\D*\s/BZ
7114------------------------------------------------------------------
7115        Bra
7116        \D*
7117        \s
7118        Ket
7119        End
7120------------------------------------------------------------------
7121
7122/\D*\S/BZ
7123------------------------------------------------------------------
7124        Bra
7125        \D*
7126        \S
7127        Ket
7128        End
7129------------------------------------------------------------------
7130
7131/\D*\w/BZ
7132------------------------------------------------------------------
7133        Bra
7134        \D*
7135        \w
7136        Ket
7137        End
7138------------------------------------------------------------------
7139
7140/\D*\W/BZ
7141------------------------------------------------------------------
7142        Bra
7143        \D*
7144        \W
7145        Ket
7146        End
7147------------------------------------------------------------------
7148
7149/\s*a/BZ
7150------------------------------------------------------------------
7151        Bra
7152        \s*+
7153        a
7154        Ket
7155        End
7156------------------------------------------------------------------
7157
7158/\s*2/BZ
7159------------------------------------------------------------------
7160        Bra
7161        \s*+
7162        2
7163        Ket
7164        End
7165------------------------------------------------------------------
7166
7167/\s*\d/BZ
7168------------------------------------------------------------------
7169        Bra
7170        \s*+
7171        \d
7172        Ket
7173        End
7174------------------------------------------------------------------
7175
7176/\s*\D/BZ
7177------------------------------------------------------------------
7178        Bra
7179        \s*
7180        \D
7181        Ket
7182        End
7183------------------------------------------------------------------
7184
7185/\s*\s/BZ
7186------------------------------------------------------------------
7187        Bra
7188        \s*
7189        \s
7190        Ket
7191        End
7192------------------------------------------------------------------
7193
7194/\s*\S/BZ
7195------------------------------------------------------------------
7196        Bra
7197        \s*+
7198        \S
7199        Ket
7200        End
7201------------------------------------------------------------------
7202
7203/\s*\w/BZ
7204------------------------------------------------------------------
7205        Bra
7206        \s*+
7207        \w
7208        Ket
7209        End
7210------------------------------------------------------------------
7211
7212/\s*\W/BZ
7213------------------------------------------------------------------
7214        Bra
7215        \s*
7216        \W
7217        Ket
7218        End
7219------------------------------------------------------------------
7220
7221/\S*a/BZ
7222------------------------------------------------------------------
7223        Bra
7224        \S*
7225        a
7226        Ket
7227        End
7228------------------------------------------------------------------
7229
7230/\S*2/BZ
7231------------------------------------------------------------------
7232        Bra
7233        \S*
7234        2
7235        Ket
7236        End
7237------------------------------------------------------------------
7238
7239/\S*\d/BZ
7240------------------------------------------------------------------
7241        Bra
7242        \S*
7243        \d
7244        Ket
7245        End
7246------------------------------------------------------------------
7247
7248/\S*\D/BZ
7249------------------------------------------------------------------
7250        Bra
7251        \S*
7252        \D
7253        Ket
7254        End
7255------------------------------------------------------------------
7256
7257/\S*\s/BZ
7258------------------------------------------------------------------
7259        Bra
7260        \S*+
7261        \s
7262        Ket
7263        End
7264------------------------------------------------------------------
7265
7266/\S*\S/BZ
7267------------------------------------------------------------------
7268        Bra
7269        \S*
7270        \S
7271        Ket
7272        End
7273------------------------------------------------------------------
7274
7275/\S*\w/BZ
7276------------------------------------------------------------------
7277        Bra
7278        \S*
7279        \w
7280        Ket
7281        End
7282------------------------------------------------------------------
7283
7284/\S*\W/BZ
7285------------------------------------------------------------------
7286        Bra
7287        \S*
7288        \W
7289        Ket
7290        End
7291------------------------------------------------------------------
7292
7293/\w*a/BZ
7294------------------------------------------------------------------
7295        Bra
7296        \w*
7297        a
7298        Ket
7299        End
7300------------------------------------------------------------------
7301
7302/\w*2/BZ
7303------------------------------------------------------------------
7304        Bra
7305        \w*
7306        2
7307        Ket
7308        End
7309------------------------------------------------------------------
7310
7311/\w*\d/BZ
7312------------------------------------------------------------------
7313        Bra
7314        \w*
7315        \d
7316        Ket
7317        End
7318------------------------------------------------------------------
7319
7320/\w*\D/BZ
7321------------------------------------------------------------------
7322        Bra
7323        \w*
7324        \D
7325        Ket
7326        End
7327------------------------------------------------------------------
7328
7329/\w*\s/BZ
7330------------------------------------------------------------------
7331        Bra
7332        \w*+
7333        \s
7334        Ket
7335        End
7336------------------------------------------------------------------
7337
7338/\w*\S/BZ
7339------------------------------------------------------------------
7340        Bra
7341        \w*
7342        \S
7343        Ket
7344        End
7345------------------------------------------------------------------
7346
7347/\w*\w/BZ
7348------------------------------------------------------------------
7349        Bra
7350        \w*
7351        \w
7352        Ket
7353        End
7354------------------------------------------------------------------
7355
7356/\w*\W/BZ
7357------------------------------------------------------------------
7358        Bra
7359        \w*+
7360        \W
7361        Ket
7362        End
7363------------------------------------------------------------------
7364
7365/\W*a/BZ
7366------------------------------------------------------------------
7367        Bra
7368        \W*+
7369        a
7370        Ket
7371        End
7372------------------------------------------------------------------
7373
7374/\W*2/BZ
7375------------------------------------------------------------------
7376        Bra
7377        \W*+
7378        2
7379        Ket
7380        End
7381------------------------------------------------------------------
7382
7383/\W*\d/BZ
7384------------------------------------------------------------------
7385        Bra
7386        \W*+
7387        \d
7388        Ket
7389        End
7390------------------------------------------------------------------
7391
7392/\W*\D/BZ
7393------------------------------------------------------------------
7394        Bra
7395        \W*
7396        \D
7397        Ket
7398        End
7399------------------------------------------------------------------
7400
7401/\W*\s/BZ
7402------------------------------------------------------------------
7403        Bra
7404        \W*
7405        \s
7406        Ket
7407        End
7408------------------------------------------------------------------
7409
7410/\W*\S/BZ
7411------------------------------------------------------------------
7412        Bra
7413        \W*
7414        \S
7415        Ket
7416        End
7417------------------------------------------------------------------
7418
7419/\W*\w/BZ
7420------------------------------------------------------------------
7421        Bra
7422        \W*+
7423        \w
7424        Ket
7425        End
7426------------------------------------------------------------------
7427
7428/\W*\W/BZ
7429------------------------------------------------------------------
7430        Bra
7431        \W*
7432        \W
7433        Ket
7434        End
7435------------------------------------------------------------------
7436
7437/[^a]+a/BZ
7438------------------------------------------------------------------
7439        Bra
7440        [^a]++
7441        a
7442        Ket
7443        End
7444------------------------------------------------------------------
7445
7446/[^a]+a/BZi
7447------------------------------------------------------------------
7448        Bra
7449     /i [^a]++
7450     /i a
7451        Ket
7452        End
7453------------------------------------------------------------------
7454
7455/[^a]+A/BZi
7456------------------------------------------------------------------
7457        Bra
7458     /i [^a]++
7459     /i A
7460        Ket
7461        End
7462------------------------------------------------------------------
7463
7464/[^a]+b/BZ
7465------------------------------------------------------------------
7466        Bra
7467        [^a]+
7468        b
7469        Ket
7470        End
7471------------------------------------------------------------------
7472
7473/[^a]+\d/BZ
7474------------------------------------------------------------------
7475        Bra
7476        [^a]+
7477        \d
7478        Ket
7479        End
7480------------------------------------------------------------------
7481
7482/a*[^a]/BZ
7483------------------------------------------------------------------
7484        Bra
7485        a*
7486        [^a]
7487        Ket
7488        End
7489------------------------------------------------------------------
7490
7491/(?P<abc>x)(?P<xyz>y)/I
7492Capturing subpattern count = 2
7493Named capturing subpatterns:
7494  abc   1
7495  xyz   2
7496No options
7497First char = 'x'
7498Need char = 'y'
7499    xy\Cabc\Cxyz
7500 0: xy
7501 1: x
7502 2: y
7503  C x (1) abc
7504  C y (1) xyz
7505
7506/(?<abc>x)(?'xyz'y)/I
7507Capturing subpattern count = 2
7508Named capturing subpatterns:
7509  abc   1
7510  xyz   2
7511No options
7512First char = 'x'
7513Need char = 'y'
7514    xy\Cabc\Cxyz
7515 0: xy
7516 1: x
7517 2: y
7518  C x (1) abc
7519  C y (1) xyz
7520
7521/(?<abc'x)(?'xyz'y)/I
7522Failed: syntax error in subpattern name (missing terminator) at offset 6
7523
7524/(?<abc>x)(?'xyz>y)/I
7525Failed: syntax error in subpattern name (missing terminator) at offset 15
7526
7527/(?P'abc'x)(?P<xyz>y)/I
7528Failed: unrecognized character after (?P at offset 3
7529
7530/^(?:(?(ZZ)a|b)(?<ZZ>X))+/
7531    bXaX
7532 0: bXaX
7533 1: X
7534    bXbX
7535 0: bX
7536 1: X
7537    ** Failers
7538No match
7539    aXaX
7540No match
7541    aXbX
7542No match
7543
7544/^(?P>abc)(?<abcd>xxx)/
7545Failed: reference to non-existent subpattern at offset 8
7546
7547/^(?P>abc)(?<abc>x|y)/
7548    xx
7549 0: xx
7550 1: x
7551    xy
7552 0: xy
7553 1: y
7554    yy
7555 0: yy
7556 1: y
7557    yx
7558 0: yx
7559 1: x
7560
7561/^(?P>abc)(?P<abc>x|y)/
7562    xx
7563 0: xx
7564 1: x
7565    xy
7566 0: xy
7567 1: y
7568    yy
7569 0: yy
7570 1: y
7571    yx
7572 0: yx
7573 1: x
7574
7575/^((?(abc)a|b)(?<abc>x|y))+/
7576    bxay
7577 0: bxay
7578 1: ay
7579 2: y
7580    bxby
7581 0: bx
7582 1: bx
7583 2: x
7584    ** Failers
7585No match
7586    axby
7587No match
7588
7589/^(((?P=abc)|X)(?<abc>x|y))+/
7590    XxXxxx
7591 0: XxXxxx
7592 1: xx
7593 2: x
7594 3: x
7595    XxXyyx
7596 0: XxXyyx
7597 1: yx
7598 2: y
7599 3: x
7600    XxXyxx
7601 0: XxXy
7602 1: Xy
7603 2: X
7604 3: y
7605    ** Failers
7606No match
7607    x
7608No match
7609
7610/^(?1)(abc)/
7611    abcabc
7612 0: abcabc
7613 1: abc
7614
7615/^(?:(?:\1|X)(a|b))+/
7616    Xaaa
7617 0: Xaaa
7618 1: a
7619    Xaba
7620 0: Xa
7621 1: a
7622
7623/^[\E\Qa\E-\Qz\E]+/BZ
7624------------------------------------------------------------------
7625        Bra
7626        ^
7627        [a-z]+
7628        Ket
7629        End
7630------------------------------------------------------------------
7631
7632/^[a\Q]bc\E]/BZ
7633------------------------------------------------------------------
7634        Bra
7635        ^
7636        [\]a-c]
7637        Ket
7638        End
7639------------------------------------------------------------------
7640
7641/^[a-\Q\E]/BZ
7642------------------------------------------------------------------
7643        Bra
7644        ^
7645        [\-a]
7646        Ket
7647        End
7648------------------------------------------------------------------
7649
7650/^(?P>abc)[()](?<abc>)/BZ
7651------------------------------------------------------------------
7652        Bra
7653        ^
7654        Recurse
7655        [()]
7656        CBra 1
7657        Ket
7658        Ket
7659        End
7660------------------------------------------------------------------
7661
7662/^((?(abc)y)[()](?P<abc>x))+/BZ
7663------------------------------------------------------------------
7664        Bra
7665        ^
7666        CBra 1
7667        Cond
7668      2 Cond nref
7669        y
7670        Ket
7671        [()]
7672        CBra 2
7673        x
7674        Ket
7675        KetRmax
7676        Ket
7677        End
7678------------------------------------------------------------------
7679    (xy)x
7680 0: (xy)x
7681 1: y)x
7682 2: x
7683
7684/^(?P>abc)\Q()\E(?<abc>)/BZ
7685------------------------------------------------------------------
7686        Bra
7687        ^
7688        Recurse
7689        ()
7690        CBra 1
7691        Ket
7692        Ket
7693        End
7694------------------------------------------------------------------
7695
7696/^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
7697------------------------------------------------------------------
7698        Bra
7699        ^
7700        Recurse
7701        [(\]a]
7702        CBra 1
7703        Ket
7704        Ket
7705        End
7706------------------------------------------------------------------
7707
7708/^(?P>abc) # this is (a comment)
7709  (?<abc>)/BZx
7710------------------------------------------------------------------
7711        Bra
7712        ^
7713        Recurse
7714        CBra 1
7715        Ket
7716        Ket
7717        End
7718------------------------------------------------------------------
7719
7720/^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
7721Capturing subpattern count = 4
7722Max back reference = 4
7723Named capturing subpatterns:
7724  four    4
7725  one     1
7726  three   3
7727  two     2
7728Options: anchored caseless
7729No first char
7730No need char
7731    1221
7732 0: 1221
7733 1: 1221
7734 2: 1
7735    Satan, oscillate my metallic sonatas!
7736 0: Satan, oscillate my metallic sonatas!
7737 1: <unset>
7738 2: <unset>
7739 3: Satan, oscillate my metallic sonatas
7740 4: S
7741    A man, a plan, a canal: Panama!
7742 0: A man, a plan, a canal: Panama!
7743 1: <unset>
7744 2: <unset>
7745 3: A man, a plan, a canal: Panama
7746 4: A
7747    Able was I ere I saw Elba.
7748 0: Able was I ere I saw Elba.
7749 1: <unset>
7750 2: <unset>
7751 3: Able was I ere I saw Elba
7752 4: A
7753    *** Failers
7754No match
7755    The quick brown fox
7756No match
7757
7758/(?=(\w+))\1:/I
7759Capturing subpattern count = 1
7760Max back reference = 1
7761No options
7762No first char
7763Need char = ':'
7764    abcd:
7765 0: abcd:
7766 1: abcd
7767
7768/(?=(?'abc'\w+))\k<abc>:/I
7769Capturing subpattern count = 1
7770Max back reference = 1
7771Named capturing subpatterns:
7772  abc   1
7773No options
7774No first char
7775Need char = ':'
7776    abcd:
7777 0: abcd:
7778 1: abcd
7779
7780/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
7781    adaa
7782 0: adaa
7783 1: a
7784 2: d
7785    ** Failers
7786No match
7787    addd
7788No match
7789    adbb
7790No match
7791
7792/(?'abc'a|b)(?<abc>d|e)(?&abc){2}/J
7793    bdaa
7794 0: bdaa
7795 1: b
7796 2: d
7797    bdab
7798 0: bdab
7799 1: b
7800 2: d
7801    ** Failers
7802No match
7803    bddd
7804No match
7805
7806/(?(<bc))/
7807Failed: malformed number or name after (?( at offset 6
7808
7809/(?(''))/
7810Failed: assertion expected after (?( at offset 4
7811
7812/(?('R')stuff)/
7813Failed: reference to non-existent subpattern at offset 7
7814
7815/((abc (?(R) (?(R1)1) (?(R2)2) X  |  (?1)  (?2)   (?R) ))) /x
7816    abcabc1Xabc2XabcXabcabc
7817 0: abcabc1Xabc2XabcX
7818 1: abcabc1Xabc2XabcX
7819 2: abcabc1Xabc2XabcX
7820
7821/(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
7822    abcabc1Xabc2XabcXabcabc
7823 0: abcabc1Xabc2XabcX
7824 1: abcabc1Xabc2XabcX
7825 2: abcabc1Xabc2XabcX
7826
7827/(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
7828Failed: reference to non-existent subpattern at offset 29
7829
7830/(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
7831    abcabc1Xabc2XabcXabcabc
7832 0: abcabc1Xabc2XabcX
7833 1: abcabc1Xabc2XabcX
7834 2: abcabc1Xabc2XabcX
7835
7836/^(?(DEFINE) abc | xyz ) /x
7837Failed: DEFINE group contains more than one branch at offset 22
7838
7839/(?(DEFINE) abc) xyz/xI
7840Capturing subpattern count = 0
7841Options: extended
7842First char = 'x'
7843Need char = 'z'
7844
7845/(a|)*\d/
7846  \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
7847No match
7848  \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
7849Matched, but too many substrings
7850
7851/^a.b/<lf>
7852    a\rb
7853 0: a\x0db
7854    a\nb\<cr>
7855 0: a\x0ab
7856    a\x85b\<anycrlf>
7857 0: a\x85b
7858    ** Failers
7859No match
7860    a\nb
7861No match
7862    a\nb\<any>
7863No match
7864    a\rb\<cr>
7865No match
7866    a\rb\<any>
7867No match
7868    a\x85b\<any>
7869No match
7870    a\rb\<anycrlf>
7871No match
7872
7873/^abc./mgx<any>
7874    abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
7875 0: abc1
7876 0: abc2
7877 0: abc3
7878 0: abc4
7879 0: abc5
7880 0: abc6
7881 0: abc7
7882
7883/abc.$/mgx<any>
7884    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
7885 0: abc1
7886 0: abc2
7887 0: abc3
7888 0: abc4
7889 0: abc5
7890 0: abc6
7891 0: abc9
7892
7893/a/<cr><any>
7894
7895/a/<any><crlf>
7896Failed: inconsistent NEWLINE options at offset 0
7897
7898/^a\Rb/<bsr_unicode>
7899    a\nb
7900 0: a\x0ab
7901    a\rb
7902 0: a\x0db
7903    a\r\nb
7904 0: a\x0d\x0ab
7905    a\x0bb
7906 0: a\x0bb
7907    a\x0cb
7908 0: a\x0cb
7909    a\x85b
7910 0: a\x85b
7911    ** Failers
7912No match
7913    a\n\rb
7914No match
7915
7916/^a\R*b/<bsr_unicode>
7917    ab
7918 0: ab
7919    a\nb
7920 0: a\x0ab
7921    a\rb
7922 0: a\x0db
7923    a\r\nb
7924 0: a\x0d\x0ab
7925    a\x0bb
7926 0: a\x0bb
7927    a\x0cb
7928 0: a\x0cb
7929    a\x85b
7930 0: a\x85b
7931    a\n\rb
7932 0: a\x0a\x0db
7933    a\n\r\x85\x0cb
7934 0: a\x0a\x0d\x85\x0cb
7935
7936/^a\R+b/<bsr_unicode>
7937    a\nb
7938 0: a\x0ab
7939    a\rb
7940 0: a\x0db
7941    a\r\nb
7942 0: a\x0d\x0ab
7943    a\x0bb
7944 0: a\x0bb
7945    a\x0cb
7946 0: a\x0cb
7947    a\x85b
7948 0: a\x85b
7949    a\n\rb
7950 0: a\x0a\x0db
7951    a\n\r\x85\x0cb
7952 0: a\x0a\x0d\x85\x0cb
7953    ** Failers
7954No match
7955    ab
7956No match
7957
7958/^a\R{1,3}b/<bsr_unicode>
7959    a\nb
7960 0: a\x0ab
7961    a\n\rb
7962 0: a\x0a\x0db
7963    a\n\r\x85b
7964 0: a\x0a\x0d\x85b
7965    a\r\n\r\nb
7966 0: a\x0d\x0a\x0d\x0ab
7967    a\r\n\r\n\r\nb
7968 0: a\x0d\x0a\x0d\x0a\x0d\x0ab
7969    a\n\r\n\rb
7970 0: a\x0a\x0d\x0a\x0db
7971    a\n\n\r\nb
7972 0: a\x0a\x0a\x0d\x0ab
7973    ** Failers
7974No match
7975    a\n\n\n\rb
7976No match
7977    a\r
7978No match
7979
7980/^a[\R]b/<bsr_unicode>
7981    aRb
7982 0: aRb
7983    ** Failers
7984No match
7985    a\nb
7986No match
7987
7988/(?&abc)X(?<abc>P)/I
7989Capturing subpattern count = 1
7990Named capturing subpatterns:
7991  abc   1
7992No options
7993No first char
7994Need char = 'P'
7995    abcPXP123
7996 0: PXP
7997 1: P
7998
7999/(?1)X(?<abc>P)/I
8000Capturing subpattern count = 1
8001Named capturing subpatterns:
8002  abc   1
8003No options
8004No first char
8005Need char = 'P'
8006    abcPXP123
8007 0: PXP
8008 1: P
8009
8010/(?:a(?&abc)b)*(?<abc>x)/
8011    123axbaxbaxbx456
8012 0: axbaxbaxbx
8013 1: x
8014    123axbaxbaxb456
8015 0: x
8016 1: x
8017
8018/(?:a(?&abc)b){1,5}(?<abc>x)/
8019    123axbaxbaxbx456
8020 0: axbaxbaxbx
8021 1: x
8022
8023/(?:a(?&abc)b){2,5}(?<abc>x)/
8024    123axbaxbaxbx456
8025 0: axbaxbaxbx
8026 1: x
8027
8028/(?:a(?&abc)b){2,}(?<abc>x)/
8029    123axbaxbaxbx456
8030 0: axbaxbaxbx
8031 1: x
8032
8033/(abc)(?i:(?1))/
8034   defabcabcxyz
8035 0: abcabc
8036 1: abc
8037   DEFabcABCXYZ
8038No match
8039
8040/(abc)(?:(?i)(?1))/
8041   defabcabcxyz
8042 0: abcabc
8043 1: abc
8044   DEFabcABCXYZ
8045No match
8046
8047/^(a)\g-2/
8048Failed: reference to non-existent subpattern at offset 7
8049
8050/^(a)\g/
8051Failed: a numbered reference must not be zero at offset 5
8052
8053/^(a)\g{0}/
8054Failed: a numbered reference must not be zero at offset 8
8055
8056/^(a)\g{3/
8057Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 8
8058
8059/^(a)\g{4a}/
8060Failed: reference to non-existent subpattern at offset 9
8061
8062/^a.b/<lf>
8063    a\rb
8064 0: a\x0db
8065    *** Failers
8066No match
8067    a\nb
8068No match
8069
8070/.+foo/
8071    afoo
8072 0: afoo
8073    ** Failers
8074No match
8075    \r\nfoo
8076No match
8077    \nfoo
8078No match
8079
8080/.+foo/<crlf>
8081    afoo
8082 0: afoo
8083    \nfoo
8084 0: \x0afoo
8085    ** Failers
8086No match
8087    \r\nfoo
8088No match
8089
8090/.+foo/<any>
8091    afoo
8092 0: afoo
8093    ** Failers
8094No match
8095    \nfoo
8096No match
8097    \r\nfoo
8098No match
8099
8100/.+foo/s
8101    afoo
8102 0: afoo
8103    \r\nfoo
8104 0: \x0d\x0afoo
8105    \nfoo
8106 0: \x0afoo
8107
8108/^$/mg<any>
8109    abc\r\rxyz
8110 0:
8111    abc\n\rxyz
8112 0:
8113    ** Failers
8114No match
8115    abc\r\nxyz
8116No match
8117
8118/(?m)^$/<any>g+
8119    abc\r\n\r\n
8120 0:
8121 0+ \x0d\x0a
8122
8123/(?m)^$|^\r\n/<any>g+
8124    abc\r\n\r\n
8125 0:
8126 0+ \x0d\x0a
8127 0: \x0d\x0a
8128 0+
8129
8130/(?m)$/<any>g+
8131    abc\r\n\r\n
8132 0:
8133 0+ \x0d\x0a\x0d\x0a
8134 0:
8135 0+ \x0d\x0a
8136 0:
8137 0+
8138
8139/abc.$/mgx<anycrlf>
8140    abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
8141 0: abc1
8142 0: abc4
8143 0: abc5
8144 0: abc9
8145
8146/^X/m
8147    XABC
8148 0: X
8149    ** Failers
8150No match
8151    XABC\B
8152No match
8153
8154/(ab|c)(?-1)/BZ
8155------------------------------------------------------------------
8156        Bra
8157        CBra 1
8158        ab
8159        Alt
8160        c
8161        Ket
8162        Recurse
8163        Ket
8164        End
8165------------------------------------------------------------------
8166    abc
8167 0: abc
8168 1: ab
8169
8170/xy(?+1)(abc)/BZ
8171------------------------------------------------------------------
8172        Bra
8173        xy
8174        Recurse
8175        CBra 1
8176        abc
8177        Ket
8178        Ket
8179        End
8180------------------------------------------------------------------
8181    xyabcabc
8182 0: xyabcabc
8183 1: abc
8184    ** Failers
8185No match
8186    xyabc
8187No match
8188
8189/x(?-0)y/
8190Failed: a numbered reference must not be zero at offset 5
8191
8192/x(?-1)y/
8193Failed: reference to non-existent subpattern at offset 5
8194
8195/x(?+0)y/
8196Failed: a numbered reference must not be zero at offset 5
8197
8198/x(?+1)y/
8199Failed: reference to non-existent subpattern at offset 5
8200
8201/^(abc)?(?(-1)X|Y)/BZ
8202------------------------------------------------------------------
8203        Bra
8204        ^
8205        Brazero
8206        CBra 1
8207        abc
8208        Ket
8209        Cond
8210      1 Cond ref
8211        X
8212        Alt
8213        Y
8214        Ket
8215        Ket
8216        End
8217------------------------------------------------------------------
8218    abcX
8219 0: abcX
8220 1: abc
8221    Y
8222 0: Y
8223    ** Failers
8224No match
8225    abcY
8226No match
8227
8228/^((?(+1)X|Y)(abc))+/BZ
8229------------------------------------------------------------------
8230        Bra
8231        ^
8232        CBra 1
8233        Cond
8234      2 Cond ref
8235        X
8236        Alt
8237        Y
8238        Ket
8239        CBra 2
8240        abc
8241        Ket
8242        KetRmax
8243        Ket
8244        End
8245------------------------------------------------------------------
8246    YabcXabc
8247 0: YabcXabc
8248 1: Xabc
8249 2: abc
8250    YabcXabcXabc
8251 0: YabcXabcXabc
8252 1: Xabc
8253 2: abc
8254    ** Failers
8255No match
8256    XabcXabc
8257No match
8258
8259/(?(-1)a)/BZ
8260Failed: reference to non-existent subpattern at offset 6
8261
8262/((?(-1)a))/BZ
8263------------------------------------------------------------------
8264        Bra
8265        CBra 1
8266        Cond
8267      1 Cond ref
8268        a
8269        Ket
8270        Ket
8271        Ket
8272        End
8273------------------------------------------------------------------
8274
8275/((?(-2)a))/BZ
8276Failed: reference to non-existent subpattern at offset 7
8277
8278/^(?(+1)X|Y)(.)/BZ
8279------------------------------------------------------------------
8280        Bra
8281        ^
8282        Cond
8283      1 Cond ref
8284        X
8285        Alt
8286        Y
8287        Ket
8288        CBra 1
8289        Any
8290        Ket
8291        Ket
8292        End
8293------------------------------------------------------------------
8294    Y!
8295 0: Y!
8296 1: !
8297
8298/(?<A>tom|bon)-\k{A}/
8299    tom-tom
8300 0: tom-tom
8301 1: tom
8302    bon-bon
8303 0: bon-bon
8304 1: bon
8305    ** Failers
8306No match
8307    tom-bon
8308No match
8309
8310/\g{A/
8311Failed: syntax error in subpattern name (missing terminator) at offset 4
8312
8313/(?|(abc)|(xyz))/BZ
8314------------------------------------------------------------------
8315        Bra
8316        Bra
8317        CBra 1
8318        abc
8319        Ket
8320        Alt
8321        CBra 1
8322        xyz
8323        Ket
8324        Ket
8325        Ket
8326        End
8327------------------------------------------------------------------
8328   >abc<
8329 0: abc
8330 1: abc
8331   >xyz<
8332 0: xyz
8333 1: xyz
8334
8335/(x)(?|(abc)|(xyz))(x)/BZ
8336------------------------------------------------------------------
8337        Bra
8338        CBra 1
8339        x
8340        Ket
8341        Bra
8342        CBra 2
8343        abc
8344        Ket
8345        Alt
8346        CBra 2
8347        xyz
8348        Ket
8349        Ket
8350        CBra 3
8351        x
8352        Ket
8353        Ket
8354        End
8355------------------------------------------------------------------
8356    xabcx
8357 0: xabcx
8358 1: x
8359 2: abc
8360 3: x
8361    xxyzx
8362 0: xxyzx
8363 1: x
8364 2: xyz
8365 3: x
8366
8367/(x)(?|(abc)(pqr)|(xyz))(x)/BZ
8368------------------------------------------------------------------
8369        Bra
8370        CBra 1
8371        x
8372        Ket
8373        Bra
8374        CBra 2
8375        abc
8376        Ket
8377        CBra 3
8378        pqr
8379        Ket
8380        Alt
8381        CBra 2
8382        xyz
8383        Ket
8384        Ket
8385        CBra 4
8386        x
8387        Ket
8388        Ket
8389        End
8390------------------------------------------------------------------
8391    xabcpqrx
8392 0: xabcpqrx
8393 1: x
8394 2: abc
8395 3: pqr
8396 4: x
8397    xxyzx
8398 0: xxyzx
8399 1: x
8400 2: xyz
8401 3: <unset>
8402 4: x
8403
8404/\H++X/BZ
8405------------------------------------------------------------------
8406        Bra
8407        \H++
8408        X
8409        Ket
8410        End
8411------------------------------------------------------------------
8412    ** Failers
8413No match
8414    XXXX
8415No match
8416
8417/\H+\hY/BZ
8418------------------------------------------------------------------
8419        Bra
8420        \H++
8421        \h
8422        Y
8423        Ket
8424        End
8425------------------------------------------------------------------
8426    XXXX Y
8427 0: XXXX Y
8428
8429/\H+ Y/BZ
8430------------------------------------------------------------------
8431        Bra
8432        \H++
8433         Y
8434        Ket
8435        End
8436------------------------------------------------------------------
8437
8438/\h+A/BZ
8439------------------------------------------------------------------
8440        Bra
8441        \h++
8442        A
8443        Ket
8444        End
8445------------------------------------------------------------------
8446
8447/\v*B/BZ
8448------------------------------------------------------------------
8449        Bra
8450        \v*+
8451        B
8452        Ket
8453        End
8454------------------------------------------------------------------
8455
8456/\V+\x0a/BZ
8457------------------------------------------------------------------
8458        Bra
8459        \V++
8460        \x0a
8461        Ket
8462        End
8463------------------------------------------------------------------
8464
8465/A+\h/BZ
8466------------------------------------------------------------------
8467        Bra
8468        A++
8469        \h
8470        Ket
8471        End
8472------------------------------------------------------------------
8473
8474/ *\H/BZ
8475------------------------------------------------------------------
8476        Bra
8477         *+
8478        \H
8479        Ket
8480        End
8481------------------------------------------------------------------
8482
8483/A*\v/BZ
8484------------------------------------------------------------------
8485        Bra
8486        A*+
8487        \v
8488        Ket
8489        End
8490------------------------------------------------------------------
8491
8492/\x0b*\V/BZ
8493------------------------------------------------------------------
8494        Bra
8495        \x0b*+
8496        \V
8497        Ket
8498        End
8499------------------------------------------------------------------
8500
8501/\d+\h/BZ
8502------------------------------------------------------------------
8503        Bra
8504        \d++
8505        \h
8506        Ket
8507        End
8508------------------------------------------------------------------
8509
8510/\d*\v/BZ
8511------------------------------------------------------------------
8512        Bra
8513        \d*+
8514        \v
8515        Ket
8516        End
8517------------------------------------------------------------------
8518
8519/S+\h\S+\v/BZ
8520------------------------------------------------------------------
8521        Bra
8522        S++
8523        \h
8524        \S++
8525        \v
8526        Ket
8527        End
8528------------------------------------------------------------------
8529
8530/\w{3,}\h\w+\v/BZ
8531------------------------------------------------------------------
8532        Bra
8533        \w{3}
8534        \w*+
8535        \h
8536        \w++
8537        \v
8538        Ket
8539        End
8540------------------------------------------------------------------
8541
8542/\h+\d\h+\w\h+\S\h+\H/BZ
8543------------------------------------------------------------------
8544        Bra
8545        \h++
8546        \d
8547        \h++
8548        \w
8549        \h++
8550        \S
8551        \h++
8552        \H
8553        Ket
8554        End
8555------------------------------------------------------------------
8556
8557/\v+\d\v+\w\v+\S\v+\V/BZ
8558------------------------------------------------------------------
8559        Bra
8560        \v++
8561        \d
8562        \v++
8563        \w
8564        \v+
8565        \S
8566        \v++
8567        \V
8568        Ket
8569        End
8570------------------------------------------------------------------
8571
8572/\H+\h\H+\d/BZ
8573------------------------------------------------------------------
8574        Bra
8575        \H++
8576        \h
8577        \H+
8578        \d
8579        Ket
8580        End
8581------------------------------------------------------------------
8582
8583/\V+\v\V+\w/BZ
8584------------------------------------------------------------------
8585        Bra
8586        \V++
8587        \v
8588        \V+
8589        \w
8590        Ket
8591        End
8592------------------------------------------------------------------
8593
8594/\( (?: [^()]* | (?R) )* \)/x
8595\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(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(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(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(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(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(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(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(00)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)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)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)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)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)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)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)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)
8596 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(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(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(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(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(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(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(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(00)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)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)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)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)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)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)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)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)
8597
8598/[\E]AAA/
8599Failed: missing terminating ] for character class at offset 7
8600
8601/[\Q\E]AAA/
8602Failed: missing terminating ] for character class at offset 9
8603
8604/[^\E]AAA/
8605Failed: missing terminating ] for character class at offset 8
8606
8607/[^\Q\E]AAA/
8608Failed: missing terminating ] for character class at offset 10
8609
8610/[\E^]AAA/
8611Failed: missing terminating ] for character class at offset 8
8612
8613/[\Q\E^]AAA/
8614Failed: missing terminating ] for character class at offset 10
8615
8616/A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ
8617------------------------------------------------------------------
8618        Bra
8619        A
8620        *PRUNE
8621        B
8622        *SKIP
8623        C
8624        *THEN
8625        D
8626        *COMMIT
8627        E
8628        *FAIL
8629        F
8630        *FAIL
8631        G
8632        *FAIL
8633        H
8634        *ACCEPT
8635        I
8636        Ket
8637        End
8638------------------------------------------------------------------
8639
8640/^a+(*FAIL)/C
8641    aaaaaa
8642--->aaaaaa
8643 +0 ^          ^
8644 +1 ^          a+
8645 +3 ^     ^    (*FAIL)
8646 +3 ^    ^     (*FAIL)
8647 +3 ^   ^      (*FAIL)
8648 +3 ^  ^       (*FAIL)
8649 +3 ^ ^        (*FAIL)
8650 +3 ^^         (*FAIL)
8651No match
8652
8653/a+b?c+(*FAIL)/C
8654    aaabccc
8655--->aaabccc
8656 +0 ^           a+
8657 +2 ^  ^        b?
8658 +4 ^   ^       c+
8659 +6 ^      ^    (*FAIL)
8660 +6 ^     ^     (*FAIL)
8661 +6 ^    ^      (*FAIL)
8662 +4 ^  ^        c+
8663 +2 ^ ^         b?
8664 +4 ^ ^         c+
8665 +2 ^^          b?
8666 +4 ^^          c+
8667 +0  ^          a+
8668 +2  ^ ^        b?
8669 +4  ^  ^       c+
8670 +6  ^     ^    (*FAIL)
8671 +6  ^    ^     (*FAIL)
8672 +6  ^   ^      (*FAIL)
8673 +4  ^ ^        c+
8674 +2  ^^         b?
8675 +4  ^^         c+
8676 +0   ^         a+
8677 +2   ^^        b?
8678 +4   ^ ^       c+
8679 +6   ^    ^    (*FAIL)
8680 +6   ^   ^     (*FAIL)
8681 +6   ^  ^      (*FAIL)
8682 +4   ^^        c+
8683No match
8684
8685/a+b?(*PRUNE)c+(*FAIL)/C
8686    aaabccc
8687--->aaabccc
8688 +0 ^           a+
8689 +2 ^  ^        b?
8690 +4 ^   ^       (*PRUNE)
8691+12 ^   ^       c+
8692+14 ^      ^    (*FAIL)
8693+14 ^     ^     (*FAIL)
8694+14 ^    ^      (*FAIL)
8695 +0  ^          a+
8696 +2  ^ ^        b?
8697 +4  ^  ^       (*PRUNE)
8698+12  ^  ^       c+
8699+14  ^     ^    (*FAIL)
8700+14  ^    ^     (*FAIL)
8701+14  ^   ^      (*FAIL)
8702 +0   ^         a+
8703 +2   ^^        b?
8704 +4   ^ ^       (*PRUNE)
8705+12   ^ ^       c+
8706+14   ^    ^    (*FAIL)
8707+14   ^   ^     (*FAIL)
8708+14   ^  ^      (*FAIL)
8709No match
8710
8711/a+b?(*COMMIT)c+(*FAIL)/C
8712    aaabccc
8713--->aaabccc
8714 +0 ^           a+
8715 +2 ^  ^        b?
8716 +4 ^   ^       (*COMMIT)
8717+13 ^   ^       c+
8718+15 ^      ^    (*FAIL)
8719+15 ^     ^     (*FAIL)
8720+15 ^    ^      (*FAIL)
8721No match
8722
8723/a+b?(*SKIP)c+(*FAIL)/C
8724    aaabcccaaabccc
8725--->aaabcccaaabccc
8726 +0 ^                  a+
8727 +2 ^  ^               b?
8728 +4 ^   ^              (*SKIP)
8729+11 ^   ^              c+
8730+13 ^      ^           (*FAIL)
8731+13 ^     ^            (*FAIL)
8732+13 ^    ^             (*FAIL)
8733 +0        ^           a+
8734 +2        ^  ^        b?
8735 +4        ^   ^       (*SKIP)
8736+11        ^   ^       c+
8737+13        ^      ^    (*FAIL)
8738+13        ^     ^     (*FAIL)
8739+13        ^    ^      (*FAIL)
8740No match
8741
8742/a+b?(*THEN)c+(*FAIL)/C
8743    aaabccc
8744--->aaabccc
8745 +0 ^           a+
8746 +2 ^  ^        b?
8747 +4 ^   ^       (*THEN)
8748+11 ^   ^       c+
8749+13 ^      ^    (*FAIL)
8750+13 ^     ^     (*FAIL)
8751+13 ^    ^      (*FAIL)
8752 +0  ^          a+
8753 +2  ^ ^        b?
8754 +4  ^  ^       (*THEN)
8755+11  ^  ^       c+
8756+13  ^     ^    (*FAIL)
8757+13  ^    ^     (*FAIL)
8758+13  ^   ^      (*FAIL)
8759 +0   ^         a+
8760 +2   ^^        b?
8761 +4   ^ ^       (*THEN)
8762+11   ^ ^       c+
8763+13   ^    ^    (*FAIL)
8764+13   ^   ^     (*FAIL)
8765+13   ^  ^      (*FAIL)
8766No match
8767
8768/a(*MARK)b/
8769Failed: (*MARK) must have an argument at offset 7
8770
8771/(?i:A{1,}\6666666666)/
8772Failed: number is too big at offset 19
8773
8774/\g6666666666/
8775Failed: number is too big at offset 11
8776
8777/[\g6666666666]/BZ
8778------------------------------------------------------------------
8779        Bra
8780        [6g]
8781        Ket
8782        End
8783------------------------------------------------------------------
8784
8785/(?1)\c[/
8786Failed: reference to non-existent subpattern at offset 3
8787
8788/.+A/<crlf>
8789    \r\nA
8790No match
8791
8792/\nA/<crlf>
8793    \r\nA
8794 0: \x0aA
8795
8796/[\r\n]A/<crlf>
8797    \r\nA
8798 0: \x0aA
8799
8800/(\r|\n)A/<crlf>
8801    \r\nA
8802 0: \x0aA
8803 1: \x0a
8804
8805/a(*CR)b/
8806Failed: (*VERB) not recognized at offset 5
8807
8808/(*CR)a.b/
8809    a\nb
8810 0: a\x0ab
8811    ** Failers
8812No match
8813    a\rb
8814No match
8815
8816/(*CR)a.b/<lf>
8817    a\nb
8818 0: a\x0ab
8819    ** Failers
8820No match
8821    a\rb
8822No match
8823
8824/(*LF)a.b/<CRLF>
8825    a\rb
8826 0: a\x0db
8827    ** Failers
8828No match
8829    a\nb
8830No match
8831
8832/(*CRLF)a.b/
8833    a\rb
8834 0: a\x0db
8835    a\nb
8836 0: a\x0ab
8837    ** Failers
8838No match
8839    a\r\nb
8840No match
8841
8842/(*ANYCRLF)a.b/<CR>
8843    ** Failers
8844No match
8845    a\rb
8846No match
8847    a\nb
8848No match
8849    a\r\nb
8850No match
8851
8852/(*ANY)a.b/<cr>
8853    ** Failers
8854No match
8855    a\rb
8856No match
8857    a\nb
8858No match
8859    a\r\nb
8860No match
8861    a\x85b
8862No match
8863
8864/(*ANY).*/g
8865    abc\r\ndef
8866 0: abc
8867 0:
8868 0: def
8869 0:
8870
8871/(*ANYCRLF).*/g
8872    abc\r\ndef
8873 0: abc
8874 0:
8875 0: def
8876 0:
8877
8878/(*CRLF).*/g
8879    abc\r\ndef
8880 0: abc
8881 0:
8882 0: def
8883 0:
8884
8885/a\Rb/I<bsr_anycrlf>
8886Capturing subpattern count = 0
8887Options: bsr_anycrlf
8888First char = 'a'
8889Need char = 'b'
8890    a\rb
8891 0: a\x0db
8892    a\nb
8893 0: a\x0ab
8894    a\r\nb
8895 0: a\x0d\x0ab
8896    ** Failers
8897No match
8898    a\x85b
8899No match
8900    a\x0bb
8901No match
8902
8903/a\Rb/I<bsr_unicode>
8904Capturing subpattern count = 0
8905Options: bsr_unicode
8906First char = 'a'
8907Need char = 'b'
8908    a\rb
8909 0: a\x0db
8910    a\nb
8911 0: a\x0ab
8912    a\r\nb
8913 0: a\x0d\x0ab
8914    a\x85b
8915 0: a\x85b
8916    a\x0bb
8917 0: a\x0bb
8918    ** Failers
8919No match
8920    a\x85b\<bsr_anycrlf>
8921No match
8922    a\x0bb\<bsr_anycrlf>
8923No match
8924
8925/a\R?b/I<bsr_anycrlf>
8926Capturing subpattern count = 0
8927Options: bsr_anycrlf
8928First char = 'a'
8929Need char = 'b'
8930    a\rb
8931 0: a\x0db
8932    a\nb
8933 0: a\x0ab
8934    a\r\nb
8935 0: a\x0d\x0ab
8936    ** Failers
8937No match
8938    a\x85b
8939No match
8940    a\x0bb
8941No match
8942
8943/a\R?b/I<bsr_unicode>
8944Capturing subpattern count = 0
8945Options: bsr_unicode
8946First char = 'a'
8947Need char = 'b'
8948    a\rb
8949 0: a\x0db
8950    a\nb
8951 0: a\x0ab
8952    a\r\nb
8953 0: a\x0d\x0ab
8954    a\x85b
8955 0: a\x85b
8956    a\x0bb
8957 0: a\x0bb
8958    ** Failers
8959No match
8960    a\x85b\<bsr_anycrlf>
8961No match
8962    a\x0bb\<bsr_anycrlf>
8963No match
8964
8965/a\R{2,4}b/I<bsr_anycrlf>
8966Capturing subpattern count = 0
8967Options: bsr_anycrlf
8968First char = 'a'
8969Need char = 'b'
8970    a\r\n\nb
8971 0: a\x0d\x0a\x0ab
8972    a\n\r\rb
8973 0: a\x0a\x0d\x0db
8974    a\r\n\r\n\r\n\r\nb
8975 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
8976    ** Failers
8977No match
8978    a\x85\85b
8979No match
8980    a\x0b\0bb
8981No match
8982
8983/a\R{2,4}b/I<bsr_unicode>
8984Capturing subpattern count = 0
8985Options: bsr_unicode
8986First char = 'a'
8987Need char = 'b'
8988    a\r\rb
8989 0: a\x0d\x0db
8990    a\n\n\nb
8991 0: a\x0a\x0a\x0ab
8992    a\r\n\n\r\rb
8993 0: a\x0d\x0a\x0a\x0d\x0db
8994    a\x85\85b
8995No match
8996    a\x0b\0bb
8997No match
8998    ** Failers
8999No match
9000    a\r\r\r\r\rb
9001No match
9002    a\x85\85b\<bsr_anycrlf>
9003No match
9004    a\x0b\0bb\<bsr_anycrlf>
9005No match
9006
9007/(*BSR_ANYCRLF)a\Rb/I
9008Capturing subpattern count = 0
9009Options: bsr_anycrlf
9010First char = 'a'
9011Need char = 'b'
9012    a\nb
9013 0: a\x0ab
9014    a\rb
9015 0: a\x0db
9016
9017/(*BSR_UNICODE)a\Rb/I
9018Capturing subpattern count = 0
9019Options: bsr_unicode
9020First char = 'a'
9021Need char = 'b'
9022    a\x85b
9023 0: a\x85b
9024
9025/(*BSR_ANYCRLF)(*CRLF)a\Rb/I
9026Capturing subpattern count = 0
9027Options: bsr_anycrlf
9028Forced newline sequence: CRLF
9029First char = 'a'
9030Need char = 'b'
9031    a\nb
9032 0: a\x0ab
9033    a\rb
9034 0: a\x0db
9035
9036/(*CRLF)(*BSR_UNICODE)a\Rb/I
9037Capturing subpattern count = 0
9038Options: bsr_unicode
9039Forced newline sequence: CRLF
9040First char = 'a'
9041Need char = 'b'
9042    a\x85b
9043 0: a\x85b
9044
9045/(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
9046Capturing subpattern count = 0
9047Options: bsr_anycrlf
9048Forced newline sequence: CR
9049First char = 'a'
9050Need char = 'b'
9051
9052/(?<a>)(?&)/
9053Failed: subpattern name expected at offset 9
9054
9055/(?<abc>)(?&a)/
9056Failed: reference to non-existent subpattern at offset 12
9057
9058/(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
9059Failed: reference to non-existent subpattern at offset 32
9060
9061/(?+-a)/
9062Failed: digit expected after (?+ at offset 3
9063
9064/(?-+a)/
9065Failed: unrecognized character after (? or (?- at offset 3
9066
9067/(?(-1))/
9068Failed: reference to non-existent subpattern at offset 6
9069
9070/(?(+10))/
9071Failed: reference to non-existent subpattern at offset 7
9072
9073/(?(10))/
9074Failed: reference to non-existent subpattern at offset 6
9075
9076/(?(+2))()()/
9077
9078/(?(2))()()/
9079
9080/\k''/
9081Failed: subpattern name expected at offset 3
9082
9083/\k<>/
9084Failed: subpattern name expected at offset 3
9085
9086/\k{}/
9087Failed: subpattern name expected at offset 3
9088
9089/\k/
9090Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 2
9091
9092/\kabc/
9093Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 5
9094
9095/(?P=)/
9096Failed: subpattern name expected at offset 4
9097
9098/(?P>)/
9099Failed: subpattern name expected at offset 4
9100
9101/(?!\w)(?R)/
9102Failed: recursive call could loop indefinitely at offset 9
9103
9104/(?=\w)(?R)/
9105Failed: recursive call could loop indefinitely at offset 9
9106
9107/(?<!\w)(?R)/
9108Failed: recursive call could loop indefinitely at offset 10
9109
9110/(?<=\w)(?R)/
9111Failed: recursive call could loop indefinitely at offset 10
9112
9113/[[:foo:]]/
9114Failed: unknown POSIX class name at offset 3
9115
9116/[[:1234:]]/
9117Failed: unknown POSIX class name at offset 3
9118
9119/[[:f\oo:]]/
9120Failed: unknown POSIX class name at offset 3
9121
9122/[[: :]]/
9123Failed: unknown POSIX class name at offset 3
9124
9125/[[:...:]]/
9126Failed: unknown POSIX class name at offset 3
9127
9128/[[:l\ower:]]/
9129Failed: unknown POSIX class name at offset 3
9130
9131/[[:abc\:]]/
9132Failed: unknown POSIX class name at offset 3
9133
9134/[abc[:x\]pqr:]]/
9135Failed: unknown POSIX class name at offset 6
9136
9137/[[:a\dz:]]/
9138Failed: unknown POSIX class name at offset 3
9139
9140/(^(a|b\g<-1'c))/
9141Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15
9142
9143/^(?+1)(?<a>x|y){0}z/
9144    xzxx
9145 0: xz
9146    yzyy
9147 0: yz
9148    ** Failers
9149No match
9150    xxz
9151No match
9152
9153/(\3)(\1)(a)/
9154    cat
9155No match
9156
9157/(\3)(\1)(a)/<JS>
9158    cat
9159 0: a
9160 1:
9161 2:
9162 3: a
9163
9164/TA]/
9165    The ACTA] comes
9166 0: TA]
9167
9168/TA]/<JS>
9169Failed: ] is an invalid data character in JavaScript compatibility mode at offset 2
9170
9171/(?2)[]a()b](abc)/
9172Failed: reference to non-existent subpattern at offset 3
9173
9174/(?2)[^]a()b](abc)/
9175Failed: reference to non-existent subpattern at offset 3
9176
9177/(?1)[]a()b](abc)/
9178    abcbabc
9179 0: abcbabc
9180 1: abc
9181    ** Failers
9182No match
9183    abcXabc
9184No match
9185
9186/(?1)[^]a()b](abc)/
9187    abcXabc
9188 0: abcXabc
9189 1: abc
9190    ** Failers
9191No match
9192    abcbabc
9193No match
9194
9195/(?2)[]a()b](abc)(xyz)/
9196    xyzbabcxyz
9197 0: xyzbabcxyz
9198 1: abc
9199 2: xyz
9200
9201/(?&N)[]a(?<N>)](?<M>abc)/
9202Failed: reference to non-existent subpattern at offset 4
9203
9204/(?&N)[]a(?<N>)](abc)/
9205Failed: reference to non-existent subpattern at offset 4
9206
9207/a[]b/
9208Failed: missing terminating ] for character class at offset 4
9209
9210/a[^]b/
9211Failed: missing terminating ] for character class at offset 5
9212
9213/a[]b/<JS>
9214    ** Failers
9215No match
9216    ab
9217No match
9218
9219/a[]+b/<JS>
9220    ** Failers
9221No match
9222    ab
9223No match
9224
9225/a[]*+b/<JS>
9226    ** Failers
9227No match
9228    ab
9229No match
9230
9231/a[^]b/<JS>
9232    aXb
9233 0: aXb
9234    a\nb
9235 0: a\x0ab
9236    ** Failers
9237No match
9238    ab
9239No match
9240
9241/a[^]+b/<JS>
9242    aXb
9243 0: aXb
9244    a\nX\nXb
9245 0: a\x0aX\x0aXb
9246    ** Failers
9247No match
9248    ab
9249No match
9250
9251/a(?!)+b/
9252Failed: nothing to repeat at offset 5
9253
9254/a(*FAIL)+b/
9255Failed: nothing to repeat at offset 8
9256
9257/(abc|pqr|123){0}[xyz]/SI
9258Capturing subpattern count = 1
9259No options
9260No first char
9261No need char
9262Subject length lower bound = 1
9263Starting byte set: x y z
9264
9265/(?(?=.*b)b|^)/CI
9266Capturing subpattern count = 0
9267Options:
9268No first char
9269No need char
9270   adc
9271--->adc
9272 +0 ^       (?(?=.*b)b|^)
9273 +2 ^       (?=.*b)
9274 +5 ^       .*
9275 +7 ^  ^    b
9276 +7 ^ ^     b
9277 +7 ^^      b
9278 +7 ^       b
9279+12 ^       )
9280+13 ^
9281 0:
9282   abc
9283--->abc
9284 +0 ^       (?(?=.*b)b|^)
9285 +2 ^       (?=.*b)
9286 +5 ^       .*
9287 +7 ^  ^    b
9288 +7 ^ ^     b
9289 +7 ^^      b
9290 +8 ^ ^     )
9291 +9 ^       b
9292 +0  ^      (?(?=.*b)b|^)
9293 +2  ^      (?=.*b)
9294 +5  ^      .*
9295 +7  ^ ^    b
9296 +7  ^^     b
9297 +7  ^      b
9298 +8  ^^     )
9299 +9  ^      b
9300+10  ^^     |
9301+13  ^^
9302 0: b
9303
9304/(?(?=b).*b|^d)/I
9305Capturing subpattern count = 0
9306No options
9307No first char
9308No need char
9309
9310/(?(?=.*b).*b|^d)/I
9311Capturing subpattern count = 0
9312No options
9313First char at start or follows newline
9314No need char
9315
9316/xyz/C
9317  xyz
9318--->xyz
9319 +0 ^       x
9320 +1 ^^      y
9321 +2 ^ ^     z
9322 +3 ^  ^
9323 0: xyz
9324  abcxyz
9325--->abcxyz
9326 +0    ^       x
9327 +1    ^^      y
9328 +2    ^ ^     z
9329 +3    ^  ^
9330 0: xyz
9331  abcxyz\Y
9332--->abcxyz
9333 +0 ^          x
9334 +0  ^         x
9335 +0   ^        x
9336 +0    ^       x
9337 +1    ^^      y
9338 +2    ^ ^     z
9339 +3    ^  ^
9340 0: xyz
9341  ** Failers
9342No match
9343  abc
9344No match
9345  abc\Y
9346--->abc
9347 +0 ^       x
9348 +0  ^      x
9349 +0   ^     x
9350 +0    ^    x
9351No match
9352  abcxypqr
9353No match
9354  abcxypqr\Y
9355--->abcxypqr
9356 +0 ^            x
9357 +0  ^           x
9358 +0   ^          x
9359 +0    ^         x
9360 +1    ^^        y
9361 +2    ^ ^       z
9362 +0     ^        x
9363 +0      ^       x
9364 +0       ^      x
9365 +0        ^     x
9366 +0         ^    x
9367No match
9368
9369/(*NO_START_OPT)xyz/C
9370  abcxyz
9371--->abcxyz
9372+15 ^          x
9373+15  ^         x
9374+15   ^        x
9375+15    ^       x
9376+16    ^^      y
9377+17    ^ ^     z
9378+18    ^  ^
9379 0: xyz
9380
9381/xyz/CY
9382  abcxyz
9383--->abcxyz
9384 +0 ^          x
9385 +0  ^         x
9386 +0   ^        x
9387 +0    ^       x
9388 +1    ^^      y
9389 +2    ^ ^     z
9390 +3    ^  ^
9391 0: xyz
9392
9393/^"((?(?=[a])[^"])|b)*"$/C
9394    "ab"
9395--->"ab"
9396 +0 ^        ^
9397 +1 ^        "
9398 +2 ^^       ((?(?=[a])[^"])|b)*
9399 +3 ^^       (?(?=[a])[^"])
9400 +5 ^^       (?=[a])
9401 +8 ^^       [a]
9402+11 ^ ^      )
9403+12 ^^       [^"]
9404+16 ^ ^      )
9405+17 ^ ^      |
9406 +3 ^ ^      (?(?=[a])[^"])
9407 +5 ^ ^      (?=[a])
9408 +8 ^ ^      [a]
9409+21 ^ ^      "
9410+18 ^ ^      b
9411+19 ^  ^     )
9412 +3 ^  ^     (?(?=[a])[^"])
9413 +5 ^  ^     (?=[a])
9414 +8 ^  ^     [a]
9415+21 ^  ^     "
9416+22 ^   ^    $
9417+23 ^   ^
9418 0: "ab"
9419 1:
9420
9421/^"((?(?=[a])[^"])|b)*"$/
9422    "ab"
9423 0: "ab"
9424 1:
9425
9426/^X(?5)(a)(?|(b)|(q))(c)(d)Y/
9427Failed: reference to non-existent subpattern at offset 5
9428
9429/^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
9430    XYabcdY
9431 0: XYabcdY
9432 1: a
9433 2: b
9434 3: c
9435 4: d
9436 5: Y
9437
9438/Xa{2,4}b/
9439    X\P
9440Partial match: X
9441    Xa\P
9442Partial match: Xa
9443    Xaa\P
9444Partial match: Xaa
9445    Xaaa\P
9446Partial match: Xaaa
9447    Xaaaa\P
9448Partial match: Xaaaa
9449
9450/Xa{2,4}?b/
9451    X\P
9452Partial match: X
9453    Xa\P
9454Partial match: Xa
9455    Xaa\P
9456Partial match: Xaa
9457    Xaaa\P
9458Partial match: Xaaa
9459    Xaaaa\P
9460Partial match: Xaaaa
9461
9462/Xa{2,4}+b/
9463    X\P
9464Partial match: X
9465    Xa\P
9466Partial match: Xa
9467    Xaa\P
9468Partial match: Xaa
9469    Xaaa\P
9470Partial match: Xaaa
9471    Xaaaa\P
9472Partial match: Xaaaa
9473
9474/X\d{2,4}b/
9475    X\P
9476Partial match: X
9477    X3\P
9478Partial match: X3
9479    X33\P
9480Partial match: X33
9481    X333\P
9482Partial match: X333
9483    X3333\P
9484Partial match: X3333
9485
9486/X\d{2,4}?b/
9487    X\P
9488Partial match: X
9489    X3\P
9490Partial match: X3
9491    X33\P
9492Partial match: X33
9493    X333\P
9494Partial match: X333
9495    X3333\P
9496Partial match: X3333
9497
9498/X\d{2,4}+b/
9499    X\P
9500Partial match: X
9501    X3\P
9502Partial match: X3
9503    X33\P
9504Partial match: X33
9505    X333\P
9506Partial match: X333
9507    X3333\P
9508Partial match: X3333
9509
9510/X\D{2,4}b/
9511    X\P
9512Partial match: X
9513    Xa\P
9514Partial match: Xa
9515    Xaa\P
9516Partial match: Xaa
9517    Xaaa\P
9518Partial match: Xaaa
9519    Xaaaa\P
9520Partial match: Xaaaa
9521
9522/X\D{2,4}?b/
9523    X\P
9524Partial match: X
9525    Xa\P
9526Partial match: Xa
9527    Xaa\P
9528Partial match: Xaa
9529    Xaaa\P
9530Partial match: Xaaa
9531    Xaaaa\P
9532Partial match: Xaaaa
9533
9534/X\D{2,4}+b/
9535    X\P
9536Partial match: X
9537    Xa\P
9538Partial match: Xa
9539    Xaa\P
9540Partial match: Xaa
9541    Xaaa\P
9542Partial match: Xaaa
9543    Xaaaa\P
9544Partial match: Xaaaa
9545
9546/X[abc]{2,4}b/
9547    X\P
9548Partial match: X
9549    Xa\P
9550Partial match: Xa
9551    Xaa\P
9552Partial match: Xaa
9553    Xaaa\P
9554Partial match: Xaaa
9555    Xaaaa\P
9556Partial match: Xaaaa
9557
9558/X[abc]{2,4}?b/
9559    X\P
9560Partial match: X
9561    Xa\P
9562Partial match: Xa
9563    Xaa\P
9564Partial match: Xaa
9565    Xaaa\P
9566Partial match: Xaaa
9567    Xaaaa\P
9568Partial match: Xaaaa
9569
9570/X[abc]{2,4}+b/
9571    X\P
9572Partial match: X
9573    Xa\P
9574Partial match: Xa
9575    Xaa\P
9576Partial match: Xaa
9577    Xaaa\P
9578Partial match: Xaaa
9579    Xaaaa\P
9580Partial match: Xaaaa
9581
9582/X[^a]{2,4}b/
9583    X\P
9584Partial match: X
9585    Xz\P
9586Partial match: Xz
9587    Xzz\P
9588Partial match: Xzz
9589    Xzzz\P
9590Partial match: Xzzz
9591    Xzzzz\P
9592Partial match: Xzzzz
9593
9594/X[^a]{2,4}?b/
9595    X\P
9596Partial match: X
9597    Xz\P
9598Partial match: Xz
9599    Xzz\P
9600Partial match: Xzz
9601    Xzzz\P
9602Partial match: Xzzz
9603    Xzzzz\P
9604Partial match: Xzzzz
9605
9606/X[^a]{2,4}+b/
9607    X\P
9608Partial match: X
9609    Xz\P
9610Partial match: Xz
9611    Xzz\P
9612Partial match: Xzz
9613    Xzzz\P
9614Partial match: Xzzz
9615    Xzzzz\P
9616Partial match: Xzzzz
9617
9618/(Y)X\1{2,4}b/
9619    YX\P
9620Partial match: YX
9621    YXY\P
9622Partial match: YXY
9623    YXYY\P
9624Partial match: YXYY
9625    YXYYY\P
9626Partial match: YXYYY
9627    YXYYYY\P
9628Partial match: YXYYYY
9629
9630/(Y)X\1{2,4}?b/
9631    YX\P
9632Partial match: YX
9633    YXY\P
9634Partial match: YXY
9635    YXYY\P
9636Partial match: YXYY
9637    YXYYY\P
9638Partial match: YXYYY
9639    YXYYYY\P
9640Partial match: YXYYYY
9641
9642/(Y)X\1{2,4}+b/
9643    YX\P
9644Partial match: YX
9645    YXY\P
9646Partial match: YXY
9647    YXYY\P
9648Partial match: YXYY
9649    YXYYY\P
9650Partial match: YXYYY
9651    YXYYYY\P
9652Partial match: YXYYYY
9653
9654/\++\KZ|\d+X|9+Y/
9655    ++++123999\P
9656Partial match: 123999
9657    ++++123999Y\P
9658 0: 999Y
9659    ++++Z1234\P
9660 0: Z
9661
9662/Z(*F)/
9663    Z\P
9664No match
9665    ZA\P
9666No match
9667
9668/Z(?!)/
9669    Z\P
9670No match
9671    ZA\P
9672No match
9673
9674/dog(sbody)?/
9675    dogs\P
9676 0: dog
9677    dogs\P\P
9678Partial match: dogs
9679
9680/dog(sbody)??/
9681    dogs\P
9682 0: dog
9683    dogs\P\P
9684 0: dog
9685
9686/dog|dogsbody/
9687    dogs\P
9688 0: dog
9689    dogs\P\P
9690 0: dog
9691
9692/dogsbody|dog/
9693    dogs\P
9694 0: dog
9695    dogs\P\P
9696Partial match: dogs
9697
9698/\bthe cat\b/
9699    the cat\P
9700 0: the cat
9701    the cat\P\P
9702Partial match: the cat
9703
9704/abc/
9705   abc\P
9706 0: abc
9707   abc\P\P
9708 0: abc
9709
9710/abc\K123/
9711    xyzabc123pqr
9712 0: 123
9713    xyzabc12\P
9714Partial match: abc12
9715    xyzabc12\P\P
9716Partial match: abc12
9717
9718/(?<=abc)123/
9719    xyzabc123pqr
9720 0: 123
9721    xyzabc12\P
9722Partial match: abc12
9723    xyzabc12\P\P
9724Partial match: abc12
9725
9726/\babc\b/
9727    +++abc+++
9728 0: abc
9729    +++ab\P
9730Partial match: +ab
9731    +++ab\P\P
9732Partial match: +ab
9733
9734/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
9735------------------------------------------------------------------
9736        Bra
9737        Recurse
9738        Recurse
9739        Cond
9740        Cond def
9741        CBra 1
9742        <
9743        [^m]
9744        [^>]
9745        >
9746        [^<]
9747        Ket
9748        CBra 2
9749        \w*+
9750        Ket
9751        Ket
9752        Ket
9753        End
9754------------------------------------------------------------------
9755
9756/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
9757------------------------------------------------------------------
9758        Bra
9759        Recurse
9760        Recurse
9761        Cond
9762        Cond def
9763        CBra 1
9764        <
9765        [\x00-/:-\xff] (neg)
9766        [^>]
9767        >
9768        [^<]
9769        Ket
9770        CBra 2
9771        \w*+
9772        Ket
9773        Ket
9774        Ket
9775        End
9776------------------------------------------------------------------
9777
9778/(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
9779------------------------------------------------------------------
9780        Bra
9781        CBra 1
9782        ab
9783        Ket
9784        CBra 2
9785        x
9786        CBra 3
9787        y
9788        Ket
9789        z
9790        CBra 4
9791        cd
9792        Close 4
9793        Close 2
9794        *ACCEPT
9795        Ket
9796        Ket
9797        pq
9798        Ket
9799        End
9800------------------------------------------------------------------
9801
9802/abc\K/+
9803    abcdef
9804 0:
9805 0+ def
9806    abcdef\N\N
9807 0:
9808 0+ def
9809    xyzabcdef\N\N
9810 0:
9811 0+ def
9812    ** Failers
9813No match
9814    abcdef\N
9815No match
9816    xyzabcdef\N
9817No match
9818
9819/^(?:(?=abc)|abc\K)/+
9820    abcdef
9821 0:
9822 0+ abcdef
9823    abcdef\N\N
9824 0:
9825 0+ def
9826    ** Failers
9827No match
9828    abcdef\N
9829No match
9830
9831/a?b?/+
9832    xyz
9833 0:
9834 0+ xyz
9835    xyzabc
9836 0:
9837 0+ xyzabc
9838    xyzabc\N
9839 0: ab
9840 0+ c
9841    xyzabc\N\N
9842 0:
9843 0+ yzabc
9844    xyz\N\N
9845 0:
9846 0+ yz
9847    ** Failers
9848 0:
9849 0+ ** Failers
9850    xyz\N
9851No match
9852
9853/^a?b?/+
9854    xyz
9855 0:
9856 0+ xyz
9857    xyzabc
9858 0:
9859 0+ xyzabc
9860    ** Failers
9861 0:
9862 0+ ** Failers
9863    xyzabc\N
9864No match
9865    xyzabc\N\N
9866No match
9867    xyz\N\N
9868No match
9869    xyz\N
9870No match
9871
9872/^(?<name>a|b\g<name>c)/
9873    aaaa
9874 0: a
9875 1: a
9876    bacxxx
9877 0: bac
9878 1: bac
9879    bbaccxxx
9880 0: bbacc
9881 1: bbacc
9882    bbbacccxx
9883 0: bbbaccc
9884 1: bbbaccc
9885
9886/^(?<name>a|b\g'name'c)/
9887    aaaa
9888 0: a
9889 1: a
9890    bacxxx
9891 0: bac
9892 1: bac
9893    bbaccxxx
9894 0: bbacc
9895 1: bbacc
9896    bbbacccxx
9897 0: bbbaccc
9898 1: bbbaccc
9899
9900/^(a|b\g<1>c)/
9901    aaaa
9902 0: a
9903 1: a
9904    bacxxx
9905 0: bac
9906 1: bac
9907    bbaccxxx
9908 0: bbacc
9909 1: bbacc
9910    bbbacccxx
9911 0: bbbaccc
9912 1: bbbaccc
9913
9914/^(a|b\g'1'c)/
9915    aaaa
9916 0: a
9917 1: a
9918    bacxxx
9919 0: bac
9920 1: bac
9921    bbaccxxx
9922 0: bbacc
9923 1: bbacc
9924    bbbacccxx
9925 0: bbbaccc
9926 1: bbbaccc
9927
9928/^(a|b\g'-1'c)/
9929    aaaa
9930 0: a
9931 1: a
9932    bacxxx
9933 0: bac
9934 1: bac
9935    bbaccxxx
9936 0: bbacc
9937 1: bbacc
9938    bbbacccxx
9939 0: bbbaccc
9940 1: bbbaccc
9941
9942/(^(a|b\g<-1>c))/
9943    aaaa
9944 0: a
9945 1: a
9946 2: a
9947    bacxxx
9948 0: bac
9949 1: bac
9950 2: bac
9951    bbaccxxx
9952 0: bbacc
9953 1: bbacc
9954 2: bbacc
9955    bbbacccxx
9956 0: bbbaccc
9957 1: bbbaccc
9958 2: bbbaccc
9959
9960/(?-i:\g<name>)(?i:(?<name>a))/
9961    XaaX
9962 0: aa
9963 1: a
9964    XAAX
9965 0: AA
9966 1: A
9967
9968/(?i:\g<name>)(?-i:(?<name>a))/
9969    XaaX
9970 0: aa
9971 1: a
9972    ** Failers
9973No match
9974    XAAX
9975No match
9976
9977/(?-i:\g<+1>)(?i:(a))/
9978    XaaX
9979 0: aa
9980 1: a
9981    XAAX
9982 0: AA
9983 1: A
9984
9985/(?=(?<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>\})\}))\{/
9986
9987/(?<n>a|b|c)\g<n>*/
9988   abc
9989 0: abc
9990 1: a
9991   accccbbb
9992 0: accccbbb
9993 1: a
9994
9995/^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
9996    XYabcdY
9997 0: XYabcdY
9998 1: a
9999 2: b
10000 3: <unset>
10001 4: <unset>
10002 5: c
10003 6: d
10004 7: Y
10005
10006/(?<=b(?1)|zzz)(a)/
10007    xbaax
10008 0: a
10009 1: a
10010    xzzzax
10011 0: a
10012 1: a
10013
10014/(a)(?<=b\1)/
10015Failed: lookbehind assertion is not fixed length at offset 10
10016
10017/(a)(?<=b+(?1))/
10018Failed: lookbehind assertion is not fixed length at offset 13
10019
10020/(a+)(?<=b(?1))/
10021Failed: lookbehind assertion is not fixed length at offset 14
10022
10023/(a(?<=b(?1)))/
10024Failed: lookbehind assertion is not fixed length at offset 13
10025
10026/(?<=b(?1))xyz/
10027Failed: reference to non-existent subpattern at offset 8
10028
10029/(?<=b(?1))xyz(b+)pqrstuvew/
10030Failed: lookbehind assertion is not fixed length at offset 26
10031
10032/(a|bc)\1/SI
10033Capturing subpattern count = 1
10034Max back reference = 1
10035No options
10036No first char
10037No need char
10038Subject length lower bound = 2
10039Starting byte set: a b
10040
10041/(a|bc)\1{2,3}/SI
10042Capturing subpattern count = 1
10043Max back reference = 1
10044No options
10045No first char
10046No need char
10047Subject length lower bound = 3
10048Starting byte set: a b
10049
10050/(a|bc)(?1)/SI
10051Capturing subpattern count = 1
10052No options
10053No first char
10054No need char
10055Subject length lower bound = 2
10056Starting byte set: a b
10057
10058/(a|b\1)(a|b\1)/SI
10059Capturing subpattern count = 2
10060Max back reference = 1
10061No options
10062No first char
10063No need char
10064Subject length lower bound = 2
10065Starting byte set: a b
10066
10067/(a|b\1){2}/SI
10068Capturing subpattern count = 1
10069Max back reference = 1
10070No options
10071No first char
10072No need char
10073Subject length lower bound = 2
10074Starting byte set: a b
10075
10076/(a|bbbb\1)(a|bbbb\1)/SI
10077Capturing subpattern count = 2
10078Max back reference = 1
10079No options
10080No first char
10081No need char
10082Subject length lower bound = 2
10083Starting byte set: a b
10084
10085/(a|bbbb\1){2}/SI
10086Capturing subpattern count = 1
10087Max back reference = 1
10088No options
10089No first char
10090No need char
10091Subject length lower bound = 2
10092Starting byte set: a b
10093
10094/^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
10095Capturing subpattern count = 1
10096Options: anchored
10097No first char
10098Need char = ':'
10099Subject length lower bound = 22
10100No set of starting bytes
10101
10102/<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
10103Capturing subpattern count = 11
10104Options: caseless dotall
10105First char = '<'
10106Need char = '>'
10107Subject length lower bound = 47
10108No set of starting bytes
10109
10110"(?>.*/)foo"SI
10111Capturing subpattern count = 0
10112No options
10113No first char
10114Need char = 'o'
10115Subject length lower bound = 4
10116No set of starting bytes
10117
10118/(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /xSI
10119Capturing subpattern count = 0
10120Options: extended
10121No first char
10122Need char = '-'
10123Subject length lower bound = 8
10124No set of starting bytes
10125
10126/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
10127Capturing subpattern count = 1
10128Options: caseless
10129No first char
10130No need char
10131Subject length lower bound = 1
10132Starting byte set: A B C a b c
10133
10134/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
10135Capturing subpattern count = 0
10136No options
10137No first char
10138Need char = 'b'
10139Subject length lower bound = 41
10140Starting byte set: c d
10141
10142/<a[\s]+href[\s]*=[\s]*          # find <a href=
10143 ([\"\'])?                       # find single or double quote
10144 (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
10145                                 # quote, otherwise match up to next space
10146/isxSI
10147Capturing subpattern count = 3
10148Max back reference = 1
10149Options: caseless extended dotall
10150First char = '<'
10151Need char = '='
10152Subject length lower bound = 9
10153No set of starting bytes
10154
10155/^(?!:)                       # colon disallowed at start
10156  (?:                         # start of item
10157    (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
10158    (?(1)0 | () ) )           # if null previously matched, fail; else null
10159    :                         # followed by colon
10160  ){1,7}                      # end item; 1-7 of them required
10161  [0-9a-f]{1,4} $             # final hex number at end of string
10162  (?(1)|.)                    # check that there was an empty component
10163  /xiIS
10164Capturing subpattern count = 1
10165Options: anchored caseless extended
10166No first char
10167Need char = ':'
10168Subject length lower bound = 2
10169No set of starting bytes
10170
10171/(?|(?<a>A)|(?<a>B))/I
10172Capturing subpattern count = 1
10173Named capturing subpatterns:
10174  a   1
10175  a   1
10176No options
10177No first char
10178No need char
10179    AB\Ca
10180 0: A
10181 1: A
10182  C A (1) a
10183    BA\Ca
10184 0: B
10185 1: B
10186  C B (1) a
10187
10188/(?|(?<a>A)|(?<b>B))/
10189Failed: different names for subpatterns of the same number are not allowed at offset 15
10190
10191/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
10192    b(?<quote> (?<apostrophe>')|(?<realquote>")) )
10193    (?('quote')[a-z]+|[0-9]+)/JIx
10194Capturing subpattern count = 6
10195Named capturing subpatterns:
10196  apostrophe   2
10197  apostrophe   5
10198  quote        1
10199  quote        4
10200  realquote    3
10201  realquote    6
10202Options: extended dupnames
10203No first char
10204No need char
10205    a"aaaaa
10206 0: a"aaaaa
10207 1: "
10208 2: <unset>
10209 3: "
10210    b"aaaaa
10211 0: b"aaaaa
10212 1: <unset>
10213 2: <unset>
10214 3: <unset>
10215 4: "
10216 5: <unset>
10217 6: "
10218    ** Failers
10219No match
10220    b"11111
10221No match
10222    a"11111
10223No match
10224
10225/^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
10226------------------------------------------------------------------
10227        Bra
10228        ^
10229        Bra
10230        CBra 1
10231        a
10232        Ket
10233        CBra 2
10234        b
10235        Ket
10236        CBra 3
10237        c
10238        Ket
10239        CBra 4
10240        d
10241        Ket
10242        Alt
10243        CBra 1
10244        e
10245        Ket
10246        Ket
10247        Cond
10248      4 Cond nref
10249        X
10250        Alt
10251        Y
10252        Ket
10253        Ket
10254        End
10255------------------------------------------------------------------
10256Capturing subpattern count = 4
10257Named capturing subpatterns:
10258  D   4
10259  D   1
10260Options: anchored extended dupnames
10261No first char
10262No need char
10263    abcdX
10264 0: abcdX
10265 1: a
10266 2: b
10267 3: c
10268 4: d
10269    eX
10270 0: eX
10271 1: e
10272    ** Failers
10273No match
10274    abcdY
10275No match
10276    ey
10277No match
10278
10279/(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
10280------------------------------------------------------------------
10281        Bra
10282        CBra 1
10283        a
10284        Ket
10285        CBra 2
10286        b
10287        Ket
10288        CBra 3
10289        c
10290        Ket
10291        CBra 4
10292        d
10293        Cond
10294        Cond nrecurse 1
10295        $
10296        Alt
10297        Recurse
10298        Ket
10299        Ket
10300        Ket
10301        End
10302------------------------------------------------------------------
10303Capturing subpattern count = 4
10304Named capturing subpatterns:
10305  A   1
10306  A   4
10307Options: extended dupnames
10308First char = 'a'
10309Need char = 'd'
10310    abcdd
10311 0: abcdd
10312 1: a
10313 2: b
10314 3: c
10315 4: dd
10316    ** Failers
10317No match
10318    abcdde
10319No match
10320
10321/abcd*/
10322    xxxxabcd\P
10323 0: abcd
10324    xxxxabcd\P\P
10325Partial match: abcd
10326
10327/abcd*/i
10328    xxxxabcd\P
10329 0: abcd
10330    xxxxabcd\P\P
10331Partial match: abcd
10332    XXXXABCD\P
10333 0: ABCD
10334    XXXXABCD\P\P
10335Partial match: ABCD
10336
10337/abc\d*/
10338    xxxxabc1\P
10339 0: abc1
10340    xxxxabc1\P\P
10341Partial match: abc1
10342
10343/(a)bc\1*/
10344    xxxxabca\P
10345 0: abca
10346 1: a
10347    xxxxabca\P\P
10348Partial match: abca
10349
10350/abc[de]*/
10351    xxxxabcde\P
10352 0: abcde
10353    xxxxabcde\P\P
10354Partial match: abcde
10355
10356/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
10357    broken and not behaving as specified in that it *does* bumpalong after
10358    hitting (*COMMIT). --/
10359
10360/(?1)(A(*COMMIT)|B)D/
10361    ABD
10362 0: ABD
10363 1: B
10364    XABD
10365 0: ABD
10366 1: B
10367    BAD
10368 0: BAD
10369 1: A
10370    ABXABD
10371 0: ABD
10372 1: B
10373    ** Failers
10374No match
10375    ABX
10376No match
10377    BAXBAD
10378No match
10379
10380/(\3)(\1)(a)/<JS>
10381    cat
10382 0: a
10383 1:
10384 2:
10385 3: a
10386
10387/(\3)(\1)(a)/SI<JS>
10388Capturing subpattern count = 3
10389Max back reference = 3
10390Options:
10391No first char
10392Need char = 'a'
10393Subject length lower bound = 1
10394No set of starting bytes
10395    cat
10396 0: a
10397 1:
10398 2:
10399 3: a
10400
10401/(\3)(\1)(a)/SI
10402Capturing subpattern count = 3
10403Max back reference = 3
10404No options
10405No first char
10406Need char = 'a'
10407Subject length lower bound = 3
10408No set of starting bytes
10409    cat
10410No match
10411
10412/i(?(DEFINE)(?<s>a))/SI
10413Capturing subpattern count = 1
10414Named capturing subpatterns:
10415  s   1
10416No options
10417First char = 'i'
10418No need char
10419Subject length lower bound = 1
10420No set of starting bytes
10421    i
10422 0: i
10423
10424/()i(?(1)a)/SI
10425Capturing subpattern count = 1
10426No options
10427No first char
10428Need char = 'i'
10429Subject length lower bound = 1
10430Starting byte set: i
10431    ia
10432 0: ia
10433 1:
10434
10435/(?i)a(?-i)b|c/BZ
10436------------------------------------------------------------------
10437        Bra
10438     /i a
10439        b
10440        Alt
10441        c
10442        Ket
10443        End
10444------------------------------------------------------------------
10445    XabX
10446 0: ab
10447    XAbX
10448 0: Ab
10449    CcC
10450 0: c
10451    ** Failers
10452No match
10453    XABX
10454No match
10455
10456/(?i)a(?s)b|c/BZ
10457------------------------------------------------------------------
10458        Bra
10459     /i ab
10460        Alt
10461     /i c
10462        Ket
10463        End
10464------------------------------------------------------------------
10465
10466/(?i)a(?s-i)b|c/BZ
10467------------------------------------------------------------------
10468        Bra
10469     /i a
10470        b
10471        Alt
10472        c
10473        Ket
10474        End
10475------------------------------------------------------------------
10476
10477/^(ab(c\1)d|x){2}$/BZ
10478------------------------------------------------------------------
10479        Bra
10480        ^
10481        Once
10482        CBra 1
10483        ab
10484        CBra 2
10485        c
10486        \1
10487        Ket
10488        d
10489        Alt
10490        x
10491        Ket
10492        Ket
10493        Once
10494        CBra 1
10495        ab
10496        CBra 2
10497        c
10498        \1
10499        Ket
10500        d
10501        Alt
10502        x
10503        Ket
10504        Ket
10505        $
10506        Ket
10507        End
10508------------------------------------------------------------------
10509    xabcxd
10510 0: xabcxd
10511 1: abcxd
10512 2: cx
10513
10514/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
10515------------------------------------------------------------------
10516        Bra
10517        ^
10518        Braposzero
10519        SBraPos
10520        Recurse
10521        KetRpos
10522        Cond
10523        Cond def
10524        CBra 1
10525        Any
10526        Ket
10527        Ket
10528        $
10529        Ket
10530        End
10531------------------------------------------------------------------
10532
10533/^(?&t)*(?(DEFINE)(?<t>.))$/BZ
10534------------------------------------------------------------------
10535        Bra
10536        ^
10537        Brazero
10538        Once
10539        Recurse
10540        KetRmax
10541        Cond
10542        Cond def
10543        CBra 1
10544        Any
10545        Ket
10546        Ket
10547        $
10548        Ket
10549        End
10550------------------------------------------------------------------
10551
10552/ -- The first four of these are not in the Perl >= 5.10 test because Perl
10553     documents that the use of \K in assertions is "not well defined". The
10554     last is here because Perl gives the match as "b" rather than "ab". I
10555     believe this to be a Perl bug. --/
10556
10557/(?=a\Kb)ab/
10558    ab
10559 0: b
10560
10561/(?!a\Kb)ac/
10562    ac
10563 0: ac
10564
10565/^abc(?<=b\Kc)d/
10566    abcd
10567 0: cd
10568
10569/^abc(?<!b\Kq)d/
10570    abcd
10571 0: abcd
10572
10573/(?>a\Kb)z|(ab)/
10574    ab
10575 0: ab
10576 1: ab
10577
10578/----------------------/
10579
10580/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
10581Failed: recursive call could loop indefinitely at offset 31
10582
10583/abc(*MARK:)pqr/
10584Failed: (*MARK) must have an argument at offset 10
10585
10586/abc(*:)pqr/
10587Failed: (*MARK) must have an argument at offset 6
10588
10589/abc(*FAIL:123)xyz/
10590Failed: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) at offset 13
10591
10592/--- This should, and does, fail. In Perl, it does not, which I think is a
10593     bug because replacing the B in the pattern by (B|D) does make it fail. ---/
10594
10595/A(*COMMIT)B/+K
10596    ACABX
10597No match
10598
10599/--- These should be different, but in Perl 5.11 are not, which I think
10600     is a bug in Perl. ---/
10601
10602/A(*THEN)B|A(*THEN)C/K
10603    AC
10604 0: AC
10605
10606/A(*PRUNE)B|A(*PRUNE)C/K
10607    AC
10608No match
10609
10610/--- This should fail; the SKIP advances by one, but when we get to AC, the
10611     PRUNE kills it. Perl behaves differently. ---/
10612
10613/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
10614    AAAC
10615No match, mark = A
10616
10617/--- Mark names can be duplicated. Perl doesn't give a mark for this one,
10618though PCRE does. ---/
10619
10620/^A(*:A)B|^X(*:A)Y/K
10621    ** Failers
10622No match
10623    XAQQ
10624No match, mark = A
10625
10626/--- COMMIT at the start of a pattern should be the same as an anchor. Perl
10627optimizations defeat this. So does the PCRE optimization unless we disable it
10628with \Y. ---/
10629
10630/(*COMMIT)ABC/
10631    ABCDEFG
10632 0: ABC
10633    ** Failers
10634No match
10635    DEFGABC\Y
10636No match
10637
10638/^(ab (c+(*THEN)cd) | xyz)/x
10639    abcccd
10640No match
10641
10642/^(ab (c+(*PRUNE)cd) | xyz)/x
10643    abcccd
10644No match
10645
10646/^(ab (c+(*FAIL)cd) | xyz)/x
10647    abcccd
10648No match
10649
10650/--- Perl 5.11 gets some of these wrong ---/
10651
10652/(?>.(*ACCEPT))*?5/
10653    abcde
10654 0: a
10655
10656/(.(*ACCEPT))*?5/
10657    abcde
10658 0: a
10659 1: a
10660
10661/(.(*ACCEPT))5/
10662    abcde
10663 0: a
10664 1: a
10665
10666/(.(*ACCEPT))*5/
10667    abcde
10668 0: a
10669 1: a
10670
10671/A\NB./BZ
10672------------------------------------------------------------------
10673        Bra
10674        A
10675        Any
10676        B
10677        Any
10678        Ket
10679        End
10680------------------------------------------------------------------
10681    ACBD
10682 0: ACBD
10683    *** Failers
10684No match
10685    A\nB
10686No match
10687    ACB\n
10688No match
10689
10690/A\NB./sBZ
10691------------------------------------------------------------------
10692        Bra
10693        A
10694        Any
10695        B
10696        AllAny
10697        Ket
10698        End
10699------------------------------------------------------------------
10700    ACBD
10701 0: ACBD
10702    ACB\n
10703 0: ACB\x0a
10704    *** Failers
10705No match
10706    A\nB
10707No match
10708
10709/A\NB/<crlf>
10710    A\nB
10711 0: A\x0aB
10712    A\rB
10713 0: A\x0dB
10714    ** Failers
10715No match
10716    A\r\nB
10717No match
10718
10719/\R+b/BZ
10720------------------------------------------------------------------
10721        Bra
10722        \R++
10723        b
10724        Ket
10725        End
10726------------------------------------------------------------------
10727
10728/\R+\n/BZ
10729------------------------------------------------------------------
10730        Bra
10731        \R+
10732        \x0a
10733        Ket
10734        End
10735------------------------------------------------------------------
10736
10737/\R+\d/BZ
10738------------------------------------------------------------------
10739        Bra
10740        \R++
10741        \d
10742        Ket
10743        End
10744------------------------------------------------------------------
10745
10746/\d*\R/BZ
10747------------------------------------------------------------------
10748        Bra
10749        \d*+
10750        \R
10751        Ket
10752        End
10753------------------------------------------------------------------
10754
10755/\s*\R/BZ
10756------------------------------------------------------------------
10757        Bra
10758        \s*
10759        \R
10760        Ket
10761        End
10762------------------------------------------------------------------
10763    \x20\x0a
10764 0:  \x0a
10765    \x20\x0d
10766 0:  \x0d
10767    \x20\x0d\x0a
10768 0:  \x0d\x0a
10769
10770/\S*\R/BZ
10771------------------------------------------------------------------
10772        Bra
10773        \S*+
10774        \R
10775        Ket
10776        End
10777------------------------------------------------------------------
10778    a\x0a
10779 0: a\x0a
10780
10781/X\h*\R/BZ
10782------------------------------------------------------------------
10783        Bra
10784        X
10785        \h*+
10786        \R
10787        Ket
10788        End
10789------------------------------------------------------------------
10790    X\x20\x0a
10791 0: X \x0a
10792
10793/X\H*\R/BZ
10794------------------------------------------------------------------
10795        Bra
10796        X
10797        \H*
10798        \R
10799        Ket
10800        End
10801------------------------------------------------------------------
10802    X\x0d\x0a
10803 0: X\x0d\x0a
10804
10805/X\H+\R/BZ
10806------------------------------------------------------------------
10807        Bra
10808        X
10809        \H+
10810        \R
10811        Ket
10812        End
10813------------------------------------------------------------------
10814    X\x0d\x0a
10815 0: X\x0d\x0a
10816
10817/X\H++\R/BZ
10818------------------------------------------------------------------
10819        Bra
10820        X
10821        \H++
10822        \R
10823        Ket
10824        End
10825------------------------------------------------------------------
10826    X\x0d\x0a
10827No match
10828
10829/-- Perl treats this one differently, not failing the second string. I believe
10830    that is a bug in Perl. --/
10831
10832/^((abc|abcx)(*THEN)y|abcd)/
10833    abcd
10834 0: abcd
10835 1: abcd
10836    *** Failers
10837No match
10838    abcxy
10839No match
10840
10841/(?<=abc)def/
10842    abc\P\P
10843Partial match: abc
10844
10845/abc$/
10846    abc
10847 0: abc
10848    abc\P
10849 0: abc
10850    abc\P\P
10851Partial match: abc
10852
10853/abc$/m
10854    abc
10855 0: abc
10856    abc\n
10857 0: abc
10858    abc\P\P
10859Partial match: abc
10860    abc\n\P\P
10861 0: abc
10862    abc\P
10863 0: abc
10864    abc\n\P
10865 0: abc
10866
10867/abc\z/
10868    abc
10869 0: abc
10870    abc\P
10871 0: abc
10872    abc\P\P
10873Partial match: abc
10874
10875/abc\Z/
10876    abc
10877 0: abc
10878    abc\P
10879 0: abc
10880    abc\P\P
10881Partial match: abc
10882
10883/abc\b/
10884    abc
10885 0: abc
10886    abc\P
10887 0: abc
10888    abc\P\P
10889Partial match: abc
10890
10891/abc\B/
10892    abc
10893No match
10894    abc\P
10895Partial match: abc
10896    abc\P\P
10897Partial match: abc
10898
10899/.+/
10900    abc\>0
10901 0: abc
10902    abc\>1
10903 0: bc
10904    abc\>2
10905 0: c
10906    abc\>3
10907No match
10908    abc\>4
10909Error -24 (bad offset value)
10910    abc\>-4
10911Error -24 (bad offset value)
10912
10913/^\cģ/
10914Failed: \c must be followed by an ASCII character at offset 3
10915
10916/(?P<abn>(?P=abn)xxx)/BZ
10917------------------------------------------------------------------
10918        Bra
10919        Once
10920        CBra 1
10921        \1
10922        xxx
10923        Ket
10924        Ket
10925        Ket
10926        End
10927------------------------------------------------------------------
10928
10929/(a\1z)/BZ
10930------------------------------------------------------------------
10931        Bra
10932        Once
10933        CBra 1
10934        a
10935        \1
10936        z
10937        Ket
10938        Ket
10939        Ket
10940        End
10941------------------------------------------------------------------
10942
10943/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
10944Failed: syntax error in subpattern name (missing terminator) at offset 29
10945
10946/(?P<abn>(?P=axn)xxx)/BZ
10947Failed: reference to non-existent subpattern at offset 15
10948
10949/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
10950------------------------------------------------------------------
10951        Bra
10952        CBra 1
10953        \2
10954        xxx
10955        Ket
10956        CBra 2
10957        yy
10958        Ket
10959        Ket
10960        End
10961------------------------------------------------------------------
10962
10963/-- These tests are here because Perl gets the first one wrong. --/
10964
10965/(\R*)(.)/s
10966    \r\n
10967 0: \x0d
10968 1:
10969 2: \x0d
10970    \r\r\n\n\r
10971 0: \x0d\x0d\x0a\x0a\x0d
10972 1: \x0d\x0d\x0a\x0a
10973 2: \x0d
10974    \r\r\n\n\r\n
10975 0: \x0d\x0d\x0a\x0a\x0d
10976 1: \x0d\x0d\x0a\x0a
10977 2: \x0d
10978
10979/(\R)*(.)/s
10980    \r\n
10981 0: \x0d
10982 1: <unset>
10983 2: \x0d
10984    \r\r\n\n\r
10985 0: \x0d\x0d\x0a\x0a\x0d
10986 1: \x0a
10987 2: \x0d
10988    \r\r\n\n\r\n
10989 0: \x0d\x0d\x0a\x0a\x0d
10990 1: \x0a
10991 2: \x0d
10992
10993/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
10994    \r\n
10995 0: \x0d
10996 1:
10997 2: \x0d
10998    \r\r\n\n\r
10999 0: \x0d\x0d\x0a\x0a\x0d
11000 1: \x0d\x0d\x0a\x0a
11001 2: \x0d
11002    \r\r\n\n\r\n
11003 0: \x0d\x0d\x0a\x0a\x0d
11004 1: \x0d\x0d\x0a\x0a
11005 2: \x0d
11006
11007/-- --/
11008
11009/^abc$/BZ
11010------------------------------------------------------------------
11011        Bra
11012        ^
11013        abc
11014        $
11015        Ket
11016        End
11017------------------------------------------------------------------
11018
11019/^abc$/BZm
11020------------------------------------------------------------------
11021        Bra
11022     /m ^
11023        abc
11024     /m $
11025        Ket
11026        End
11027------------------------------------------------------------------
11028
11029/^(a)*+(\w)/S
11030    aaaaX
11031 0: aaaaX
11032 1: a
11033 2: X
11034    ** Failers
11035No match
11036    aaaa
11037No match
11038
11039/^(?:a)*+(\w)/S
11040    aaaaX
11041 0: aaaaX
11042 1: X
11043    ** Failers
11044No match
11045    aaaa
11046No match
11047
11048/(a)++1234/SDZ
11049------------------------------------------------------------------
11050        Bra
11051        CBraPos 1
11052        a
11053        KetRpos
11054        1234
11055        Ket
11056        End
11057------------------------------------------------------------------
11058Capturing subpattern count = 1
11059No options
11060First char = 'a'
11061Need char = '4'
11062Subject length lower bound = 5
11063No set of starting bytes
11064
11065/([abc])++1234/SI
11066Capturing subpattern count = 1
11067No options
11068No first char
11069Need char = '4'
11070Subject length lower bound = 5
11071Starting byte set: a b c
11072
11073/(?<=(abc)+)X/
11074Failed: lookbehind assertion is not fixed length at offset 10
11075
11076/(^ab)/I
11077Capturing subpattern count = 1
11078Options: anchored
11079No first char
11080No need char
11081
11082/(^ab)++/I
11083Capturing subpattern count = 1
11084Options: anchored
11085No first char
11086No need char
11087
11088/(^ab|^)+/I
11089Capturing subpattern count = 1
11090Options: anchored
11091No first char
11092No need char
11093
11094/(^ab|^)++/I
11095Capturing subpattern count = 1
11096Options: anchored
11097No first char
11098No need char
11099
11100/(?:^ab)/I
11101Capturing subpattern count = 0
11102Options: anchored
11103No first char
11104No need char
11105
11106/(?:^ab)++/I
11107Capturing subpattern count = 0
11108Options: anchored
11109No first char
11110No need char
11111
11112/(?:^ab|^)+/I
11113Capturing subpattern count = 0
11114Options: anchored
11115No first char
11116No need char
11117
11118/(?:^ab|^)++/I
11119Capturing subpattern count = 0
11120Options: anchored
11121No first char
11122No need char
11123
11124/(.*ab)/I
11125Capturing subpattern count = 1
11126No options
11127First char at start or follows newline
11128Need char = 'b'
11129
11130/(.*ab)++/I
11131Capturing subpattern count = 1
11132No options
11133First char at start or follows newline
11134Need char = 'b'
11135
11136/(.*ab|.*)+/I
11137Capturing subpattern count = 1
11138No options
11139First char at start or follows newline
11140No need char
11141
11142/(.*ab|.*)++/I
11143Capturing subpattern count = 1
11144No options
11145First char at start or follows newline
11146No need char
11147
11148/(?:.*ab)/I
11149Capturing subpattern count = 0
11150No options
11151First char at start or follows newline
11152Need char = 'b'
11153
11154/(?:.*ab)++/I
11155Capturing subpattern count = 0
11156No options
11157First char at start or follows newline
11158Need char = 'b'
11159
11160/(?:.*ab|.*)+/I
11161Capturing subpattern count = 0
11162No options
11163First char at start or follows newline
11164No need char
11165
11166/(?:.*ab|.*)++/I
11167Capturing subpattern count = 0
11168No options
11169First char at start or follows newline
11170No need char
11171
11172/(?=a)[bcd]/I
11173Capturing subpattern count = 0
11174No options
11175First char = 'a'
11176No need char
11177
11178/((?=a))[bcd]/I
11179Capturing subpattern count = 1
11180No options
11181First char = 'a'
11182No need char
11183
11184/((?=a))+[bcd]/I
11185Capturing subpattern count = 1
11186No options
11187First char = 'a'
11188No need char
11189
11190/((?=a))++[bcd]/I
11191Capturing subpattern count = 1
11192No options
11193First char = 'a'
11194No need char
11195
11196/(?=a+)[bcd]/iI
11197Capturing subpattern count = 0
11198Options: caseless
11199First char = 'a' (caseless)
11200No need char
11201
11202/(?=a+?)[bcd]/iI
11203Capturing subpattern count = 0
11204Options: caseless
11205First char = 'a' (caseless)
11206No need char
11207
11208/(?=a++)[bcd]/iI
11209Capturing subpattern count = 0
11210Options: caseless
11211First char = 'a' (caseless)
11212No need char
11213
11214/(?=a{3})[bcd]/iI
11215Capturing subpattern count = 0
11216Options: caseless
11217First char = 'a' (caseless)
11218Need char = 'a' (caseless)
11219
11220/(abc)\1+/S
11221
11222/-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
11223
11224/(?1)(?:(b(*ACCEPT))){0}/
11225    b
11226 0: b
11227
11228/(?1)(?:(b(*ACCEPT))){0}c/
11229    bc
11230 0: bc
11231    ** Failers
11232No match
11233    b
11234No match
11235
11236/(?1)(?:((*ACCEPT))){0}c/
11237    c
11238 0: c
11239    c\N
11240 0: c
11241
11242/^.*?(?(?=a)a|b(*THEN)c)/
11243    ba
11244No match
11245
11246/^.*?(?(?=a)a|bc)/
11247    ba
11248 0: ba
11249
11250/^.*?(?(?=a)a(*THEN)b|c)/
11251    ac
11252No match
11253
11254/^.*?(?(?=a)a(*THEN)b)c/
11255    ac
11256No match
11257
11258/^.*?(a(*THEN)b)c/
11259    aabc
11260No match
11261
11262/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
11263    aabc
11264 0: aabc
11265
11266/^.*?(a(*THEN)b|z)c/
11267    aabc
11268 0: aabc
11269 1: ab
11270
11271/^.*?(z|a(*THEN)b)c/
11272    aabc
11273 0: aabc
11274 1: ab
11275
11276/-- --/
11277
11278/-- These studied versions are here because they are not Perl-compatible; the
11279    studying means the mark is not seen. --/
11280
11281/(*MARK:A)(*SKIP:B)(C|X)/KS
11282    C
11283 0: C
11284 1: C
11285MK: A
11286    D
11287No match, mark = A
11288
11289/(*:A)A+(*SKIP:A)(B|Z)/KS
11290    AAAC
11291No match, mark = A
11292
11293/-- --/
11294
11295"(?=a*(*ACCEPT)b)c"
11296    c
11297 0: c
11298    c\N
11299 0: c
11300
11301/(?1)c(?(DEFINE)((*ACCEPT)b))/
11302    c
11303 0: c
11304    c\N
11305 0: c
11306
11307/(?>(*ACCEPT)b)c/
11308    c
11309 0:
11310    c\N
11311No match
11312
11313/(?:(?>(a)))+a%/++
11314    %aa%
11315 0: aa%
11316 0+
11317 1: a
11318 1+ a%
11319
11320/(a)b|ac/++SS
11321    ac\O3
11322Matched, but too many substrings
11323 0: ac
11324 0+
11325
11326/(a)(b)x|abc/++
11327     abc\O6
11328 0: abc
11329 0+
11330
11331/(a)bc|(a)(b)\2/
11332    \O3abc
11333Matched, but too many substrings
11334 0: abc
11335    \O4abc
11336Matched, but too many substrings
11337 0: abc
11338
11339/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
11340Capturing subpattern count = 2
11341No options
11342No first char
11343No need char
11344Subject length lower bound = 1
11345No set of starting bytes
11346
11347/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
11348Capturing subpattern count = 2
11349No options
11350No first char
11351No need char
11352Subject length lower bound = 3
11353Starting byte set: a b
11354
11355/(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
11356Capturing subpattern count = 2
11357No options
11358No first char
11359No need char
11360Subject length lower bound = 4
11361Starting byte set: a b
11362
11363/(abc)(?1)/SI
11364Capturing subpattern count = 1
11365No options
11366First char = 'a'
11367Need char = 'c'
11368Subject length lower bound = 6
11369No set of starting bytes
11370
11371/^(?>a)++/
11372    aa\M
11373Minimum match() limit = 5
11374Minimum match() recursion limit = 2
11375 0: aa
11376    aaaaaaaaa\M
11377Minimum match() limit = 12
11378Minimum match() recursion limit = 2
11379 0: aaaaaaaaa
11380
11381/(a)(?1)++/
11382    aa\M
11383Minimum match() limit = 7
11384Minimum match() recursion limit = 4
11385 0: aa
11386 1: a
11387    aaaaaaaaa\M
11388Minimum match() limit = 21
11389Minimum match() recursion limit = 4
11390 0: aaaaaaaaa
11391 1: a
11392
11393/(?:(foo)|(bar)|(baz))X/SS=
11394    bazfooX
11395 0: fooX
11396 1: foo
11397 2: <unset>
11398 3: <unset>
11399    foobazbarX
11400 0: barX
11401 1: <unset>
11402 2: bar
11403 3: <unset>
11404    barfooX
11405 0: fooX
11406 1: foo
11407 2: <unset>
11408 3: <unset>
11409    bazX
11410 0: bazX
11411 1: <unset>
11412 2: <unset>
11413 3: baz
11414    foobarbazX
11415 0: bazX
11416 1: <unset>
11417 2: <unset>
11418 3: baz
11419    bazfooX\O0
11420Matched, but too many substrings
11421    bazfooX\O2
11422Matched, but too many substrings
11423 0: fooX
11424    bazfooX\O4
11425Matched, but too many substrings
11426 0: fooX
11427 1: <unset>
11428    bazfooX\O6
11429Matched, but too many substrings
11430 0: fooX
11431 1: foo
11432 2: <unset>
11433    bazfooX\O8
11434Matched, but too many substrings
11435 0: fooX
11436 1: foo
11437 2: <unset>
11438 3: <unset>
11439    bazfooX\O10
11440 0: fooX
11441 1: foo
11442 2: <unset>
11443 3: <unset>
11444
11445/(?=abc){3}abc/BZ
11446------------------------------------------------------------------
11447        Bra
11448        Assert
11449        abc
11450        Ket
11451        abc
11452        Ket
11453        End
11454------------------------------------------------------------------
11455
11456/(?=abc)+abc/BZ
11457------------------------------------------------------------------
11458        Bra
11459        Assert
11460        abc
11461        Ket
11462        abc
11463        Ket
11464        End
11465------------------------------------------------------------------
11466
11467/(?=abc)++abc/BZ
11468------------------------------------------------------------------
11469        Bra
11470        Assert
11471        abc
11472        Ket
11473        abc
11474        Ket
11475        End
11476------------------------------------------------------------------
11477
11478/(?=abc){0}xyz/BZ
11479------------------------------------------------------------------
11480        Bra
11481        Skip zero
11482        Assert
11483        abc
11484        Ket
11485        xyz
11486        Ket
11487        End
11488------------------------------------------------------------------
11489
11490/(?=(a))?./BZ
11491------------------------------------------------------------------
11492        Bra
11493        Brazero
11494        Assert
11495        CBra 1
11496        a
11497        Ket
11498        Ket
11499        Any
11500        Ket
11501        End
11502------------------------------------------------------------------
11503
11504/(?=(a))??./BZ
11505------------------------------------------------------------------
11506        Bra
11507        Braminzero
11508        Assert
11509        CBra 1
11510        a
11511        Ket
11512        Ket
11513        Any
11514        Ket
11515        End
11516------------------------------------------------------------------
11517
11518/^(?=(a)){0}b(?1)/BZ
11519------------------------------------------------------------------
11520        Bra
11521        ^
11522        Skip zero
11523        Assert
11524        CBra 1
11525        a
11526        Ket
11527        Ket
11528        b
11529        Recurse
11530        Ket
11531        End
11532------------------------------------------------------------------
11533
11534/(?(DEFINE)(a))?b(?1)/BZ
11535------------------------------------------------------------------
11536        Bra
11537        Cond
11538        Cond def
11539        CBra 1
11540        a
11541        Ket
11542        Ket
11543        b
11544        Recurse
11545        Ket
11546        End
11547------------------------------------------------------------------
11548
11549/^(?=(?1))?[az]([abc])d/BZ
11550------------------------------------------------------------------
11551        Bra
11552        ^
11553        Brazero
11554        Assert
11555        Recurse
11556        Ket
11557        [az]
11558        CBra 1
11559        [a-c]
11560        Ket
11561        d
11562        Ket
11563        End
11564------------------------------------------------------------------
11565
11566/^(?!a){0}\w+/BZ
11567------------------------------------------------------------------
11568        Bra
11569        ^
11570        Skip zero
11571        Assert not
11572        a
11573        Ket
11574        \w+
11575        Ket
11576        End
11577------------------------------------------------------------------
11578
11579/(?<=(abc))?xyz/BZ
11580------------------------------------------------------------------
11581        Bra
11582        Brazero
11583        AssertB
11584        Reverse
11585        CBra 1
11586        abc
11587        Ket
11588        Ket
11589        xyz
11590        Ket
11591        End
11592------------------------------------------------------------------
11593
11594/[:a[:abc]b:]/BZ
11595------------------------------------------------------------------
11596        Bra
11597        [:[a-c]
11598        b:]
11599        Ket
11600        End
11601------------------------------------------------------------------
11602
11603/((?2))((?1))/SS
11604    abc
11605Error -26 (nested recursion at the same subject position)
11606
11607/((?(R2)a+|(?1)b))/SS
11608    aaaabcde
11609Error -26 (nested recursion at the same subject position)
11610
11611/(?(R)a*(?1)|((?R))b)/SS
11612    aaaabcde
11613Error -26 (nested recursion at the same subject position)
11614
11615/(a+|(?R)b)/
11616Failed: recursive call could loop indefinitely at offset 7
11617
11618/^(a(*:A)(d|e(*:B))z|aeq)/C
11619    adz
11620--->adz
11621 +0 ^       ^
11622 +1 ^       (a(*:A)(d|e(*:B))z|aeq)
11623 +2 ^       a
11624 +3 ^^      (*:A)
11625 +8 ^^      (d|e(*:B))
11626Latest Mark: A
11627 +9 ^^      d
11628+10 ^ ^     |
11629+18 ^ ^     z
11630+19 ^  ^    |
11631+24 ^  ^
11632 0: adz
11633 1: adz
11634 2: d
11635    aez
11636--->aez
11637 +0 ^       ^
11638 +1 ^       (a(*:A)(d|e(*:B))z|aeq)
11639 +2 ^       a
11640 +3 ^^      (*:A)
11641 +8 ^^      (d|e(*:B))
11642Latest Mark: A
11643 +9 ^^      d
11644+11 ^^      e
11645+12 ^ ^     (*:B)
11646+17 ^ ^     )
11647Latest Mark: B
11648+18 ^ ^     z
11649+19 ^  ^    |
11650+24 ^  ^
11651 0: aez
11652 1: aez
11653 2: e
11654    aeqwerty
11655--->aeqwerty
11656 +0 ^            ^
11657 +1 ^            (a(*:A)(d|e(*:B))z|aeq)
11658 +2 ^            a
11659 +3 ^^           (*:A)
11660 +8 ^^           (d|e(*:B))
11661Latest Mark: A
11662 +9 ^^           d
11663+11 ^^           e
11664+12 ^ ^          (*:B)
11665+17 ^ ^          )
11666Latest Mark: B
11667+18 ^ ^          z
11668+20 ^            a
11669+21 ^^           e
11670+22 ^ ^          q
11671+23 ^  ^         )
11672+24 ^  ^
11673 0: aeq
11674 1: aeq
11675
11676/.(*F)/
11677    \P\Pabc
11678No match
11679
11680/\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
11681Capturing subpattern count = 0
11682No options
11683First char = 't'
11684Need char = 't'
11685Max lookbehind = 1
11686Subject length lower bound = 18
11687No set of starting bytes
11688
11689/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
11690Capturing subpattern count = 0
11691No options
11692No first char
11693No need char
11694Max lookbehind = 1
11695Subject length lower bound = 8
11696Starting byte set: < o t u
11697
11698/a(*SKIP)c|b(*ACCEPT)|/+SI
11699Capturing subpattern count = 0
11700No options
11701No first char
11702No need char
11703Study returned NULL
11704    a
11705 0:
11706 0+
11707
11708/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
11709Capturing subpattern count = 0
11710No options
11711No first char
11712No need char
11713Subject length lower bound = -1
11714Starting byte set: a b x
11715    ax
11716 0: x
11717
11718'a*(*ACCEPT)b'+
11719    \N\N
11720No match
11721    abc\N\N
11722 0: a
11723 0+ bc
11724    bbb\N\N
11725 0:
11726 0+ bb
11727
11728/(*ACCEPT)a/+I
11729Capturing subpattern count = 0
11730No options
11731No first char
11732No need char
11733    bax
11734 0:
11735 0+ bax
11736
11737/z(*ACCEPT)a/+I
11738Capturing subpattern count = 0
11739No options
11740First char = 'z'
11741No need char
11742    baxzbx
11743 0: z
11744 0+ bx
11745
11746/a(?:.)*?a/ims
11747    \Mabbbbbbbbbbbbbbbbbbbbba
11748Minimum match() limit = 65
11749Minimum match() recursion limit = 2
11750 0: abbbbbbbbbbbbbbbbbbbbba
11751
11752/a(?:.(*THEN))*?a/ims
11753    \Mabbbbbbbbbbbbbbbbbbbbba
11754Minimum match() limit = 86
11755Minimum match() recursion limit = 45
11756 0: abbbbbbbbbbbbbbbbbbbbba
11757
11758/a(?:.(*THEN:ABC))*?a/ims
11759    \Mabbbbbbbbbbbbbbbbbbbbba
11760Minimum match() limit = 86
11761Minimum match() recursion limit = 45
11762 0: abbbbbbbbbbbbbbbbbbbbba
11763
11764/-- These tests are in agreement with development Perl 5.015, which has fixed
11765    some things, but they don't all work with 5.012, so they aren't in the
11766    Perl-compatible tests. Those after the first come from Perl's own test
11767    files. --/
11768
11769/^((yes|no)(*THEN)(*F))?/
11770  yes
11771No match
11772
11773/(A (.*)   C? (*THEN)  | A D) (*FAIL)/x
11774AbcdCBefgBhiBqz
11775No match
11776
11777/(A (.*)   C? (*THEN)  | A D) z/x
11778AbcdCBefgBhiBqz
11779No match
11780
11781/(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x
11782AbcdCBefgBhiBqz
11783No match
11784
11785/(A (.*)   C? (*THEN)  | A D) \s* z/x
11786AbcdCBefgBhiBqz
11787No match
11788
11789/(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x
11790AbcdCBefgBhiBqz
11791No match
11792
11793/(A (.*)   (?:C|) (*THEN)  | A D) z/x
11794AbcdCBefgBhiBqz
11795No match
11796
11797/(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x
11798AbcdCBefgBhiBqz
11799No match
11800
11801/(A (.*)   C{0,6} (*THEN)  | A D) z/x
11802AbcdCBefgBhiBqz
11803No match
11804
11805/(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x
11806AbcdCEBefgBhiBqz
11807No match
11808
11809/(A (.*)   (CE){0,6} (*THEN)  | A D) z/x
11810AbcdCEBefgBhiBqz
11811No match
11812
11813/(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x
11814AbcdCBefgBhiBqz
11815No match
11816
11817/(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x
11818AbcdCBefgBhiBqz
11819No match
11820
11821/-----------------------------------------------/
11822
11823/^(?>a+)(?>(z+))\w/BZ
11824------------------------------------------------------------------
11825        Bra
11826        ^
11827        Once_NC
11828        a+
11829        Ket
11830        Once
11831        CBra 1
11832        z+
11833        Ket
11834        Ket
11835        \w
11836        Ket
11837        End
11838------------------------------------------------------------------
11839    aaaazzzzb
11840 0: aaaazzzzb
11841 1: zzzz
11842    ** Failers
11843No match
11844    aazz
11845No match
11846
11847/(.)(\1|a(?2))/
11848    bab
11849 0: bab
11850 1: b
11851 2: ab
11852
11853/\1|(.)(?R)\1/
11854    cbbbc
11855 0: cbbbc
11856 1: c
11857
11858/(.)((?(1)c|a)|a(?2))/
11859    baa
11860No match
11861
11862/(?P<abn>(?P=abn)xxx)/BZ
11863------------------------------------------------------------------
11864        Bra
11865        Once
11866        CBra 1
11867        \1
11868        xxx
11869        Ket
11870        Ket
11871        Ket
11872        End
11873------------------------------------------------------------------
11874
11875/(a\1z)/BZ
11876------------------------------------------------------------------
11877        Bra
11878        Once
11879        CBra 1
11880        a
11881        \1
11882        z
11883        Ket
11884        Ket
11885        Ket
11886        End
11887------------------------------------------------------------------
11888
11889/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
11890     \Maabbccddee
11891Minimum match() limit = 12
11892Minimum match() recursion limit = 3
11893 0: aabbccddee
11894
11895/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
11896     \Maabbccddee
11897Minimum match() limit = 22
11898Minimum match() recursion limit = 21
11899 0: aabbccddee
11900 1: aa
11901 2: bb
11902 3: cc
11903 4: dd
11904 5: ee
11905
11906/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
11907     \Maabbccddee
11908Minimum match() limit = 18
11909Minimum match() recursion limit = 13
11910 0: aabbccddee
11911 1: aa
11912 2: cc
11913 3: ee
11914
11915/^a\x41z/<JS>
11916    aAz
11917 0: aAz
11918    *** Failers
11919No match
11920    ax41z
11921No match
11922
11923/^a[m\x41]z/<JS>
11924    aAz
11925 0: aAz
11926
11927/^a\x1z/<JS>
11928    ax1z
11929 0: ax1z
11930
11931/^a\u0041z/<JS>
11932    aAz
11933 0: aAz
11934    *** Failers
11935No match
11936    au0041z
11937No match
11938
11939/^a[m\u0041]z/<JS>
11940    aAz
11941 0: aAz
11942
11943/^a\u041z/<JS>
11944    au041z
11945 0: au041z
11946    *** Failers
11947No match
11948    aAz
11949No match
11950
11951/^a\U0041z/<JS>
11952    aU0041z
11953 0: aU0041z
11954    *** Failers
11955No match
11956    aAz
11957No match
11958
11959/(?(?=c)c|d)++Y/BZ
11960------------------------------------------------------------------
11961        Bra
11962        BraPos
11963        Cond
11964        Assert
11965        c
11966        Ket
11967        c
11968        Alt
11969        d
11970        Ket
11971        KetRpos
11972        Y
11973        Ket
11974        End
11975------------------------------------------------------------------
11976
11977/(?(?=c)c|d)*+Y/BZ
11978------------------------------------------------------------------
11979        Bra
11980        Braposzero
11981        BraPos
11982        Cond
11983        Assert
11984        c
11985        Ket
11986        c
11987        Alt
11988        d
11989        Ket
11990        KetRpos
11991        Y
11992        Ket
11993        End
11994------------------------------------------------------------------
11995
11996/a[\NB]c/
11997Failed: \N is not supported in a class at offset 3
11998
11999/a[B-\Nc]/
12000Failed: \N is not supported in a class at offset 5
12001
12002/(a)(?2){0,1999}?(b)/
12003
12004/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
12005
12006/--- This test, with something more complicated than individual letters, causes
12007different behaviour in Perl. Perhaps it disables some optimization; no tag is
12008passed back for the failures, whereas in PCRE there is a tag. ---/
12009
12010/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
12011    AABC
12012 0: AB
12013 1: A
12014 2: B
12015MK: A
12016    XXYZ
12017 0: XXY
12018 1: <unset>
12019 2: <unset>
12020 3: X
12021 4: X
12022 5: Y
12023MK: B
12024    ** Failers
12025No match
12026    XAQQ
12027No match, mark = A
12028    XAQQXZZ
12029No match, mark = A
12030    AXQQQ
12031No match, mark = A
12032    AXXQQQ
12033No match, mark = B
12034
12035/-- Perl doesn't give marks for these, though it does if the alternatives are
12036replaced by single letters. --/
12037
12038/(b|q)(*:m)f|a(*:n)w/K
12039    aw
12040 0: aw
12041MK: n
12042    ** Failers
12043No match, mark = n
12044    abc
12045No match, mark = m
12046
12047/(q|b)(*:m)f|a(*:n)w/K
12048    aw
12049 0: aw
12050MK: n
12051    ** Failers
12052No match, mark = n
12053    abc
12054No match, mark = m
12055
12056/-- After a partial match, the behaviour is as for a failure. --/
12057
12058/^a(*:X)bcde/K
12059   abc\P
12060Partial match, mark=X: abc
12061
12062/-- These are here because Perl doesn't return a mark, except for the first --/
12063
12064/(?=(*:x))(q|)/K+
12065    abc
12066 0:
12067 0+ abc
12068 1:
12069MK: x
12070
12071/(?=(*:x))((*:y)q|)/K+
12072    abc
12073 0:
12074 0+ abc
12075 1:
12076MK: x
12077
12078/(?=(*:x))(?:(*:y)q|)/K+
12079    abc
12080 0:
12081 0+ abc
12082MK: x
12083
12084/(?=(*:x))(?>(*:y)q|)/K+
12085    abc
12086 0:
12087 0+ abc
12088MK: x
12089
12090/(?=a(*:x))(?!a(*:y)c)/K+
12091    ab
12092 0:
12093 0+ ab
12094MK: x
12095
12096/(?=a(*:x))(?=a(*:y)c|)/K+
12097    ab
12098 0:
12099 0+ ab
12100MK: x
12101
12102/(..)\1/
12103    ab\P
12104Partial match: ab
12105    aba\P
12106Partial match: aba
12107    abab\P
12108 0: abab
12109 1: ab
12110
12111/(..)\1/i
12112    ab\P
12113Partial match: ab
12114    abA\P
12115Partial match: abA
12116    aBAb\P
12117 0: aBAb
12118 1: aB
12119
12120/(..)\1{2,}/
12121    ab\P
12122Partial match: ab
12123    aba\P
12124Partial match: aba
12125    abab\P
12126Partial match: abab
12127    ababa\P
12128Partial match: ababa
12129    ababab\P
12130 0: ababab
12131 1: ab
12132    ababab\P\P
12133Partial match: ababab
12134    abababa\P
12135 0: ababab
12136 1: ab
12137    abababa\P\P
12138Partial match: abababa
12139
12140/(..)\1{2,}/i
12141    ab\P
12142Partial match: ab
12143    aBa\P
12144Partial match: aBa
12145    aBAb\P
12146Partial match: aBAb
12147    AbaBA\P
12148Partial match: AbaBA
12149    abABAb\P
12150 0: abABAb
12151 1: ab
12152    aBAbaB\P\P
12153Partial match: aBAbaB
12154    abABabA\P
12155 0: abABab
12156 1: ab
12157    abaBABa\P\P
12158Partial match: abaBABa
12159
12160/(..)\1{2,}?x/i
12161    ab\P
12162Partial match: ab
12163    abA\P
12164Partial match: abA
12165    aBAb\P
12166Partial match: aBAb
12167    abaBA\P
12168Partial match: abaBA
12169    abAbaB\P
12170Partial match: abAbaB
12171    abaBabA\P
12172Partial match: abaBabA
12173    abAbABaBx\P
12174 0: abAbABaBx
12175 1: ab
12176
12177/^(..)\1/
12178    aba\P
12179Partial match: aba
12180
12181/^(..)\1{2,3}x/
12182    aba\P
12183Partial match: aba
12184    ababa\P
12185Partial match: ababa
12186    ababa\P\P
12187Partial match: ababa
12188    abababx
12189 0: abababx
12190 1: ab
12191    ababababx
12192 0: ababababx
12193 1: ab
12194
12195/^(..)\1{2,3}?x/
12196    aba\P
12197Partial match: aba
12198    ababa\P
12199Partial match: ababa
12200    ababa\P\P
12201Partial match: ababa
12202    abababx
12203 0: abababx
12204 1: ab
12205    ababababx
12206 0: ababababx
12207 1: ab
12208
12209/^(..)(\1{2,3})ab/
12210    abababab
12211 0: abababab
12212 1: ab
12213 2: abab
12214
12215/^\R/
12216    \r\P
12217 0: \x0d
12218    \r\P\P
12219Partial match: \x0d
12220
12221/^\R{2,3}x/
12222    \r\P
12223Partial match: \x0d
12224    \r\P\P
12225Partial match: \x0d
12226    \r\r\P
12227Partial match: \x0d\x0d
12228    \r\r\P\P
12229Partial match: \x0d\x0d
12230    \r\r\r\P
12231Partial match: \x0d\x0d\x0d
12232    \r\r\r\P\P
12233Partial match: \x0d\x0d\x0d
12234    \r\rx
12235 0: \x0d\x0dx
12236    \r\r\rx
12237 0: \x0d\x0d\x0dx
12238
12239/^\R{2,3}?x/
12240    \r\P
12241Partial match: \x0d
12242    \r\P\P
12243Partial match: \x0d
12244    \r\r\P
12245Partial match: \x0d\x0d
12246    \r\r\P\P
12247Partial match: \x0d\x0d
12248    \r\r\r\P
12249Partial match: \x0d\x0d\x0d
12250    \r\r\r\P\P
12251Partial match: \x0d\x0d\x0d
12252    \r\rx
12253 0: \x0d\x0dx
12254    \r\r\rx
12255 0: \x0d\x0d\x0dx
12256
12257/^\R?x/
12258    \r\P
12259Partial match: \x0d
12260    \r\P\P
12261Partial match: \x0d
12262    x
12263 0: x
12264    \rx
12265 0: \x0dx
12266
12267/^\R+x/
12268    \r\P
12269Partial match: \x0d
12270    \r\P\P
12271Partial match: \x0d
12272    \r\n\P
12273Partial match: \x0d\x0a
12274    \r\n\P\P
12275Partial match: \x0d\x0a
12276    \rx
12277 0: \x0dx
12278
12279/^a$/<CRLF>
12280    a\r\P
12281Partial match: a\x0d
12282    a\r\P\P
12283Partial match: a\x0d
12284
12285/^a$/m<CRLF>
12286    a\r\P
12287Partial match: a\x0d
12288    a\r\P\P
12289Partial match: a\x0d
12290
12291/^(a$|a\r)/<CRLF>
12292    a\r\P
12293 0: a\x0d
12294 1: a\x0d
12295    a\r\P\P
12296Partial match: a\x0d
12297
12298/^(a$|a\r)/m<CRLF>
12299    a\r\P
12300 0: a\x0d
12301 1: a\x0d
12302    a\r\P\P
12303Partial match: a\x0d
12304
12305/./<CRLF>
12306    \r\P
12307 0: \x0d
12308    \r\P\P
12309Partial match: \x0d
12310
12311/.{2,3}/<CRLF>
12312    \r\P
12313Partial match: \x0d
12314    \r\P\P
12315Partial match: \x0d
12316    \r\r\P
12317 0: \x0d\x0d
12318    \r\r\P\P
12319Partial match: \x0d\x0d
12320    \r\r\r\P
12321 0: \x0d\x0d\x0d
12322    \r\r\r\P\P
12323Partial match: \x0d\x0d\x0d
12324
12325/.{2,3}?/<CRLF>
12326    \r\P
12327Partial match: \x0d
12328    \r\P\P
12329Partial match: \x0d
12330    \r\r\P
12331 0: \x0d\x0d
12332    \r\r\P\P
12333Partial match: \x0d\x0d
12334    \r\r\r\P
12335 0: \x0d\x0d
12336    \r\r\r\P\P
12337 0: \x0d\x0d
12338
12339/-- These two are here because Perl does not match: it seems to allow the
12340COMMIT to escape from the assertion. --/
12341
12342/(?=a(*COMMIT)b|ac)ac|ac/
12343    ac
12344 0: ac
12345
12346/(?=a(*COMMIT)b|(ac)) ac | (a)c/x
12347    ac
12348 0: ac
12349 1: <unset>
12350 2: a
12351
12352"AB(C(D))(E(F))?(?(?=\2)(?=\4))"
12353    ABCDGHI\O03
12354Matched, but too many substrings
12355 0: ABCD
12356
12357/-- This one is here because Perl does not confine the *COMMIT to the
12358assertion, and therefore fails the entire subroutine call. --/
12359
12360/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
12361    ac
12362 0: ac
12363
12364/-- These are all run as real matches in test 1; here we are just checking the
12365settings of the anchored and startline bits. --/
12366
12367/(?>.*?a)(?<=ba)/I
12368Capturing subpattern count = 0
12369No options
12370No first char
12371Need char = 'a'
12372Max lookbehind = 2
12373
12374/(?:.*?a)(?<=ba)/I
12375Capturing subpattern count = 0
12376No options
12377First char at start or follows newline
12378Need char = 'a'
12379Max lookbehind = 2
12380
12381/.*?a(*PRUNE)b/I
12382Capturing subpattern count = 0
12383No options
12384No first char
12385Need char = 'b'
12386
12387/.*?a(*PRUNE)b/sI
12388Capturing subpattern count = 0
12389Options: dotall
12390No first char
12391Need char = 'b'
12392
12393/^a(*PRUNE)b/sI
12394Capturing subpattern count = 0
12395Options: anchored dotall
12396No first char
12397No need char
12398
12399/.*?a(*SKIP)b/I
12400Capturing subpattern count = 0
12401No options
12402No first char
12403Need char = 'b'
12404
12405/(?>.*?a)b/sI
12406Capturing subpattern count = 0
12407Options: dotall
12408No first char
12409Need char = 'b'
12410
12411/(?>.*?a)b/I
12412Capturing subpattern count = 0
12413No options
12414No first char
12415Need char = 'b'
12416
12417/(?>^a)b/sI
12418Capturing subpattern count = 0
12419Options: anchored dotall
12420No first char
12421No need char
12422
12423/(?>.*?)(?<=(abcd)|(wxyz))/I
12424Capturing subpattern count = 2
12425No options
12426No first char
12427No need char
12428Max lookbehind = 4
12429
12430/(?>.*)(?<=(abcd)|(wxyz))/I
12431Capturing subpattern count = 2
12432No options
12433No first char
12434No need char
12435Max lookbehind = 4
12436
12437"(?>.*)foo"I
12438Capturing subpattern count = 0
12439No options
12440No first char
12441Need char = 'o'
12442
12443"(?>.*?)foo"I
12444Capturing subpattern count = 0
12445No options
12446No first char
12447Need char = 'o'
12448
12449/(?>^abc)/mI
12450Capturing subpattern count = 0
12451Options: multiline
12452First char at start or follows newline
12453Need char = 'c'
12454
12455/(?>.*abc)/mI
12456Capturing subpattern count = 0
12457Options: multiline
12458No first char
12459Need char = 'c'
12460
12461/(?:.*abc)/mI
12462Capturing subpattern count = 0
12463Options: multiline
12464First char at start or follows newline
12465Need char = 'c'
12466
12467/-- Check PCRE_STUDY_EXTRA_NEEDED --/
12468
12469/.?/S-I
12470Capturing subpattern count = 0
12471No options
12472No first char
12473No need char
12474Study returned NULL
12475
12476/.?/S!I
12477Capturing subpattern count = 0
12478No options
12479No first char
12480No need char
12481Subject length lower bound = -1
12482No set of starting bytes
12483
12484/-- End of testinput2 --/
12485