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