/[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 41 by nigel, Sat Feb 24 21:39:17 2007 UTC revision 69 by nigel, Sat Feb 24 21:40:18 2007 UTC
# Line 1  Line 1 
1  PCRE version 2.08 31-Aug-1999  PCRE version 4.3 21-May-2003
2    
3  /(a)b|/  /(a)b|/
4  Identifying subpattern count = 1  Capturing subpattern count = 1
5  No options  No options
6  No first char  No first char
7  No req char  No need char
8    
9  /abc/  /abc/
10  Identifying subpattern count = 0  Capturing subpattern count = 0
11  No options  No options
12  First char = 'a'  First char = 'a'
13  Req char = 'c'  Need char = 'c'
14      abc      abc
15   0: abc   0: abc
16      defabc      defabc
# Line 25  No match Line 25  No match
25  No match  No match
26    
27  /^abc/  /^abc/
28  Identifying subpattern count = 0  Capturing subpattern count = 0
29  Options: anchored  Options: anchored
30  No first char  No first char
31  Req char = 'c'  No need char
32      abc      abc
33   0: abc   0: abc
34      \Aabc      \Aabc
# Line 41  No match Line 41  No match
41  No match  No match
42    
43  /a+bc/  /a+bc/
44  Identifying subpattern count = 0  Capturing subpattern count = 0
45  No options  No options
46  First char = 'a'  First char = 'a'
47  Req char = 'c'  Need char = 'c'
48    
49  /a*bc/  /a*bc/
50  Identifying subpattern count = 0  Capturing subpattern count = 0
51  No options  No options
52  No first char  No first char
53  Req char = 'c'  Need char = 'c'
54    
55  /a{3}bc/  /a{3}bc/
56  Identifying subpattern count = 0  Capturing subpattern count = 0
57  No options  No options
58  First char = 'a'  First char = 'a'
59  Req char = 'c'  Need char = 'c'
60    
61  /(abc|a+z)/  /(abc|a+z)/
62  Identifying subpattern count = 1  Capturing subpattern count = 1
63  No options  No options
64  First char = 'a'  First char = 'a'
65  No req char  No need char
66    
67  /^abc$/  /^abc$/
68  Identifying subpattern count = 0  Capturing subpattern count = 0
69  Options: anchored  Options: anchored
70  No first char  No first char
71  Req char = 'c'  No need char
72      abc      abc
73   0: abc   0: abc
74      *** Failers      *** Failers
# Line 91  Failed: number too big in {} quantifier Line 91  Failed: number too big in {} quantifier
91  /[abcd/  /[abcd/
92  Failed: missing terminating ] for character class at offset 5  Failed: missing terminating ] for character class at offset 5
93    
94  /[\B]/  /(?X)[\B]/
95  Failed: invalid escape sequence in character class at offset 2  Failed: invalid escape sequence in character class at offset 6
   
 /[a-\w]/  
 Failed: invalid escape sequence in character class at offset 4  
96    
97  /[z-a]/  /[z-a]/
98  Failed: range out of order in character class at offset 3  Failed: range out of order in character class at offset 3
# Line 113  Failed: missing ) after comment at offse Line 110  Failed: missing ) after comment at offse
110  Failed: unrecognized character after (? at offset 2  Failed: unrecognized character after (? at offset 2
111    
112  /.*b/  /.*b/
113  Identifying subpattern count = 0  Capturing subpattern count = 0
114  No options  No options
115  First char at start or follows \n  First char at start or follows \n
116  Req char = 'b'  Need char = 'b'
117    
118  /.*?b/  /.*?b/
119  Identifying subpattern count = 0  Capturing subpattern count = 0
120  No options  No options
121  First char at start or follows \n  First char at start or follows \n
122  Req char = 'b'  Need char = 'b'
123    
124  /cat|dog|elephant/  /cat|dog|elephant/
125  Identifying subpattern count = 0  Capturing subpattern count = 0
126  No options  No options
127  No first char  No first char
128  No req char  No need char
129      this sentence eventually mentions a cat      this sentence eventually mentions a cat
130   0: cat   0: cat
131      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
132   0: elephant   0: elephant
133    
134  /cat|dog|elephant/S  /cat|dog|elephant/S
135  Identifying subpattern count = 0  Capturing subpattern count = 0
136  No options  No options
137  No first char  No first char
138  No req char  No need char
139    Study size = 40
140  Starting character set: c d e  Starting character set: c d e
141      this sentence eventually mentions a cat      this sentence eventually mentions a cat
142   0: cat   0: cat
# Line 146  Starting character set: c d e Line 144  Starting character set: c d e
144   0: elephant   0: elephant
145    
146  /cat|dog|elephant/iS  /cat|dog|elephant/iS
147  Identifying subpattern count = 0  Capturing subpattern count = 0
148  Options: caseless  Options: caseless
149  No first char  No first char
150  No req char  No need char
151    Study size = 40
152  Starting character set: C D E c d e  Starting character set: C D E c d e
153      this sentence eventually mentions a CAT cat      this sentence eventually mentions a CAT cat
154   0: CAT   0: CAT
# Line 157  Starting character set: C D E c d e Line 156  Starting character set: C D E c d e
156   0: elephant   0: elephant
157    
158  /a|[bcd]/S  /a|[bcd]/S
159  Identifying subpattern count = 0  Capturing subpattern count = 0
160  No options  No options
161  No first char  No first char
162  No req char  No need char
163    Study size = 40
164  Starting character set: a b c d  Starting character set: a b c d
165    
166  /(a|[^\dZ])/S  /(a|[^\dZ])/S
167  Identifying subpattern count = 1  Capturing subpattern count = 1
168  No options  No options
169  No first char  No first char
170  No req char  No need char
171    Study size = 40
172  Starting character set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a  Starting character set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
173    \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
174    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
# Line 184  Starting character set: \x00 \x01 \x02 \ Line 185  Starting character set: \x00 \x01 \x02 \
185    \xfc \xfd \xfe \xff    \xfc \xfd \xfe \xff
186    
187  /(a|b)*[\s]/S  /(a|b)*[\s]/S
188  Identifying subpattern count = 1  Capturing subpattern count = 1
189  No options  No options
190  No first char  No first char
191  No req char  No need char
192  Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b  Study size = 40
193    Starting character set: \x09 \x0a \x0c \x0d \x20 a b
194    
195  /(ab\2)/  /(ab\2)/
196  Failed: back reference to non-existent subpattern at offset 6  Failed: reference to non-existent subpattern at offset 6
197    
198  /{4,5}abc/  /{4,5}abc/
199  Failed: nothing to repeat at offset 4  Failed: nothing to repeat at offset 4
200    
201  /(a)(b)(c)\2/  /(a)(b)(c)\2/
202  Identifying subpattern count = 3  Capturing subpattern count = 3
203    Max back reference = 2
204  No options  No options
205  First char = 'a'  First char = 'a'
206  Req char = 'c'  Need char = 'c'
207      abcb      abcb
208   0: abcb   0: abcb
209   1: a   1: a
# Line 227  Matched, but too many substrings Line 230  Matched, but too many substrings
230   3: c   3: c
231    
232  /(a)bc|(a)(b)\2/  /(a)bc|(a)(b)\2/
233  Identifying subpattern count = 3  Capturing subpattern count = 3
234    Max back reference = 2
235  No options  No options
236  First char = 'a'  First char = 'a'
237  No req char  No need char
238      abc      abc
239   0: abc   0: abc
240   1: a   1: a
# Line 268  Matched, but too many substrings Line 272  Matched, but too many substrings
272   3: b   3: b
273    
274  /abc$/E  /abc$/E
275  Identifying subpattern count = 0  Capturing subpattern count = 0
276  Options: dollar_endonly  Options: dollar_endonly
277  First char = 'a'  First char = 'a'
278  Req char = 'c'  Need char = 'c'
279      abc      abc
280   0: abc   0: abc
281      *** Failers      *** Failers
# Line 282  No match Line 286  No match
286  No match  No match
287    
288  /(a)(b)(c)(d)(e)\6/  /(a)(b)(c)(d)(e)\6/
289  Failed: back reference to non-existent subpattern at offset 17  Failed: reference to non-existent subpattern at offset 17
290    
291  /the quick brown fox/  /the quick brown fox/
292  Identifying subpattern count = 0  Capturing subpattern count = 0
293  No options  No options
294  First char = 't'  First char = 't'
295  Req char = 'x'  Need char = 'x'
296      the quick brown fox      the quick brown fox
297   0: the quick brown fox   0: the quick brown fox
298      this is a line with the quick brown fox      this is a line with the quick brown fox
299   0: the quick brown fox   0: the quick brown fox
300    
301  /the quick brown fox/A  /the quick brown fox/A
302  Identifying subpattern count = 0  Capturing subpattern count = 0
303  Options: anchored  Options: anchored
304  No first char  No first char
305  Req char = 'x'  No need char
306      the quick brown fox      the quick brown fox
307   0: the quick brown fox   0: the quick brown fox
308      *** Failers      *** Failers
# Line 310  No match Line 314  No match
314  Failed: unrecognized character after (? at offset 4  Failed: unrecognized character after (? at offset 4
315    
316  /^abc|def/  /^abc|def/
317  Identifying subpattern count = 0  Capturing subpattern count = 0
318  No options  No options
319  No first char  No first char
320  No req char  No need char
321      abcdef      abcdef
322   0: abc   0: abc
323      abcdef\B      abcdef\B
324   0: def   0: def
325    
326  /.*((abc)$|(def))/  /.*((abc)$|(def))/
327  Identifying subpattern count = 3  Capturing subpattern count = 3
328  No options  No options
329  First char at start or follows \n  First char at start or follows \n
330  No req char  No need char
331      defabc      defabc
332   0: defabc   0: defabc
333   1: abc   1: abc
# Line 396  Failed: unmatched parentheses at offset Line 400  Failed: unmatched parentheses at offset
400  Failed: missing terminating ] for character class at offset 4  Failed: missing terminating ] for character class at offset 4
401    
402  /[^aeiou ]{3,}/  /[^aeiou ]{3,}/
403  Identifying subpattern count = 0  Capturing subpattern count = 0
404  No options  No options
405  No first char  No first char
406  No req char  No need char
407      co-processors, and for      co-processors, and for
408   0: -pr   0: -pr
409    
410  /<.*>/  /<.*>/
411  Identifying subpattern count = 0  Capturing subpattern count = 0
412  No options  No options
413  First char = '<'  First char = '<'
414  Req char = '>'  Need char = '>'
415      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
416   0: <def>ghi<klm>   0: <def>ghi<klm>
417    
418  /<.*?>/  /<.*?>/
419  Identifying subpattern count = 0  Capturing subpattern count = 0
420  No options  No options
421  First char = '<'  First char = '<'
422  Req char = '>'  Need char = '>'
423      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
424   0: <def>   0: <def>
425    
426  /<.*>/U  /<.*>/U
427  Identifying subpattern count = 0  Capturing subpattern count = 0
428  Options: ungreedy  Options: ungreedy
429  First char = '<'  First char = '<'
430  Req char = '>'  Need char = '>'
431      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
432   0: <def>   0: <def>
433    
434  /<.*>(?U)/  /(?U)<.*>/
435  Identifying subpattern count = 0  Capturing subpattern count = 0
436  Options: ungreedy  Options: ungreedy
437  First char = '<'  First char = '<'
438  Req char = '>'  Need char = '>'
439      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
440   0: <def>   0: <def>
441    
442  /<.*?>/U  /<.*?>/U
443  Identifying subpattern count = 0  Capturing subpattern count = 0
444  Options: ungreedy  Options: ungreedy
445  First char = '<'  First char = '<'
446  Req char = '>'  Need char = '>'
447      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
448   0: <def>ghi<klm>   0: <def>ghi<klm>
449    
450  /={3,}/U  /={3,}/U
451  Identifying subpattern count = 0  Capturing subpattern count = 0
452  Options: ungreedy  Options: ungreedy
453  First char = '='  First char = '='
454  Req char = '='  Need char = '='
455      abc========def      abc========def
456   0: ===   0: ===
457    
458  /(?U)={3,}?/  /(?U)={3,}?/
459  Identifying subpattern count = 0  Capturing subpattern count = 0
460  Options: ungreedy  Options: ungreedy
461  First char = '='  First char = '='
462  Req char = '='  Need char = '='
463      abc========def      abc========def
464   0: ========   0: ========
465    
466  /(?<!bar|cattle)foo/  /(?<!bar|cattle)foo/
467  Identifying subpattern count = 0  Capturing subpattern count = 0
468  No options  No options
469  First char = 'f'  First char = 'f'
470  Req char = 'o'  Need char = 'o'
471      foo      foo
472   0: foo   0: foo
473      catfoo      catfoo
# Line 485  Failed: lookbehind assertion is not fixe Line 489  Failed: lookbehind assertion is not fixe
489  Failed: lookbehind assertion is not fixed length at offset 12  Failed: lookbehind assertion is not fixed length at offset 12
490    
491  /(?i)abc/  /(?i)abc/
492  Identifying subpattern count = 0  Capturing subpattern count = 0
493  Options: caseless  Options: caseless
494  First char = 'a'  First char = 'a' (caseless)
495  Req char = 'c'  Need char = 'c' (caseless)
496    
497  /(a|(?m)a)/  /(a|(?m)a)/
498  Identifying subpattern count = 1  Capturing subpattern count = 1
499  No options  No options
500  First char = 'a'  First char = 'a'
501  No req char  No need char
502    
503  /(?i)^1234/  /(?i)^1234/
504  Identifying subpattern count = 0  Capturing subpattern count = 0
505  Options: anchored caseless  Options: anchored caseless
506  No first char  No first char
507  Req char = '4'  No need char
508    
509  /(^b|(?i)^d)/  /(^b|(?i)^d)/
510  Identifying subpattern count = 1  Capturing subpattern count = 1
511  Options: anchored  Options: anchored
512  Case state changes  Case state changes
513  No first char  No first char
514  No req char  No need char
515    
516  /(?s).*/  /(?s).*/
517  Identifying subpattern count = 0  Capturing subpattern count = 0
518  Options: anchored dotall  Options: anchored dotall
519  No first char  No first char
520  No req char  No need char
521    
522  /[abcd]/S  /[abcd]/S
523  Identifying subpattern count = 0  Capturing subpattern count = 0
524  No options  No options
525  No first char  No first char
526  No req char  No need char
527    Study size = 40
528  Starting character set: a b c d  Starting character set: a b c d
529    
530  /(?i)[abcd]/S  /(?i)[abcd]/S
531  Identifying subpattern count = 0  Capturing subpattern count = 0
532  Options: caseless  Options: caseless
533  No first char  No first char
534  No req char  No need char
535    Study size = 40
536  Starting character set: A B C D a b c d  Starting character set: A B C D a b c d
537    
538  /(?m)[xy]|(b|c)/S  /(?m)[xy]|(b|c)/S
539  Identifying subpattern count = 1  Capturing subpattern count = 1
540  Options: multiline  Options: multiline
541  No first char  No first char
542  No req char  No need char
543    Study size = 40
544  Starting character set: b c x y  Starting character set: b c x y
545    
546  /(^a|^b)/m  /(^a|^b)/m
547  Identifying subpattern count = 1  Capturing subpattern count = 1
548  Options: multiline  Options: multiline
549  First char at start or follows \n  First char at start or follows \n
550  No req char  No need char
551    
552  /(?i)(^a|^b)/m  /(?i)(^a|^b)/m
553  Identifying subpattern count = 1  Capturing subpattern count = 1
554  Options: caseless multiline  Options: caseless multiline
555  First char at start or follows \n  First char at start or follows \n
556  No req char  No need char
557    
558  /(a)(?(1)a|b|c)/  /(a)(?(1)a|b|c)/
559  Failed: conditional group contains more than two branches at offset 13  Failed: conditional group contains more than two branches at offset 13
# Line 564  Failed: assertion expected after (?( at Line 571  Failed: assertion expected after (?( at
571  Failed: assertion expected after (?( at offset 3  Failed: assertion expected after (?( at offset 3
572    
573  /(?(?<ab))/  /(?(?<ab))/
574  Failed: unrecognized character after (?< at offset 2  Failed: unrecognized character after (?< at offset 5
575    
576  /((?s)blah)\s+\1/  /((?s)blah)\s+\1/
577  Identifying subpattern count = 1  Capturing subpattern count = 1
578    Max back reference = 1
579  No options  No options
580  First char = 'b'  First char = 'b'
581  Req char = 'h'  Need char = 'h'
582    
583  /((?i)blah)\s+\1/  /((?i)blah)\s+\1/
584  Identifying subpattern count = 1  Capturing subpattern count = 1
585    Max back reference = 1
586  No options  No options
587  Case state changes  Case state changes
588  No first char  First char = 'b' (caseless)
589  Req char = 'h'  Need char = 'h' (caseless)
590    
591  /((?i)b)/DS  /((?i)b)/DS
592  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 590  Req char = 'h' Line 599  Req char = 'h'
599   16  16 Ket   16  16 Ket
600   19     End   19     End
601  ------------------------------------------------------------------  ------------------------------------------------------------------
602  Identifying subpattern count = 1  Capturing subpattern count = 1
603  No options  No options
604  Case state changes  Case state changes
605  No first char  First char = 'b' (caseless)
606  Req char = 'b'  No need char
607  Starting character set: B b  Study returned NULL
608    
609  /(a*b|(?i:c*(?-i)d))/S  /(a*b|(?i:c*(?-i)d))/S
610  Identifying subpattern count = 1  Capturing subpattern count = 1
611  No options  No options
612  Case state changes  Case state changes
613  No first char  No first char
614  No req char  No need char
615    Study size = 40
616  Starting character set: C a b c d  Starting character set: C a b c d
617    
618  /a$/  /a$/
619  Identifying subpattern count = 0  Capturing subpattern count = 0
620  No options  No options
621  First char = 'a'  First char = 'a'
622  No req char  No need char
623      a      a
624   0: a   0: a
625      a\n      a\n
# Line 622  No match Line 632  No match
632  No match  No match
633    
634  /a$/m  /a$/m
635  Identifying subpattern count = 0  Capturing subpattern count = 0
636  Options: multiline  Options: multiline
637  First char = 'a'  First char = 'a'
638  No req char  No need char
639      a      a
640   0: a   0: a
641      a\n      a\n
# Line 638  No match Line 648  No match
648  No match  No match
649    
650  /\Aabc/m  /\Aabc/m
651  Identifying subpattern count = 0  Capturing subpattern count = 0
652  Options: anchored multiline  Options: anchored multiline
653  No first char  No first char
654  Req char = 'c'  No need char
655    
656  /^abc/m  /^abc/m
657  Identifying subpattern count = 0  Capturing subpattern count = 0
658  Options: multiline  Options: multiline
659  First char at start or follows \n  First char at start or follows \n
660  Req char = 'c'  Need char = 'c'
661    
662  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
663  Identifying subpattern count = 5  Capturing subpattern count = 5
664  Options: anchored  Options: anchored
665  No first char  No first char
666  Req char = 'a'  No need char
667    aaaaabbbbbcccccdef    aaaaabbbbbcccccdef
668   0: aaaaabbbbbcccccdef   0: aaaaabbbbbcccccdef
669   1: aaaaabbbbbcccccdef   1: aaaaabbbbbcccccdef
# Line 663  Req char = 'a' Line 673  Req char = 'a'
673   5: def   5: def
674    
675  /(?<=foo)[ab]/S  /(?<=foo)[ab]/S
676  Identifying subpattern count = 0  Capturing subpattern count = 0
677  No options  No options
678  No first char  No first char
679  No req char  No need char
680    Study size = 40
681  Starting character set: a b  Starting character set: a b
682    
683  /(?<!foo)(alpha|omega)/S  /(?<!foo)(alpha|omega)/S
684  Identifying subpattern count = 1  Capturing subpattern count = 1
685  No options  No options
686  No first char  No first char
687  Req char = 'a'  Need char = 'a'
688    Study size = 40
689  Starting character set: a o  Starting character set: a o
690    
691  /(?!alphabet)[ab]/S  /(?!alphabet)[ab]/S
692  Identifying subpattern count = 0  Capturing subpattern count = 0
693  No options  No options
694  No first char  No first char
695  No req char  No need char
696    Study size = 40
697  Starting character set: a b  Starting character set: a b
698    
699  /(?<=foo\n)^bar/m  /(?<=foo\n)^bar/m
700  Identifying subpattern count = 0  Capturing subpattern count = 0
701  Options: multiline  Options: multiline
702  First char at start or follows \n  First char at start or follows \n
703  Req char = 'r'  Need char = 'r'
704    
705  /(?>^abc)/m  /(?>^abc)/m
706  Identifying subpattern count = 0  Capturing subpattern count = 0
707  Options: multiline  Options: multiline
708  First char at start or follows \n  First char at start or follows \n
709  Req char = 'c'  Need char = 'c'
710      abc      abc
711   0: abc   0: abc
712      def\nabc      def\nabc
# Line 713  Failed: lookbehind assertion is not fixe Line 726  Failed: lookbehind assertion is not fixe
726  Failed: lookbehind assertion is not fixed length at offset 13  Failed: lookbehind assertion is not fixed length at offset 13
727    
728  /The next three are in testinput2 because they have variable length branches/  /The next three are in testinput2 because they have variable length branches/
729  Identifying subpattern count = 0  Capturing subpattern count = 0
730  No options  No options
731  First char = 'T'  First char = 'T'
732  Req char = 's'  Need char = 's'
733    
734  /(?<=bullock|donkey)-cart/  /(?<=bullock|donkey)-cart/
735  Identifying subpattern count = 0  Capturing subpattern count = 0
736  No options  No options
737  First char = '-'  First char = '-'
738  Req char = 't'  Need char = 't'
739      the bullock-cart      the bullock-cart
740   0: -cart   0: -cart
741      a donkey-cart race      a donkey-cart race
# Line 735  No match Line 748  No match
748  No match  No match
749    
750  /(?<=ab(?i)x|y|z)/  /(?<=ab(?i)x|y|z)/
751  Identifying subpattern count = 0  Capturing subpattern count = 0
752  No options  No options
753  Case state changes  Case state changes
754  No first char  No first char
755  No req char  No need char
756    
757  /(?>.*)(?<=(abcd)|(xyz))/  /(?>.*)(?<=(abcd)|(xyz))/
758  Identifying subpattern count = 2  Capturing subpattern count = 2
759  No options  No options
760  First char at start or follows \n  First char at start or follows \n
761  No req char  No need char
762      alphabetabcd      alphabetabcd
763   0: alphabetabcd   0: alphabetabcd
764   1: abcd   1: abcd
# Line 755  No req char Line 768  No req char
768   2: xyz   2: xyz
769    
770  /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/  /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/
771  Identifying subpattern count = 0  Capturing subpattern count = 0
772  No options  No options
773  Case state changes  Case state changes
774  First char = 'Z'  First char = 'Z'
775  Req char = 'Z'  Need char = 'Z'
776      abxyZZ      abxyZZ
777   0: ZZ   0: ZZ
778      abXyZZ      abXyZZ
# Line 784  No match Line 797  No match
797  No match  No match
798    
799  /(?<!(foo)a)bar/  /(?<!(foo)a)bar/
800  Identifying subpattern count = 1  Capturing subpattern count = 1
801  No options  No options
802  First char = 'b'  First char = 'b'
803  Req char = 'r'  Need char = 'r'
804      bar      bar
805   0: bar   0: bar
806      foobbar      foobbar
# Line 798  No match Line 811  No match
811  No match  No match
812    
813  /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/
814  Identifying subpattern count = 0  Capturing subpattern count = 0
815  No options  No options
816  First char = 'T'  First char = 'T'
817  Req char = 't'  Need char = 't'
818    
819  /^(a)?(?(1)a|b)+$/  /^(a)?(?(1)a|b)+$/
820  Identifying subpattern count = 1  Capturing subpattern count = 1
821  Options: anchored  Options: anchored
822  No first char  No first char
823  No req char  No need char
824      *** Failers      *** Failers
825  No match  No match
826      a      a
827  No match  No match
828    
829  /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/
830  Identifying subpattern count = 0  Capturing subpattern count = 0
831  No options  No options
832  First char = 'T'  First char = 'T'
833  Req char = 'g'  Need char = 'g'
834    
835  /^(a\1?){4}$/  /^(a\1?){4}$/
836  Identifying subpattern count = 1  Capturing subpattern count = 1
837    Max back reference = 1
838  Options: anchored  Options: anchored
839  No first char  No first char
840  Req char = 'a'  No need char
841      aaaaaa      aaaaaa
842   0: aaaaaa   0: aaaaaa
843   1: aa   1: aa
844    
845  /These are syntax tests from Perl 5.005/  /These are syntax tests from Perl 5.005/
846  Identifying subpattern count = 0  Capturing subpattern count = 0
847  No options  No options
848  First char = 'T'  First char = 'T'
849  Req char = '5'  Need char = '5'
850    
851  /a[b-a]/  /a[b-a]/
852  Failed: range out of order in character class at offset 4  Failed: range out of order in character class at offset 4
# Line 862  Failed: nothing to repeat at offset 2 Line 876  Failed: nothing to repeat at offset 2
876  Failed: unmatched parentheses at offset 0  Failed: unmatched parentheses at offset 0
877    
878  /\1/  /\1/
879  Failed: back reference to non-existent subpattern at offset 2  Failed: reference to non-existent subpattern at offset 2
880    
881  /\2/  /\2/
882  Failed: back reference to non-existent subpattern at offset 2  Failed: reference to non-existent subpattern at offset 2
883    
884  /(a)|\2/  /(a)|\2/
885  Failed: back reference to non-existent subpattern at offset 6  Failed: reference to non-existent subpattern at offset 6
886    
887  /a[b-a]/i  /a[b-a]/i
888  Failed: range out of order in character class at offset 4  Failed: range out of order in character class at offset 4
# Line 901  Failed: unmatched parentheses at offset Line 915  Failed: unmatched parentheses at offset
915  Failed: missing ) at offset 4  Failed: missing ) at offset 4
916    
917  /(?<%)b/  /(?<%)b/
918  Failed: unrecognized character after (?< at offset 0  Failed: unrecognized character after (?< at offset 3
919    
920  /a(?{)b/  /a(?{)b/
921  Failed: unrecognized character after (? at offset 3  Failed: unrecognized character after (? at offset 3
# Line 943  Failed: POSIX code 9: bad escape sequenc Line 957  Failed: POSIX code 9: bad escape sequenc
957  Failed: \ at end of pattern at offset 4  Failed: \ at end of pattern at offset 4
958    
959  /(a)bc(d)/  /(a)bc(d)/
960  Identifying subpattern count = 2  Capturing subpattern count = 2
961  No options  No options
962  First char = 'a'  First char = 'a'
963  Req char = 'd'  Need char = 'd'
964      abcd      abcd
965   0: abcd   0: abcd
966   1: a   1: a
# Line 963  Req char = 'd' Line 977  Req char = 'd'
977  copy substring 5 failed -7  copy substring 5 failed -7
978    
979  /(.{20})/  /(.{20})/
980  Identifying subpattern count = 1  Capturing subpattern count = 1
981  No options  No options
982  No first char  No first char
983  No req char  No need char
984      abcdefghijklmnopqrstuvwxyz      abcdefghijklmnopqrstuvwxyz
985   0: abcdefghijklmnopqrst   0: abcdefghijklmnopqrst
986   1: abcdefghijklmnopqrst   1: abcdefghijklmnopqrst
# Line 980  copy substring 1 failed -6 Line 994  copy substring 1 failed -6
994   1G abcdefghijklmnopqrst (20)   1G abcdefghijklmnopqrst (20)
995    
996  /(.{15})/  /(.{15})/
997  Identifying subpattern count = 1  Capturing subpattern count = 1
998  No options  No options
999  No first char  No first char
1000  No req char  No need char
1001      abcdefghijklmnopqrstuvwxyz      abcdefghijklmnopqrstuvwxyz
1002   0: abcdefghijklmno   0: abcdefghijklmno
1003   1: abcdefghijklmno   1: abcdefghijklmno
# Line 994  No req char Line 1008  No req char
1008   1G abcdefghijklmno (15)   1G abcdefghijklmno (15)
1009    
1010  /(.{16})/  /(.{16})/
1011  Identifying subpattern count = 1  Capturing subpattern count = 1
1012  No options  No options
1013  No first char  No first char
1014  No req char  No need char
1015      abcdefghijklmnopqrstuvwxyz      abcdefghijklmnopqrstuvwxyz
1016   0: abcdefghijklmnop   0: abcdefghijklmnop
1017   1: abcdefghijklmnop   1: abcdefghijklmnop
# Line 1010  copy substring 1 failed -6 Line 1024  copy substring 1 failed -6
1024   1L abcdefghijklmnop   1L abcdefghijklmnop
1025    
1026  /^(a|(bc))de(f)/  /^(a|(bc))de(f)/
1027  Identifying subpattern count = 3  Capturing subpattern count = 3
1028  Options: anchored  Options: anchored
1029  No first char  No first char
1030  Req char = 'f'  No need char
1031      adef\G1\G2\G3\G4\L      adef\G1\G2\G3\G4\L
1032   0: adef   0: adef
1033   1: a   1: a
# Line 1048  get substring 4 failed -7 Line 1062  get substring 4 failed -7
1062   0C adef (4)   0C adef (4)
1063    
1064  /^abc\00def/  /^abc\00def/
1065  Identifying subpattern count = 0  Capturing subpattern count = 0
1066  Options: anchored  Options: anchored
1067  No first char  No first char
1068  Req char = 'f'  No need char
1069      abc\00def\L\C0      abc\00def\L\C0
1070   0: abc\x00def   0: abc\x00def
1071   0C abc (7)   0C abc (7)
# Line 1061  Req char = 'f' Line 1075  Req char = 'f'
1075  )((?:[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]+
1076  )?)?)?)?)?)?)?)?)?otherword/M  )?)?)?)?)?)?)?)?)?otherword/M
1077  Memory allocation (code space): 428  Memory allocation (code space): 428
1078  Identifying subpattern count = 8  Capturing subpattern count = 8
1079  No options  No options
1080  First char = 'w'  First char = 'w'
1081  Req char = 'd'  Need char = 'd'
1082    
1083  /.*X/D  /.*X/D
1084  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1074  Req char = 'd' Line 1088  Req char = 'd'
1088    8   8 Ket    8   8 Ket
1089   11     End   11     End
1090  ------------------------------------------------------------------  ------------------------------------------------------------------
1091  Identifying subpattern count = 0  Capturing subpattern count = 0
1092  No options  No options
1093  First char at start or follows \n  First char at start or follows \n
1094  Req char = 'X'  Need char = 'X'
1095    
1096  /.*X/Ds  /.*X/Ds
1097  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1087  Req char = 'X' Line 1101  Req char = 'X'
1101    8   8 Ket    8   8 Ket
1102   11     End   11     End
1103  ------------------------------------------------------------------  ------------------------------------------------------------------
1104  Identifying subpattern count = 0  Capturing subpattern count = 0
1105  Options: anchored dotall  Options: anchored dotall
1106  No first char  No first char
1107  Req char = 'X'  Need char = 'X'
1108    
1109  /(.*X|^B)/D  /(.*X|^B)/D
1110  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1105  Req char = 'X' Line 1119  Req char = 'X'
1119   21  21 Ket   21  21 Ket
1120   24     End   24     End
1121  ------------------------------------------------------------------  ------------------------------------------------------------------
1122  Identifying subpattern count = 1  Capturing subpattern count = 1
1123  No options  No options
1124  First char at start or follows \n  First char at start or follows \n
1125  No req char  No need char
1126    
1127  /(.*X|^B)/Ds  /(.*X|^B)/Ds
1128  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1123  No req char Line 1137  No req char
1137   21  21 Ket   21  21 Ket
1138   24     End   24     End
1139  ------------------------------------------------------------------  ------------------------------------------------------------------
1140  Identifying subpattern count = 1  Capturing subpattern count = 1
1141  Options: anchored dotall  Options: anchored dotall
1142  No first char  No first char
1143  No req char  No need char
1144    
1145  /(?s)(.*X|^B)/D  /(?s)(.*X|^B)/D
1146  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1141  No req char Line 1155  No req char
1155   21  21 Ket   21  21 Ket
1156   24     End   24     End
1157  ------------------------------------------------------------------  ------------------------------------------------------------------
1158  Identifying subpattern count = 1  Capturing subpattern count = 1
1159  Options: anchored dotall  Options: anchored dotall
1160  No first char  No first char
1161  No req char  No need char
1162    
1163  /(?s:.*X|^B)/D  /(?s:.*X|^B)/D
1164  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1162  No req char Line 1176  No req char
1176   27  27 Ket   27  27 Ket
1177   30     End   30     End
1178  ------------------------------------------------------------------  ------------------------------------------------------------------
1179  Identifying subpattern count = 0  Capturing subpattern count = 0
1180  No options  No options
1181  First char at start or follows \n  First char at start or follows \n
1182  No req char  No need char
1183    
1184  /\Biss\B/+  /\Biss\B/+
1185  Identifying subpattern count = 0  Capturing subpattern count = 0
1186  No options  No options
1187  First char = 'i'  First char = 'i'
1188  Req char = 's'  Need char = 's'
1189      Mississippi      Mississippi
1190   0: iss   0: iss
1191   0+ issippi   0+ issippi
# Line 1182  Req char = 's' Line 1196  Req char = 's'
1196   0+ issippi   0+ issippi
1197    
1198  /iss/G+  /iss/G+
1199  Identifying subpattern count = 0  Capturing subpattern count = 0
1200  No options  No options
1201  First char = 'i'  First char = 'i'
1202  Req char = 's'  Need char = 's'
1203      Mississippi      Mississippi
1204   0: iss   0: iss
1205   0+ issippi   0+ issippi
# Line 1193  Req char = 's' Line 1207  Req char = 's'
1207   0+ ippi   0+ ippi
1208    
1209  /\Biss\B/G+  /\Biss\B/G+
1210  Identifying subpattern count = 0  Capturing subpattern count = 0
1211  No options  No options
1212  First char = 'i'  First char = 'i'
1213  Req char = 's'  Need char = 's'
1214      Mississippi      Mississippi
1215   0: iss   0: iss
1216   0+ issippi   0+ issippi
1217    
1218  /\Biss\B/g+  /\Biss\B/g+
1219  Identifying subpattern count = 0  Capturing subpattern count = 0
1220  No options  No options
1221  First char = 'i'  First char = 'i'
1222  Req char = 's'  Need char = 's'
1223      Mississippi      Mississippi
1224   0: iss   0: iss
1225   0+ issippi   0+ issippi
# Line 1217  No match Line 1231  No match
1231  No match  No match
1232    
1233  /(?<=[Ms])iss/g+  /(?<=[Ms])iss/g+
1234  Identifying subpattern count = 0  Capturing subpattern count = 0
1235  No options  No options
1236  First char = 'i'  First char = 'i'
1237  Req char = 's'  Need char = 's'
1238      Mississippi      Mississippi
1239   0: iss   0: iss
1240   0+ issippi   0+ issippi
# Line 1228  Req char = 's' Line 1242  Req char = 's'
1242   0+ ippi   0+ ippi
1243    
1244  /(?<=[Ms])iss/G+  /(?<=[Ms])iss/G+
1245  Identifying subpattern count = 0  Capturing subpattern count = 0
1246  No options  No options
1247  First char = 'i'  First char = 'i'
1248  Req char = 's'  Need char = 's'
1249      Mississippi      Mississippi
1250   0: iss   0: iss
1251   0+ issippi   0+ issippi
1252    
1253  /^iss/g+  /^iss/g+
1254  Identifying subpattern count = 0  Capturing subpattern count = 0
1255  Options: anchored  Options: anchored
1256  No first char  No first char
1257  Req char = 's'  No need char
1258      ississippi      ississippi
1259   0: iss   0: iss
1260   0+ issippi   0+ issippi
1261    
1262  /.*iss/g+  /.*iss/g+
1263  Identifying subpattern count = 0  Capturing subpattern count = 0
1264  No options  No options
1265  First char at start or follows \n  First char at start or follows \n
1266  Req char = 's'  Need char = 's'
1267      abciss\nxyzisspqr      abciss\nxyzisspqr
1268   0: abciss   0: abciss
1269   0+ \x0axyzisspqr   0+ \x0axyzisspqr
# Line 1257  Req char = 's' Line 1271  Req char = 's'
1271   0+ pqr   0+ pqr
1272    
1273  /.i./+g  /.i./+g
1274  Identifying subpattern count = 0  Capturing subpattern count = 0
1275  No options  No options
1276  No first char  No first char
1277  Req char = 'i'  Need char = 'i'
1278      Mississippi      Mississippi
1279   0: Mis   0: Mis
1280   0+ sissippi   0+ sissippi
# Line 1287  Req char = 'i' Line 1301  Req char = 'i'
1301   0+ souri river   0+ souri river
1302    
1303  /^.is/+g  /^.is/+g
1304  Identifying subpattern count = 0  Capturing subpattern count = 0
1305  Options: anchored  Options: anchored
1306  No first char  No first char
1307  Req char = 's'  No need char
1308      Mississippi      Mississippi
1309   0: Mis   0: Mis
1310   0+ sissippi   0+ sissippi
1311    
1312  /^ab\n/g+  /^ab\n/g+
1313  Identifying subpattern count = 0  Capturing subpattern count = 0
1314  Options: anchored  Options: anchored
1315  No first char  No first char
1316  Req char = 10  No need char
1317      ab\nab\ncd      ab\nab\ncd
1318   0: ab\x0a   0: ab\x0a
1319   0+ ab\x0acd   0+ ab\x0acd
1320    
1321  /^ab\n/mg+  /^ab\n/mg+
1322  Identifying subpattern count = 0  Capturing subpattern count = 0
1323  Options: multiline  Options: multiline
1324  First char at start or follows \n  First char at start or follows \n
1325  Req char = 10  Need char = 10
1326      ab\nab\ncd      ab\nab\ncd
1327   0: ab\x0a   0: ab\x0a
1328   0+ ab\x0acd   0+ ab\x0acd
# Line 1316  Req char = 10 Line 1330  Req char = 10
1330   0+ cd   0+ cd
1331    
1332  /abc/  /abc/
1333  Identifying subpattern count = 0  Capturing subpattern count = 0
1334  No options  No options
1335  First char = 'a'  First char = 'a'
1336  Req char = 'c'  Need char = 'c'
1337    
1338  /abc|bac/  /abc|bac/
1339  Identifying subpattern count = 0  Capturing subpattern count = 0
1340  No options  No options
1341  No first char  No first char
1342  Req char = 'c'  Need char = 'c'
1343    
1344  /(abc|bac)/  /(abc|bac)/
1345  Identifying subpattern count = 1  Capturing subpattern count = 1
1346  No options  No options
1347  No first char  No first char
1348  Req char = 'c'  Need char = 'c'
1349    
1350  /(abc|(c|dc))/  /(abc|(c|dc))/
1351  Identifying subpattern count = 2  Capturing subpattern count = 2
1352  No options  No options
1353  No first char  No first char
1354  Req char = 'c'  Need char = 'c'
1355    
1356  /(abc|(d|de)c)/  /(abc|(d|de)c)/
1357  Identifying subpattern count = 2  Capturing subpattern count = 2
1358  No options  No options
1359  No first char  No first char
1360  Req char = 'c'  Need char = 'c'
1361    
1362  /a*/  /a*/
1363  Identifying subpattern count = 0  Capturing subpattern count = 0
1364  No options  No options
1365  No first char  No first char
1366  No req char  No need char
1367    
1368  /a+/  /a+/
1369  Identifying subpattern count = 0  Capturing subpattern count = 0
1370  No options  No options
1371  First char = 'a'  First char = 'a'
1372  No req char  No need char
1373    
1374  /(baa|a+)/  /(baa|a+)/
1375  Identifying subpattern count = 1  Capturing subpattern count = 1
1376  No options  No options
1377  No first char  No first char
1378  Req char = 'a'  Need char = 'a'
1379    
1380  /a{0,3}/  /a{0,3}/
1381  Identifying subpattern count = 0  Capturing subpattern count = 0
1382  No options  No options
1383  No first char  No first char
1384  No req char  No need char
1385    
1386  /baa{3,}/  /baa{3,}/
1387  Identifying subpattern count = 0  Capturing subpattern count = 0
1388  No options  No options
1389  First char = 'b'  First char = 'b'
1390  Req char = 'a'  Need char = 'a'
1391    
1392  /"([^\\"]+|\\.)*"/  /"([^\\"]+|\\.)*"/
1393  Identifying subpattern count = 1  Capturing subpattern count = 1
1394  No options  No options
1395  First char = '"'  First char = '"'
1396  Req char = '"'  Need char = '"'
1397    
1398  /(abc|ab[cd])/  /(abc|ab[cd])/
1399  Identifying subpattern count = 1  Capturing subpattern count = 1
1400  No options  No options
1401  First char = 'a'  First char = 'a'
1402  No req char  No need char
1403    
1404  /(a|.)/  /(a|.)/
1405  Identifying subpattern count = 1  Capturing subpattern count = 1
1406  No options  No options
1407  No first char  No first char
1408  No req char  No need char
1409    
1410  /a|ba|\w/  /a|ba|\w/
1411  Identifying subpattern count = 0  Capturing subpattern count = 0
1412  No options  No options
1413  No first char  No first char
1414  No req char  No need char
1415    
1416  /abc(?=pqr)/  /abc(?=pqr)/
1417  Identifying subpattern count = 0  Capturing subpattern count = 0
1418  No options  No options
1419  First char = 'a'  First char = 'a'
1420  Req char = 'r'  Need char = 'r'
1421    
1422  /...(?<=abc)/  /...(?<=abc)/
1423  Identifying subpattern count = 0  Capturing subpattern count = 0
1424  No options  No options
1425  No first char  No first char
1426  No req char  No need char
1427    
1428  /abc(?!pqr)/  /abc(?!pqr)/
1429  Identifying subpattern count = 0  Capturing subpattern count = 0
1430  No options  No options
1431  First char = 'a'  First char = 'a'
1432  Req char = 'c'  Need char = 'c'
1433    
1434  /ab./  /ab./
1435  Identifying subpattern count = 0  Capturing subpattern count = 0
1436  No options  No options
1437  First char = 'a'  First char = 'a'
1438  Req char = 'b'  Need char = 'b'
1439    
1440  /ab[xyz]/  /ab[xyz]/
1441  Identifying subpattern count = 0  Capturing subpattern count = 0
1442  No options  No options
1443  First char = 'a'  First char = 'a'
1444  Req char = 'b'  Need char = 'b'
1445    
1446  /abc*/  /abc*/
1447  Identifying subpattern count = 0  Capturing subpattern count = 0
1448  No options  No options
1449  First char = 'a'  First char = 'a'
1450  Req char = 'b'  Need char = 'b'
1451    
1452  /ab.c*/  /ab.c*/
1453  Identifying subpattern count = 0  Capturing subpattern count = 0
1454  No options  No options
1455  First char = 'a'  First char = 'a'
1456  Req char = 'b'  Need char = 'b'
1457    
1458  /a.c*/  /a.c*/
1459  Identifying subpattern count = 0  Capturing subpattern count = 0
1460  No options  No options
1461  First char = 'a'  First char = 'a'
1462  No req char  No need char
1463    
1464  /.c*/  /.c*/
1465  Identifying subpattern count = 0  Capturing subpattern count = 0
1466  No options  No options
1467  No first char  No first char
1468  No req char  No need char
1469    
1470  /ac*/  /ac*/
1471  Identifying subpattern count = 0  Capturing subpattern count = 0
1472  No options  No options
1473  First char = 'a'  First char = 'a'
1474  No req char  No need char
1475    
1476  /(a.c*|b.c*)/  /(a.c*|b.c*)/
1477  Identifying subpattern count = 1  Capturing subpattern count = 1
1478  No options  No options
1479  No first char  No first char
1480  No req char  No need char
1481    
1482  /a.c*|aba/  /a.c*|aba/
1483  Identifying subpattern count = 0  Capturing subpattern count = 0
1484  No options  No options
1485  First char = 'a'  First char = 'a'
1486  No req char  No need char
1487    
1488  /.+a/  /.+a/
1489  Identifying subpattern count = 0  Capturing subpattern count = 0
1490  No options  No options
1491  No first char  No first char
1492  Req char = 'a'  Need char = 'a'
1493    
1494  /(?=abcda)a.*/  /(?=abcda)a.*/
1495  Identifying subpattern count = 0  Capturing subpattern count = 0
1496  No options  No options
1497  First char = 'a'  First char = 'a'
1498  No req char  Need char = 'a'
1499    
1500  /(?=a)a.*/  /(?=a)a.*/
1501  Identifying subpattern count = 0  Capturing subpattern count = 0
1502  No options  No options
1503  First char = 'a'  First char = 'a'
1504  No req char  No need char
1505    
1506  /a(b)*/  /a(b)*/
1507  Identifying subpattern count = 1  Capturing subpattern count = 1
1508  No options  No options
1509  First char = 'a'  First char = 'a'
1510  No req char  No need char
1511    
1512  /a\d*/  /a\d*/
1513  Identifying subpattern count = 0  Capturing subpattern count = 0
1514  No options  No options
1515  First char = 'a'  First char = 'a'
1516  No req char  No need char
1517    
1518  /ab\d*/  /ab\d*/
1519  Identifying subpattern count = 0  Capturing subpattern count = 0
1520  No options  No options
1521  First char = 'a'  First char = 'a'
1522  Req char = 'b'  Need char = 'b'
1523    
1524  /a(\d)*/  /a(\d)*/
1525  Identifying subpattern count = 1  Capturing subpattern count = 1
1526  No options  No options
1527  First char = 'a'  First char = 'a'
1528  No req char  No need char
1529    
1530  /abcde{0,0}/  /abcde{0,0}/
1531  Identifying subpattern count = 0  Capturing subpattern count = 0
1532  No options  No options
1533  First char = 'a'  First char = 'a'
1534  Req char = 'd'  Need char = 'd'
1535    
1536  /ab\d+/  /ab\d+/
1537  Identifying subpattern count = 0  Capturing subpattern count = 0
1538  No options  No options
1539  First char = 'a'  First char = 'a'
1540  Req char = 'b'  Need char = 'b'
1541    
1542  /a(?(1)b)/  /a(?(1)b)/
1543  Identifying subpattern count = 0  Capturing subpattern count = 0
1544  No options  No options
1545  First char = 'a'  First char = 'a'
1546  No req char  No need char
1547    
1548  /a(?(1)bag|big)/  /a(?(1)bag|big)/
1549  Identifying subpattern count = 0  Capturing subpattern count = 0
1550  No options  No options
1551  First char = 'a'  First char = 'a'
1552  Req char = 'g'  Need char = 'g'
1553    
1554  /a(?(1)bag|big)*/  /a(?(1)bag|big)*/
1555  Identifying subpattern count = 0  Capturing subpattern count = 0
1556  No options  No options
1557  First char = 'a'  First char = 'a'
1558  No req char  No need char
1559    
1560  /a(?(1)bag|big)+/  /a(?(1)bag|big)+/
1561  Identifying subpattern count = 0  Capturing subpattern count = 0
1562  No options  No options
1563  First char = 'a'  First char = 'a'
1564  Req char = 'g'  Need char = 'g'
1565    
1566  /a(?(1)b..|b..)/  /a(?(1)b..|b..)/
1567  Identifying subpattern count = 0  Capturing subpattern count = 0
1568  No options  No options
1569  First char = 'a'  First char = 'a'
1570  Req char = 'b'  Need char = 'b'
1571    
1572  /ab\d{0}e/  /ab\d{0}e/
1573  Identifying subpattern count = 0  Capturing subpattern count = 0
1574  No options  No options
1575  First char = 'a'  First char = 'a'
1576  Req char = 'e'  Need char = 'e'
1577    
1578  /a?b?/  /a?b?/
1579  Identifying subpattern count = 0  Capturing subpattern count = 0
1580  No options  No options
1581  No first char  No first char
1582  No req char  No need char
1583      a      a
1584   0: a   0: a
1585      b      b
# Line 1580  No req char Line 1594  No req char
1594  No match  No match
1595    
1596  /|-/  /|-/
1597  Identifying subpattern count = 0  Capturing subpattern count = 0
1598  No options  No options
1599  No first char  No first char
1600  No req char  No need char
1601      abcd      abcd
1602   0:   0:
1603      -abc      -abc
# Line 1621  No match Line 1635  No match
1635   1: bbbb   1: bbbb
1636   2: z   2: z
1637   3: z   3: z
1638    
1639    /^.?abcd/S
1640    Capturing subpattern count = 0
1641    Options: anchored
1642    No first char
1643    Need char = 'd'
1644    Study returned NULL
1645    
1646    /\(             # ( at start
1647      (?:           # Non-capturing bracket
1648      (?>[^()]+)    # Either a sequence of non-brackets (no backtracking)
1649      |             # Or
1650      (?R)          # Recurse - i.e. nested bracketed string
1651      )*            # Zero or more contents
1652      \)            # Closing )
1653      /x
1654    Capturing subpattern count = 0
1655    Options: extended
1656    First char = '('
1657    Need char = ')'
1658        (abcd)
1659     0: (abcd)
1660        (abcd)xyz
1661     0: (abcd)
1662        xyz(abcd)
1663     0: (abcd)
1664        (ab(xy)cd)pqr
1665     0: (ab(xy)cd)
1666        (ab(xycd)pqr
1667     0: (xycd)
1668        () abc ()
1669     0: ()
1670        12(abcde(fsh)xyz(foo(bar))lmno)89
1671     0: (abcde(fsh)xyz(foo(bar))lmno)
1672        *** Failers
1673    No match
1674        abcd
1675    No match
1676        abcd)
1677    No match
1678        (abcd
1679    No match
1680    
1681    /\(  ( (?>[^()]+) | (?R) )* \) /xg
1682    Capturing subpattern count = 1
1683    Options: extended
1684    First char = '('
1685    Need char = ')'
1686        (ab(xy)cd)pqr
1687     0: (ab(xy)cd)
1688     1: cd
1689        1(abcd)(x(y)z)pqr
1690     0: (abcd)
1691     1: abcd
1692     0: (x(y)z)
1693     1: z
1694    
1695    /\(  (?: (?>[^()]+) | (?R) ) \) /x
1696    Capturing subpattern count = 0
1697    Options: extended
1698    First char = '('
1699    Need char = ')'
1700        (abcd)
1701     0: (abcd)
1702        (ab(xy)cd)
1703     0: (xy)
1704        (a(b(c)d)e)
1705     0: (c)
1706        ((ab))
1707     0: ((ab))
1708        *** Failers
1709    No match
1710        ()
1711    No match
1712    
1713    /\(  (?: (?>[^()]+) | (?R) )? \) /x
1714    Capturing subpattern count = 0
1715    Options: extended
1716    First char = '('
1717    Need char = ')'
1718        ()
1719     0: ()
1720        12(abcde(fsh)xyz(foo(bar))lmno)89
1721     0: (fsh)
1722    
1723    /\(  ( (?>[^()]+) | (?R) )* \) /x
1724    Capturing subpattern count = 1
1725    Options: extended
1726    First char = '('
1727    Need char = ')'
1728        (ab(xy)cd)
1729     0: (ab(xy)cd)
1730     1: cd
1731    
1732    /\( ( ( (?>[^()]+) | (?R) )* ) \) /x
1733    Capturing subpattern count = 2
1734    Options: extended
1735    First char = '('
1736    Need char = ')'
1737        (ab(xy)cd)
1738     0: (ab(xy)cd)
1739     1: ab(xy)cd
1740     2: cd
1741    
1742    /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x
1743    Capturing subpattern count = 3
1744    Options: extended
1745    First char = '('
1746    Need char = ')'
1747        (ab(xy)cd)
1748     0: (ab(xy)cd)
1749     1: <unset>
1750     2: ab(xy)cd
1751     3: cd
1752        (123ab(xy)cd)
1753     0: (123ab(xy)cd)
1754     1: 123
1755     2: ab(xy)cd
1756     3: cd
1757    
1758    /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x
1759    Capturing subpattern count = 3
1760    Options: extended
1761    First char = '('
1762    Need char = ')'
1763        (ab(xy)cd)
1764     0: (ab(xy)cd)
1765     1: ab(xy)cd
1766     2: <unset>
1767     3: cd
1768        (123ab(xy)cd)
1769     0: (123ab(xy)cd)
1770     1: 123ab(xy)cd
1771     2: 123
1772     3: cd
1773    
1774    /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x
1775    Capturing subpattern count = 11
1776    Options: extended
1777    First char = '('
1778    Need char = ')'
1779        (ab(xy)cd)
1780     0: (ab(xy)cd)
1781     1: ab(xy)cd
1782     2: ab(xy)cd
1783     3: ab(xy)cd
1784     4: ab(xy)cd
1785     5: ab(xy)cd
1786     6: ab(xy)cd
1787     7: ab(xy)cd
1788     8: ab(xy)cd
1789     9: ab(xy)cd
1790    10: ab(xy)cd
1791    11: cd
1792    
1793    /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x
1794    Capturing subpattern count = 3
1795    Options: extended
1796    First char = '('
1797    Need char = ')'
1798        (abcd(xyz<p>qrs)123)
1799     0: (abcd(xyz<p>qrs)123)
1800     1: abcd(xyz<p>qrs)123
1801     2: 123
1802     3: <unset>
1803    
1804    /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x
1805    Capturing subpattern count = 3
1806    Options: extended
1807    First char = '('
1808    Need char = ')'
1809        (ab(cd)ef)
1810     0: (ab(cd)ef)
1811     1: ab(cd)ef
1812     2: ef
1813     3: (cd)
1814        (ab(cd(ef)gh)ij)
1815     0: (ab(cd(ef)gh)ij)
1816     1: ab(cd(ef)gh)ij
1817     2: ij
1818     3: (cd(ef)gh)
1819    
1820    /^[[:alnum:]]/D
1821    ------------------------------------------------------------------
1822      0  37 Bra 0
1823      3     ^
1824      4     [0-9A-Za-z]
1825     37  37 Ket
1826     40     End
1827    ------------------------------------------------------------------
1828    Capturing subpattern count = 0
1829    Options: anchored
1830    No first char
1831    No need char
1832    
1833    /^[[:alpha:]]/D
1834    ------------------------------------------------------------------
1835      0  37 Bra 0
1836      3     ^
1837      4     [A-Za-z]
1838     37  37 Ket
1839     40     End
1840    ------------------------------------------------------------------
1841    Capturing subpattern count = 0
1842    Options: anchored
1843    No first char
1844    No need char
1845    
1846    /^[[:ascii:]]/D
1847    ------------------------------------------------------------------
1848      0  37 Bra 0
1849      3     ^
1850      4     [\x00-\x7f]
1851     37  37 Ket
1852     40     End
1853    ------------------------------------------------------------------
1854    Capturing subpattern count = 0
1855    Options: anchored
1856    No first char
1857    No need char
1858    
1859    /^[[:blank:]]/D
1860    ------------------------------------------------------------------
1861      0  37 Bra 0
1862      3     ^
1863      4     [\x09 ]
1864     37  37 Ket
1865     40     End
1866    ------------------------------------------------------------------
1867    Capturing subpattern count = 0
1868    Options: anchored
1869    No first char
1870    No need char
1871    
1872    /^[[:cntrl:]]/D
1873    ------------------------------------------------------------------
1874      0  37 Bra 0
1875      3     ^
1876      4     [\x00-\x1f\x7f]
1877     37  37 Ket
1878     40     End
1879    ------------------------------------------------------------------
1880    Capturing subpattern count = 0
1881    Options: anchored
1882    No first char
1883    No need char
1884    
1885    /^[[:digit:]]/D
1886    ------------------------------------------------------------------
1887      0  37 Bra 0
1888      3     ^
1889      4     [0-9]
1890     37  37 Ket
1891     40     End
1892    ------------------------------------------------------------------
1893    Capturing subpattern count = 0
1894    Options: anchored
1895    No first char
1896    No need char
1897    
1898    /^[[:graph:]]/D
1899    ------------------------------------------------------------------
1900      0  37 Bra 0
1901      3     ^
1902      4     [!-~]
1903     37  37 Ket
1904     40     End
1905    ------------------------------------------------------------------
1906    Capturing subpattern count = 0
1907    Options: anchored
1908    No first char
1909    No need char
1910    
1911    /^[[:lower:]]/D
1912    ------------------------------------------------------------------
1913      0  37 Bra 0
1914      3     ^
1915      4     [a-z]
1916     37  37 Ket
1917     40     End
1918    ------------------------------------------------------------------
1919    Capturing subpattern count = 0
1920    Options: anchored
1921    No first char
1922    No need char
1923    
1924    /^[[:print:]]/D
1925    ------------------------------------------------------------------
1926      0  37 Bra 0
1927      3     ^
1928      4     [ -~]
1929     37  37 Ket
1930     40     End
1931    ------------------------------------------------------------------
1932    Capturing subpattern count = 0
1933    Options: anchored
1934    No first char
1935    No need char
1936    
1937    /^[[:punct:]]/D
1938    ------------------------------------------------------------------
1939      0  37 Bra 0
1940      3     ^
1941      4     [!-/:-@[-`{-~]
1942     37  37 Ket
1943     40     End
1944    ------------------------------------------------------------------
1945    Capturing subpattern count = 0
1946    Options: anchored
1947    No first char
1948    No need char
1949    
1950    /^[[:space:]]/D
1951    ------------------------------------------------------------------
1952      0  37 Bra 0
1953      3     ^
1954      4     [\x09-\x0d ]
1955     37  37 Ket
1956     40     End
1957    ------------------------------------------------------------------
1958    Capturing subpattern count = 0
1959    Options: anchored
1960    No first char
1961    No need char
1962    
1963    /^[[:upper:]]/D
1964    ------------------------------------------------------------------
1965      0  37 Bra 0
1966      3     ^
1967      4     [A-Z]
1968     37  37 Ket
1969     40     End
1970    ------------------------------------------------------------------
1971    Capturing subpattern count = 0
1972    Options: anchored
1973    No first char
1974    No need char
1975    
1976    /^[[:xdigit:]]/D
1977    ------------------------------------------------------------------
1978      0  37 Bra 0
1979      3     ^
1980      4     [0-9A-Fa-f]
1981     37  37 Ket
1982     40     End
1983    ------------------------------------------------------------------
1984    Capturing subpattern count = 0
1985    Options: anchored
1986    No first char
1987    No need char
1988    
1989    /^[[:word:]]/D
1990    ------------------------------------------------------------------
1991      0  37 Bra 0
1992      3     ^
1993      4     [0-9A-Z_a-z]
1994     37  37 Ket
1995     40     End
1996    ------------------------------------------------------------------
1997    Capturing subpattern count = 0
1998    Options: anchored
1999    No first char
2000    No need char
2001    
2002    /^[[:^cntrl:]]/D
2003    ------------------------------------------------------------------
2004      0  37 Bra 0
2005      3     ^
2006      4     [ -~\x80-\xff]
2007     37  37 Ket
2008     40     End
2009    ------------------------------------------------------------------
2010    Capturing subpattern count = 0
2011    Options: anchored
2012    No first char
2013    No need char
2014    
2015    /^[12[:^digit:]]/D
2016    ------------------------------------------------------------------
2017      0  37 Bra 0
2018      3     ^
2019      4     [\x00-/1-2:-\xff]
2020     37  37 Ket
2021     40     End
2022    ------------------------------------------------------------------
2023    Capturing subpattern count = 0
2024    Options: anchored
2025    No first char
2026    No need char
2027    
2028    /^[[:^blank:]]/D
2029    ------------------------------------------------------------------
2030      0  37 Bra 0
2031      3     ^
2032      4     [\x00-\x08\x0a-\x1f!-\xff]
2033     37  37 Ket
2034     40     End
2035    ------------------------------------------------------------------
2036    Capturing subpattern count = 0
2037    Options: anchored
2038    No first char
2039    No need char
2040    
2041    /[01[:alpha:]%]/D
2042    ------------------------------------------------------------------
2043      0  36 Bra 0
2044      3     [%0-1A-Za-z]
2045     36  36 Ket
2046     39     End
2047    ------------------------------------------------------------------
2048    Capturing subpattern count = 0
2049    No options
2050    No first char
2051    No need char
2052    
2053    /[[.ch.]]/
2054    Failed: POSIX collating elements are not supported at offset 1
2055    
2056    /[[=ch=]]/
2057    Failed: POSIX collating elements are not supported at offset 1
2058    
2059    /[[:rhubarb:]]/
2060    Failed: unknown POSIX class name at offset 3
2061    
2062    /[[:upper:]]/i
2063    Capturing subpattern count = 0
2064    Options: caseless
2065    No first char
2066    No need char
2067        A
2068     0: A
2069        a
2070     0: a
2071    
2072    /[[:lower:]]/i
2073    Capturing subpattern count = 0
2074    Options: caseless
2075    No first char
2076    No need char
2077        A
2078     0: A
2079        a
2080     0: a
2081    
2082    /((?-i)[[:lower:]])[[:lower:]]/i
2083    Capturing subpattern count = 1
2084    Options: caseless
2085    Case state changes
2086    No first char
2087    No need char
2088        ab
2089     0: ab
2090     1: a
2091        aB
2092     0: aB
2093     1: a
2094        *** Failers
2095     0: ai
2096     1: a
2097        Ab
2098    No match
2099        AB
2100    No match
2101    
2102    /[\200-\410]/
2103    Failed: range out of order in character class at offset 9
2104    
2105    /^(?(0)f|b)oo/
2106    Failed: invalid condition (?(0) at offset 5
2107    
2108    /This one's here because of the large output vector needed/
2109    Capturing subpattern count = 0
2110    No options
2111    First char = 'T'
2112    Need char = 'd'
2113    
2114    /(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\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)/
2115    Capturing subpattern count = 271
2116    Max back reference = 270
2117    No options
2118    No first char
2119    No need char
2120        \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
2121     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
2122     1: 1
2123     2: 2
2124     3: 3
2125     4: 4
2126     5: 5
2127     6: 6
2128     7: 7
2129     8: 8
2130     9: 9
2131    10: 10
2132    11: 11
2133    12: 12
2134    13: 13
2135    14: 14
2136    15: 15
2137    16: 16
2138    17: 17
2139    18: 18
2140    19: 19
2141    20: 20
2142    21: 21
2143    22: 22
2144    23: 23
2145    24: 24
2146    25: 25
2147    26: 26
2148    27: 27
2149    28: 28
2150    29: 29
2151    30: 30
2152    31: 31
2153    32: 32
2154    33: 33
2155    34: 34
2156    35: 35
2157    36: 36
2158    37: 37
2159    38: 38
2160    39: 39
2161    40: 40
2162    41: 41
2163    42: 42
2164    43: 43
2165    44: 44
2166    45: 45
2167    46: 46
2168    47: 47
2169    48: 48
2170    49: 49
2171    50: 50
2172    51: 51
2173    52: 52
2174    53: 53
2175    54: 54
2176    55: 55
2177    56: 56
2178    57: 57
2179    58: 58
2180    59: 59
2181    60: 60
2182    61: 61
2183    62: 62
2184    63: 63
2185    64: 64
2186    65: 65
2187    66: 66
2188    67: 67
2189    68: 68
2190    69: 69
2191    70: 70
2192    71: 71
2193    72: 72
2194    73: 73
2195    74: 74
2196    75: 75
2197    76: 76
2198    77: 77
2199    78: 78
2200    79: 79
2201    80: 80
2202    81: 81
2203    82: 82
2204    83: 83
2205    84: 84
2206    85: 85
2207    86: 86
2208    87: 87
2209    88: 88
2210    89: 89
2211    90: 90
2212    91: 91
2213    92: 92
2214    93: 93
2215    94: 94
2216    95: 95
2217    96: 96
2218    97: 97
2219    98: 98
2220    99: 99
2221    100: 100
2222    101: 101
2223    102: 102
2224    103: 103
2225    104: 104
2226    105: 105
2227    106: 106
2228    107: 107
2229    108: 108
2230    109: 109
2231    110: 110
2232    111: 111
2233    112: 112
2234    113: 113
2235    114: 114
2236    115: 115
2237    116: 116
2238    117: 117
2239    118: 118
2240    119: 119
2241    120: 120
2242    121: 121
2243    122: 122
2244    123: 123
2245    124: 124
2246    125: 125
2247    126: 126
2248    127: 127
2249    128: 128
2250    129: 129
2251    130: 130
2252    131: 131
2253    132: 132
2254    133: 133
2255    134: 134
2256    135: 135
2257    136: 136
2258    137: 137
2259    138: 138
2260    139: 139
2261    140: 140
2262    141: 141
2263    142: 142
2264    143: 143
2265    144: 144
2266    145: 145
2267    146: 146
2268    147: 147
2269    148: 148
2270    149: 149
2271    150: 150
2272    151: 151
2273    152: 152
2274    153: 153
2275    154: 154
2276    155: 155
2277    156: 156
2278    157: 157
2279    158: 158
2280    159: 159
2281    160: 160
2282    161: 161
2283    162: 162
2284    163: 163
2285    164: 164
2286    165: 165
2287    166: 166
2288    167: 167
2289    168: 168
2290    169: 169
2291    170: 170
2292    171: 171
2293    172: 172
2294    173: 173
2295    174: 174
2296    175: 175
2297    176: 176
2298    177: 177
2299    178: 178
2300    179: 179
2301    180: 180
2302    181: 181
2303    182: 182
2304    183: 183
2305    184: 184
2306    185: 185
2307    186: 186
2308    187: 187
2309    188: 188
2310    189: 189
2311    190: 190
2312    191: 191
2313    192: 192
2314    193: 193
2315    194: 194
2316    195: 195
2317    196: 196
2318    197: 197
2319    198: 198
2320    199: 199
2321    200: 200
2322    201: 201
2323    202: 202
2324    203: 203
2325    204: 204
2326    205: 205
2327    206: 206
2328    207: 207
2329    208: 208
2330    209: 209
2331    210: 210
2332    211: 211
2333    212: 212
2334    213: 213
2335    214: 214
2336    215: 215
2337    216: 216
2338    217: 217
2339    218: 218
2340    219: 219
2341    220: 220
2342    221: 221
2343    222: 222
2344    223: 223
2345    224: 224
2346    225: 225
2347    226: 226
2348    227: 227
2349    228: 228
2350    229: 229
2351    230: 230
2352    231: 231
2353    232: 232
2354    233: 233
2355    234: 234
2356    235: 235
2357    236: 236
2358    237: 237
2359    238: 238
2360    239: 239
2361    240: 240
2362    241: 241
2363    242: 242
2364    243: 243
2365    244: 244
2366    245: 245
2367    246: 246
2368    247: 247
2369    248: 248
2370    249: 249
2371    250: 250
2372    251: 251
2373    252: 252
2374    253: 253
2375    254: 254
2376    255: 255
2377    256: 256
2378    257: 257
2379    258: 258
2380    259: 259
2381    260: 260
2382    261: 261
2383    262: 262
2384    263: 263
2385    264: 264
2386    265: 265
2387    266: 266
2388    267: 267
2389    268: 268
2390    269: 269
2391    270: ABC
2392    271: ABC
2393    
2394    /This one's here because Perl does this differently and PCRE can't at present/
2395    Capturing subpattern count = 0
2396    No options
2397    First char = 'T'
2398    Need char = 't'
2399    
2400    /(main(O)?)+/
2401    Capturing subpattern count = 2
2402    No options
2403    First char = 'm'
2404    Need char = 'n'
2405        mainmain
2406     0: mainmain
2407     1: main
2408        mainOmain
2409     0: mainOmain
2410     1: main
2411     2: O
2412    
2413    /These are all cases where Perl does it differently (nested captures)/
2414    Capturing subpattern count = 1
2415    No options
2416    First char = 'T'
2417    Need char = 's'
2418    
2419    /^(a(b)?)+$/
2420    Capturing subpattern count = 2
2421    Options: anchored
2422    No first char
2423    No need char
2424        aba
2425     0: aba
2426     1: a
2427     2: b
2428    
2429    /^(aa(bb)?)+$/
2430    Capturing subpattern count = 2
2431    Options: anchored
2432    No first char
2433    No need char
2434        aabbaa
2435     0: aabbaa
2436     1: aa
2437     2: bb
2438    
2439    /^(aa|aa(bb))+$/
2440    Capturing subpattern count = 2
2441    Options: anchored
2442    No first char
2443    No need char
2444        aabbaa
2445     0: aabbaa
2446     1: aa
2447     2: bb
2448    
2449    /^(aa(bb)??)+$/
2450    Capturing subpattern count = 2
2451    Options: anchored
2452    No first char
2453    No need char
2454        aabbaa
2455     0: aabbaa
2456     1: aa
2457     2: bb
2458    
2459    /^(?:aa(bb)?)+$/
2460    Capturing subpattern count = 1
2461    Options: anchored
2462    No first char
2463    No need char
2464        aabbaa
2465     0: aabbaa
2466     1: bb
2467    
2468    /^(aa(b(b))?)+$/
2469    Capturing subpattern count = 3
2470    Options: anchored
2471    No first char
2472    No need char
2473        aabbaa
2474     0: aabbaa
2475     1: aa
2476     2: bb
2477     3: b
2478    
2479    /^(?:aa(b(b))?)+$/
2480    Capturing subpattern count = 2
2481    Options: anchored
2482    No first char
2483    No need char
2484        aabbaa
2485     0: aabbaa
2486     1: bb
2487     2: b
2488    
2489    /^(?:aa(b(?:b))?)+$/
2490    Capturing subpattern count = 1
2491    Options: anchored
2492    No first char
2493    No need char
2494        aabbaa
2495     0: aabbaa
2496     1: bb
2497    
2498    /^(?:aa(bb(?:b))?)+$/
2499    Capturing subpattern count = 1
2500    Options: anchored
2501    No first char
2502    No need char
2503        aabbbaa
2504     0: aabbbaa
2505     1: bbb
2506    
2507    /^(?:aa(b(?:bb))?)+$/
2508    Capturing subpattern count = 1
2509    Options: anchored
2510    No first char
2511    No need char
2512        aabbbaa
2513     0: aabbbaa
2514     1: bbb
2515    
2516    /^(?:aa(?:b(b))?)+$/
2517    Capturing subpattern count = 1
2518    Options: anchored
2519    No first char
2520    No need char
2521        aabbaa
2522     0: aabbaa
2523     1: b
2524    
2525    /^(?:aa(?:b(bb))?)+$/
2526    Capturing subpattern count = 1
2527    Options: anchored
2528    No first char
2529    No need char
2530        aabbbaa
2531     0: aabbbaa
2532     1: bb
2533    
2534    /^(aa(b(bb))?)+$/
2535    Capturing subpattern count = 3
2536    Options: anchored
2537    No first char
2538    No need char
2539        aabbbaa
2540     0: aabbbaa
2541     1: aa
2542     2: bbb
2543     3: bb
2544    
2545    /^(aa(bb(bb))?)+$/
2546    Capturing subpattern count = 3
2547    Options: anchored
2548    No first char
2549    No need char
2550        aabbbbaa
2551     0: aabbbbaa
2552     1: aa
2553     2: bbbb
2554     3: bb
2555    
2556    /--------------------------------------------------------------------/
2557    Capturing subpattern count = 0
2558    No options
2559    First char = '-'
2560    Need char = '-'
2561    
2562    /#/xMD
2563    Memory allocation (code space): 7
2564    ------------------------------------------------------------------
2565      0   3 Bra 0
2566      3   3 Ket
2567      6     End
2568    ------------------------------------------------------------------
2569    Capturing subpattern count = 0
2570    Options: extended
2571    No first char
2572    No need char
2573    
2574    /a#/xMD
2575    Memory allocation (code space): 13
2576    ------------------------------------------------------------------
2577      0   6 Bra 0
2578      3   1 a
2579      6   6 Ket
2580      9     End
2581    ------------------------------------------------------------------
2582    Capturing subpattern count = 0
2583    Options: extended
2584    First char = 'a'
2585    No need char
2586    
2587    /[\s]/D
2588    ------------------------------------------------------------------
2589      0  36 Bra 0
2590      3     [\x09-\x0a\x0c-\x0d ]
2591     36  36 Ket
2592     39     End
2593    ------------------------------------------------------------------
2594    Capturing subpattern count = 0
2595    No options
2596    No first char
2597    No need char
2598    
2599    /[\S]/D
2600    ------------------------------------------------------------------
2601      0  36 Bra 0
2602      3     [\x00-\x08\x0b\x0e-\x1f!-\xff]
2603     36  36 Ket
2604     39     End
2605    ------------------------------------------------------------------
2606    Capturing subpattern count = 0
2607    No options
2608    No first char
2609    No need char
2610    
2611    /a(?i)b/D
2612    ------------------------------------------------------------------
2613      0  11 Bra 0
2614      3   1 a
2615      6  01 Opt
2616      8   1 b
2617     11  11 Ket
2618     14     End
2619    ------------------------------------------------------------------
2620    Capturing subpattern count = 0
2621    No options
2622    Case state changes
2623    First char = 'a'
2624    Need char = 'b' (caseless)
2625        ab
2626     0: ab
2627        aB
2628     0: aB
2629        *** Failers
2630    No match
2631        AB
2632    No match
2633    
2634    /(a(?i)b)/D
2635    ------------------------------------------------------------------
2636      0  19 Bra 0
2637      3  11 Bra 1
2638      6   1 a
2639      9  01 Opt
2640     11   1 b
2641     14  11 Ket
2642     17  00 Opt
2643     19  19 Ket
2644     22     End
2645    ------------------------------------------------------------------
2646    Capturing subpattern count = 1
2647    No options
2648    Case state changes
2649    First char = 'a'
2650    Need char = 'b' (caseless)
2651        ab
2652     0: ab
2653     1: ab
2654        aB
2655     0: aB
2656     1: aB
2657        *** Failers
2658    No match
2659        AB
2660    No match
2661    
2662    /   (?i)abc/xD
2663    ------------------------------------------------------------------
2664      0   8 Bra 0
2665      3   3 abc
2666      8   8 Ket
2667     11     End
2668    ------------------------------------------------------------------
2669    Capturing subpattern count = 0
2670    Options: caseless extended
2671    First char = 'a' (caseless)
2672    Need char = 'c' (caseless)
2673    
2674    /#this is a comment
2675      (?i)abc/xD
2676    ------------------------------------------------------------------
2677      0   8 Bra 0
2678      3   3 abc
2679      8   8 Ket
2680     11     End
2681    ------------------------------------------------------------------
2682    Capturing subpattern count = 0
2683    Options: caseless extended
2684    First char = 'a' (caseless)
2685    Need char = 'c' (caseless)
2686    
2687    /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
2688    ------------------------------------------------------------------
2689      0 307 Bra 0
2690      3 250 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2691    255  50 12345678901234567890123456789012345678901234567890
2692    307 307 Ket
2693    310     End
2694    ------------------------------------------------------------------
2695    Capturing subpattern count = 0
2696    No options
2697    First char = '1'
2698    Need char = '0'
2699    
2700    /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
2701    ------------------------------------------------------------------
2702      0 307 Bra 0
2703      3 250 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2704    255  50 12345678901234567890123456789012345678901234567890
2705    307 307 Ket
2706    310     End
2707    ------------------------------------------------------------------
2708    Capturing subpattern count = 0
2709    No options
2710    First char = '1'
2711    Need char = '0'
2712    
2713    /\Q\E/D
2714    ------------------------------------------------------------------
2715      0   3 Bra 0
2716      3   3 Ket
2717      6     End
2718    ------------------------------------------------------------------
2719    Capturing subpattern count = 0
2720    No options
2721    No first char
2722    No need char
2723        \
2724     0:
2725    
2726    /\Q\Ex/D
2727    ------------------------------------------------------------------
2728      0   6 Bra 0
2729      3   1 x
2730      6   6 Ket
2731      9     End
2732    ------------------------------------------------------------------
2733    Capturing subpattern count = 0
2734    No options
2735    First char = 'x'
2736    No need char
2737    
2738    / \Q\E/D
2739    ------------------------------------------------------------------
2740      0   6 Bra 0
2741      3   1
2742      6   6 Ket
2743      9     End
2744    ------------------------------------------------------------------
2745    Capturing subpattern count = 0
2746    No options
2747    First char = ' '
2748    No need char
2749    
2750    /a\Q\E/D
2751    ------------------------------------------------------------------
2752      0   6 Bra 0
2753      3   1 a
2754      6   6 Ket
2755      9     End
2756    ------------------------------------------------------------------
2757    Capturing subpattern count = 0
2758    No options
2759    First char = 'a'
2760    No need char
2761      abc
2762     0: a
2763      bca
2764     0: a
2765      bac
2766     0: a
2767    
2768    /a\Q\Eb/D
2769    ------------------------------------------------------------------
2770      0   9 Bra 0
2771      3   1 a
2772      6   1 b
2773      9   9 Ket
2774     12     End
2775    ------------------------------------------------------------------
2776    Capturing subpattern count = 0
2777    No options
2778    First char = 'a'
2779    Need char = 'b'
2780      abc
2781     0: ab
2782    
2783    /\Q\Eabc/D
2784    ------------------------------------------------------------------
2785      0   8 Bra 0
2786      3   3 abc
2787      8   8 Ket
2788     11     End
2789    ------------------------------------------------------------------
2790    Capturing subpattern count = 0
2791    No options
2792    First char = 'a'
2793    Need char = 'c'
2794    
2795    /x*+\w/D
2796    ------------------------------------------------------------------
2797      0  12 Bra 0
2798      3   5 Once
2799      6     x*
2800      8   5 Ket
2801     11     \w
2802     12  12 Ket
2803     15     End
2804    ------------------------------------------------------------------
2805    Capturing subpattern count = 0
2806    No options
2807    No first char
2808    No need char
2809        *** Failers
2810     0: F
2811        xxxxx
2812    No match
2813    
2814    /x?+/D
2815    ------------------------------------------------------------------
2816      0  11 Bra 0
2817      3   5 Once
2818      6     x?
2819      8   5 Ket
2820     11  11 Ket
2821     14     End
2822    ------------------------------------------------------------------
2823    Capturing subpattern count = 0
2824    No options
2825    No first char
2826    No need char
2827    
2828    /x++/D
2829    ------------------------------------------------------------------
2830      0  11 Bra 0
2831      3   5 Once
2832      6     x+
2833      8   5 Ket
2834     11  11 Ket
2835     14     End
2836    ------------------------------------------------------------------
2837    Capturing subpattern count = 0
2838    No options
2839    First char = 'x'
2840    No need char
2841    
2842    /x{1,3}+/D
2843    ------------------------------------------------------------------
2844      0  16 Bra 0
2845      3  10 Once
2846      6   1 x
2847      9     x{,2}
2848     13  10 Ket
2849     16  16 Ket
2850     19     End
2851    ------------------------------------------------------------------
2852    Capturing subpattern count = 0
2853    No options
2854    First char = 'x'
2855    No need char
2856    
2857    /(x)*+/D
2858    ------------------------------------------------------------------
2859      0  19 Bra 0
2860      3  13 Once
2861      6     Brazero
2862      7   6 Bra 1
2863     10   1 x
2864     13   6 KetRmax
2865     16  13 Ket
2866     19  19 Ket
2867     22     End
2868    ------------------------------------------------------------------
2869    Capturing subpattern count = 1
2870    No options
2871    No first char
2872    No need char
2873    
2874    /^(\w++|\s++)*$/
2875    Capturing subpattern count = 1
2876    Options: anchored
2877    No first char
2878    No need char
2879        now is the time for all good men to come to the aid of the party
2880     0: now is the time for all good men to come to the aid of the party
2881     1: party
2882        *** Failers
2883    No match
2884        this is not a line with only words and spaces!
2885    No match
2886    
2887    /(\d++)(\w)/
2888    Capturing subpattern count = 2
2889    No options
2890    No first char
2891    No need char
2892        12345a
2893     0: 12345a
2894     1: 12345
2895     2: a
2896        *** Failers
2897    No match
2898        12345+
2899    No match
2900    
2901    /a++b/
2902    Capturing subpattern count = 0
2903    No options
2904    First char = 'a'
2905    Need char = 'b'
2906        aaab
2907     0: aaab
2908    
2909    /(a++b)/
2910    Capturing subpattern count = 1
2911    No options
2912    First char = 'a'
2913    Need char = 'b'
2914        aaab
2915     0: aaab
2916     1: aaab
2917    
2918    /(a++)b/
2919    Capturing subpattern count = 1
2920    No options
2921    First char = 'a'
2922    Need char = 'b'
2923        aaab
2924     0: aaab
2925     1: aaa
2926    
2927    /([^()]++|\([^()]*\))+/
2928    Capturing subpattern count = 1
2929    No options
2930    No first char
2931    No need char
2932        ((abc(ade)ufh()()x
2933     0: abc(ade)ufh()()x
2934     1: x
2935    
2936    /\(([^()]++|\([^()]+\))+\)/
2937    Capturing subpattern count = 1
2938    No options
2939    First char = '('
2940    Need char = ')'
2941        (abc)
2942     0: (abc)
2943     1: abc
2944        (abc(def)xyz)
2945     0: (abc(def)xyz)
2946     1: xyz
2947        *** Failers
2948    No match
2949        ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2950    No match
2951    
2952    /(abc){1,3}+/D
2953    ------------------------------------------------------------------
2954      0  50 Bra 0
2955      3  44 Once
2956      6   8 Bra 1
2957      9   3 abc
2958     14   8 Ket
2959     17     Brazero
2960     18  26 Bra 0
2961     21   8 Bra 1
2962     24   3 abc
2963     29   8 Ket
2964     32     Brazero
2965     33   8 Bra 1
2966     36   3 abc
2967     41   8 Ket
2968     44  26 Ket
2969     47  44 Ket
2970     50  50 Ket
2971     53     End
2972    ------------------------------------------------------------------
2973    Capturing subpattern count = 1
2974    No options
2975    First char = 'a'
2976    Need char = 'c'
2977    
2978    /a+?+/
2979    Failed: nothing to repeat at offset 3
2980    
2981    /a{2,3}?+b/
2982    Failed: nothing to repeat at offset 7
2983    
2984    /(?U)a+?+/
2985    Failed: nothing to repeat at offset 7
2986    
2987    /a{2,3}?+b/U
2988    Failed: nothing to repeat at offset 7
2989    
2990    /x(?U)a++b/D
2991    ------------------------------------------------------------------
2992      0  17 Bra 0
2993      3   1 x
2994      6   5 Once
2995      9     a+
2996     11   5 Ket
2997     14   1 b
2998     17  17 Ket
2999     20     End
3000    ------------------------------------------------------------------
3001    Capturing subpattern count = 0
3002    No options
3003    First char = 'x'
3004    Need char = 'b'
3005        xaaaab
3006     0: xaaaab
3007    
3008    /(?U)xa++b/D
3009    ------------------------------------------------------------------
3010      0  17 Bra 0
3011      3   1 x
3012      6   5 Once
3013      9     a+
3014     11   5 Ket
3015     14   1 b
3016     17  17 Ket
3017     20     End
3018    ------------------------------------------------------------------
3019    Capturing subpattern count = 0
3020    Options: ungreedy
3021    First char = 'x'
3022    Need char = 'b'
3023        xaaaab
3024     0: xaaaab
3025    
3026    /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/D
3027    ------------------------------------------------------------------
3028      0 106 Bra 0
3029      3     ^
3030      4  99 Bra 1
3031      7   5 Bra 2
3032     10     a+
3033     12   5 Ket
3034     15  37 Bra 3
3035     18     [a-b]+?
3036     52  37 Ket
3037     55  37 Bra 4
3038     58     [b-c]+
3039     92  37 Ket
3040     95   5 Bra 5
3041     98     \w*
3042    100   5 Ket
3043    103  99 Ket
3044    106 106 Ket
3045    109     End
3046    ------------------------------------------------------------------
3047    Capturing subpattern count = 5
3048    Options: anchored
3049    No first char
3050    No need char
3051    
3052    /^x(?U)a+b/D
3053    ------------------------------------------------------------------
3054      0  12 Bra 0
3055      3     ^
3056      4   1 x
3057      7     a+?
3058      9   1 b
3059     12  12 Ket
3060     15     End
3061    ------------------------------------------------------------------
3062    Capturing subpattern count = 0
3063    Options: anchored
3064    No first char
3065    Need char = 'b'
3066    
3067    /^x(?U)(a+)b/D
3068    ------------------------------------------------------------------
3069      0  18 Bra 0
3070      3     ^
3071      4   1 x
3072      7   5 Bra 1
3073     10     a+?
3074     12   5 Ket
3075     15   1 b
3076     18  18 Ket
3077     21     End
3078    ------------------------------------------------------------------
3079    Capturing subpattern count = 1
3080    Options: anchored
3081    No first char
3082    Need char = 'b'
3083    
3084    /[.x.]/
3085    Failed: POSIX collating elements are not supported at offset 0
3086    
3087    /[=x=]/
3088    Failed: POSIX collating elements are not supported at offset 0
3089    
3090    /[:x:]/
3091    Failed: POSIX named classes are supported only within a class at offset 0
3092    
3093    /\l/
3094    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3095    
3096    /\L/
3097    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3098    
3099    /\N{name}/
3100    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3101    
3102    /\pP/
3103    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3104    
3105    /\PP/
3106    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3107    
3108    /\p{prop}/
3109    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3110    
3111    /\P{prop}/
3112    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3113    
3114    /\u/
3115    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3116    
3117    /\U/
3118    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3119    
3120    /\X/
3121    Failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 1
3122    
3123    /[/
3124    Failed: missing terminating ] for character class at offset 1
3125    
3126    /[a-/
3127    Failed: missing terminating ] for character class at offset 3
3128    
3129    /[[:space:]/
3130    Failed: missing terminating ] for character class at offset 10
3131    
3132    /[\s]/DM
3133    Memory allocation (code space): 40
3134    ------------------------------------------------------------------
3135      0  36 Bra 0
3136      3     [\x09-\x0a\x0c-\x0d ]
3137     36  36 Ket
3138     39     End
3139    ------------------------------------------------------------------
3140    Capturing subpattern count = 0
3141    No options
3142    No first char
3143    No need char
3144    
3145    /[[:space:]]/DM
3146    Memory allocation (code space): 40
3147    ------------------------------------------------------------------
3148      0  36 Bra 0
3149      3     [\x09-\x0d ]
3150     36  36 Ket
3151     39     End
3152    ------------------------------------------------------------------
3153    Capturing subpattern count = 0
3154    No options
3155    No first char
3156    No need char
3157    
3158    /[[:space:]abcde]/DM
3159    Memory allocation (code space): 40
3160    ------------------------------------------------------------------
3161      0  36 Bra 0
3162      3     [\x09-\x0d a-e]
3163     36  36 Ket
3164     39     End
3165    ------------------------------------------------------------------
3166    Capturing subpattern count = 0
3167    No options
3168    No first char
3169    No need char
3170    
3171    /< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/x
3172    Capturing subpattern count = 0
3173    Options: extended
3174    First char = '<'
3175    Need char = '>'
3176        <>
3177     0: <>
3178        <abcd>
3179     0: <abcd>
3180        <abc <123> hij>
3181     0: <abc <123> hij>
3182        <abc <def> hij>
3183     0: <def>
3184        <abc<>def>
3185     0: <abc<>def>
3186        <abc<>
3187     0: <>
3188        *** Failers
3189    No match
3190        <abc
3191    No match
3192    
3193    |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|DM
3194    Memory allocation (code space): 421
3195    ------------------------------------------------------------------
3196      0 417 Bra 0
3197      3 250 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:
3198    255 159 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
3199    416     \b
3200    417 417 Ket
3201    420     End
3202    ------------------------------------------------------------------
3203    Capturing subpattern count = 0
3204    No options
3205    First char = '8'
3206    Need char = 'X'
3207    
3208    |\$\<\.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|DM
3209    Memory allocation (code space): 416
3210    ------------------------------------------------------------------
3211      0 412 Bra 0
3212      3 250 $<.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[
3213    255 154 %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
3214    411     \b
3215    412 412 Ket
3216    415     End
3217    ------------------------------------------------------------------
3218    Capturing subpattern count = 0
3219    No options
3220    First char = '$'
3221    Need char = 'X'
3222    
3223    /(.*)\d+\1/I
3224    Capturing subpattern count = 1
3225    Max back reference = 1
3226    No options
3227    No first char
3228    No need char
3229    
3230    /(.*)\d+/I
3231    Capturing subpattern count = 1
3232    No options
3233    First char at start or follows \n
3234    No need char
3235    
3236    /(.*)\d+\1/Is
3237    Capturing subpattern count = 1
3238    Max back reference = 1
3239    Options: dotall
3240    No first char
3241    No need char
3242    
3243    /(.*)\d+/Is
3244    Capturing subpattern count = 1
3245    Options: anchored dotall
3246    No first char
3247    No need char
3248    
3249    /(.*(xyz))\d+\2/I
3250    Capturing subpattern count = 2
3251    Max back reference = 2
3252    No options
3253    First char at start or follows \n
3254    Need char = 'z'
3255    
3256    /((.*))\d+\1/I
3257    Capturing subpattern count = 2
3258    Max back reference = 1
3259    No options
3260    No first char
3261    No need char
3262        abc123bc
3263     0: bc123bc
3264     1: bc
3265     2: bc
3266    
3267    /a[b]/I
3268    Capturing subpattern count = 0
3269    No options
3270    First char = 'a'
3271    Need char = 'b'
3272    
3273    /(?=a).*/I
3274    Capturing subpattern count = 0
3275    No options
3276    First char = 'a'
3277    No need char
3278    
3279    /(?=abc).xyz/iI
3280    Capturing subpattern count = 0
3281    Options: caseless
3282    First char = 'a' (caseless)
3283    Need char = 'z' (caseless)
3284    
3285    /(?=abc)(?i).xyz/I
3286    Capturing subpattern count = 0
3287    No options
3288    Case state changes
3289    First char = 'a'
3290    Need char = 'z' (caseless)
3291    
3292    /(?=a)(?=b)/I
3293    Capturing subpattern count = 0
3294    No options
3295    First char = 'a'
3296    No need char
3297    
3298    /(?=.)a/I
3299    Capturing subpattern count = 0
3300    No options
3301    First char = 'a'
3302    No need char
3303    
3304    /((?=abcda)a)/I
3305    Capturing subpattern count = 1
3306    No options
3307    First char = 'a'
3308    Need char = 'a'
3309    
3310    /((?=abcda)ab)/I
3311    Capturing subpattern count = 1
3312    No options
3313    First char = 'a'
3314    Need char = 'b'
3315    
3316    /()a/I
3317    Capturing subpattern count = 1
3318    No options
3319    No first char
3320    Need char = 'a'
3321    
3322    /(?(1)ab|ac)/I
3323    Capturing subpattern count = 0
3324    No options
3325    First char = 'a'
3326    No need char
3327    
3328    /(?(1)abz|acz)/I
3329    Capturing subpattern count = 0
3330    No options
3331    First char = 'a'
3332    Need char = 'z'
3333    
3334    /(?(1)abz)/I
3335    Capturing subpattern count = 0
3336    No options
3337    No first char
3338    No need char
3339    
3340    /(?(1)abz)123/I
3341    Capturing subpattern count = 0
3342    No options
3343    No first char
3344    Need char = '3'
3345    
3346    /(a)+/I
3347    Capturing subpattern count = 1
3348    No options
3349    First char = 'a'
3350    No need char
3351    
3352    /(a){2,3}/I
3353    Capturing subpattern count = 1
3354    No options
3355    First char = 'a'
3356    Need char = 'a'
3357    
3358    /(a)*/I
3359    Capturing subpattern count = 1
3360    No options
3361    No first char
3362    No need char
3363    
3364    /[a]/I
3365    Capturing subpattern count = 0
3366    No options
3367    First char = 'a'
3368    No need char
3369    
3370    /[ab]/I
3371    Capturing subpattern count = 0
3372    No options
3373    No first char
3374    No need char
3375    
3376    /[ab]/IS
3377    Capturing subpattern count = 0
3378    No options
3379    No first char
3380    No need char
3381    Study size = 40
3382    Starting character set: a b
3383    
3384    /[^a]/I
3385    Capturing subpattern count = 0
3386    No options
3387    No first char
3388    No need char
3389    
3390    /\d456/I
3391    Capturing subpattern count = 0
3392    No options
3393    No first char
3394    Need char = '6'
3395    
3396    /\d456/IS
3397    Capturing subpattern count = 0
3398    No options
3399    No first char
3400    Need char = '6'
3401    Study size = 40
3402    Starting character set: 0 1 2 3 4 5 6 7 8 9
3403    
3404    /a^b/I
3405    Capturing subpattern count = 0
3406    No options
3407    First char = 'a'
3408    Need char = 'b'
3409    
3410    /^a/mI
3411    Capturing subpattern count = 0
3412    Options: multiline
3413    First char at start or follows \n
3414    Need char = 'a'
3415      abcde
3416     0: a
3417      xy\nabc
3418     0: a
3419      *** Failers
3420    No match
3421      xyabc
3422    No match
3423    
3424    /c|abc/I
3425    Capturing subpattern count = 0
3426    No options
3427    No first char
3428    Need char = 'c'
3429    
3430    /(?i)[ab]/IS
3431    Capturing subpattern count = 0
3432    Options: caseless
3433    No first char
3434    No need char
3435    Study size = 40
3436    Starting character set: A B a b
3437    
3438    /[ab](?i)cd/IS
3439    Capturing subpattern count = 0
3440    No options
3441    Case state changes
3442    No first char
3443    Need char = 'd' (caseless)
3444    Study size = 40
3445    Starting character set: a b
3446    
3447    /abc(?C)def/
3448    Capturing subpattern count = 0
3449    No options
3450    First char = 'a'
3451    Need char = 'f'
3452        abcdef
3453    --->abcdef
3454      0 ^  ^
3455     0: abcdef
3456        1234abcdef
3457    --->1234abcdef
3458      0     ^  ^
3459     0: abcdef
3460        *** Failers
3461    No match
3462        abcxyz
3463    No match
3464        abcxyzf
3465    --->abcxyzf
3466      0 ^  ^
3467    No match
3468    
3469    /abc(?C)de(?C1)f/
3470    Capturing subpattern count = 0
3471    No options
3472    First char = 'a'
3473    Need char = 'f'
3474        123abcdef
3475    --->123abcdef
3476      0    ^  ^
3477      1    ^    ^
3478     0: abcdef
3479    
3480    /(?C1)\dabc(?C2)def/
3481    Capturing subpattern count = 0
3482    No options
3483    No first char
3484    Need char = 'f'
3485        1234abcdef
3486    --->1234abcdef
3487      1 ^
3488      1  ^
3489      1   ^
3490      1    ^
3491      2    ^   ^
3492     0: 4abcdef
3493        *** Failers
3494    No match
3495        abcdef
3496    --->abcdef
3497      1 ^
3498      1  ^
3499      1   ^
3500      1    ^
3501      1     ^
3502      1      ^
3503    No match
3504    
3505    /(?C255)ab/
3506    Capturing subpattern count = 0
3507    No options
3508    First char = 'a'
3509    Need char = 'b'
3510    
3511    /(?C256)ab/
3512    Failed: number after (?C is > 255 at offset 6
3513    
3514    /(?Cab)xx/
3515    Failed: closing ) for (?C expected at offset 3
3516    
3517    /(?C12vr)x/
3518    Failed: closing ) for (?C expected at offset 5
3519    
3520    /abc(?C)def/
3521    Capturing subpattern count = 0
3522    No options
3523    First char = 'a'
3524    Need char = 'f'
3525        *** Failers
3526    No match
3527        \x83\x0\x61bcdef
3528    --->\x83\x00abcdef
3529      0         ^  ^
3530     0: abcdef
3531    
3532    /(abc)(?C)de(?C1)f/
3533    Capturing subpattern count = 1
3534    No options
3535    First char = 'a'
3536    Need char = 'f'
3537        123abcdef
3538    --->123abcdef
3539      0    ^  ^
3540      1    ^    ^
3541     0: abcdef
3542     1: abc
3543        123abcdef\C+
3544    Callout 0: last capture = 1
3545     0: <unset>
3546     1: abc
3547    --->123abcdef
3548           ^  ^
3549    Callout 1: last capture = 1
3550     0: <unset>
3551     1: abc
3552    --->123abcdef
3553           ^    ^
3554     0: abcdef
3555     1: abc
3556        123abcdef\C-
3557     0: abcdef
3558     1: abc
3559        *** Failers
3560    No match
3561        123abcdef\C!1
3562    --->123abcdef
3563      0    ^  ^
3564      1    ^    ^
3565    No match
3566    
3567    /(?C0)(abc(?C1))*/
3568    Capturing subpattern count = 1
3569    No options
3570    No first char
3571    No need char
3572        abcabcabc
3573    --->abcabcabc
3574      0 ^
3575      1 ^  ^
3576      1 ^     ^
3577      1 ^        ^
3578     0: abcabcabc
3579     1: abc
3580        abcabc\C!1!3
3581    --->abcabc
3582      0 ^
3583      1 ^  ^
3584      1 ^     ^
3585     0: abcabc
3586     1: abc
3587        *** Failers
3588    --->*** Failers
3589      0 ^
3590     0:
3591        abcabcabc\C!1!3
3592    --->abcabcabc
3593      0 ^
3594      1 ^  ^
3595      1 ^     ^
3596      1 ^        ^
3597     0: abcabc
3598     1: abc
3599    
3600    /(\d{3}(?C))*/
3601    Capturing subpattern count = 1
3602    No options
3603    No first char
3604    No need char
3605        123\C+
3606    Callout 0: last capture = -1
3607     0: <unset>
3608    --->123
3609        ^  ^
3610     0: 123
3611     1: 123
3612        123456\C+
3613    Callout 0: last capture = -1
3614     0: <unset>
3615    --->123456
3616        ^  ^
3617    Callout 0: last capture = 1
3618     0: <unset>
3619     1: 123
3620    --->123456
3621        ^     ^
3622     0: 123456
3623     1: 456
3624        123456789\C+
3625    Callout 0: last capture = -1
3626     0: <unset>
3627    --->123456789
3628        ^  ^
3629    Callout 0: last capture = 1
3630     0: <unset>
3631     1: 123
3632    --->123456789
3633        ^     ^
3634    Callout 0: last capture = 1
3635     0: <unset>
3636     1: 456
3637    --->123456789
3638        ^        ^
3639     0: 123456789
3640     1: 789
3641    
3642    /((xyz)(?C)p|(?C1)xyzabc)/
3643    Capturing subpattern count = 2
3644    No options
3645    First char = 'x'
3646    No need char
3647        xyzabc\C+
3648    Callout 0: last capture = 2
3649     0: <unset>
3650     1: <unset>
3651     2: xyz
3652    --->xyzabc
3653        ^  ^
3654    Callout 1: last capture = -1
3655     0: <unset>
3656    --->xyzabc
3657        ^
3658     0: xyzabc
3659     1: xyzabc
3660    
3661    /(X)((xyz)(?C)p|(?C1)xyzabc)/
3662    Capturing subpattern count = 3
3663    No options
3664    First char = 'X'
3665    Need char = 'x'
3666        Xxyzabc\C+
3667    Callout 0: last capture = 3
3668     0: <unset>
3669     1: X
3670     2: <unset>
3671     3: xyz
3672    --->Xxyzabc
3673        ^   ^
3674    Callout 1: last capture = 1
3675     0: <unset>
3676     1: X
3677    --->Xxyzabc
3678        ^^
3679     0: Xxyzabc
3680     1: X
3681     2: xyzabc
3682    
3683    /(?=(abc))(?C)abcdef/
3684    Capturing subpattern count = 1
3685    No options
3686    First char = 'a'
3687    Need char = 'f'
3688        abcdef\C+
3689    Callout 0: last capture = 1
3690     0: <unset>
3691     1: abc
3692    --->abcdef
3693        ^
3694     0: abcdef
3695     1: abc
3696    
3697    /(?!(abc)(?C1)d)(?C2)abcxyz/
3698    Capturing subpattern count = 1
3699    No options
3700    First char = 'a'
3701    Need char = 'z'
3702        abcxyz\C+
3703    Callout 1: last capture = 1
3704     0: <unset>
3705     1: abc
3706    --->abcxyz
3707        ^  ^
3708    Callout 2: last capture = -1
3709     0: <unset>
3710    --->abcxyz
3711        ^
3712     0: abcxyz
3713    
3714    /(?<=(abc)(?C))xyz/
3715    Capturing subpattern count = 1
3716    No options
3717    First char = 'x'
3718    Need char = 'z'
3719       abcxyz\C+
3720    Callout 0: last capture = 1
3721     0: <unset>
3722     1: abc
3723    --->abcxyz
3724           ^
3725     0: xyz
3726     1: abc
3727    
3728    /(?C)abc/
3729    Capturing subpattern count = 0
3730    No options
3731    First char = 'a'
3732    Need char = 'c'
3733    
3734    /(?C)^abc/
3735    Capturing subpattern count = 0
3736    Options: anchored
3737    No first char
3738    No need char
3739    
3740    /(?C)a|b/S
3741    Capturing subpattern count = 0
3742    No options
3743    No first char
3744    No need char
3745    Study size = 40
3746    Starting character set: a b
3747    
3748    /(?R)/
3749    Failed: recursive call could loop indefinitely at offset 3
3750    
3751    /(a|(?R))/
3752    Failed: recursive call could loop indefinitely at offset 6
3753    
3754    /(ab|(bc|(de|(?R))))/
3755    Failed: recursive call could loop indefinitely at offset 15
3756    
3757    /x(ab|(bc|(de|(?R))))/
3758    Capturing subpattern count = 3
3759    No options
3760    First char = 'x'
3761    No need char
3762        xab
3763     0: xab
3764     1: ab
3765        xbc
3766     0: xbc
3767     1: bc
3768     2: bc
3769        xde
3770     0: xde
3771     1: de
3772     2: de
3773     3: de
3774        xxab
3775     0: xxab
3776     1: xab
3777     2: xab
3778     3: xab
3779        xxxab
3780     0: xxxab
3781     1: xxab
3782     2: xxab
3783     3: xxab
3784        *** Failers
3785    No match
3786        xyab
3787    No match
3788    
3789    /(ab|(bc|(de|(?1))))/
3790    Failed: recursive call could loop indefinitely at offset 15
3791    
3792    /x(ab|(bc|(de|(?1)x)x)x)/
3793    Failed: recursive call could loop indefinitely at offset 16
3794    
3795    /^([^()]|\((?1)*\))*$/
3796    Capturing subpattern count = 1
3797    Options: anchored
3798    No first char
3799    No need char
3800        abc
3801     0: abc
3802     1: c
3803        a(b)c
3804     0: a(b)c
3805     1: c
3806        a(b(c))d
3807     0: a(b(c))d
3808     1: d
3809        *** Failers)
3810    No match
3811        a(b(c)d
3812    No match
3813    
3814    /^>abc>([^()]|\((?1)*\))*<xyz<$/
3815    Capturing subpattern count = 1
3816    Options: anchored
3817    No first char
3818    Need char = '<'
3819       >abc>123<xyz<
3820     0: >abc>123<xyz<
3821     1: 3
3822       >abc>1(2)3<xyz<
3823     0: >abc>1(2)3<xyz<
3824     1: 3
3825       >abc>(1(2)3)<xyz<
3826     0: >abc>(1(2)3)<xyz<
3827     1: (1(2)3)
3828    
3829    /(a(?1)b)/D
3830    ------------------------------------------------------------------
3831      0  18 Bra 0
3832      3  12 Bra 1
3833      6   1 a
3834      9   3 Recurse
3835     12   1 b
3836     15  12 Ket
3837     18  18 Ket
3838     21     End
3839    ------------------------------------------------------------------
3840    Capturing subpattern count = 1
3841    No options
3842    First char = 'a'
3843    Need char = 'b'
3844    
3845    /(a(?1)+b)/D
3846    ------------------------------------------------------------------
3847      0  24 Bra 0
3848      3  18 Bra 1
3849      6   1 a
3850      9   6 Bra 0
3851     12   3 Recurse
3852     15   6 KetRmax
3853     18   1 b
3854     21  18 Ket
3855     24  24 Ket
3856     27     End
3857    ------------------------------------------------------------------
3858    Capturing subpattern count = 1
3859    No options
3860    First char = 'a'
3861    Need char = 'b'
3862    
3863    /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/i
3864    Capturing subpattern count = 4
3865    Max back reference = 4
3866    Options: anchored caseless
3867    No first char
3868    No need char
3869        1221
3870     0: 1221
3871     1: 1221
3872     2: 1
3873        Satan, oscillate my metallic sonatas!
3874     0: Satan, oscillate my metallic sonatas!
3875     1: <unset>
3876     2: <unset>
3877     3: Satan, oscillate my metallic sonatas
3878     4: S
3879        A man, a plan, a canal: Panama!
3880     0: A man, a plan, a canal: Panama!
3881     1: <unset>
3882     2: <unset>
3883     3: A man, a plan, a canal: Panama
3884     4: A
3885        Able was I ere I saw Elba.
3886     0: Able was I ere I saw Elba.
3887     1: <unset>
3888     2: <unset>
3889     3: Able was I ere I saw Elba
3890     4: A
3891        *** Failers
3892    No match
3893        The quick brown fox
3894    No match
3895    
3896    /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
3897    Capturing subpattern count = 2
3898    Options: anchored
3899    No first char
3900    No need char
3901        12
3902     0: 12
3903     1: 12
3904        (((2+2)*-3)-7)
3905     0: (((2+2)*-3)-7)
3906     1: (((2+2)*-3)-7)
3907     2: -
3908        -12
3909     0: -12
3910     1: -12
3911        *** Failers
3912    No match
3913        ((2+2)*-3)-7)
3914    No match
3915    
3916    /^(x(y|(?1){2})z)/
3917    Capturing subpattern count = 2
3918    Options: anchored
3919    No first char
3920    No need char
3921        xyz
3922     0: xyz
3923     1: xyz
3924     2: y
3925        xxyzxyzz
3926     0: xxyzxyzz
3927     1: xxyzxyzz
3928     2: xyzxyz
3929        *** Failers
3930    No match
3931        xxyzz
3932    No match
3933        xxyzxyzxyzz
3934    No match
3935    
3936    /((< (?: (?(R) \d++  | [^<>]*+) | (?2)) * >))/x
3937    Capturing subpattern count = 2
3938    Options: extended
3939    First char = '<'
3940    Need char = '>'
3941        <>
3942     0: <>
3943     1: <>
3944     2: <>
3945        <abcd>
3946     0: <abcd>
3947     1: <abcd>
3948     2: <abcd>
3949        <abc <123> hij>
3950     0: <abc <123> hij>
3951     1: <abc <123> hij>
3952     2: <abc <123> hij>
3953        <abc <def> hij>
3954     0: <def>
3955     1: <def>
3956     2: <def>
3957        <abc<>def>
3958     0: <abc<>def>
3959     1: <abc<>def>
3960     2: <abc<>def>
3961        <abc<>
3962     0: <>
3963     1: <>
3964     2: <>
3965        *** Failers
3966    No match
3967        <abc
3968    No match
3969    
3970    /(?1)/
3971    Failed: reference to non-existent subpattern at offset 3
3972    
3973    /((?2)(abc)/
3974    Failed: reference to non-existent subpattern at offset 4
3975    
3976    /^(abc)def(?1)/
3977    Capturing subpattern count = 1
3978    Options: anchored
3979    No first char
3980    No need char
3981        abcdefabc
3982     0: abcdefabc
3983     1: abc
3984    
3985    /^(a|b|c)=(?1)+/
3986    Capturing subpattern count = 1
3987    Options: anchored
3988    No first char
3989    No need char
3990        a=a
3991     0: a=a
3992     1: a
3993        a=b
3994     0: a=b
3995     1: a
3996        a=bc
3997     0: a=bc
3998     1: a
3999    
4000    /^(a|b|c)=((?1))+/
4001    Capturing subpattern count = 2
4002    Options: anchored
4003    No first char
4004    No need char
4005        a=a
4006     0: a=a
4007     1: a
4008     2: a
4009        a=b
4010     0: a=b
4011     1: a
4012     2: b
4013        a=bc
4014     0: a=bc
4015     1: a
4016     2: c
4017    
4018    /a(?P<name1>b|c)d(?P<longername2>e)/D
4019    ------------------------------------------------------------------
4020      0  33 Bra 0
4021      3   1 a
4022      6   6 Bra 1
4023      9   1 b
4024     12   6 Alt
4025     15   1 c
4026     18  12 Ket
4027     21   1 d
4028     24   6 Bra 2
4029     27   1 e
4030     30   6 Ket
4031     33  33 Ket
4032     36     End
4033    ------------------------------------------------------------------
4034    Capturing subpattern count = 2
4035    Named capturing subpatterns:
4036      longername2   2
4037      name1         1
4038    No options
4039    First char = 'a'
4040    Need char = 'e'
4041        abde
4042     0: abde
4043     1: b
4044     2: e
4045        acde
4046     0: acde
4047     1: c
4048     2: e
4049    
4050    /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/D
4051    ------------------------------------------------------------------
4052      0  39 Bra 0
4053      3  24 Bra 0
4054      6   1 a
4055      9  15 Bra 1
4056     12   1 c
4057     15   6 Bra 2
4058     18   1 d
4059     21   6 Ket
4060     24  15 Ket
4061     27  24 Ket
4062     30   6 Bra 3
4063     33   1 a
4064     36   6 Ket
4065     39  39 Ket
4066     42     End
4067    ------------------------------------------------------------------
4068    Capturing subpattern count = 3
4069    Named capturing subpatterns:
4070      a   3
4071      c   1
4072      d   2
4073    No options
4074    First char = 'a'
4075    Need char = 'a'
4076    
4077    /(?P<a>a)...(?P=a)bbb(?P>a)d/D
4078    ------------------------------------------------------------------
4079      0  29 Bra 0
4080      3   6 Bra 1
4081      6   1 a
4082      9   6 Ket
4083     12     Any
4084     13     Any
4085     14     Any
4086     15     \1
4087     18   3 bbb
4088     23   3 Recurse
4089     26   1 d
4090     29  29 Ket
4091     32     End
4092    ------------------------------------------------------------------
4093    Capturing subpattern count = 1
4094    Max back reference = 1
4095    Named capturing subpatterns:
4096      a   1
4097    No options
4098    First char = 'a'
4099    Need char = 'd'
4100    
4101    /^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/i
4102    Capturing subpattern count = 4
4103    Max back reference = 4
4104    Named capturing subpatterns:
4105      four    4
4106      one     1
4107      three   3
4108      two     2
4109    Options: anchored caseless
4110    No first char
4111    No need char
4112        1221
4113     0: 1221
4114     1: 1221
4115     2: 1
4116        Satan, oscillate my metallic sonatas!
4117     0: Satan, oscillate my metallic sonatas!
4118     1: <unset>
4119     2: <unset>
4120     3: Satan, oscillate my metallic sonatas
4121     4: S
4122        A man, a plan, a canal: Panama!
4123     0: A man, a plan, a canal: Panama!
4124     1: <unset>
4125     2: <unset>
4126     3: A man, a plan, a canal: Panama
4127     4: A
4128        Able was I ere I saw Elba.
4129     0: Able was I ere I saw Elba.
4130     1: <unset>
4131     2: <unset>
4132     3: Able was I ere I saw Elba
4133     4: A
4134        *** Failers
4135    No match
4136        The quick brown fox
4137    No match
4138    
4139    /((?(R)a|b))\1(?1)?/
4140    Capturing subpattern count = 1
4141    Max back reference = 1
4142    No options
4143    No first char
4144    No need char
4145      bb
4146     0: bb
4147     1: b
4148      bbaa
4149     0: bba
4150     1: b
4151    
4152    /(.*)a/sI
4153    Capturing subpattern count = 1
4154    Options: anchored dotall
4155    No first char
4156    Need char = 'a'
4157    
4158    /(.*)a\1/sI
4159    Capturing subpattern count = 1
4160    Max back reference = 1
4161    Options: dotall
4162    No first char
4163    Need char = 'a'
4164    
4165    /(.*)a(b)\2/sI
4166    Capturing subpattern count = 2
4167    Max back reference = 2
4168    Options: anchored dotall
4169    No first char
4170    Need char = 'b'
4171    
4172    /((.*)a|(.*)b)z/sI
4173    Capturing subpattern count = 3
4174    Options: anchored dotall
4175    No first char
4176    Need char = 'z'
4177    
4178    /((.*)a|(.*)b)z\1/sI
4179    Capturing subpattern count = 3
4180    Max back reference = 1
4181    Options: dotall
4182    No first char
4183    Need char = 'z'
4184    
4185    /((.*)a|(.*)b)z\2/sI
4186    Capturing subpattern count = 3
4187    Max back reference = 2
4188    Options: dotall
4189    No first char
4190    Need char = 'z'
4191    
4192    /((.*)a|(.*)b)z\3/sI
4193    Capturing subpattern count = 3
4194    Max back reference = 3
4195    Options: dotall
4196    No first char
4197    Need char = 'z'
4198    
4199    /((.*)a|^(.*)b)z\3/sI
4200    Capturing subpattern count = 3
4201    Max back reference = 3
4202    Options: anchored dotall
4203    No first char
4204    Need char = 'z'
4205    
4206    /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/sI
4207    Capturing subpattern count = 31
4208    Options: anchored dotall
4209    No first char
4210    No need char
4211    
4212    /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/sI
4213    Capturing subpattern count = 31
4214    Max back reference = 31
4215    Options: dotall
4216    No first char
4217    No need char
4218    
4219    /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/sI
4220    Capturing subpattern count = 32
4221    Max back reference = 32
4222    Options: dotall
4223    No first char
4224    No need char
4225    
4226    /(a)(bc)/ND
4227    ------------------------------------------------------------------
4228      0  22 Bra 0
4229      3   6 Bra 0
4230      6   1 a
4231      9   6 Ket
4232     12   7 Bra 0
4233     15   2 bc
4234     19   7 Ket
4235     22  22 Ket
4236     25     End
4237    ------------------------------------------------------------------
4238    Capturing subpattern count = 0
4239    Options:
4240    First char = 'a'
4241    Need char = 'c'
4242      abc
4243     0: abc
4244    
4245    /(?P<one>a)(bc)/ND
4246    ------------------------------------------------------------------
4247      0  22 Bra 0
4248      3   6 Bra 1
4249      6   1 a
4250      9   6 Ket
4251     12   7 Bra 0
4252     15   2 bc
4253     19   7 Ket
4254     22  22 Ket
4255     25     End
4256    ------------------------------------------------------------------
4257    Capturing subpattern count = 1
4258    Named capturing subpatterns:
4259      one   1
4260    Options:
4261    First char = 'a'
4262    Need char = 'c'
4263      abc
4264     0: abc
4265     1: a
4266    
4267    /(a)(?P<named>bc)/ND
4268    ------------------------------------------------------------------
4269      0  22 Bra 0
4270      3   6 Bra 0
4271      6   1 a
4272      9   6 Ket
4273     12   7 Bra 1
4274     15   2 bc
4275     19   7 Ket
4276     22  22 Ket
4277     25     End
4278    ------------------------------------------------------------------
4279    Capturing subpattern count = 1
4280    Named capturing subpatterns:
4281      named   1
4282    Options:
4283    First char = 'a'
4284    Need char = 'c'
4285    
4286    /(a+)*zz/
4287    Capturing subpattern count = 1
4288    No options
4289    No first char
4290    Need char = 'z'
4291      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
4292    Minimum match limit = 8
4293     0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
4294     1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4295      aaaaaaaaaaaaaz\M
4296    Minimum match limit = 32768
4297    No match
4298    
4299    /(aaa(?C1)bbb|ab)/
4300    Capturing subpattern count = 1
4301    No options
4302    First char = 'a'
4303    Need char = 'b'
4304       aaabbb
4305    --->aaabbb
4306      1 ^  ^
4307     0: aaabbb
4308     1: aaabbb
4309       aaabbb\C*0
4310    --->aaabbb
4311      1 ^  ^
4312     0: aaabbb
4313     1: aaabbb
4314       aaabbb\C*1
4315    --->aaabbb
4316      1 ^  ^
4317    Callout data = 1
4318     0: ab
4319     1: ab
4320       aaabbb\C*-1
4321    --->aaabbb
4322      1 ^  ^
4323    Callout data = -1
4324    No match
4325    
4326    /ab(?P<one>cd)ef(?P<two>gh)/
4327    Capturing subpattern count = 2
4328    Named capturing subpatterns:
4329      one   1
4330      two   2
4331    No options
4332    First char = 'a'
4333    Need char = 'h'
4334        abcdefgh
4335     0: abcdefgh
4336     1: cd
4337     2: gh
4338        abcdefgh\C1\Gtwo
4339     0: abcdefgh
4340     1: cd
4341     2: gh
4342     1C cd (2)
4343     2G gh (2)
4344        abcdefgh\Cone\Ctwo
4345     0: abcdefgh
4346     1: cd
4347     2: gh
4348     1C cd (2)
4349     2C gh (2)
4350        abcdefgh\Cthree
4351    no parentheses with name "three"
4352     0: abcdefgh
4353     1: cd
4354     2: gh
4355    
4356    /(?P<Tes>)(?P<Test>)/D
4357    ------------------------------------------------------------------
4358      0  15 Bra 0
4359      3   3 Bra 1
4360      6   3 Ket
4361      9   3 Bra 2
4362     12   3 Ket
4363     15  15 Ket
4364     18     End
4365    ------------------------------------------------------------------
4366    Capturing subpattern count = 2
4367    Named capturing subpatterns:
4368      Tes    1
4369      Test   2
4370    No options
4371    No first char
4372    No need char
4373    
4374    /(?P<Test>)(?P<Tes>)/D
4375    ------------------------------------------------------------------
4376      0  15 Bra 0
4377      3   3 Bra 1
4378      6   3 Ket
4379      9   3 Bra 2
4380     12   3 Ket
4381     15  15 Ket
4382     18     End
4383    ------------------------------------------------------------------
4384    Capturing subpattern count = 2
4385    Named capturing subpatterns:
4386      Tes    2
4387      Test   1
4388    No options
4389    No first char
4390    No need char
4391    
4392    /(?P<Z>zz)(?P<A>aa)/
4393    Capturing subpattern count = 2
4394    Named capturing subpatterns:
4395      A   2
4396      Z   1
4397    No options
4398    First char = 'z'
4399    Need char = 'a'
4400        zzaa\CZ
4401     0: zzaa
4402     1: zz
4403     2: aa
4404     1C zz (2)
4405        zzaa\CA
4406     0: zzaa
4407     1: zz
4408     2: aa
4409     2C aa (2)
4410    
4411    /(?P<x>eks)(?P<x>eccs)/
4412    Failed: two named groups have the same name at offset 16
4413    
4414    /(?P<abc>abc(?P<def>def)(?P<abc>xyz))/
4415    Failed: two named groups have the same name at offset 31
4416    
4417  / End of test input /  / End of testinput2 /
4418  Identifying subpattern count = 0  Capturing subpattern count = 0
4419  No options  No options
4420  First char = ' '  First char = ' '
4421  Req char = ' '  Need char = ' '
4422    

Legend:
Removed from v.41  
changed lines
  Added in v.69

  ViewVC Help
Powered by ViewVC 1.1.5