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

Diff of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 51 by nigel, Sat Feb 24 21:39:37 2007 UTC revision 449 by ph10, Wed Sep 16 08:48:17 2009 UTC
# Line 1  Line 1 
1  PCRE version 3.4 22-Aug-2000  /(a)b|/I
   
 /(a)b|/  
2  Capturing subpattern count = 1  Capturing subpattern count = 1
3  No options  No options
4  No first char  No first char
5  No need char  No need char
6    
7  /abc/  /abc/I
8  Capturing subpattern count = 0  Capturing subpattern count = 0
9  No options  No options
10  First char = 'a'  First char = 'a'
# Line 24  No match Line 22  No match
22      ABC      ABC
23  No match  No match
24    
25  /^abc/  /^abc/I
26  Capturing subpattern count = 0  Capturing subpattern count = 0
27  Options: anchored  Options: anchored
28  No first char  No first char
29  Need char = 'c'  No need char
30      abc      abc
31   0: abc   0: abc
32      \Aabc      \Aabc
# Line 40  No match Line 38  No match
38      \Adefabc      \Adefabc
39  No match  No match
40    
41  /a+bc/  /a+bc/I
42  Capturing subpattern count = 0  Capturing subpattern count = 0
43  No options  No options
44  First char = 'a'  First char = 'a'
45  Need char = 'c'  Need char = 'c'
46    
47  /a*bc/  /a*bc/I
48  Capturing subpattern count = 0  Capturing subpattern count = 0
49  No options  No options
50  No first char  No first char
51  Need char = 'c'  Need char = 'c'
52    
53  /a{3}bc/  /a{3}bc/I
54  Capturing subpattern count = 0  Capturing subpattern count = 0
55  No options  No options
56  First char = 'a'  First char = 'a'
57  Need char = 'c'  Need char = 'c'
58    
59  /(abc|a+z)/  /(abc|a+z)/I
60  Capturing subpattern count = 1  Capturing subpattern count = 1
61  No options  No options
62  First char = 'a'  First char = 'a'
63  No need char  No need char
64    
65  /^abc$/  /^abc$/I
66  Capturing subpattern count = 0  Capturing subpattern count = 0
67  Options: anchored  Options: anchored
68  No first char  No first char
69  Need char = 'c'  No need char
70      abc      abc
71   0: abc   0: abc
72      *** Failers      *** Failers
# Line 76  No match Line 74  No match
74      def\nabc      def\nabc
75  No match  No match
76    
77  /ab\gdef/X  /ab\idef/X
78  Failed: unrecognized character follows \ at offset 3  Failed: unrecognized character follows \ at offset 3
79    
80  /(?X)ab\gdef/X  /(?X)ab\idef/X
81  Failed: unrecognized character follows \ at offset 7  Failed: unrecognized character follows \ at offset 7
82    
83  /x{5,4}/  /x{5,4}/
# Line 91  Failed: number too big in {} quantifier Line 89  Failed: number too big in {} quantifier
89  /[abcd/  /[abcd/
90  Failed: missing terminating ] for character class at offset 5  Failed: missing terminating ] for character class at offset 5
91    
92  /[\B]/  /(?X)[\B]/
93  Failed: invalid escape sequence in character class at offset 2  Failed: invalid escape sequence in character class at offset 6
94    
95  /[z-a]/  /[z-a]/
96  Failed: range out of order in character class at offset 3  Failed: range out of order in character class at offset 3
# Line 107  Failed: missing ) at offset 4 Line 105  Failed: missing ) at offset 4
105  Failed: missing ) after comment at offset 7  Failed: missing ) after comment at offset 7
106    
107  /(?z)abc/  /(?z)abc/
108  Failed: unrecognized character after (? at offset 2  Failed: unrecognized character after (? or (?- at offset 2
109    
110  /.*b/  /.*b/I
111  Capturing subpattern count = 0  Capturing subpattern count = 0
112  No options  No options
113  First char at start or follows \n  First char at start or follows newline
114  Need char = 'b'  Need char = 'b'
115    
116  /.*?b/  /.*?b/I
117  Capturing subpattern count = 0  Capturing subpattern count = 0
118  No options  No options
119  First char at start or follows \n  First char at start or follows newline
120  Need char = 'b'  Need char = 'b'
121    
122  /cat|dog|elephant/  /cat|dog|elephant/I
123  Capturing subpattern count = 0  Capturing subpattern count = 0
124  No options  No options
125  No first char  No first char
# Line 131  No need char Line 129  No need char
129      this sentences rambles on and on for a while and then reaches elephant      this sentences rambles on and on for a while and then reaches elephant
130   0: elephant   0: elephant
131    
132  /cat|dog|elephant/S  /cat|dog|elephant/IS
133  Capturing subpattern count = 0  Capturing subpattern count = 0
134  No options  No options
135  No first char  No first char
136  No need char  No need char
137  Starting character set: c d e  Starting byte set: c d e
138      this sentence eventually mentions a cat      this sentence eventually mentions a cat
139   0: cat   0: cat
140      this sentences rambles on and on for a while and then reaches elephant      this sentences rambles on and on for a while and then reaches elephant
141   0: elephant   0: elephant
142    
143  /cat|dog|elephant/iS  /cat|dog|elephant/IiS
144  Capturing subpattern count = 0  Capturing subpattern count = 0
145  Options: caseless  Options: caseless
146  No first char  No first char
147  No need char  No need char
148  Starting character set: C D E c d e  Starting byte set: C D E c d e
149      this sentence eventually mentions a CAT cat      this sentence eventually mentions a CAT cat
150   0: CAT   0: CAT
151      this sentences rambles on and on for a while to elephant ElePhant      this sentences rambles on and on for a while to elephant ElePhant
152   0: elephant   0: elephant
153    
154  /a|[bcd]/S  /a|[bcd]/IS
155  Capturing subpattern count = 0  Capturing subpattern count = 0
156  No options  No options
157  No first char  No first char
158  No need char  No need char
159  Starting character set: a b c d  Starting byte set: a b c d
160    
161  /(a|[^\dZ])/S  /(a|[^\dZ])/IS
162  Capturing subpattern count = 1  Capturing subpattern count = 1
163  No options  No options
164  No first char  No first char
165  No need char  No need char
166  Starting character set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a  Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
167    \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19    \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
168    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
169    ? @ 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    ? @ 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
# Line 180  Starting character set: \x00 \x01 \x02 \ Line 178  Starting character set: \x00 \x01 \x02 \
178    \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb    \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb
179    \xfc \xfd \xfe \xff    \xfc \xfd \xfe \xff
180    
181  /(a|b)*[\s]/S  /(a|b)*[\s]/IS
182  Capturing subpattern count = 1  Capturing subpattern count = 1
183  No options  No options
184  No first char  No first char
185  No need char  No need char
186  Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b  Starting byte set: \x09 \x0a \x0c \x0d \x20 a b
187    
188  /(ab\2)/  /(ab\2)/
189  Failed: back reference to non-existent subpattern at offset 6  Failed: reference to non-existent subpattern at offset 6
190    
191  /{4,5}abc/  /{4,5}abc/
192  Failed: nothing to repeat at offset 4  Failed: nothing to repeat at offset 4
193    
194  /(a)(b)(c)\2/  /(a)(b)(c)\2/I
195  Capturing subpattern count = 3  Capturing subpattern count = 3
196  Max back reference = 2  Max back reference = 2
197  No options  No options
# Line 218  Matched, but too many substrings Line 216  Matched, but too many substrings
216   0: abcb   0: abcb
217   1: a   1: a
218   2: b   2: b
219      \O12abcb      \O12abcb
220   0: abcb   0: abcb
221   1: a   1: a
222   2: b   2: b
223   3: c   3: c
224    
225  /(a)bc|(a)(b)\2/  /(a)bc|(a)(b)\2/I
226  Capturing subpattern count = 3  Capturing subpattern count = 3
227  Max back reference = 2  Max back reference = 2
228  No options  No options
# Line 266  Matched, but too many substrings Line 264  Matched, but too many substrings
264   2: a   2: a
265   3: b   3: b
266    
267  /abc$/E  /abc$/IE
268  Capturing subpattern count = 0  Capturing subpattern count = 0
269  Options: dollar_endonly  Options: dollar_endonly
270  First char = 'a'  First char = 'a'
# Line 281  No match Line 279  No match
279  No match  No match
280    
281  /(a)(b)(c)(d)(e)\6/  /(a)(b)(c)(d)(e)\6/
282  Failed: back reference to non-existent subpattern at offset 17  Failed: reference to non-existent subpattern at offset 17
283    
284  /the quick brown fox/  /the quick brown fox/I
285  Capturing subpattern count = 0  Capturing subpattern count = 0
286  No options  No options
287  First char = 't'  First char = 't'
# Line 293  Need char = 'x' Line 291  Need char = 'x'
291      this is a line with the quick brown fox      this is a line with the quick brown fox
292   0: the quick brown fox   0: the quick brown fox
293    
294  /the quick brown fox/A  /the quick brown fox/IA
295  Capturing subpattern count = 0  Capturing subpattern count = 0
296  Options: anchored  Options: anchored
297  No first char  No first char
298  Need char = 'x'  No need char
299      the quick brown fox      the quick brown fox
300   0: the quick brown fox   0: the quick brown fox
301      *** Failers      *** Failers
# Line 306  No match Line 304  No match
304  No match  No match
305    
306  /ab(?z)cd/  /ab(?z)cd/
307  Failed: unrecognized character after (? at offset 4  Failed: unrecognized character after (? or (?- at offset 4
308    
309  /^abc|def/  /^abc|def/I
310  Capturing subpattern count = 0  Capturing subpattern count = 0
311  No options  No options
312  No first char  No first char
# Line 318  No need char Line 316  No need char
316      abcdef\B      abcdef\B
317   0: def   0: def
318    
319  /.*((abc)$|(def))/  /.*((abc)$|(def))/I
320  Capturing subpattern count = 3  Capturing subpattern count = 3
321  No options  No options
322  First char at start or follows \n  First char at start or follows newline
323  No need char  No need char
324      defabc      defabc
325   0: defabc   0: defabc
# Line 338  No need char Line 336  No need char
336   0: abc   0: abc
337      *** Failers      *** Failers
338  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
339    
340  /^abc|def/P  /^abc|def/P
341      abcdef      abcdef
342   0: abc   0: abc
# Line 354  No match: POSIX code 17: match failed Line 352  No match: POSIX code 17: match failed
352   0: def   0: def
353   1: def   1: def
354   3: def   3: def
355    
356  /the quick brown fox/P  /the quick brown fox/P
357      the quick brown fox      the quick brown fox
358   0: the quick brown fox   0: the quick brown fox
359      *** Failers      *** Failers
360  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
361      The Quick Brown Fox      The Quick Brown Fox
362  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
363    
364  /the quick brown fox/Pi  /the quick brown fox/Pi
365      the quick brown fox      the quick brown fox
366   0: the quick brown fox   0: the quick brown fox
367      The Quick Brown Fox      The Quick Brown Fox
368   0: The Quick Brown Fox   0: The Quick Brown Fox
369    
370  /abc.def/P  /abc.def/P
# Line 374  No match: POSIX code 17: match failed Line 372  No match: POSIX code 17: match failed
372  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
373      abc\ndef      abc\ndef
374  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
375    
376  /abc$/P  /abc$/P
377      abc      abc
378   0: abc   0: abc
379      abc\n      abc\n
380   0: abc   0: abc
381    
382  /(abc)\2/P  /(abc)\2/P
# Line 394  Failed: unmatched parentheses at offset Line 392  Failed: unmatched parentheses at offset
392  /a[]b/  /a[]b/
393  Failed: missing terminating ] for character class at offset 4  Failed: missing terminating ] for character class at offset 4
394    
395  /[^aeiou ]{3,}/  /[^aeiou ]{3,}/I
396  Capturing subpattern count = 0  Capturing subpattern count = 0
397  No options  No options
398  No first char  No first char
399  No need char  No need char
400      co-processors, and for      co-processors, and for
401   0: -pr   0: -pr
402    
403  /<.*>/  /<.*>/I
404  Capturing subpattern count = 0  Capturing subpattern count = 0
405  No options  No options
406  First char = '<'  First char = '<'
# Line 410  Need char = '>' Line 408  Need char = '>'
408      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
409   0: <def>ghi<klm>   0: <def>ghi<klm>
410    
411  /<.*?>/  /<.*?>/I
412  Capturing subpattern count = 0  Capturing subpattern count = 0
413  No options  No options
414  First char = '<'  First char = '<'
# Line 418  Need char = '>' Line 416  Need char = '>'
416      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
417   0: <def>   0: <def>
418    
419  /<.*>/U  /<.*>/IU
420  Capturing subpattern count = 0  Capturing subpattern count = 0
421  Options: ungreedy  Options: ungreedy
422  First char = '<'  First char = '<'
423  Need char = '>'  Need char = '>'
424      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
425   0: <def>   0: <def>
426    
427  /<.*>(?U)/  /(?U)<.*>/I
428  Capturing subpattern count = 0  Capturing subpattern count = 0
429  Options: ungreedy  Options: ungreedy
430  First char = '<'  First char = '<'
# Line 434  Need char = '>' Line 432  Need char = '>'
432      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
433   0: <def>   0: <def>
434    
435  /<.*?>/U  /<.*?>/IU
436  Capturing subpattern count = 0  Capturing subpattern count = 0
437  Options: ungreedy  Options: ungreedy
438  First char = '<'  First char = '<'
439  Need char = '>'  Need char = '>'
440      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
441   0: <def>ghi<klm>   0: <def>ghi<klm>
442    
443  /={3,}/U  /={3,}/IU
444  Capturing subpattern count = 0  Capturing subpattern count = 0
445  Options: ungreedy  Options: ungreedy
446  First char = '='  First char = '='
447  Need char = '='  Need char = '='
448      abc========def      abc========def
449   0: ===   0: ===
450    
451  /(?U)={3,}?/  /(?U)={3,}?/I
452  Capturing subpattern count = 0  Capturing subpattern count = 0
453  Options: ungreedy  Options: ungreedy
454  First char = '='  First char = '='
455  Need char = '='  Need char = '='
456      abc========def      abc========def
457   0: ========   0: ========
458    
459  /(?<!bar|cattle)foo/  /(?<!bar|cattle)foo/I
460  Capturing subpattern count = 0  Capturing subpattern count = 0
461  No options  No options
462  First char = 'f'  First char = 'f'
463  Need char = 'o'  Need char = 'o'
464      foo      foo
465   0: foo   0: foo
466      catfoo      catfoo
467   0: foo   0: foo
468      *** Failers      *** Failers
469  No match  No match
470      the barfoo      the barfoo
471  No match  No match
472      and cattlefoo      and cattlefoo
473  No match  No match
474    
475  /(?<=a+)b/  /(?<=a+)b/
# Line 483  Failed: lookbehind assertion is not fixe Line 481  Failed: lookbehind assertion is not fixe
481  /(?<!(foo)a\1)bar/  /(?<!(foo)a\1)bar/
482  Failed: lookbehind assertion is not fixed length at offset 12  Failed: lookbehind assertion is not fixed length at offset 12
483    
484  /(?i)abc/  /(?i)abc/I
485  Capturing subpattern count = 0  Capturing subpattern count = 0
486  Options: caseless  Options: caseless
487  First char = 'a'  First char = 'a' (caseless)
488  Need char = 'c'  Need char = 'c' (caseless)
489    
490  /(a|(?m)a)/  /(a|(?m)a)/I
491  Capturing subpattern count = 1  Capturing subpattern count = 1
492  No options  No options
493  First char = 'a'  First char = 'a'
494  No need char  No need char
495    
496  /(?i)^1234/  /(?i)^1234/I
497  Capturing subpattern count = 0  Capturing subpattern count = 0
498  Options: anchored caseless  Options: anchored caseless
499  No first char  No first char
500  Need char = '4'  No need char
501    
502  /(^b|(?i)^d)/  /(^b|(?i)^d)/I
503  Capturing subpattern count = 1  Capturing subpattern count = 1
504  Options: anchored  Options: anchored
 Case state changes  
505  No first char  No first char
506  No need char  No need char
507    
508  /(?s).*/  /(?s).*/I
509  Capturing subpattern count = 0  Capturing subpattern count = 0
510  Options: anchored dotall  Options: anchored dotall
511  No first char  No first char
512  No need char  No need char
513    
514  /[abcd]/S  /[abcd]/IS
515  Capturing subpattern count = 0  Capturing subpattern count = 0
516  No options  No options
517  No first char  No first char
518  No need char  No need char
519  Starting character set: a b c d  Starting byte set: a b c d
520    
521  /(?i)[abcd]/S  /(?i)[abcd]/IS
522  Capturing subpattern count = 0  Capturing subpattern count = 0
523  Options: caseless  Options: caseless
524  No first char  No first char
525  No need char  No need char
526  Starting character set: A B C D a b c d  Starting byte set: A B C D a b c d
527    
528  /(?m)[xy]|(b|c)/S  /(?m)[xy]|(b|c)/IS
529  Capturing subpattern count = 1  Capturing subpattern count = 1
530  Options: multiline  Options: multiline
531  No first char  No first char
532  No need char  No need char
533  Starting character set: b c x y  Starting byte set: b c x y
534    
535  /(^a|^b)/m  /(^a|^b)/Im
536  Capturing subpattern count = 1  Capturing subpattern count = 1
537  Options: multiline  Options: multiline
538  First char at start or follows \n  First char at start or follows newline
539  No need char  No need char
540    
541  /(?i)(^a|^b)/m  /(?i)(^a|^b)/Im
542  Capturing subpattern count = 1  Capturing subpattern count = 1
543  Options: caseless multiline  Options: caseless multiline
544  First char at start or follows \n  First char at start or follows newline
545  No need char  No need char
546    
547  /(a)(?(1)a|b|c)/  /(a)(?(1)a|b|c)/
# Line 554  Failed: conditional group contains more Line 551  Failed: conditional group contains more
551  Failed: conditional group contains more than two branches at offset 12  Failed: conditional group contains more than two branches at offset 12
552    
553  /(?(1a)/  /(?(1a)/
554  Failed: malformed number after (?( at offset 4  Failed: missing ) at offset 6
555    
556    /(?(1a))/
557    Failed: reference to non-existent subpattern at offset 6
558    
559  /(?(?i))/  /(?(?i))/
560  Failed: assertion expected after (?( at offset 3  Failed: assertion expected after (?( at offset 3
561    
562  /(?(abc))/  /(?(abc))/
563  Failed: assertion expected after (?( at offset 3  Failed: reference to non-existent subpattern at offset 7
564    
565  /(?(?<ab))/  /(?(?<ab))/
566  Failed: unrecognized character after (?< at offset 2  Failed: syntax error in subpattern name (missing terminator) at offset 7
567    
568  /((?s)blah)\s+\1/  /((?s)blah)\s+\1/I
569  Capturing subpattern count = 1  Capturing subpattern count = 1
570  Max back reference = 1  Max back reference = 1
571  No options  No options
572  First char = 'b'  First char = 'b'
573  Need char = 'h'  Need char = 'h'
574    
575  /((?i)blah)\s+\1/  /((?i)blah)\s+\1/I
576  Capturing subpattern count = 1  Capturing subpattern count = 1
577  Max back reference = 1  Max back reference = 1
578  No options  No options
579  Case state changes  First char = 'b' (caseless)
580  No first char  Need char = 'h' (caseless)
 Need char = 'h'  
581    
582  /((?i)b)/DS  /((?i)b)/IDZS
583  ------------------------------------------------------------------  ------------------------------------------------------------------
584    0  16 Bra 0          Bra
585    3   8 Bra 1          CBra 1
586    6  01 Opt       01 Opt
587    8   1 b       NC b
588   11   8 Ket          Ket
589   14  00 Opt       00 Opt
590   16  16 Ket          Ket
591   19     End          End
592  ------------------------------------------------------------------  ------------------------------------------------------------------
593  Capturing subpattern count = 1  Capturing subpattern count = 1
594  No options  No options
595  Case state changes  First char = 'b' (caseless)
596  No first char  No need char
597  Need char = 'b'  Study returned NULL
 Starting character set: B b  
598    
599  /(a*b|(?i:c*(?-i)d))/S  /(a*b|(?i:c*(?-i)d))/IS
600  Capturing subpattern count = 1  Capturing subpattern count = 1
601  No options  No options
 Case state changes  
602  No first char  No first char
603  No need char  No need char
604  Starting character set: C a b c d  Starting byte set: C a b c d
605    
606  /a$/  /a$/I
607  Capturing subpattern count = 0  Capturing subpattern count = 0
608  No options  No options
609  First char = 'a'  First char = 'a'
# Line 615  No need char Line 612  No need char
612   0: a   0: a
613      a\n      a\n
614   0: a   0: a
615      *** Failers      *** Failers
616  No match  No match
617      \Za      \Za
618  No match  No match
619      \Za\n      \Za\n
620  No match  No match
621    
622  /a$/m  /a$/Im
623  Capturing subpattern count = 0  Capturing subpattern count = 0
624  Options: multiline  Options: multiline
625  First char = 'a'  First char = 'a'
# Line 631  No need char Line 628  No need char
628   0: a   0: a
629      a\n      a\n
630   0: a   0: a
631      \Za\n      \Za\n
632   0: a   0: a
633      *** Failers      *** Failers
634  No match  No match
635      \Za      \Za
636  No match  No match
637    
638  /\Aabc/m  /\Aabc/Im
639  Capturing subpattern count = 0  Capturing subpattern count = 0
640  Options: anchored multiline  Options: anchored multiline
641  No first char  No first char
642  Need char = 'c'  No need char
643    
644  /^abc/m  /^abc/Im
645  Capturing subpattern count = 0  Capturing subpattern count = 0
646  Options: multiline  Options: multiline
647  First char at start or follows \n  First char at start or follows newline
648  Need char = 'c'  Need char = 'c'
649    
650  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
651  Capturing subpattern count = 5  Capturing subpattern count = 5
652  Options: anchored  Options: anchored
653  No first char  No first char
654  Need char = 'a'  No need char
655    aaaaabbbbbcccccdef    aaaaabbbbbcccccdef
656   0: aaaaabbbbbcccccdef   0: aaaaabbbbbcccccdef
657   1: aaaaabbbbbcccccdef   1: aaaaabbbbbcccccdef
# Line 663  Need char = 'a' Line 660  Need char = 'a'
660   4: bbbbccccc   4: bbbbccccc
661   5: def   5: def
662    
663  /(?<=foo)[ab]/S  /(?<=foo)[ab]/IS
664  Capturing subpattern count = 0  Capturing subpattern count = 0
665  No options  No options
666  No first char  No first char
667  No need char  No need char
668  Starting character set: a b  Starting byte set: a b
669    
670  /(?<!foo)(alpha|omega)/S  /(?<!foo)(alpha|omega)/IS
671  Capturing subpattern count = 1  Capturing subpattern count = 1
672  No options  No options
673  No first char  No first char
674  Need char = 'a'  Need char = 'a'
675  Starting character set: a o  Starting byte set: a o
676    
677  /(?!alphabet)[ab]/S  /(?!alphabet)[ab]/IS
678  Capturing subpattern count = 0  Capturing subpattern count = 0
679  No options  No options
680  No first char  No first char
681  No need char  No need char
682  Starting character set: a b  Starting byte set: a b
683    
684    /(?<=foo\n)^bar/Im
685    Capturing subpattern count = 0
686    Contains explicit CR or LF match
687    Options: multiline
688    No first char
689    Need char = 'r'
690        foo\nbarbar
691     0: bar
692        ***Failers
693    No match
694        rhubarb
695    No match
696        barbell
697    No match
698        abc\nbarton
699    No match
700    
701  /(?<=foo\n)^bar/m  /^(?<=foo\n)bar/Im
702  Capturing subpattern count = 0  Capturing subpattern count = 0
703    Contains explicit CR or LF match
704  Options: multiline  Options: multiline
705  First char at start or follows \n  First char at start or follows newline
706  Need char = 'r'  Need char = 'r'
707        foo\nbarbar
708     0: bar
709        ***Failers
710    No match
711        rhubarb
712    No match
713        barbell
714    No match
715        abc\nbarton
716    No match
717    
718  /(?>^abc)/m  /(?>^abc)/Im
719  Capturing subpattern count = 0  Capturing subpattern count = 0
720  Options: multiline  Options: multiline
721  First char at start or follows \n  First char at start or follows newline
722  Need char = 'c'  Need char = 'c'
723      abc      abc
724   0: abc   0: abc
# Line 701  Need char = 'c' Line 726  Need char = 'c'
726   0: abc   0: abc
727      *** Failers      *** Failers
728  No match  No match
729      defabc      defabc
730  No match  No match
731    
732  /(?<=ab(c+)d)ef/  /(?<=ab(c+)d)ef/
# Line 714  Failed: lookbehind assertion is not fixe Line 739  Failed: lookbehind assertion is not fixe
739  Failed: lookbehind assertion is not fixed length at offset 13  Failed: lookbehind assertion is not fixed length at offset 13
740    
741  /The next three are in testinput2 because they have variable length branches/  /The next three are in testinput2 because they have variable length branches/
 Capturing subpattern count = 0  
 No options  
 First char = 'T'  
 Need char = 's'  
742    
743  /(?<=bullock|donkey)-cart/  /(?<=bullock|donkey)-cart/I
744  Capturing subpattern count = 0  Capturing subpattern count = 0
745  No options  No options
746  First char = '-'  First char = '-'
# Line 732  Need char = 't' Line 753  Need char = 't'
753  No match  No match
754      cart      cart
755  No match  No match
756      horse-and-cart      horse-and-cart
757  No match  No match
758    
759  /(?<=ab(?i)x|y|z)/  /(?<=ab(?i)x|y|z)/I
760  Capturing subpattern count = 0  Capturing subpattern count = 0
761  No options  No options
 Case state changes  
762  No first char  No first char
763  No need char  No need char
764    
765  /(?>.*)(?<=(abcd)|(xyz))/  /(?>.*)(?<=(abcd)|(xyz))/I
766  Capturing subpattern count = 2  Capturing subpattern count = 2
767  No options  No options
768  First char at start or follows \n  First char at start or follows newline
769  No need char  No need char
770      alphabetabcd      alphabetabcd
771   0: alphabetabcd   0: alphabetabcd
# Line 755  No need char Line 775  No need char
775   1: <unset>   1: <unset>
776   2: xyz   2: xyz
777    
778  /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/  /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
779  Capturing subpattern count = 0  Capturing subpattern count = 0
780  No options  No options
 Case state changes  
781  First char = 'Z'  First char = 'Z'
782  Need char = 'Z'  Need char = 'Z'
783      abxyZZ      abxyZZ
# Line 771  Need char = 'Z' Line 790  Need char = 'Z'
790   0: ZZ   0: ZZ
791      bZZ      bZZ
792   0: ZZ   0: ZZ
793      BZZ      BZZ
794   0: ZZ   0: ZZ
795      *** Failers      *** Failers
796  No match  No match
797      ZZ      ZZ
798  No match  No match
799      abXYZZ      abXYZZ
800  No match  No match
801      zzz      zzz
802  No match  No match
803      bzz      bzz
804  No match  No match
805    
806  /(?<!(foo)a)bar/  /(?<!(foo)a)bar/I
807  Capturing subpattern count = 1  Capturing subpattern count = 1
808  No options  No options
809  First char = 'b'  First char = 'b'
810  Need char = 'r'  Need char = 'r'
811      bar      bar
812   0: bar   0: bar
813      foobbar      foobbar
814   0: bar   0: bar
815      *** Failers      *** Failers
816  No match  No match
817      fooabar      fooabar
818  No match  No match
819    
820  /This one is here because Perl 5.005_02 doesn't fail it/  /This one is here because Perl 5.005_02 doesn't fail it/I
821  Capturing subpattern count = 0  Capturing subpattern count = 0
822  No options  No options
823  First char = 'T'  First char = 'T'
824  Need char = 't'  Need char = 't'
825    
826  /^(a)?(?(1)a|b)+$/  /^(a)?(?(1)a|b)+$/I
827  Capturing subpattern count = 1  Capturing subpattern count = 1
828  Options: anchored  Options: anchored
829  No first char  No first char
830  No need char  No need char
831      *** Failers      *** Failers
832  No match  No match
833      a      a
834  No match  No match
835    
836  /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/  /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I
837  Capturing subpattern count = 0  Capturing subpattern count = 0
838  No options  No options
839  First char = 'T'  First char = 'T'
840  Need char = 'g'  Need char = 'g'
841    
842  /^(a\1?){4}$/  /^(a\1?){4}$/I
843  Capturing subpattern count = 1  Capturing subpattern count = 1
844  Max back reference = 1  Max back reference = 1
845  Options: anchored  Options: anchored
846  No first char  No first char
847  Need char = 'a'  No need char
848      aaaaaa      aaaaaa
849   0: aaaaaa   0: aaaaaa
850   1: aa   1: aa
851    
852  /These are syntax tests from Perl 5.005/  /These are syntax tests from Perl 5.005/I
853  Capturing subpattern count = 0  Capturing subpattern count = 0
854  No options  No options
855  First char = 'T'  First char = 'T'
# Line 864  Failed: nothing to repeat at offset 2 Line 883  Failed: nothing to repeat at offset 2
883  Failed: unmatched parentheses at offset 0  Failed: unmatched parentheses at offset 0
884    
885  /\1/  /\1/
886  Failed: back reference to non-existent subpattern at offset 2  Failed: reference to non-existent subpattern at offset 2
887    
888  /\2/  /\2/
889  Failed: back reference to non-existent subpattern at offset 2  Failed: reference to non-existent subpattern at offset 2
890    
891  /(a)|\2/  /(a)|\2/
892  Failed: back reference to non-existent subpattern at offset 6  Failed: reference to non-existent subpattern at offset 6
893    
894  /a[b-a]/i  /a[b-a]/Ii
895  Failed: range out of order in character class at offset 4  Failed: range out of order in character class at offset 4
896    
897  /a[]b/i  /a[]b/Ii
898  Failed: missing terminating ] for character class at offset 4  Failed: missing terminating ] for character class at offset 4
899    
900  /a[/i  /a[/Ii
901  Failed: missing terminating ] for character class at offset 2  Failed: missing terminating ] for character class at offset 2
902    
903  /*a/i  /*a/Ii
904  Failed: nothing to repeat at offset 0  Failed: nothing to repeat at offset 0
905    
906  /(*)b/i  /(*)b/Ii
907  Failed: nothing to repeat at offset 1  Failed: nothing to repeat at offset 1
908    
909  /abc)/i  /abc)/Ii
910  Failed: unmatched parentheses at offset 3  Failed: unmatched parentheses at offset 3
911    
912  /(abc/i  /(abc/Ii
913  Failed: missing ) at offset 4  Failed: missing ) at offset 4
914    
915  /a**/i  /a**/Ii
916  Failed: nothing to repeat at offset 2  Failed: nothing to repeat at offset 2
917    
918  /)(/i  /)(/Ii
919  Failed: unmatched parentheses at offset 0  Failed: unmatched parentheses at offset 0
920    
921  /:(?:/  /:(?:/
922  Failed: missing ) at offset 4  Failed: missing ) at offset 4
923    
924  /(?<%)b/  /(?<%)b/
925  Failed: unrecognized character after (?< at offset 0  Failed: unrecognized character after (?< at offset 3
926    
927  /a(?{)b/  /a(?{)b/
928  Failed: unrecognized character after (? at offset 3  Failed: unrecognized character after (? or (?- at offset 3
929    
930  /a(?{{})b/  /a(?{{})b/
931  Failed: unrecognized character after (? at offset 3  Failed: unrecognized character after (? or (?- at offset 3
932    
933  /a(?{}})b/  /a(?{}})b/
934  Failed: unrecognized character after (? at offset 3  Failed: unrecognized character after (? or (?- at offset 3
935    
936  /a(?{"{"})b/  /a(?{"{"})b/
937  Failed: unrecognized character after (? at offset 3  Failed: unrecognized character after (? or (?- at offset 3
938    
939  /a(?{"{"}})b/  /a(?{"{"}})b/
940  Failed: unrecognized character after (? at offset 3  Failed: unrecognized character after (? or (?- at offset 3
941    
942  /(?(1?)a|b)/  /(?(1?)a|b)/
943  Failed: malformed number after (?( at offset 4  Failed: malformed number or name after (?( at offset 4
   
 /(?(1)a|b|c)/  
 Failed: conditional group contains more than two branches at offset 10  
944    
945  /[a[:xyz:/  /[a[:xyz:/
946  Failed: missing terminating ] for character class at offset 8  Failed: missing terminating ] for character class at offset 8
# Line 944  Failed: POSIX code 9: bad escape sequenc Line 960  Failed: POSIX code 9: bad escape sequenc
960  /abc/\i  /abc/\i
961  Failed: \ at end of pattern at offset 4  Failed: \ at end of pattern at offset 4
962    
963  /(a)bc(d)/  /(a)bc(d)/I
964  Capturing subpattern count = 2  Capturing subpattern count = 2
965  No options  No options
966  First char = 'a'  First char = 'a'
# Line 963  Need char = 'd' Line 979  Need char = 'd'
979   1: a   1: a
980   2: d   2: d
981  copy substring 5 failed -7  copy substring 5 failed -7
982    
983  /(.{20})/  /(.{20})/I
984  Capturing subpattern count = 1  Capturing subpattern count = 1
985  No options  No options
986  No first char  No first char
# Line 975  No need char Line 991  No need char
991      abcdefghijklmnopqrstuvwxyz\C1      abcdefghijklmnopqrstuvwxyz\C1
992   0: abcdefghijklmnopqrst   0: abcdefghijklmnopqrst
993   1: abcdefghijklmnopqrst   1: abcdefghijklmnopqrst
994  copy substring 1 failed -6   1C abcdefghijklmnopqrst (20)
995      abcdefghijklmnopqrstuvwxyz\G1      abcdefghijklmnopqrstuvwxyz\G1
996   0: abcdefghijklmnopqrst   0: abcdefghijklmnopqrst
997   1: abcdefghijklmnopqrst   1: abcdefghijklmnopqrst
998   1G abcdefghijklmnopqrst (20)   1G abcdefghijklmnopqrst (20)
999    
1000  /(.{15})/  /(.{15})/I
1001  Capturing subpattern count = 1  Capturing subpattern count = 1
1002  No options  No options
1003  No first char  No first char
# Line 995  No need char Line 1011  No need char
1011   1C abcdefghijklmno (15)   1C abcdefghijklmno (15)
1012   1G abcdefghijklmno (15)   1G abcdefghijklmno (15)
1013    
1014  /(.{16})/  /(.{16})/I
1015  Capturing subpattern count = 1  Capturing subpattern count = 1
1016  No options  No options
1017  No first char  No first char
# Line 1006  No need char Line 1022  No need char
1022      abcdefghijklmnopqrstuvwxyz\C1\G1\L      abcdefghijklmnopqrstuvwxyz\C1\G1\L
1023   0: abcdefghijklmnop   0: abcdefghijklmnop
1024   1: abcdefghijklmnop   1: abcdefghijklmnop
1025  copy substring 1 failed -6   1C abcdefghijklmnop (16)
1026   1G abcdefghijklmnop (16)   1G abcdefghijklmnop (16)
1027   0L abcdefghijklmnop   0L abcdefghijklmnop
1028   1L abcdefghijklmnop   1L abcdefghijklmnop
1029    
1030  /^(a|(bc))de(f)/  /^(a|(bc))de(f)/I
1031  Capturing subpattern count = 3  Capturing subpattern count = 3
1032  Options: anchored  Options: anchored
1033  No first char  No first char
1034  Need char = 'f'  No need char
1035      adef\G1\G2\G3\G4\L      adef\G1\G2\G3\G4\L
1036   0: adef   0: adef
1037   1: a   1: a
1038   2: <unset>   2: <unset>
# Line 1029  get substring 4 failed -7 Line 1045  get substring 4 failed -7
1045   1L a   1L a
1046   2L   2L
1047   3L f   3L f
1048      bcdef\G1\G2\G3\G4\L      bcdef\G1\G2\G3\G4\L
1049   0: bcdef   0: bcdef
1050   1: bc   1: bc
1051   2: bc   2: bc
# Line 1042  get substring 4 failed -7 Line 1058  get substring 4 failed -7
1058   1L bc   1L bc
1059   2L bc   2L bc
1060   3L f   3L f
1061      adefghijk\C0      adefghijk\C0
1062   0: adef   0: adef
1063   1: a   1: a
1064   2: <unset>   2: <unset>
1065   3: f   3: f
1066   0C adef (4)   0C adef (4)
1067    
1068  /^abc\00def/  /^abc\00def/I
1069  Capturing subpattern count = 0  Capturing subpattern count = 0
1070  Options: anchored  Options: anchored
1071  No first char  No first char
1072  Need char = 'f'  No need char
1073      abc\00def\L\C0      abc\00def\L\C0
1074   0: abc\x00def   0: abc\x00def
1075   0C abc (7)   0C abc (7)
1076   0L abc   0L abc
1077    
1078  /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+  /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
1079  )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+  )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
1080  )?)?)?)?)?)?)?)?)?otherword/M  )?)?)?)?)?)?)?)?)?otherword/I
 Memory allocation (code space): 428  
1081  Capturing subpattern count = 8  Capturing subpattern count = 8
1082    Contains explicit CR or LF match
1083  No options  No options
1084  First char = 'w'  First char = 'w'
1085  Need char = 'd'  Need char = 'd'
1086    
1087  /.*X/D  /.*X/IDZ
1088  ------------------------------------------------------------------  ------------------------------------------------------------------
1089    0   8 Bra 0          Bra
1090    3     Any*          Any*
1091    5   1 X          X
1092    8   8 Ket          Ket
1093   11     End          End
1094  ------------------------------------------------------------------  ------------------------------------------------------------------
1095  Capturing subpattern count = 0  Capturing subpattern count = 0
1096  No options  No options
1097  First char at start or follows \n  First char at start or follows newline
1098  Need char = 'X'  Need char = 'X'
1099    
1100  /.*X/Ds  /.*X/IDZs
1101  ------------------------------------------------------------------  ------------------------------------------------------------------
1102    0   8 Bra 0          Bra
1103    3     Any*          AllAny*
1104    5   1 X          X
1105    8   8 Ket          Ket
1106   11     End          End
1107  ------------------------------------------------------------------  ------------------------------------------------------------------
1108  Capturing subpattern count = 0  Capturing subpattern count = 0
1109  Options: anchored dotall  Options: anchored dotall
1110  No first char  No first char
1111  Need char = 'X'  Need char = 'X'
1112    
1113  /(.*X|^B)/D  /(.*X|^B)/IDZ
1114  ------------------------------------------------------------------  ------------------------------------------------------------------
1115    0  21 Bra 0          Bra
1116    3   8 Bra 1          CBra 1
1117    6     Any*          Any*
1118    8   1 X          X
1119   11   7 Alt          Alt
1120   14     ^          ^
1121   15   1 B          B
1122   18  15 Ket          Ket
1123   21  21 Ket          Ket
1124   24     End          End
1125  ------------------------------------------------------------------  ------------------------------------------------------------------
1126  Capturing subpattern count = 1  Capturing subpattern count = 1
1127  No options  No options
1128  First char at start or follows \n  First char at start or follows newline
1129  No need char  No need char
1130    
1131  /(.*X|^B)/Ds  /(.*X|^B)/IDZs
1132  ------------------------------------------------------------------  ------------------------------------------------------------------
1133    0  21 Bra 0          Bra
1134    3   8 Bra 1          CBra 1
1135    6     Any*          AllAny*
1136    8   1 X          X
1137   11   7 Alt          Alt
1138   14     ^          ^
1139   15   1 B          B
1140   18  15 Ket          Ket
1141   21  21 Ket          Ket
1142   24     End          End
1143  ------------------------------------------------------------------  ------------------------------------------------------------------
1144  Capturing subpattern count = 1  Capturing subpattern count = 1
1145  Options: anchored dotall  Options: anchored dotall
1146  No first char  No first char
1147  No need char  No need char
1148    
1149  /(?s)(.*X|^B)/D  /(?s)(.*X|^B)/IDZ
1150  ------------------------------------------------------------------  ------------------------------------------------------------------
1151    0  21 Bra 0          Bra
1152    3   8 Bra 1          CBra 1
1153    6     Any*          AllAny*
1154    8   1 X          X
1155   11   7 Alt          Alt
1156   14     ^          ^
1157   15   1 B          B
1158   18  15 Ket          Ket
1159   21  21 Ket          Ket
1160   24     End          End
1161  ------------------------------------------------------------------  ------------------------------------------------------------------
1162  Capturing subpattern count = 1  Capturing subpattern count = 1
1163  Options: anchored dotall  Options: anchored dotall
1164  No first char  No first char
1165  No need char  No need char
1166    
1167  /(?s:.*X|^B)/D  /(?s:.*X|^B)/IDZ
1168  ------------------------------------------------------------------  ------------------------------------------------------------------
1169    0  27 Bra 0          Bra
1170    3  10 Bra 0          Bra
1171    6  04 Opt       04 Opt
1172    8     Any*          AllAny*
1173   10   1 X          X
1174   13   9 Alt          Alt
1175   16  04 Opt       04 Opt
1176   18     ^          ^
1177   19   1 B          B
1178   22  19 Ket          Ket
1179   25  00 Opt       00 Opt
1180   27  27 Ket          Ket
1181   30     End          End
1182  ------------------------------------------------------------------  ------------------------------------------------------------------
1183  Capturing subpattern count = 0  Capturing subpattern count = 0
1184  No options  Options: anchored
1185  First char at start or follows \n  No first char
1186  No need char  No need char
1187    
1188  /\Biss\B/+  /\Biss\B/I+
1189  Capturing subpattern count = 0  Capturing subpattern count = 0
1190  No options  No options
1191  First char = 'i'  First char = 'i'
# Line 1178  Need char = 's' Line 1194  Need char = 's'
1194   0: iss   0: iss
1195   0+ issippi   0+ issippi
1196    
1197  /\Biss\B/+P  /\Biss\B/I+P
1198      Mississippi      Mississippi
1199   0: iss   0: iss
1200   0+ issippi   0+ issippi
1201    
1202  /iss/G+  /iss/IG+
1203  Capturing subpattern count = 0  Capturing subpattern count = 0
1204  No options  No options
1205  First char = 'i'  First char = 'i'
# Line 1194  Need char = 's' Line 1210  Need char = 's'
1210   0: iss   0: iss
1211   0+ ippi   0+ ippi
1212    
1213  /\Biss\B/G+  /\Biss\B/IG+
1214  Capturing subpattern count = 0  Capturing subpattern count = 0
1215  No options  No options
1216  First char = 'i'  First char = 'i'
# Line 1203  Need char = 's' Line 1219  Need char = 's'
1219   0: iss   0: iss
1220   0+ issippi   0+ issippi
1221    
1222  /\Biss\B/g+  /\Biss\B/Ig+
1223  Capturing subpattern count = 0  Capturing subpattern count = 0
1224  No options  No options
1225  First char = 'i'  First char = 'i'
# Line 1218  No match Line 1234  No match
1234      Mississippi\A      Mississippi\A
1235  No match  No match
1236    
1237  /(?<=[Ms])iss/g+  /(?<=[Ms])iss/Ig+
1238  Capturing subpattern count = 0  Capturing subpattern count = 0
1239  No options  No options
1240  First char = 'i'  First char = 'i'
# Line 1229  Need char = 's' Line 1245  Need char = 's'
1245   0: iss   0: iss
1246   0+ ippi   0+ ippi
1247    
1248  /(?<=[Ms])iss/G+  /(?<=[Ms])iss/IG+
1249  Capturing subpattern count = 0  Capturing subpattern count = 0
1250  No options  No options
1251  First char = 'i'  First char = 'i'
# Line 1238  Need char = 's' Line 1254  Need char = 's'
1254   0: iss   0: iss
1255   0+ issippi   0+ issippi
1256    
1257  /^iss/g+  /^iss/Ig+
1258  Capturing subpattern count = 0  Capturing subpattern count = 0
1259  Options: anchored  Options: anchored
1260  No first char  No first char
1261  Need char = 's'  No need char
1262      ississippi      ississippi
1263   0: iss   0: iss
1264   0+ issippi   0+ issippi
1265    
1266  /.*iss/g+  /.*iss/Ig+
1267  Capturing subpattern count = 0  Capturing subpattern count = 0
1268  No options  No options
1269  First char at start or follows \n  First char at start or follows newline
1270  Need char = 's'  Need char = 's'
1271      abciss\nxyzisspqr      abciss\nxyzisspqr
1272   0: abciss   0: abciss
1273   0+ \x0axyzisspqr   0+ \x0axyzisspqr
1274   0: xyziss   0: xyziss
1275   0+ pqr   0+ pqr
1276    
1277  /.i./+g  /.i./I+g
1278  Capturing subpattern count = 0  Capturing subpattern count = 0
1279  No options  No options
1280  No first char  No first char
# Line 1284  Need char = 'i' Line 1300  Need char = 'i'
1300   0+ river   0+ river
1301   0: riv   0: riv
1302   0+ er   0+ er
1303      Missouri river\A      Missouri river\A
1304   0: Mis   0: Mis
1305   0+ souri river   0+ souri river
1306    
1307  /^.is/+g  /^.is/I+g
1308  Capturing subpattern count = 0  Capturing subpattern count = 0
1309  Options: anchored  Options: anchored
1310  No first char  No first char
1311  Need char = 's'  No need char
1312      Mississippi      Mississippi
1313   0: Mis   0: Mis
1314   0+ sissippi   0+ sissippi
1315    
1316  /^ab\n/g+  /^ab\n/Ig+
1317  Capturing subpattern count = 0  Capturing subpattern count = 0
1318    Contains explicit CR or LF match
1319  Options: anchored  Options: anchored
1320  No first char  No first char
1321  Need char = 10  No need char
1322      ab\nab\ncd      ab\nab\ncd
1323   0: ab\x0a   0: ab\x0a
1324   0+ ab\x0acd   0+ ab\x0acd
1325    
1326  /^ab\n/mg+  /^ab\n/Img+
1327  Capturing subpattern count = 0  Capturing subpattern count = 0
1328    Contains explicit CR or LF match
1329  Options: multiline  Options: multiline
1330  First char at start or follows \n  First char at start or follows newline
1331  Need char = 10  Need char = 10
1332      ab\nab\ncd      ab\nab\ncd
1333   0: ab\x0a   0: ab\x0a
# Line 1317  Need char = 10 Line 1335  Need char = 10
1335   0: ab\x0a   0: ab\x0a
1336   0+ cd   0+ cd
1337    
1338  /abc/  /abc/I
1339  Capturing subpattern count = 0  Capturing subpattern count = 0
1340  No options  No options
1341  First char = 'a'  First char = 'a'
1342  Need char = 'c'  Need char = 'c'
1343    
1344  /abc|bac/  /abc|bac/I
1345  Capturing subpattern count = 0  Capturing subpattern count = 0
1346  No options  No options
1347  No first char  No first char
1348  Need char = 'c'  Need char = 'c'
1349    
1350  /(abc|bac)/  /(abc|bac)/I
1351  Capturing subpattern count = 1  Capturing subpattern count = 1
1352  No options  No options
1353  No first char  No first char
1354  Need char = 'c'  Need char = 'c'
1355    
1356  /(abc|(c|dc))/  /(abc|(c|dc))/I
1357  Capturing subpattern count = 2  Capturing subpattern count = 2
1358  No options  No options
1359  No first char  No first char
1360  Need char = 'c'  Need char = 'c'
1361    
1362  /(abc|(d|de)c)/  /(abc|(d|de)c)/I
1363  Capturing subpattern count = 2  Capturing subpattern count = 2
1364  No options  No options
1365  No first char  No first char
1366  Need char = 'c'  Need char = 'c'
1367    
1368  /a*/  /a*/I
1369  Capturing subpattern count = 0  Capturing subpattern count = 0
1370  No options  No options
1371  No first char  No first char
1372  No need char  No need char
1373    
1374  /a+/  /a+/I
1375  Capturing subpattern count = 0  Capturing subpattern count = 0
1376  No options  No options
1377  First char = 'a'  First char = 'a'
1378  No need char  No need char
1379    
1380  /(baa|a+)/  /(baa|a+)/I
1381  Capturing subpattern count = 1  Capturing subpattern count = 1
1382  No options  No options
1383  No first char  No first char
1384  Need char = 'a'  Need char = 'a'
1385    
1386  /a{0,3}/  /a{0,3}/I
1387  Capturing subpattern count = 0  Capturing subpattern count = 0
1388  No options  No options
1389  No first char  No first char
1390  No need char  No need char
1391    
1392  /baa{3,}/  /baa{3,}/I
1393  Capturing subpattern count = 0  Capturing subpattern count = 0
1394  No options  No options
1395  First char = 'b'  First char = 'b'
1396  Need char = 'a'  Need char = 'a'
1397    
1398  /"([^\\"]+|\\.)*"/  /"([^\\"]+|\\.)*"/I
1399  Capturing subpattern count = 1  Capturing subpattern count = 1
1400  No options  No options
1401  First char = '"'  First char = '"'
1402  Need char = '"'  Need char = '"'
1403    
1404  /(abc|ab[cd])/  /(abc|ab[cd])/I
1405  Capturing subpattern count = 1  Capturing subpattern count = 1
1406  No options  No options
1407  First char = 'a'  First char = 'a'
1408  No need char  No need char
1409    
1410  /(a|.)/  /(a|.)/I
1411  Capturing subpattern count = 1  Capturing subpattern count = 1
1412  No options  No options
1413  No first char  No first char
1414  No need char  No need char
1415    
1416  /a|ba|\w/  /a|ba|\w/I
1417  Capturing subpattern count = 0  Capturing subpattern count = 0
1418  No options  No options
1419  No first char  No first char
1420  No need char  No need char
1421    
1422  /abc(?=pqr)/  /abc(?=pqr)/I
1423  Capturing subpattern count = 0  Capturing subpattern count = 0
1424  No options  No options
1425  First char = 'a'  First char = 'a'
1426  Need char = 'r'  Need char = 'r'
1427    
1428  /...(?<=abc)/  /...(?<=abc)/I
1429  Capturing subpattern count = 0  Capturing subpattern count = 0
1430  No options  No options
1431  No first char  No first char
1432  No need char  No need char
1433    
1434  /abc(?!pqr)/  /abc(?!pqr)/I
1435  Capturing subpattern count = 0  Capturing subpattern count = 0
1436  No options  No options
1437  First char = 'a'  First char = 'a'
1438  Need char = 'c'  Need char = 'c'
1439    
1440  /ab./  /ab./I
1441  Capturing subpattern count = 0  Capturing subpattern count = 0
1442  No options  No options
1443  First char = 'a'  First char = 'a'
1444  Need char = 'b'  Need char = 'b'
1445    
1446  /ab[xyz]/  /ab[xyz]/I
1447  Capturing subpattern count = 0  Capturing subpattern count = 0
1448  No options  No options
1449  First char = 'a'  First char = 'a'
1450  Need char = 'b'  Need char = 'b'
1451    
1452  /abc*/  /abc*/I
1453  Capturing subpattern count = 0  Capturing subpattern count = 0
1454  No options  No options
1455  First char = 'a'  First char = 'a'
1456  Need char = 'b'  Need char = 'b'
1457    
1458  /ab.c*/  /ab.c*/I
1459  Capturing subpattern count = 0  Capturing subpattern count = 0
1460  No options  No options
1461  First char = 'a'  First char = 'a'
1462  Need char = 'b'  Need char = 'b'
1463    
1464  /a.c*/  /a.c*/I
1465  Capturing subpattern count = 0  Capturing subpattern count = 0
1466  No options  No options
1467  First char = 'a'  First char = 'a'
1468  No need char  No need char
1469    
1470  /.c*/  /.c*/I
1471  Capturing subpattern count = 0  Capturing subpattern count = 0
1472  No options  No options
1473  No first char  No first char
1474  No need char  No need char
1475    
1476  /ac*/  /ac*/I
1477  Capturing subpattern count = 0  Capturing subpattern count = 0
1478  No options  No options
1479  First char = 'a'  First char = 'a'
1480  No need char  No need char
1481    
1482  /(a.c*|b.c*)/  /(a.c*|b.c*)/I
1483  Capturing subpattern count = 1  Capturing subpattern count = 1
1484  No options  No options
1485  No first char  No first char
1486  No need char  No need char
1487    
1488  /a.c*|aba/  /a.c*|aba/I
1489  Capturing subpattern count = 0  Capturing subpattern count = 0
1490  No options  No options
1491  First char = 'a'  First char = 'a'
1492  No need char  No need char
1493    
1494  /.+a/  /.+a/I
1495  Capturing subpattern count = 0  Capturing subpattern count = 0
1496  No options  No options
1497  No first char  No first char
1498  Need char = 'a'  Need char = 'a'
1499    
1500  /(?=abcda)a.*/  /(?=abcda)a.*/I
1501  Capturing subpattern count = 0  Capturing subpattern count = 0
1502  No options  No options
1503  First char = 'a'  First char = 'a'
1504  No need char  Need char = 'a'
1505    
1506  /(?=a)a.*/  /(?=a)a.*/I
1507  Capturing subpattern count = 0  Capturing subpattern count = 0
1508  No options  No options
1509  First char = 'a'  First char = 'a'
1510  No need char  No need char
1511    
1512  /a(b)*/  /a(b)*/I
1513  Capturing subpattern count = 1  Capturing subpattern count = 1
1514  No options  No options
1515  First char = 'a'  First char = 'a'
1516  No need char  No need char
1517    
1518  /a\d*/  /a\d*/I
1519  Capturing subpattern count = 0  Capturing subpattern count = 0
1520  No options  No options
1521  First char = 'a'  First char = 'a'
1522  No need char  No need char
1523    
1524  /ab\d*/  /ab\d*/I
1525  Capturing subpattern count = 0  Capturing subpattern count = 0
1526  No options  No options
1527  First char = 'a'  First char = 'a'
1528  Need char = 'b'  Need char = 'b'
1529    
1530  /a(\d)*/  /a(\d)*/I
1531  Capturing subpattern count = 1  Capturing subpattern count = 1
1532  No options  No options
1533  First char = 'a'  First char = 'a'
1534  No need char  No need char
1535    
1536  /abcde{0,0}/  /abcde{0,0}/I
1537  Capturing subpattern count = 0  Capturing subpattern count = 0
1538  No options  No options
1539  First char = 'a'  First char = 'a'
1540  Need char = 'd'  Need char = 'd'
1541    
1542  /ab\d+/  /ab\d+/I
1543  Capturing subpattern count = 0  Capturing subpattern count = 0
1544  No options  No options
1545  First char = 'a'  First char = 'a'
1546  Need char = 'b'  Need char = 'b'
1547    
1548  /a(?(1)b)/  /a(?(1)b)(.)/I
1549  Capturing subpattern count = 0  Capturing subpattern count = 1
1550  No options  No options
1551  First char = 'a'  First char = 'a'
1552  No need char  No need char
1553    
1554  /a(?(1)bag|big)/  /a(?(1)bag|big)(.)/I
1555  Capturing subpattern count = 0  Capturing subpattern count = 1
1556  No options  No options
1557  First char = 'a'  First char = 'a'
1558  Need char = 'g'  Need char = 'g'
1559    
1560  /a(?(1)bag|big)*/  /a(?(1)bag|big)*(.)/I
1561  Capturing subpattern count = 0  Capturing subpattern count = 1
1562  No options  No options
1563  First char = 'a'  First char = 'a'
1564  No need char  No need char
1565    
1566  /a(?(1)bag|big)+/  /a(?(1)bag|big)+(.)/I
1567  Capturing subpattern count = 0  Capturing subpattern count = 1
1568  No options  No options
1569  First char = 'a'  First char = 'a'
1570  Need char = 'g'  Need char = 'g'
1571    
1572  /a(?(1)b..|b..)/  /a(?(1)b..|b..)(.)/I
1573  Capturing subpattern count = 0  Capturing subpattern count = 1
1574  No options  No options
1575  First char = 'a'  First char = 'a'
1576  Need char = 'b'  Need char = 'b'
1577    
1578  /ab\d{0}e/  /ab\d{0}e/I
1579  Capturing subpattern count = 0  Capturing subpattern count = 0
1580  No options  No options
1581  First char = 'a'  First char = 'a'
1582  Need char = 'e'  Need char = 'e'
1583    
1584  /a?b?/  /a?b?/I
1585  Capturing subpattern count = 0  Capturing subpattern count = 0
1586  No options  No options
1587  No first char  No first char
# Line 1578  No need char Line 1596  No need char
1596   0:   0:
1597      *** Failers      *** Failers
1598   0:   0:
1599      \N      \N
1600  No match  No match
1601    
1602  /|-/  /|-/I
1603  Capturing subpattern count = 0  Capturing subpattern count = 0
1604  No options  No options
1605  No first char  No first char
# Line 1594  No need char Line 1612  No need char
1612   0: -   0: -
1613      *** Failers      *** Failers
1614   0:   0:
1615      \Nabc      \Nabc
1616  No match  No match
1617    
1618  /a*(b+)(z)(z)/P  /a*(b+)(z)(z)/P
# Line 1623  No match Line 1641  No match
1641   1: bbbb   1: bbbb
1642   2: z   2: z
1643   3: z   3: z
1644    
1645  /^.?abcd/S  /^.?abcd/IS
1646  Capturing subpattern count = 0  Capturing subpattern count = 0
1647  Options: anchored  Options: anchored
1648  No first char  No first char
# Line 1638  Study returned NULL Line 1656  Study returned NULL
1656    (?R)          # Recurse - i.e. nested bracketed string    (?R)          # Recurse - i.e. nested bracketed string
1657    )*            # Zero or more contents    )*            # Zero or more contents
1658    \)            # Closing )    \)            # Closing )
1659    /x    /Ix
1660  Capturing subpattern count = 0  Capturing subpattern count = 0
1661  Options: extended  Options: extended
1662  First char = '('  First char = '('
# Line 1649  Need char = ')' Line 1667  Need char = ')'
1667   0: (abcd)   0: (abcd)
1668      xyz(abcd)      xyz(abcd)
1669   0: (abcd)   0: (abcd)
1670      (ab(xy)cd)pqr      (ab(xy)cd)pqr
1671   0: (ab(xy)cd)   0: (ab(xy)cd)
1672      (ab(xycd)pqr      (ab(xycd)pqr
1673   0: (xycd)   0: (xycd)
1674      () abc ()      () abc ()
1675   0: ()   0: ()
1676      12(abcde(fsh)xyz(foo(bar))lmno)89      12(abcde(fsh)xyz(foo(bar))lmno)89
1677   0: (abcde(fsh)xyz(foo(bar))lmno)   0: (abcde(fsh)xyz(foo(bar))lmno)
1678      *** Failers      *** Failers
1679  No match  No match
1680      abcd      abcd
1681  No match  No match
1682      abcd)      abcd)
1683  No match  No match
1684      (abcd      (abcd
1685  No match  No match
1686    
1687  /\(  ( (?>[^()]+) | (?R) )* \) /xg  /\(  ( (?>[^()]+) | (?R) )* \) /Ixg
1688  Capturing subpattern count = 1  Capturing subpattern count = 1
1689  Options: extended  Options: extended
1690  First char = '('  First char = '('
1691  Need char = ')'  Need char = ')'
1692      (ab(xy)cd)pqr      (ab(xy)cd)pqr
1693   0: (ab(xy)cd)   0: (ab(xy)cd)
1694   1: cd   1: cd
1695      1(abcd)(x(y)z)pqr      1(abcd)(x(y)z)pqr
# Line 1680  Need char = ')' Line 1698  Need char = ')'
1698   0: (x(y)z)   0: (x(y)z)
1699   1: z   1: z
1700    
1701  /\(  (?: (?>[^()]+) | (?R) ) \) /x  /\(  (?: (?>[^()]+) | (?R) ) \) /Ix
1702  Capturing subpattern count = 0  Capturing subpattern count = 0
1703  Options: extended  Options: extended
1704  First char = '('  First char = '('
# Line 1689  Need char = ')' Line 1707  Need char = ')'
1707   0: (abcd)   0: (abcd)
1708      (ab(xy)cd)      (ab(xy)cd)
1709   0: (xy)   0: (xy)
1710      (a(b(c)d)e)      (a(b(c)d)e)
1711   0: (c)   0: (c)
1712      ((ab))      ((ab))
1713   0: ((ab))   0: ((ab))
1714      *** Failers      *** Failers
1715  No match  No match
1716      ()      ()
1717  No match  No match
1718    
1719  /\(  (?: (?>[^()]+) | (?R) )? \) /x  /\(  (?: (?>[^()]+) | (?R) )? \) /Ix
1720  Capturing subpattern count = 0  Capturing subpattern count = 0
1721  Options: extended  Options: extended
1722  First char = '('  First char = '('
# Line 1708  Need char = ')' Line 1726  Need char = ')'
1726      12(abcde(fsh)xyz(foo(bar))lmno)89      12(abcde(fsh)xyz(foo(bar))lmno)89
1727   0: (fsh)   0: (fsh)
1728    
1729  /\(  ( (?>[^()]+) | (?R) )* \) /x  /\(  ( (?>[^()]+) | (?R) )* \) /Ix
1730  Capturing subpattern count = 1  Capturing subpattern count = 1
1731  Options: extended  Options: extended
1732  First char = '('  First char = '('
# Line 1717  Need char = ')' Line 1735  Need char = ')'
1735   0: (ab(xy)cd)   0: (ab(xy)cd)
1736   1: cd   1: cd
1737    
1738  /\( ( ( (?>[^()]+) | (?R) )* ) \) /x  /\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
1739  Capturing subpattern count = 2  Capturing subpattern count = 2
1740  Options: extended  Options: extended
1741  First char = '('  First char = '('
# Line 1727  Need char = ')' Line 1745  Need char = ')'
1745   1: ab(xy)cd   1: ab(xy)cd
1746   2: cd   2: cd
1747    
1748  /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x  /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
1749  Capturing subpattern count = 3  Capturing subpattern count = 3
1750  Options: extended  Options: extended
1751  First char = '('  First char = '('
# Line 1743  Need char = ')' Line 1761  Need char = ')'
1761   2: ab(xy)cd   2: ab(xy)cd
1762   3: cd   3: cd
1763    
1764  /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x  /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
1765  Capturing subpattern count = 3  Capturing subpattern count = 3
1766  Options: extended  Options: extended
1767  First char = '('  First char = '('
# Line 1759  Need char = ')' Line 1777  Need char = ')'
1777   2: 123   2: 123
1778   3: cd   3: cd
1779    
1780  /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x  /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
1781  Capturing subpattern count = 11  Capturing subpattern count = 11
1782  Options: extended  Options: extended
1783  First char = '('  First char = '('
# Line 1778  Need char = ')' Line 1796  Need char = ')'
1796  10: ab(xy)cd  10: ab(xy)cd
1797  11: cd  11: cd
1798    
1799  /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x  /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
1800  Capturing subpattern count = 3  Capturing subpattern count = 3
1801  Options: extended  Options: extended
1802  First char = '('  First char = '('
# Line 1787  Need char = ')' Line 1805  Need char = ')'
1805   0: (abcd(xyz<p>qrs)123)   0: (abcd(xyz<p>qrs)123)
1806   1: abcd(xyz<p>qrs)123   1: abcd(xyz<p>qrs)123
1807   2: 123   2: 123
  3: <p>qrs  
1808    
1809  /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x  /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
1810  Capturing subpattern count = 3  Capturing subpattern count = 3
1811  Options: extended  Options: extended
1812  First char = '('  First char = '('
# Line 1805  Need char = ')' Line 1822  Need char = ')'
1822   2: ij   2: ij
1823   3: (cd(ef)gh)   3: (cd(ef)gh)
1824    
1825  /^[[:alnum:]]/D  /^[[:alnum:]]/DZ
1826    ------------------------------------------------------------------
1827            Bra
1828            ^
1829            [0-9A-Za-z]
1830            Ket
1831            End
1832    ------------------------------------------------------------------
1833    Capturing subpattern count = 0
1834    Options: anchored
1835    No first char
1836    No need char
1837    
1838    /^[[:^alnum:]]/DZ
1839    ------------------------------------------------------------------
1840            Bra
1841            ^
1842            [\x00-/:-@[-`{-\xff] (neg)
1843            Ket
1844            End
1845    ------------------------------------------------------------------
1846    Capturing subpattern count = 0
1847    Options: anchored
1848    No first char
1849    No need char
1850    
1851    /^[[:alpha:]]/DZ
1852    ------------------------------------------------------------------
1853            Bra
1854            ^
1855            [A-Za-z]
1856            Ket
1857            End
1858    ------------------------------------------------------------------
1859    Capturing subpattern count = 0
1860    Options: anchored
1861    No first char
1862    No need char
1863    
1864    /^[[:^alpha:]]/DZ
1865    ------------------------------------------------------------------
1866            Bra
1867            ^
1868            [\x00-@[-`{-\xff] (neg)
1869            Ket
1870            End
1871    ------------------------------------------------------------------
1872    Capturing subpattern count = 0
1873    Options: anchored
1874    No first char
1875    No need char
1876    
1877    /[_[:alpha:]]/IS
1878    Capturing subpattern count = 0
1879    No options
1880    No first char
1881    No need char
1882    Starting 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
1883      _ 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    
1885    /^[[:ascii:]]/DZ
1886    ------------------------------------------------------------------
1887            Bra
1888            ^
1889            [\x00-\x7f]
1890            Ket
1891            End
1892    ------------------------------------------------------------------
1893    Capturing subpattern count = 0
1894    Options: anchored
1895    No first char
1896    No need char
1897    
1898    /^[[:^ascii:]]/DZ
1899    ------------------------------------------------------------------
1900            Bra
1901            ^
1902            [\x80-\xff] (neg)
1903            Ket
1904            End
1905    ------------------------------------------------------------------
1906    Capturing subpattern count = 0
1907    Options: anchored
1908    No first char
1909    No need char
1910    
1911    /^[[:blank:]]/DZ
1912  ------------------------------------------------------------------  ------------------------------------------------------------------
1913    0  37 Bra 0          Bra
1914    3     ^          ^
1915    4     [0-9A-Za-z]          [\x09 ]
1916   37  37 Ket          Ket
1917   40     End          End
1918  ------------------------------------------------------------------  ------------------------------------------------------------------
1919  Capturing subpattern count = 0  Capturing subpattern count = 0
1920  Options: anchored  Options: anchored
1921  No first char  No first char
1922  No need char  No need char
1923    
1924  /^[[:alpha:]]/D  /^[[:^blank:]]/DZ
1925  ------------------------------------------------------------------  ------------------------------------------------------------------
1926    0  37 Bra 0          Bra
1927    3     ^          ^
1928    4     [A-Za-z]          [\x00-\x08\x0a-\x1f!-\xff] (neg)
1929   37  37 Ket          Ket
1930   40     End          End
1931  ------------------------------------------------------------------  ------------------------------------------------------------------
1932  Capturing subpattern count = 0  Capturing subpattern count = 0
1933  Options: anchored  Options: anchored
1934  No first char  No first char
1935  No need char  No need char
1936    
1937  /^[[:ascii:]]/D  /[\n\x0b\x0c\x0d[:blank:]]/IS
1938    Capturing subpattern count = 0
1939    Contains explicit CR or LF match
1940    No options
1941    No first char
1942    No need char
1943    Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
1944    
1945    /^[[:cntrl:]]/DZ
1946  ------------------------------------------------------------------  ------------------------------------------------------------------
1947    0  37 Bra 0          Bra
1948    3     ^          ^
1949    4     [\x00-\x7f]          [\x00-\x1f\x7f]
1950   37  37 Ket          Ket
1951   40     End          End
1952  ------------------------------------------------------------------  ------------------------------------------------------------------
1953  Capturing subpattern count = 0  Capturing subpattern count = 0
1954  Options: anchored  Options: anchored
1955  No first char  No first char
1956  No need char  No need char
1957    
1958  /^[[:cntrl:]]/D  /^[[:digit:]]/DZ
1959  ------------------------------------------------------------------  ------------------------------------------------------------------
1960    0  37 Bra 0          Bra
1961    3     ^          ^
1962    4     [\x00-\x1f\x7f]          [0-9]
1963   37  37 Ket          Ket
1964   40     End          End
1965  ------------------------------------------------------------------  ------------------------------------------------------------------
1966  Capturing subpattern count = 0  Capturing subpattern count = 0
1967  Options: anchored  Options: anchored
1968  No first char  No first char
1969  No need char  No need char
1970    
1971  /^[[:digit:]]/D  /^[[:graph:]]/DZ
1972  ------------------------------------------------------------------  ------------------------------------------------------------------
1973    0  37 Bra 0          Bra
1974    3     ^          ^
1975    4     [0-9]          [!-~]
1976   37  37 Ket          Ket
1977   40     End          End
1978  ------------------------------------------------------------------  ------------------------------------------------------------------
1979  Capturing subpattern count = 0  Capturing subpattern count = 0
1980  Options: anchored  Options: anchored
1981  No first char  No first char
1982  No need char  No need char
1983    
1984  /^[[:graph:]]/D  /^[[:lower:]]/DZ
1985  ------------------------------------------------------------------  ------------------------------------------------------------------
1986    0  37 Bra 0          Bra
1987    3     ^          ^
1988    4     [!-~]          [a-z]
1989   37  37 Ket          Ket
1990   40     End          End
1991  ------------------------------------------------------------------  ------------------------------------------------------------------
1992  Capturing subpattern count = 0  Capturing subpattern count = 0
1993  Options: anchored  Options: anchored
1994  No first char  No first char
1995  No need char  No need char
1996    
1997  /^[[:lower:]]/D  /^[[:print:]]/DZ
1998  ------------------------------------------------------------------  ------------------------------------------------------------------
1999    0  37 Bra 0          Bra
2000    3     ^          ^
2001    4     [a-z]          [ -~]
2002   37  37 Ket          Ket
2003   40     End          End
2004  ------------------------------------------------------------------  ------------------------------------------------------------------
2005  Capturing subpattern count = 0  Capturing subpattern count = 0
2006  Options: anchored  Options: anchored
2007  No first char  No first char
2008  No need char  No need char
2009    
2010  /^[[:print:]]/D  /^[[:punct:]]/DZ
2011  ------------------------------------------------------------------  ------------------------------------------------------------------
2012    0  37 Bra 0          Bra
2013    3     ^          ^
2014    4     [ -~]          [!-/:-@[-`{-~]
2015   37  37 Ket          Ket
2016   40     End          End
2017  ------------------------------------------------------------------  ------------------------------------------------------------------
2018  Capturing subpattern count = 0  Capturing subpattern count = 0
2019  Options: anchored  Options: anchored
2020  No first char  No first char
2021  No need char  No need char
2022    
2023  /^[[:punct:]]/D  /^[[:space:]]/DZ
2024  ------------------------------------------------------------------  ------------------------------------------------------------------
2025    0  37 Bra 0          Bra
2026    3     ^          ^
2027    4     [!-/:-@[-`{-~]          [\x09-\x0d ]
2028   37  37 Ket          Ket
2029   40     End          End
2030  ------------------------------------------------------------------  ------------------------------------------------------------------
2031  Capturing subpattern count = 0  Capturing subpattern count = 0
2032  Options: anchored  Options: anchored
2033  No first char  No first char
2034  No need char  No need char
2035    
2036  /^[[:space:]]/D  /^[[:upper:]]/DZ
2037  ------------------------------------------------------------------  ------------------------------------------------------------------
2038    0  37 Bra 0          Bra
2039    3     ^          ^
2040    4     [\x09-\x0d ]          [A-Z]
2041   37  37 Ket          Ket
2042   40     End          End
2043  ------------------------------------------------------------------  ------------------------------------------------------------------
2044  Capturing subpattern count = 0  Capturing subpattern count = 0
2045  Options: anchored  Options: anchored
2046  No first char  No first char
2047  No need char  No need char
2048    
2049  /^[[:upper:]]/D  /^[[:xdigit:]]/DZ
2050  ------------------------------------------------------------------  ------------------------------------------------------------------
2051    0  37 Bra 0          Bra
2052    3     ^          ^
2053    4     [A-Z]          [0-9A-Fa-f]
2054   37  37 Ket          Ket
2055   40     End          End
2056  ------------------------------------------------------------------  ------------------------------------------------------------------
2057  Capturing subpattern count = 0  Capturing subpattern count = 0
2058  Options: anchored  Options: anchored
2059  No first char  No first char
2060  No need char  No need char
2061    
2062  /^[[:xdigit:]]/D  /^[[:word:]]/DZ
2063  ------------------------------------------------------------------  ------------------------------------------------------------------
2064    0  37 Bra 0          Bra
2065    3     ^          ^
2066    4     [0-9A-Fa-f]          [0-9A-Z_a-z]
2067   37  37 Ket          Ket
2068   40     End          End
2069  ------------------------------------------------------------------  ------------------------------------------------------------------
2070  Capturing subpattern count = 0  Capturing subpattern count = 0
2071  Options: anchored  Options: anchored
2072  No first char  No first char
2073  No need char  No need char
2074    
2075  /^[[:word:]]/D  /^[[:^cntrl:]]/DZ
2076  ------------------------------------------------------------------  ------------------------------------------------------------------
2077    0  37 Bra 0          Bra
2078    3     ^          ^
2079    4     [0-9A-Z_a-z]          [ -~\x80-\xff] (neg)
2080   37  37 Ket          Ket
2081   40     End          End
2082  ------------------------------------------------------------------  ------------------------------------------------------------------
2083  Capturing subpattern count = 0  Capturing subpattern count = 0
2084  Options: anchored  Options: anchored
2085  No first char  No first char
2086  No need char  No need char
2087    
2088  /^[[:^cntrl:]]/D  /^[12[:^digit:]]/DZ
2089  ------------------------------------------------------------------  ------------------------------------------------------------------
2090    0  37 Bra 0          Bra
2091    3     ^          ^
2092    4     [ -~\x80-\xff]          [\x00-/12:-\xff] (neg)
2093   37  37 Ket          Ket
2094   40     End          End
2095  ------------------------------------------------------------------  ------------------------------------------------------------------
2096  Capturing subpattern count = 0  Capturing subpattern count = 0
2097  Options: anchored  Options: anchored
2098  No first char  No first char
2099  No need char  No need char
2100    
2101  /^[12[:^digit:]]/D  /^[[:^blank:]]/DZ
2102  ------------------------------------------------------------------  ------------------------------------------------------------------
2103    0  37 Bra 0          Bra
2104    3     ^          ^
2105    4     [\x00-/1-2:-\xff]          [\x00-\x08\x0a-\x1f!-\xff] (neg)
2106   37  37 Ket          Ket
2107   40     End          End
2108  ------------------------------------------------------------------  ------------------------------------------------------------------
2109  Capturing subpattern count = 0  Capturing subpattern count = 0
2110  Options: anchored  Options: anchored
2111  No first char  No first char
2112  No need char  No need char
2113    
2114  /[01[:alpha:]%]/D  /[01[:alpha:]%]/DZ
2115  ------------------------------------------------------------------  ------------------------------------------------------------------
2116    0  36 Bra 0          Bra
2117    3     [%0-1A-Za-z]          [%01A-Za-z]
2118   36  36 Ket          Ket
2119   39     End          End
2120  ------------------------------------------------------------------  ------------------------------------------------------------------
2121  Capturing subpattern count = 0  Capturing subpattern count = 0
2122  No options  No options
2123  No first char  No first char
2124  No need char  No need char
2125    
2126  /[[.ch.]]/  /[[.ch.]]/I
2127  Failed: POSIX collating elements are not supported at offset 1  Failed: POSIX collating elements are not supported at offset 1
2128    
2129  /[[=ch=]]/  /[[=ch=]]/I
2130  Failed: POSIX collating elements are not supported at offset 1  Failed: POSIX collating elements are not supported at offset 1
2131    
2132  /[[:rhubarb:]]/  /[[:rhubarb:]]/I
2133  Failed: unknown POSIX class name at offset 3  Failed: unknown POSIX class name at offset 3
2134    
2135  /[[:upper:]]/i  /[[:upper:]]/Ii
2136  Capturing subpattern count = 0  Capturing subpattern count = 0
2137  Options: caseless  Options: caseless
2138  No first char  No first char
2139  No need char  No need char
2140      A      A
2141   0: A   0: A
2142      a      a
2143   0: a   0: a
2144    
2145  /[[:lower:]]/i  /[[:lower:]]/Ii
2146  Capturing subpattern count = 0  Capturing subpattern count = 0
2147  Options: caseless  Options: caseless
2148  No first char  No first char
2149  No need char  No need char
2150      A      A
2151   0: A   0: A
2152      a      a
2153   0: a   0: a
2154    
2155  /((?-i)[[:lower:]])[[:lower:]]/i  /((?-i)[[:lower:]])[[:lower:]]/Ii
2156  Capturing subpattern count = 1  Capturing subpattern count = 1
2157  Options: caseless  Options: caseless
 Case state changes  
2158  No first char  No first char
2159  No need char  No need char
2160      ab      ab
# Line 2058  No need char Line 2168  No need char
2168   1: a   1: a
2169      Ab      Ab
2170  No match  No match
2171      AB      AB
2172  No match  No match
2173    
2174  /[\200-\410]/  /[\200-\110]/I
2175  Failed: range out of order in character class at offset 9  Failed: range out of order in character class at offset 9
2176    
2177  /^(?(0)f|b)oo/  /^(?(0)f|b)oo/I
2178  Failed: invalid condition (?(0) at offset 5  Failed: invalid condition (?(0) at offset 6
2179    
2180  / End of testinput2 /  /This one's here because of the large output vector needed/I
2181  Capturing subpattern count = 0  Capturing subpattern count = 0
2182  No options  No options
2183  First char = ' '  First char = 'T'
2184  Need char = ' '  Need char = 'd'
2185    
2186    /(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\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
2187    Capturing subpattern count = 271
2188    Max back reference = 270
2189    No options
2190    No first char
2191    No need char
2192        \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
2193     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
2194     1: 1
2195     2: 2
2196     3: 3
2197     4: 4
2198     5: 5
2199     6: 6
2200     7: 7
2201     8: 8
2202     9: 9
2203    10: 10
2204    11: 11
2205    12: 12
2206    13: 13
2207    14: 14
2208    15: 15
2209    16: 16
2210    17: 17
2211    18: 18
2212    19: 19
2213    20: 20
2214    21: 21
2215    22: 22
2216    23: 23
2217    24: 24
2218    25: 25
2219    26: 26
2220    27: 27
2221    28: 28
2222    29: 29
2223    30: 30
2224    31: 31
2225    32: 32
2226    33: 33
2227    34: 34
2228    35: 35
2229    36: 36
2230    37: 37
2231    38: 38
2232    39: 39
2233    40: 40
2234    41: 41
2235    42: 42
2236    43: 43
2237    44: 44
2238    45: 45
2239    46: 46
2240    47: 47
2241    48: 48
2242    49: 49
2243    50: 50
2244    51: 51
2245    52: 52
2246    53: 53
2247    54: 54
2248    55: 55
2249    56: 56
2250    57: 57
2251    58: 58
2252    59: 59
2253    60: 60
2254    61: 61
2255    62: 62
2256    63: 63
2257    64: 64
2258    65: 65
2259    66: 66
2260    67: 67
2261    68: 68
2262    69: 69
2263    70: 70
2264    71: 71
2265    72: 72
2266    73: 73
2267    74: 74
2268    75: 75
2269    76: 76
2270    77: 77
2271    78: 78
2272    79: 79
2273    80: 80
2274    81: 81
2275    82: 82
2276    83: 83
2277    84: 84
2278    85: 85
2279    86: 86
2280    87: 87
2281    88: 88
2282    89: 89
2283    90: 90
2284    91: 91
2285    92: 92
2286    93: 93
2287    94: 94
2288    95: 95
2289    96: 96
2290    97: 97
2291    98: 98
2292    99: 99
2293    100: 100
2294    101: 101
2295    102: 102
2296    103: 103
2297    104: 104
2298    105: 105
2299    106: 106
2300    107: 107
2301    108: 108
2302    109: 109
2303    110: 110
2304    111: 111
2305    112: 112
2306    113: 113
2307    114: 114
2308    115: 115
2309    116: 116
2310    117: 117
2311    118: 118
2312    119: 119
2313    120: 120
2314    121: 121
2315    122: 122
2316    123: 123
2317    124: 124
2318    125: 125
2319    126: 126
2320    127: 127
2321    128: 128
2322    129: 129
2323    130: 130
2324    131: 131
2325    132: 132
2326    133: 133
2327    134: 134
2328    135: 135
2329    136: 136
2330    137: 137
2331    138: 138
2332    139: 139
2333    140: 140
2334    141: 141
2335    142: 142
2336    143: 143
2337    144: 144
2338    145: 145
2339    146: 146
2340    147: 147
2341    148: 148
2342    149: 149
2343    150: 150
2344    151: 151
2345    152: 152
2346    153: 153
2347    154: 154
2348    155: 155
2349    156: 156
2350    157: 157
2351    158: 158
2352    159: 159
2353    160: 160
2354    161: 161
2355    162: 162
2356    163: 163
2357    164: 164
2358    165: 165
2359    166: 166
2360    167: 167
2361    168: 168
2362    169: 169
2363    170: 170
2364    171: 171
2365    172: 172
2366    173: 173
2367    174: 174
2368    175: 175
2369    176: 176
2370    177: 177
2371    178: 178
2372    179: 179
2373    180: 180
2374    181: 181
2375    182: 182
2376    183: 183
2377    184: 184
2378    185: 185
2379    186: 186
2380    187: 187
2381    188: 188
2382    189: 189
2383    190: 190
2384    191: 191
2385    192: 192
2386    193: 193
2387    194: 194
2388    195: 195
2389    196: 196
2390    197: 197
2391    198: 198
2392    199: 199
2393    200: 200
2394    201: 201
2395    202: 202
2396    203: 203
2397    204: 204
2398    205: 205
2399    206: 206
2400    207: 207
2401    208: 208
2402    209: 209
2403    210: 210
2404    211: 211
2405    212: 212
2406    213: 213
2407    214: 214
2408    215: 215
2409    216: 216
2410    217: 217
2411    218: 218
2412    219: 219
2413    220: 220
2414    221: 221
2415    222: 222
2416    223: 223
2417    224: 224
2418    225: 225
2419    226: 226
2420    227: 227
2421    228: 228
2422    229: 229
2423    230: 230
2424    231: 231
2425    232: 232
2426    233: 233
2427    234: 234
2428    235: 235
2429    236: 236
2430    237: 237
2431    238: 238
2432    239: 239
2433    240: 240
2434    241: 241
2435    242: 242
2436    243: 243
2437    244: 244
2438    245: 245
2439    246: 246
2440    247: 247
2441    248: 248
2442    249: 249
2443    250: 250
2444    251: 251
2445    252: 252
2446    253: 253
2447    254: 254
2448    255: 255
2449    256: 256
2450    257: 257
2451    258: 258
2452    259: 259
2453    260: 260
2454    261: 261
2455    262: 262
2456    263: 263
2457    264: 264
2458    265: 265
2459    266: 266
2460    267: 267
2461    268: 268
2462    269: 269
2463    270: ABC
2464    271: ABC
2465    
2466    /This one's here because Perl does this differently and PCRE can't at present/I
2467    Capturing subpattern count = 0
2468    No options
2469    First char = 'T'
2470    Need char = 't'
2471    
2472    /(main(O)?)+/I
2473    Capturing subpattern count = 2
2474    No options
2475    First char = 'm'
2476    Need char = 'n'
2477        mainmain
2478     0: mainmain
2479     1: main
2480        mainOmain
2481     0: mainOmain
2482     1: main
2483     2: O
2484    
2485    /These are all cases where Perl does it differently (nested captures)/I
2486    Capturing subpattern count = 1
2487    No options
2488    First char = 'T'
2489    Need char = 's'
2490    
2491    /^(a(b)?)+$/I
2492    Capturing subpattern count = 2
2493    Options: anchored
2494    No first char
2495    No need char
2496        aba
2497     0: aba
2498     1: a
2499     2: b
2500    
2501    /^(aa(bb)?)+$/I
2502    Capturing subpattern count = 2
2503    Options: anchored
2504    No first char
2505    No need char
2506        aabbaa
2507     0: aabbaa
2508     1: aa
2509     2: bb
2510    
2511    /^(aa|aa(bb))+$/I
2512    Capturing subpattern count = 2
2513    Options: anchored
2514    No first char
2515    No need char
2516        aabbaa
2517     0: aabbaa
2518     1: aa
2519     2: bb
2520    
2521    /^(aa(bb)??)+$/I
2522    Capturing subpattern count = 2
2523    Options: anchored
2524    No first char
2525    No need char
2526        aabbaa
2527     0: aabbaa
2528     1: aa
2529     2: bb
2530    
2531    /^(?:aa(bb)?)+$/I
2532    Capturing subpattern count = 1
2533    Options: anchored
2534    No first char
2535    No need char
2536        aabbaa
2537     0: aabbaa
2538     1: bb
2539    
2540    /^(aa(b(b))?)+$/I
2541    Capturing subpattern count = 3
2542    Options: anchored
2543    No first char
2544    No need char
2545        aabbaa
2546     0: aabbaa
2547     1: aa
2548     2: bb
2549     3: b
2550    
2551    /^(?:aa(b(b))?)+$/I
2552    Capturing subpattern count = 2
2553    Options: anchored
2554    No first char
2555    No need char
2556        aabbaa
2557     0: aabbaa
2558     1: bb
2559     2: b
2560    
2561    /^(?:aa(b(?:b))?)+$/I
2562    Capturing subpattern count = 1
2563    Options: anchored
2564    No first char
2565    No need char
2566        aabbaa
2567     0: aabbaa
2568     1: bb
2569    
2570    /^(?:aa(bb(?:b))?)+$/I
2571    Capturing subpattern count = 1
2572    Options: anchored
2573    No first char
2574    No need char
2575        aabbbaa
2576     0: aabbbaa
2577     1: bbb
2578    
2579    /^(?:aa(b(?:bb))?)+$/I
2580    Capturing subpattern count = 1
2581    Options: anchored
2582    No first char
2583    No need char
2584        aabbbaa
2585     0: aabbbaa
2586     1: bbb
2587    
2588    /^(?:aa(?:b(b))?)+$/I
2589    Capturing subpattern count = 1
2590    Options: anchored
2591    No first char
2592    No need char
2593        aabbaa
2594     0: aabbaa
2595     1: b
2596    
2597    /^(?:aa(?:b(bb))?)+$/I
2598    Capturing subpattern count = 1
2599    Options: anchored
2600    No first char
2601    No need char
2602        aabbbaa
2603     0: aabbbaa
2604     1: bb
2605    
2606    /^(aa(b(bb))?)+$/I
2607    Capturing subpattern count = 3
2608    Options: anchored
2609    No first char
2610    No need char
2611        aabbbaa
2612     0: aabbbaa
2613     1: aa
2614     2: bbb
2615     3: bb
2616    
2617    /^(aa(bb(bb))?)+$/I
2618    Capturing subpattern count = 3
2619    Options: anchored
2620    No first char
2621    No need char
2622        aabbbbaa
2623     0: aabbbbaa
2624     1: aa
2625     2: bbbb
2626     3: bb
2627    
2628    /--------------------------------------------------------------------/I
2629    Capturing subpattern count = 0
2630    No options
2631    First char = '-'
2632    Need char = '-'
2633    
2634    /#/IxDZ
2635    ------------------------------------------------------------------
2636            Bra
2637            Ket
2638            End
2639    ------------------------------------------------------------------
2640    Capturing subpattern count = 0
2641    Options: extended
2642    No first char
2643    No need char
2644    
2645    /a#/IxDZ
2646    ------------------------------------------------------------------
2647            Bra
2648            a
2649            Ket
2650            End
2651    ------------------------------------------------------------------
2652    Capturing subpattern count = 0
2653    Options: extended
2654    First char = 'a'
2655    No need char
2656    
2657    /[\s]/DZ
2658    ------------------------------------------------------------------
2659            Bra
2660            [\x09\x0a\x0c\x0d ]
2661            Ket
2662            End
2663    ------------------------------------------------------------------
2664    Capturing subpattern count = 0
2665    No options
2666    No first char
2667    No need char
2668    
2669    /[\S]/DZ
2670    ------------------------------------------------------------------
2671            Bra
2672            [\x00-\x08\x0b\x0e-\x1f!-\xff] (neg)
2673            Ket
2674            End
2675    ------------------------------------------------------------------
2676    Capturing subpattern count = 0
2677    No options
2678    No first char
2679    No need char
2680    
2681    /a(?i)b/DZ
2682    ------------------------------------------------------------------
2683            Bra
2684            a
2685         01 Opt
2686         NC b
2687            Ket
2688            End
2689    ------------------------------------------------------------------
2690    Capturing subpattern count = 0
2691    No options
2692    First char = 'a'
2693    Need char = 'b' (caseless)
2694        ab
2695     0: ab
2696        aB
2697     0: aB
2698        *** Failers
2699    No match
2700        AB
2701    No match
2702    
2703    /(a(?i)b)/DZ
2704    ------------------------------------------------------------------
2705            Bra
2706            CBra 1
2707            a
2708         01 Opt
2709         NC b
2710            Ket
2711         00 Opt
2712            Ket
2713            End
2714    ------------------------------------------------------------------
2715    Capturing subpattern count = 1
2716    No options
2717    First char = 'a'
2718    Need char = 'b' (caseless)
2719        ab
2720     0: ab
2721     1: ab
2722        aB
2723     0: aB
2724     1: aB
2725        *** Failers
2726    No match
2727        AB
2728    No match
2729    
2730    /   (?i)abc/IxDZ
2731    ------------------------------------------------------------------
2732            Bra
2733         NC abc
2734            Ket
2735            End
2736    ------------------------------------------------------------------
2737    Capturing subpattern count = 0
2738    Options: caseless extended
2739    First char = 'a' (caseless)
2740    Need char = 'c' (caseless)
2741    
2742    /#this is a comment
2743      (?i)abc/IxDZ
2744    ------------------------------------------------------------------
2745            Bra
2746         NC abc
2747            Ket
2748            End
2749    ------------------------------------------------------------------
2750    Capturing subpattern count = 0
2751    Options: caseless extended
2752    First char = 'a' (caseless)
2753    Need char = 'c' (caseless)
2754    
2755    /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
2756    ------------------------------------------------------------------
2757            Bra
2758            123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2759            Ket
2760            End
2761    ------------------------------------------------------------------
2762    Capturing subpattern count = 0
2763    No options
2764    First char = '1'
2765    Need char = '0'
2766    
2767    /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
2768    ------------------------------------------------------------------
2769            Bra
2770            123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2771            Ket
2772            End
2773    ------------------------------------------------------------------
2774    Capturing subpattern count = 0
2775    No options
2776    First char = '1'
2777    Need char = '0'
2778    
2779    /\Q\E/DZ
2780    ------------------------------------------------------------------
2781            Bra
2782            Ket
2783            End
2784    ------------------------------------------------------------------
2785    Capturing subpattern count = 0
2786    No options
2787    No first char
2788    No need char
2789        \
2790     0:
2791    
2792    /\Q\Ex/DZ
2793    ------------------------------------------------------------------
2794            Bra
2795            x
2796            Ket
2797            End
2798    ------------------------------------------------------------------
2799    Capturing subpattern count = 0
2800    No options
2801    First char = 'x'
2802    No need char
2803    
2804    / \Q\E/DZ
2805    ------------------------------------------------------------------
2806            Bra
2807    
2808            Ket
2809            End
2810    ------------------------------------------------------------------
2811    Capturing subpattern count = 0
2812    No options
2813    First char = ' '
2814    No need char
2815    
2816    /a\Q\E/DZ
2817    ------------------------------------------------------------------
2818            Bra
2819            a
2820            Ket
2821            End
2822    ------------------------------------------------------------------
2823    Capturing subpattern count = 0
2824    No options
2825    First char = 'a'
2826    No need char
2827      abc
2828     0: a
2829      bca
2830     0: a
2831      bac
2832     0: a
2833    
2834    /a\Q\Eb/DZ
2835    ------------------------------------------------------------------
2836            Bra
2837            ab
2838            Ket
2839            End
2840    ------------------------------------------------------------------
2841    Capturing subpattern count = 0
2842    No options
2843    First char = 'a'
2844    Need char = 'b'
2845      abc
2846     0: ab
2847    
2848    /\Q\Eabc/DZ
2849    ------------------------------------------------------------------
2850            Bra
2851            abc
2852            Ket
2853            End
2854    ------------------------------------------------------------------
2855    Capturing subpattern count = 0
2856    No options
2857    First char = 'a'
2858    Need char = 'c'
2859    
2860    /x*+\w/DZ
2861    ------------------------------------------------------------------
2862            Bra
2863            x*+
2864            \w
2865            Ket
2866            End
2867    ------------------------------------------------------------------
2868    Capturing subpattern count = 0
2869    No options
2870    No first char
2871    No need char
2872        *** Failers
2873     0: F
2874        xxxxx
2875    No match
2876    
2877    /x?+/DZ
2878    ------------------------------------------------------------------
2879            Bra
2880            x?+
2881            Ket
2882            End
2883    ------------------------------------------------------------------
2884    Capturing subpattern count = 0
2885    No options
2886    No first char
2887    No need char
2888    
2889    /x++/DZ
2890    ------------------------------------------------------------------
2891            Bra
2892            x++
2893            Ket
2894            End
2895    ------------------------------------------------------------------
2896    Capturing subpattern count = 0
2897    No options
2898    First char = 'x'
2899    No need char
2900    
2901    /x{1,3}+/DZ
2902    ------------------------------------------------------------------
2903            Bra
2904            Once
2905            x
2906            x{0,2}
2907            Ket
2908            Ket
2909            End
2910    ------------------------------------------------------------------
2911    Capturing subpattern count = 0
2912    No options
2913    First char = 'x'
2914    No need char
2915    
2916    /(x)*+/DZ
2917    ------------------------------------------------------------------
2918            Bra
2919            Once
2920            Brazero
2921            CBra 1
2922            x
2923            KetRmax
2924            Ket
2925            Ket
2926            End
2927    ------------------------------------------------------------------
2928    Capturing subpattern count = 1
2929    No options
2930    No first char
2931    No need char
2932    
2933    /^(\w++|\s++)*$/I
2934    Capturing subpattern count = 1
2935    Options: anchored
2936    No first char
2937    No need char
2938        now is the time for all good men to come to the aid of the party
2939     0: now is the time for all good men to come to the aid of the party
2940     1: party
2941        *** Failers
2942    No match
2943        this is not a line with only words and spaces!
2944    No match
2945    
2946    /(\d++)(\w)/I
2947    Capturing subpattern count = 2
2948    No options
2949    No first char
2950    No need char
2951        12345a
2952     0: 12345a
2953     1: 12345
2954     2: a
2955        *** Failers
2956    No match
2957        12345+
2958    No match
2959    
2960    /a++b/I
2961    Capturing subpattern count = 0
2962    No options
2963    First char = 'a'
2964    Need char = 'b'
2965        aaab
2966     0: aaab
2967    
2968    /(a++b)/I
2969    Capturing subpattern count = 1
2970    No options
2971    First char = 'a'
2972    Need char = 'b'
2973        aaab
2974     0: aaab
2975     1: aaab
2976    
2977    /(a++)b/I
2978    Capturing subpattern count = 1
2979    No options
2980    First char = 'a'
2981    Need char = 'b'
2982        aaab
2983     0: aaab
2984     1: aaa
2985    
2986    /([^()]++|\([^()]*\))+/I
2987    Capturing subpattern count = 1
2988    No options
2989    No first char
2990    No need char
2991        ((abc(ade)ufh()()x
2992     0: abc(ade)ufh()()x
2993     1: x
2994    
2995    /\(([^()]++|\([^()]+\))+\)/I
2996    Capturing subpattern count = 1
2997    No options
2998    First char = '('
2999    Need char = ')'
3000        (abc)
3001     0: (abc)
3002     1: abc
3003        (abc(def)xyz)
3004     0: (abc(def)xyz)
3005     1: xyz
3006        *** Failers
3007    No match
3008        ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3009    No match
3010    
3011    /(abc){1,3}+/DZ
3012    ------------------------------------------------------------------
3013            Bra
3014            Once
3015            CBra 1
3016            abc
3017            Ket
3018            Brazero
3019            Bra
3020            CBra 1
3021            abc
3022            Ket
3023            Brazero
3024            CBra 1
3025            abc
3026            Ket
3027            Ket
3028            Ket
3029            Ket
3030            End
3031    ------------------------------------------------------------------
3032    Capturing subpattern count = 1
3033    No options
3034    First char = 'a'
3035    Need char = 'c'
3036    
3037    /a+?+/I
3038    Failed: nothing to repeat at offset 3
3039    
3040    /a{2,3}?+b/I
3041    Failed: nothing to repeat at offset 7
3042    
3043    /(?U)a+?+/I
3044    Failed: nothing to repeat at offset 7
3045    
3046    /a{2,3}?+b/IU
3047    Failed: nothing to repeat at offset 7
3048    
3049    /x(?U)a++b/DZ
3050    ------------------------------------------------------------------
3051            Bra
3052            x
3053            a++
3054            b
3055            Ket
3056            End
3057    ------------------------------------------------------------------
3058    Capturing subpattern count = 0
3059    No options
3060    First char = 'x'
3061    Need char = 'b'
3062        xaaaab
3063     0: xaaaab
3064    
3065    /(?U)xa++b/DZ
3066    ------------------------------------------------------------------
3067            Bra
3068            x
3069            a++
3070            b
3071            Ket
3072            End
3073    ------------------------------------------------------------------
3074    Capturing subpattern count = 0
3075    Options: ungreedy
3076    First char = 'x'
3077    Need char = 'b'
3078        xaaaab
3079     0: xaaaab
3080    
3081    /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
3082    ------------------------------------------------------------------
3083            Bra
3084            ^
3085            CBra 1
3086            CBra 2
3087            a+
3088            Ket
3089            CBra 3
3090            [ab]+?
3091            Ket
3092            CBra 4
3093            [bc]+
3094            Ket
3095            CBra 5
3096            \w*
3097            Ket
3098            Ket
3099            Ket
3100            End
3101    ------------------------------------------------------------------
3102    Capturing subpattern count = 5
3103    Options: anchored
3104    No first char
3105    No need char
3106    
3107    /^x(?U)a+b/DZ
3108    ------------------------------------------------------------------
3109            Bra
3110            ^
3111            x
3112            a++
3113            b
3114            Ket
3115            End
3116    ------------------------------------------------------------------
3117    Capturing subpattern count = 0
3118    Options: anchored
3119    No first char
3120    Need char = 'b'
3121    
3122    /^x(?U)(a+)b/DZ
3123    ------------------------------------------------------------------
3124            Bra
3125            ^
3126            x
3127            CBra 1
3128            a+?
3129            Ket
3130            b
3131            Ket
3132            End
3133    ------------------------------------------------------------------
3134    Capturing subpattern count = 1
3135    Options: anchored
3136    No first char
3137    Need char = 'b'
3138    
3139    /[.x.]/I
3140    Failed: POSIX collating elements are not supported at offset 0
3141    
3142    /[=x=]/I
3143    Failed: POSIX collating elements are not supported at offset 0
3144    
3145    /[:x:]/I
3146    Failed: POSIX named classes are supported only within a class at offset 0
3147    
3148    /\l/I
3149    Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3150    
3151    /\L/I
3152    Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3153    
3154    /\N{name}/I
3155    Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3156    
3157    /\u/I
3158    Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3159    
3160    /\U/I
3161    Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3162    
3163    /[/I
3164    Failed: missing terminating ] for character class at offset 1
3165    
3166    /[a-/I
3167    Failed: missing terminating ] for character class at offset 3
3168    
3169    /[[:space:]/I
3170    Failed: missing terminating ] for character class at offset 10
3171    
3172    /[\s]/IDZ
3173    ------------------------------------------------------------------
3174            Bra
3175            [\x09\x0a\x0c\x0d ]
3176            Ket
3177            End
3178    ------------------------------------------------------------------
3179    Capturing subpattern count = 0
3180    No options
3181    No first char
3182    No need char
3183    
3184    /[[:space:]]/IDZ
3185    ------------------------------------------------------------------
3186            Bra
3187            [\x09-\x0d ]
3188            Ket
3189            End
3190    ------------------------------------------------------------------
3191    Capturing subpattern count = 0
3192    No options
3193    No first char
3194    No need char
3195    
3196    /[[:space:]abcde]/IDZ
3197    ------------------------------------------------------------------
3198            Bra
3199            [\x09-\x0d a-e]
3200            Ket
3201            End
3202    ------------------------------------------------------------------
3203    Capturing subpattern count = 0
3204    No options
3205    No first char
3206    No need char
3207    
3208    /< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/Ix
3209    Capturing subpattern count = 0
3210    Options: extended
3211    First char = '<'
3212    Need char = '>'
3213        <>
3214     0: <>
3215        <abcd>
3216     0: <abcd>
3217        <abc <123> hij>
3218     0: <abc <123> hij>
3219        <abc <def> hij>
3220     0: <def>
3221        <abc<>def>
3222     0: <abc<>def>
3223        <abc<>
3224     0: <>
3225        *** Failers
3226    No match
3227        <abc
3228    No match
3229    
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\b|IDZ
3231    ------------------------------------------------------------------
3232            Bra
3233            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
3234            \b
3235            Ket
3236            End
3237    ------------------------------------------------------------------
3238    Capturing subpattern count = 0
3239    No options
3240    First char = '8'
3241    Need char = 'X'
3242    
3243    |\$\<\.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
3244    ------------------------------------------------------------------
3245            Bra
3246            $<.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
3247            \b
3248            Ket
3249            End
3250    ------------------------------------------------------------------
3251    Capturing subpattern count = 0
3252    No options
3253    First char = '$'
3254    Need char = 'X'
3255    
3256    /(.*)\d+\1/I
3257    Capturing subpattern count = 1
3258    Max back reference = 1
3259    No options
3260    No first char
3261    No need char
3262    
3263    /(.*)\d+/I
3264    Capturing subpattern count = 1
3265    No options
3266    First char at start or follows newline
3267    No need char
3268    
3269    /(.*)\d+\1/Is
3270    Capturing subpattern count = 1
3271    Max back reference = 1
3272    Options: dotall
3273    No first char
3274    No need char
3275    
3276    /(.*)\d+/Is
3277    Capturing subpattern count = 1
3278    Options: anchored dotall
3279    No first char
3280    No need char
3281    
3282    /(.*(xyz))\d+\2/I
3283    Capturing subpattern count = 2
3284    Max back reference = 2
3285    No options
3286    First char at start or follows newline
3287    Need char = 'z'
3288    
3289    /((.*))\d+\1/I
3290    Capturing subpattern count = 2
3291    Max back reference = 1
3292    No options
3293    No first char
3294    No need char
3295        abc123bc
3296     0: bc123bc
3297     1: bc
3298     2: bc
3299    
3300    /a[b]/I
3301    Capturing subpattern count = 0
3302    No options
3303    First char = 'a'
3304    Need char = 'b'
3305    
3306    /(?=a).*/I
3307    Capturing subpattern count = 0
3308    No options
3309    First char = 'a'
3310    No need char
3311    
3312    /(?=abc).xyz/IiI
3313    Capturing subpattern count = 0
3314    Options: caseless
3315    First char = 'a' (caseless)
3316    Need char = 'z' (caseless)
3317    
3318    /(?=abc)(?i).xyz/I
3319    Capturing subpattern count = 0
3320    No options
3321    First char = 'a'
3322    Need char = 'z' (caseless)
3323    
3324    /(?=a)(?=b)/I
3325    Capturing subpattern count = 0
3326    No options
3327    First char = 'a'
3328    No need char
3329    
3330    /(?=.)a/I
3331    Capturing subpattern count = 0
3332    No options
3333    First char = 'a'
3334    No need char
3335    
3336    /((?=abcda)a)/I
3337    Capturing subpattern count = 1
3338    No options
3339    First char = 'a'
3340    Need char = 'a'
3341    
3342    /((?=abcda)ab)/I
3343    Capturing subpattern count = 1
3344    No options
3345    First char = 'a'
3346    Need char = 'b'
3347    
3348    /()a/I
3349    Capturing subpattern count = 1
3350    No options
3351    No first char
3352    Need char = 'a'
3353    
3354    /(?(1)ab|ac)(.)/I
3355    Capturing subpattern count = 1
3356    No options
3357    First char = 'a'
3358    No need char
3359    
3360    /(?(1)abz|acz)(.)/I
3361    Capturing subpattern count = 1
3362    No options
3363    First char = 'a'
3364    Need char = 'z'
3365    
3366    /(?(1)abz)(.)/I
3367    Capturing subpattern count = 1
3368    No options
3369    No first char
3370    No need char
3371    
3372    /(?(1)abz)(1)23/I
3373    Capturing subpattern count = 1
3374    No options
3375    No first char
3376    Need char = '3'
3377    
3378    /(a)+/I
3379    Capturing subpattern count = 1
3380    No options
3381    First char = 'a'
3382    No need char
3383    
3384    /(a){2,3}/I
3385    Capturing subpattern count = 1
3386    No options
3387    First char = 'a'
3388    Need char = 'a'
3389    
3390    /(a)*/I
3391    Capturing subpattern count = 1
3392    No options
3393    No first char
3394    No need char
3395    
3396    /[a]/I
3397    Capturing subpattern count = 0
3398    No options
3399    First char = 'a'
3400    No need char
3401    
3402    /[ab]/I
3403    Capturing subpattern count = 0
3404    No options
3405    No first char
3406    No need char
3407    
3408    /[ab]/IS
3409    Capturing subpattern count = 0
3410    No options
3411    No first char
3412    No need char
3413    Starting byte set: a b
3414    
3415    /[^a]/I
3416    Capturing subpattern count = 0
3417    No options
3418    No first char
3419    No need char
3420    
3421    /\d456/I
3422    Capturing subpattern count = 0
3423    No options
3424    No first char
3425    Need char = '6'
3426    
3427    /\d456/IS
3428    Capturing subpattern count = 0
3429    No options
3430    No first char
3431    Need char = '6'
3432    Starting byte set: 0 1 2 3 4 5 6 7 8 9
3433    
3434    /a^b/I
3435    Capturing subpattern count = 0
3436    No options
3437    First char = 'a'
3438    Need char = 'b'
3439    
3440    /^a/Im
3441    Capturing subpattern count = 0
3442    Options: multiline
3443    First char at start or follows newline
3444    Need char = 'a'
3445      abcde
3446     0: a
3447      xy\nabc
3448     0: a
3449      *** Failers
3450    No match
3451      xyabc
3452    No match
3453    
3454    /c|abc/I
3455    Capturing subpattern count = 0
3456    No options
3457    No first char
3458    Need char = 'c'
3459    
3460    /(?i)[ab]/IS
3461    Capturing subpattern count = 0
3462    Options: caseless
3463    No first char
3464    No need char
3465    Starting byte set: A B a b
3466    
3467    /[ab](?i)cd/IS
3468    Capturing subpattern count = 0
3469    No options
3470    No first char
3471    Need char = 'd' (caseless)
3472    Starting byte set: a b
3473    
3474    /abc(?C)def/I
3475    Capturing subpattern count = 0
3476    No options
3477    First char = 'a'
3478    Need char = 'f'
3479        abcdef
3480    --->abcdef
3481      0 ^  ^       d
3482     0: abcdef
3483        1234abcdef
3484    --->1234abcdef
3485      0     ^  ^       d
3486     0: abcdef
3487        *** Failers
3488    No match
3489        abcxyz
3490    No match
3491        abcxyzf
3492    --->abcxyzf
3493      0 ^  ^        d
3494    No match
3495    
3496    /abc(?C)de(?C1)f/I
3497    Capturing subpattern count = 0
3498    No options
3499    First char = 'a'
3500    Need char = 'f'
3501        123abcdef
3502    --->123abcdef
3503      0    ^  ^       d
3504      1    ^    ^     f
3505     0: abcdef
3506    
3507    /(?C1)\dabc(?C2)def/I
3508    Capturing subpattern count = 0
3509    No options
3510    No first char
3511    Need char = 'f'
3512        1234abcdef
3513    --->1234abcdef
3514      1 ^              \d
3515      1  ^             \d
3516      1   ^            \d
3517      1    ^           \d
3518      2    ^   ^       d
3519     0: 4abcdef
3520        *** Failers
3521    No match
3522        abcdef
3523    --->abcdef
3524      1 ^          \d
3525      1  ^         \d
3526      1   ^        \d
3527      1    ^       \d
3528      1     ^      \d
3529      1      ^     \d
3530    No match
3531    
3532    /(?C255)ab/I
3533    Capturing subpattern count = 0
3534    No options
3535    First char = 'a'
3536    Need char = 'b'
3537    
3538    /(?C256)ab/I
3539    Failed: number after (?C is > 255 at offset 6
3540    
3541    /(?Cab)xx/I
3542    Failed: closing ) for (?C expected at offset 3
3543    
3544    /(?C12vr)x/I
3545    Failed: closing ) for (?C expected at offset 5
3546    
3547    /abc(?C)def/I
3548    Capturing subpattern count = 0
3549    No options
3550    First char = 'a'
3551    Need char = 'f'
3552        *** Failers
3553    No match
3554        \x83\x0\x61bcdef
3555    --->\x83\x00abcdef
3556      0         ^  ^       d
3557     0: abcdef
3558    
3559    /(abc)(?C)de(?C1)f/I
3560    Capturing subpattern count = 1
3561    No options
3562    First char = 'a'
3563    Need char = 'f'
3564        123abcdef
3565    --->123abcdef
3566      0    ^  ^       d
3567      1    ^    ^     f
3568     0: abcdef
3569     1: abc
3570        123abcdef\C+
3571    Callout 0: last capture = 1
3572     0: <unset>
3573     1: abc
3574    --->123abcdef
3575           ^  ^       d
3576    Callout 1: last capture = 1
3577     0: <unset>
3578     1: abc
3579    --->123abcdef
3580           ^    ^     f
3581     0: abcdef
3582     1: abc
3583        123abcdef\C-
3584     0: abcdef
3585     1: abc
3586        *** Failers
3587    No match
3588        123abcdef\C!1
3589    --->123abcdef
3590      0    ^  ^       d
3591      1    ^    ^     f
3592    No match
3593    
3594    /(?C0)(abc(?C1))*/I
3595    Capturing subpattern count = 1
3596    No options
3597    No first char
3598    No need char
3599        abcabcabc
3600    --->abcabcabc
3601      0 ^             (abc(?C1))*
3602      1 ^  ^          )
3603      1 ^     ^       )
3604      1 ^        ^    )
3605     0: abcabcabc
3606     1: abc
3607        abcabc\C!1!3
3608    --->abcabc
3609      0 ^          (abc(?C1))*
3610      1 ^  ^       )
3611      1 ^     ^    )
3612     0: abcabc
3613     1: abc
3614        *** Failers
3615    --->*** Failers
3616      0 ^               (abc(?C1))*
3617     0:
3618        abcabcabc\C!1!3
3619    --->abcabcabc
3620      0 ^             (abc(?C1))*
3621      1 ^  ^          )
3622      1 ^     ^       )
3623      1 ^        ^    )
3624     0: abcabc
3625     1: abc
3626    
3627    /(\d{3}(?C))*/I
3628    Capturing subpattern count = 1
3629    No options
3630    No first char
3631    No need char
3632        123\C+
3633    Callout 0: last capture = -1
3634     0: <unset>
3635    --->123
3636        ^  ^    )
3637     0: 123
3638     1: 123
3639        123456\C+
3640    Callout 0: last capture = -1
3641     0: <unset>
3642    --->123456
3643        ^  ^       )
3644    Callout 0: last capture = 1
3645     0: <unset>
3646     1: 123
3647    --->123456
3648        ^     ^    )
3649     0: 123456
3650     1: 456
3651        123456789\C+
3652    Callout 0: last capture = -1
3653     0: <unset>
3654    --->123456789
3655        ^  ^          )
3656    Callout 0: last capture = 1
3657     0: <unset>
3658     1: 123
3659    --->123456789
3660        ^     ^       )
3661    Callout 0: last capture = 1
3662     0: <unset>
3663     1: 456
3664    --->123456789
3665        ^        ^    )
3666     0: 123456789
3667     1: 789
3668    
3669    /((xyz)(?C)p|(?C1)xyzabc)/I
3670    Capturing subpattern count = 2
3671    No options
3672    First char = 'x'
3673    No need char
3674        xyzabc\C+
3675    Callout 0: last capture = 2
3676     0: <unset>
3677     1: <unset>
3678     2: xyz
3679    --->xyzabc
3680        ^  ^       p
3681    Callout 1: last capture = -1
3682     0: <unset>
3683    --->xyzabc
3684        ^          x
3685     0: xyzabc
3686     1: xyzabc
3687    
3688    /(X)((xyz)(?C)p|(?C1)xyzabc)/I
3689    Capturing subpattern count = 3
3690    No options
3691    First char = 'X'
3692    Need char = 'x'
3693        Xxyzabc\C+
3694    Callout 0: last capture = 3
3695     0: <unset>
3696     1: X
3697     2: <unset>
3698     3: xyz
3699    --->Xxyzabc
3700        ^   ^       p
3701    Callout 1: last capture = 1
3702     0: <unset>
3703     1: X
3704    --->Xxyzabc
3705        ^^          x
3706     0: Xxyzabc
3707     1: X
3708     2: xyzabc
3709    
3710    /(?=(abc))(?C)abcdef/I
3711    Capturing subpattern count = 1
3712    No options
3713    First char = 'a'
3714    Need char = 'f'
3715        abcdef\C+
3716    Callout 0: last capture = 1
3717     0: <unset>
3718     1: abc
3719    --->abcdef
3720        ^          a
3721     0: abcdef
3722     1: abc
3723    
3724    /(?!(abc)(?C1)d)(?C2)abcxyz/I
3725    Capturing subpattern count = 1
3726    No options
3727    First char = 'a'
3728    Need char = 'z'
3729        abcxyz\C+
3730    Callout 1: last capture = 1
3731     0: <unset>
3732     1: abc
3733    --->abcxyz
3734        ^  ^       d
3735    Callout 2: last capture = -1
3736     0: <unset>
3737    --->abcxyz
3738        ^          a
3739     0: abcxyz
3740    
3741    /(?<=(abc)(?C))xyz/I
3742    Capturing subpattern count = 1
3743    No options
3744    First char = 'x'
3745    Need char = 'z'
3746       abcxyz\C+
3747    Callout 0: last capture = 1
3748     0: <unset>
3749     1: abc
3750    --->abcxyz
3751           ^       )
3752     0: xyz
3753     1: abc
3754    
3755    /a(b+)(c*)(?C1)/I
3756    Capturing subpattern count = 2
3757    No options
3758    First char = 'a'
3759    Need char = 'b'
3760        abbbbbccc\C*1
3761    --->abbbbbccc
3762      1 ^        ^
3763    Callout data = 1
3764      1 ^       ^
3765    Callout data = 1
3766      1 ^      ^
3767    Callout data = 1
3768      1 ^     ^
3769    Callout data = 1
3770      1 ^    ^
3771    Callout data = 1
3772      1 ^   ^
3773    Callout data = 1
3774      1 ^  ^
3775    Callout data = 1
3776      1 ^ ^
3777    Callout data = 1
3778    No match
3779    
3780    /a(b+?)(c*?)(?C1)/I
3781    Capturing subpattern count = 2
3782    No options
3783    First char = 'a'
3784    Need char = 'b'
3785        abbbbbccc\C*1
3786    --->abbbbbccc
3787      1 ^ ^
3788    Callout data = 1
3789      1 ^  ^
3790    Callout data = 1
3791      1 ^   ^
3792    Callout data = 1
3793      1 ^    ^
3794    Callout data = 1
3795      1 ^     ^
3796    Callout data = 1
3797      1 ^      ^
3798    Callout data = 1
3799      1 ^       ^
3800    Callout data = 1
3801      1 ^        ^
3802    Callout data = 1
3803    No match
3804    
3805    /(?C)abc/I
3806    Capturing subpattern count = 0
3807    No options
3808    First char = 'a'
3809    Need char = 'c'
3810    
3811    /(?C)^abc/I
3812    Capturing subpattern count = 0
3813    Options: anchored
3814    No first char
3815    No need char
3816    
3817    /(?C)a|b/IS
3818    Capturing subpattern count = 0
3819    No options
3820    No first char
3821    No need char
3822    Starting byte set: a b
3823    
3824    /(?R)/I
3825    Failed: recursive call could loop indefinitely at offset 3
3826    
3827    /(a|(?R))/I
3828    Failed: recursive call could loop indefinitely at offset 6
3829    
3830    /(ab|(bc|(de|(?R))))/I
3831    Failed: recursive call could loop indefinitely at offset 15
3832    
3833    /x(ab|(bc|(de|(?R))))/I
3834    Capturing subpattern count = 3
3835    No options
3836    First char = 'x'
3837    No need char
3838        xab
3839     0: xab
3840     1: ab
3841        xbc
3842     0: xbc
3843     1: bc
3844     2: bc
3845        xde
3846     0: xde
3847     1: de
3848     2: de
3849     3: de
3850        xxab
3851     0: xxab
3852     1: xab
3853     2: xab
3854     3: xab
3855        xxxab
3856     0: xxxab
3857     1: xxab
3858     2: xxab
3859     3: xxab
3860        *** Failers
3861    No match
3862        xyab
3863    No match
3864    
3865    /(ab|(bc|(de|(?1))))/I
3866    Failed: recursive call could loop indefinitely at offset 15
3867    
3868    /x(ab|(bc|(de|(?1)x)x)x)/I
3869    Failed: recursive call could loop indefinitely at offset 16
3870    
3871    /^([^()]|\((?1)*\))*$/I
3872    Capturing subpattern count = 1
3873    Options: anchored
3874    No first char
3875    No need char
3876        abc
3877     0: abc
3878     1: c
3879        a(b)c
3880     0: a(b)c
3881     1: c
3882        a(b(c))d
3883     0: a(b(c))d
3884     1: d
3885        *** Failers)
3886    No match
3887        a(b(c)d
3888    No match
3889    
3890    /^>abc>([^()]|\((?1)*\))*<xyz<$/I
3891    Capturing subpattern count = 1
3892    Options: anchored
3893    No first char
3894    Need char = '<'
3895       >abc>123<xyz<
3896     0: >abc>123<xyz<
3897     1: 3
3898       >abc>1(2)3<xyz<
3899     0: >abc>1(2)3<xyz<
3900     1: 3
3901       >abc>(1(2)3)<xyz<
3902     0: >abc>(1(2)3)<xyz<
3903     1: (1(2)3)
3904    
3905    /(a(?1)b)/DZ
3906    ------------------------------------------------------------------
3907            Bra
3908            CBra 1
3909            a
3910            Once
3911            Recurse
3912            Ket
3913            b
3914            Ket
3915            Ket
3916            End
3917    ------------------------------------------------------------------
3918    Capturing subpattern count = 1
3919    No options
3920    First char = 'a'
3921    Need char = 'b'
3922    
3923    /(a(?1)+b)/DZ
3924    ------------------------------------------------------------------
3925            Bra
3926            CBra 1
3927            a
3928            Once
3929            Recurse
3930            KetRmax
3931            b
3932            Ket
3933            Ket
3934            End
3935    ------------------------------------------------------------------
3936    Capturing subpattern count = 1
3937    No options