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

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

  ViewVC Help
Powered by ViewVC 1.1.5