/[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 428 by ph10, Mon Aug 31 17:10:26 2009 UTC revision 621 by ph10, Mon Jul 18 10:14:09 2011 UTC
# Line 1  Line 1 
1    /-- This set of tests is not Perl-compatible. It checks on special features
2        of PCRE's API, error diagnostics, and the compiled code of some patterns.
3        It also checks the non-Perl syntax the PCRE supports (Python, .NET,
4        Oniguruma). Finally, there are some tests where PCRE and Perl differ,
5        either because PCRE can't be compatible, or there is a possible Perl
6        bug. --/
7    
8    /-- Originally, the Perl >= 5.10 things were in here too, but now I have
9        separated many (most?) of them out into test 11. However, there may still
10        be some that were overlooked. --/
11    
12  /(a)b|/I  /(a)b|/I
13  Capturing subpattern count = 1  Capturing subpattern count = 1
14  No options  No options
# Line 92  Failed: missing terminating ] for charac Line 103  Failed: missing terminating ] for charac
103  /(?X)[\B]/  /(?X)[\B]/
104  Failed: invalid escape sequence in character class at offset 6  Failed: invalid escape sequence in character class at offset 6
105    
106    /(?X)[\R]/
107    Failed: invalid escape sequence in character class at offset 6
108    
109    /(?X)[\X]/
110    Failed: invalid escape sequence in character class at offset 6
111    
112    /[\B]/BZ
113    ------------------------------------------------------------------
114            Bra
115            B
116            Ket
117            End
118    ------------------------------------------------------------------
119    
120    /[\R]/BZ
121    ------------------------------------------------------------------
122            Bra
123            R
124            Ket
125            End
126    ------------------------------------------------------------------
127    
128    /[\X]/BZ
129    ------------------------------------------------------------------
130            Bra
131            X
132            Ket
133            End
134    ------------------------------------------------------------------
135    
136  /[z-a]/  /[z-a]/
137  Failed: range out of order in character class at offset 3  Failed: range out of order in character class at offset 3
138    
# Line 134  Capturing subpattern count = 0 Line 175  Capturing subpattern count = 0
175  No options  No options
176  No first char  No first char
177  No need char  No need char
178    Subject length lower bound = 3
179  Starting byte set: c d e  Starting byte set: c d e
180      this sentence eventually mentions a cat      this sentence eventually mentions a cat
181   0: cat   0: cat
# Line 145  Capturing subpattern count = 0 Line 187  Capturing subpattern count = 0
187  Options: caseless  Options: caseless
188  No first char  No first char
189  No need char  No need char
190    Subject length lower bound = 3
191  Starting byte set: C D E c d e  Starting byte set: C D E c d e
192      this sentence eventually mentions a CAT cat      this sentence eventually mentions a CAT cat
193   0: CAT   0: CAT
# Line 156  Capturing subpattern count = 0 Line 199  Capturing subpattern count = 0
199  No options  No options
200  No first char  No first char
201  No need char  No need char
202    Subject length lower bound = 1
203  Starting byte set: a b c d  Starting byte set: a b c d
204    
205  /(a|[^\dZ])/IS  /(a|[^\dZ])/IS
# Line 163  Capturing subpattern count = 1 Line 207  Capturing subpattern count = 1
207  No options  No options
208  No first char  No first char
209  No need char  No need char
210    Subject length lower bound = 1
211  Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a  Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
212    \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
213    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
# Line 183  Capturing subpattern count = 1 Line 228  Capturing subpattern count = 1
228  No options  No options
229  No first char  No first char
230  No need char  No need char
231    Subject length lower bound = 1
232  Starting byte set: \x09 \x0a \x0c \x0d \x20 a b  Starting byte set: \x09 \x0a \x0c \x0d \x20 a b
233    
234  /(ab\2)/  /(ab\2)/
# Line 331  No need char Line 377  No need char
377   2: <unset>   2: <unset>
378   3: def   3: def
379    
380  /abc/IP  /abc/P
381      abc      abc
382   0: abc   0: abc
383      *** Failers      *** Failers
384  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
385    
386  /^abc|def/IP  /^abc|def/P
387      abcdef      abcdef
388   0: abc   0: abc
389      abcdef\B      abcdef\B
390   0: def   0: def
391    
392  /.*((abc)$|(def))/IP  /.*((abc)$|(def))/P
393      defabc      defabc
394   0: defabc   0: defabc
395   1: abc   1: abc
# Line 353  No match: POSIX code 17: match failed Line 399  No match: POSIX code 17: match failed
399   1: def   1: def
400   3: def   3: def
401    
402  /the quick brown fox/IP  /the quick brown fox/P
403      the quick brown fox      the quick brown fox
404   0: the quick brown fox   0: the quick brown fox
405      *** Failers      *** Failers
# Line 361  No match: POSIX code 17: match failed Line 407  No match: POSIX code 17: match failed
407      The Quick Brown Fox      The Quick Brown Fox
408  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
409    
410  /the quick brown fox/IPi  /the quick brown fox/Pi
411      the quick brown fox      the quick brown fox
412   0: the quick brown fox   0: the quick brown fox
413      The Quick Brown Fox      The Quick Brown Fox
414   0: The Quick Brown Fox   0: The Quick Brown Fox
415    
416  /abc.def/IP  /abc.def/P
417      *** Failers      *** Failers
418  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
419      abc\ndef      abc\ndef
420  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
421    
422  /abc$/IP  /abc$/P
423      abc      abc
424   0: abc   0: abc
425      abc\n      abc\n
426   0: abc   0: abc
427    
428  /(abc)\2/IP  /(abc)\2/P
429  Failed: POSIX code 15: bad back reference at offset 7  Failed: POSIX code 15: bad back reference at offset 7
430    
431  /(abc\1)/IP  /(abc\1)/P
432      abc      abc
433  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
434    
# Line 516  Capturing subpattern count = 0 Line 562  Capturing subpattern count = 0
562  No options  No options
563  No first char  No first char
564  No need char  No need char
565    Subject length lower bound = 1
566  Starting byte set: a b c d  Starting byte set: a b c d
567    
568  /(?i)[abcd]/IS  /(?i)[abcd]/IS
# Line 523  Capturing subpattern count = 0 Line 570  Capturing subpattern count = 0
570  Options: caseless  Options: caseless
571  No first char  No first char
572  No need char  No need char
573    Subject length lower bound = 1
574  Starting byte set: A B C D a b c d  Starting byte set: A B C D a b c d
575    
576  /(?m)[xy]|(b|c)/IS  /(?m)[xy]|(b|c)/IS
# Line 530  Capturing subpattern count = 1 Line 578  Capturing subpattern count = 1
578  Options: multiline  Options: multiline
579  No first char  No first char
580  No need char  No need char
581    Subject length lower bound = 1
582  Starting byte set: b c x y  Starting byte set: b c x y
583    
584  /(^a|^b)/Im  /(^a|^b)/Im
# Line 583  Need char = 'h' (caseless) Line 632  Need char = 'h' (caseless)
632  ------------------------------------------------------------------  ------------------------------------------------------------------
633          Bra          Bra
634          CBra 1          CBra 1
635       01 Opt       /i b
      NC b  
636          Ket          Ket
      00 Opt  
637          Ket          Ket
638          End          End
639  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 594  Capturing subpattern count = 1 Line 641  Capturing subpattern count = 1
641  No options  No options
642  First char = 'b' (caseless)  First char = 'b' (caseless)
643  No need char  No need char
644  Study returned NULL  Subject length lower bound = 1
645    No set of starting bytes
646    
647  /(a*b|(?i:c*(?-i)d))/IS  /(a*b|(?i:c*(?-i)d))/IS
648  Capturing subpattern count = 1  Capturing subpattern count = 1
649  No options  No options
650  No first char  No first char
651  No need char  No need char
652    Subject length lower bound = 1
653  Starting byte set: C a b c d  Starting byte set: C a b c d
654    
655  /a$/I  /a$/I
# Line 665  Capturing subpattern count = 0 Line 714  Capturing subpattern count = 0
714  No options  No options
715  No first char  No first char
716  No need char  No need char
717    Subject length lower bound = 1
718  Starting byte set: a b  Starting byte set: a b
719    
720  /(?<!foo)(alpha|omega)/IS  /(?<!foo)(alpha|omega)/IS
# Line 672  Capturing subpattern count = 1 Line 722  Capturing subpattern count = 1
722  No options  No options
723  No first char  No first char
724  Need char = 'a'  Need char = 'a'
725    Subject length lower bound = 5
726  Starting byte set: a o  Starting byte set: a o
727    
728  /(?!alphabet)[ab]/IS  /(?!alphabet)[ab]/IS
# Line 679  Capturing subpattern count = 0 Line 730  Capturing subpattern count = 0
730  No options  No options
731  No first char  No first char
732  No need char  No need char
733    Subject length lower bound = 1
734  Starting byte set: a b  Starting byte set: a b
735    
736  /(?<=foo\n)^bar/Im  /(?<=foo\n)^bar/Im
# Line 833  No match Line 885  No match
885      a      a
886  No match  No match
887    
888  /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I  /This one is here because Perl behaves differently; see also the following/I
889  Capturing subpattern count = 0  Capturing subpattern count = 0
890  No options  No options
891  First char = 'T'  First char = 'T'
# Line 845  Max back reference = 1 Line 897  Max back reference = 1
897  Options: anchored  Options: anchored
898  No first char  No first char
899  No need char  No need char
900        aaaa
901    No match
902      aaaaaa      aaaaaa
903   0: aaaaaa  No match
904   1: aa  
905    /Perl does not fail these two for the final subjects. Neither did PCRE until/
906    /release 8.01. The problem is in backtracking into a subpattern that contains/
907    No match
908    /a recursive reference to itself. PCRE has now made these into atomic patterns./
909    No match
910    
911    /^(xa|=?\1a){2}$/
912        xa=xaa
913     0: xa=xaa
914     1: =xaa
915        ** Failers
916    No match
917        xa=xaaa
918    No match
919    
920    /^(xa|=?\1a)+$/
921        xa=xaa
922     0: xa=xaa
923     1: =xaa
924        ** Failers
925    No match
926        xa=xaaa
927    No match
928    
929  /These are syntax tests from Perl 5.005/I  /These are syntax tests from Perl 5.005/I
930  Capturing subpattern count = 0  Capturing subpattern count = 0
# Line 1168  No need char Line 1245  No need char
1245  ------------------------------------------------------------------  ------------------------------------------------------------------
1246          Bra          Bra
1247          Bra          Bra
      04 Opt  
1248          AllAny*          AllAny*
1249          X          X
1250          Alt          Alt
      04 Opt  
1251          ^          ^
1252          B          B
1253          Ket          Ket
      00 Opt  
1254          Ket          Ket
1255          End          End
1256  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1615  No need char Line 1689  No need char
1689      \Nabc      \Nabc
1690  No match  No match
1691    
1692  /a*(b+)(z)(z)/IP  /a*(b+)(z)(z)/P
1693      aaaabbbbzzzz      aaaabbbbzzzz
1694   0: aaaabbbbzz   0: aaaabbbbzz
1695   1: bbbb   1: bbbb
# Line 1647  Capturing subpattern count = 0 Line 1721  Capturing subpattern count = 0
1721  Options: anchored  Options: anchored
1722  No first char  No first char
1723  Need char = 'd'  Need char = 'd'
1724  Study returned NULL  Subject length lower bound = 4
1725    No set of starting bytes
1726    
1727  /\(             # ( at start  /\(             # ( at start
1728    (?:           # Non-capturing bracket    (?:           # Non-capturing bracket
# Line 1805  Need char = ')' Line 1880  Need char = ')'
1880   0: (abcd(xyz<p>qrs)123)   0: (abcd(xyz<p>qrs)123)
1881   1: abcd(xyz<p>qrs)123   1: abcd(xyz<p>qrs)123
1882   2: 123   2: 123
  3: <unset>  
1883    
1884  /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix  /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
1885  Capturing subpattern count = 3  Capturing subpattern count = 3
# Line 1880  Capturing subpattern count = 0 Line 1954  Capturing subpattern count = 0
1954  No options  No options
1955  No first char  No first char
1956  No need char  No need char
1957    Subject length lower bound = 1
1958  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  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
1959    _ 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    _ 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
1960    
# Line 1941  Contains explicit CR or LF match Line 2016  Contains explicit CR or LF match
2016  No options  No options
2017  No first char  No first char
2018  No need char  No need char
2019    Subject length lower bound = 1
2020  Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20  Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
2021    
2022  /^[[:cntrl:]]/DZ  /^[[:cntrl:]]/DZ
# Line 2683  No need char Line 2759  No need char
2759  ------------------------------------------------------------------  ------------------------------------------------------------------
2760          Bra          Bra
2761          a          a
2762       01 Opt       /i b
      NC b  
2763          Ket          Ket
2764          End          End
2765  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 2706  No match Line 2781  No match
2781          Bra          Bra
2782          CBra 1          CBra 1
2783          a          a
2784       01 Opt       /i b
      NC b  
2785          Ket          Ket
      00 Opt  
2786          Ket          Ket
2787          End          End
2788  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 2731  No match Line 2804  No match
2804  /   (?i)abc/IxDZ  /   (?i)abc/IxDZ
2805  ------------------------------------------------------------------  ------------------------------------------------------------------
2806          Bra          Bra
2807       NC abc       /i abc
2808          Ket          Ket
2809          End          End
2810  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 2744  Need char = 'c' (caseless) Line 2817  Need char = 'c' (caseless)
2817    (?i)abc/IxDZ    (?i)abc/IxDZ
2818  ------------------------------------------------------------------  ------------------------------------------------------------------
2819          Bra          Bra
2820       NC abc       /i abc
2821          Ket          Ket
2822          End          End
2823  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 2917  No need char Line 2990  No need char
2990  /(x)*+/DZ  /(x)*+/DZ
2991  ------------------------------------------------------------------  ------------------------------------------------------------------
2992          Bra          Bra
2993          Once          Braposzero
2994          Brazero          CBraPos 1
         CBra 1  
2995          x          x
2996          KetRmax          KetRpos
         Ket  
2997          Ket          Ket
2998          End          End
2999  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 3147  Failed: POSIX collating elements are not Line 3218  Failed: POSIX collating elements are not
3218  Failed: POSIX named classes are supported only within a class at offset 0  Failed: POSIX named classes are supported only within a class at offset 0
3219    
3220  /\l/I  /\l/I
3221  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3222    
3223  /\L/I  /\L/I
3224  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3225    
3226  /\N{name}/I  /\N{name}/I
3227  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3228    
3229  /\u/I  /\u/I
3230  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3231    
3232  /\U/I  /\U/I
3233  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3234    
3235  /[/I  /[/I
3236  Failed: missing terminating ] for character class at offset 1  Failed: missing terminating ] for character class at offset 1
# Line 3411  Capturing subpattern count = 0 Line 3482  Capturing subpattern count = 0
3482  No options  No options
3483  No first char  No first char
3484  No need char  No need char
3485    Subject length lower bound = 1
3486  Starting byte set: a b  Starting byte set: a b
3487    
3488  /[^a]/I  /[^a]/I
# Line 3430  Capturing subpattern count = 0 Line 3502  Capturing subpattern count = 0
3502  No options  No options
3503  No first char  No first char
3504  Need char = '6'  Need char = '6'
3505    Subject length lower bound = 4
3506  Starting byte set: 0 1 2 3 4 5 6 7 8 9  Starting byte set: 0 1 2 3 4 5 6 7 8 9
3507    
3508  /a^b/I  /a^b/I
# Line 3463  Capturing subpattern count = 0 Line 3536  Capturing subpattern count = 0
3536  Options: caseless  Options: caseless
3537  No first char  No first char
3538  No need char  No need char
3539    Subject length lower bound = 1
3540  Starting byte set: A B a b  Starting byte set: A B a b
3541    
3542  /[ab](?i)cd/IS  /[ab](?i)cd/IS
# Line 3470  Capturing subpattern count = 0 Line 3544  Capturing subpattern count = 0
3544  No options  No options
3545  No first char  No first char
3546  Need char = 'd' (caseless)  Need char = 'd' (caseless)
3547    Subject length lower bound = 3
3548  Starting byte set: a b  Starting byte set: a b
3549    
3550  /abc(?C)def/I  /abc(?C)def/I
# Line 3505  Need char = 'f' Line 3580  Need char = 'f'
3580    1    ^    ^     f    1    ^    ^     f
3581   0: abcdef   0: abcdef
3582    
3583  /(?C1)\dabc(?C2)def/I  /(?C1)\dabc(?C2)def/IS
3584    Capturing subpattern count = 0
3585    No options
3586    No first char
3587    Need char = 'f'
3588    Subject length lower bound = 7
3589    Starting byte set: 0 1 2 3 4 5 6 7 8 9
3590        1234abcdef
3591    --->1234abcdef
3592      1 ^              \d
3593      1  ^             \d
3594      1   ^            \d
3595      1    ^           \d
3596      2    ^   ^       d
3597     0: 4abcdef
3598        *** Failers
3599    No match
3600        abcdef
3601    No match
3602    
3603    /(?C1)\dabc(?C2)def/ISS
3604  Capturing subpattern count = 0  Capturing subpattern count = 0
3605  No options  No options
3606  No first char  No first char
# Line 3820  Capturing subpattern count = 0 Line 3915  Capturing subpattern count = 0
3915  No options  No options
3916  No first char  No first char
3917  No need char  No need char
3918    Subject length lower bound = 1
3919  Starting byte set: a b  Starting byte set: a b
3920    
3921  /(?R)/I  /(?R)/I
# Line 3908  Need char = '<' Line 4004  Need char = '<'
4004          Bra          Bra
4005          CBra 1          CBra 1
4006          a          a
         Once  
4007          Recurse          Recurse
         Ket  
4008          b          b
4009          Ket          Ket
4010          Ket          Ket
# Line 3939  No options Line 4033  No options
4033  First char = 'a'  First char = 'a'
4034  Need char = 'b'  Need char = 'b'
4035    
 /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/Ii  
 Capturing subpattern count = 4  
 Max back reference = 4  
 Options: anchored caseless  
 No first char  
 No need char  
     1221  
  0: 1221  
  1: 1221  
  2: 1  
     Satan, oscillate my metallic sonatas!  
  0: Satan, oscillate my metallic sonatas!  
  1: <unset>  
  2: <unset>  
  3: Satan, oscillate my metallic sonatas  
  4: S  
     A man, a plan, a canal: Panama!  
  0: A man, a plan, a canal: Panama!  
  1: <unset>  
  2: <unset>  
  3: A man, a plan, a canal: Panama  
  4: A  
     Able was I ere I saw Elba.  
  0: Able was I ere I saw Elba.  
  1: <unset>  
  2: <unset>  
  3: Able was I ere I saw Elba  
  4: A  
     *** Failers  
 No match  
     The quick brown fox  
 No match  
   
4036  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
4037  Capturing subpattern count = 2  Capturing subpattern count = 2
4038  Options: anchored  Options: anchored
# Line 4164  Need char = 'a' Line 4225  Need char = 'a'
4225          Any          Any
4226          \1          \1
4227          bbb          bbb
         Once  
4228          Recurse          Recurse
         Ket  
4229          d          d
4230          Ket          Ket
4231          End          End
# Line 4371  No first char Line 4430  No first char
4430  Need char = 'z'  Need char = 'z'
4431    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
4432  Minimum match() limit = 8  Minimum match() limit = 8
4433  Minimum match() recursion limit = 6  Minimum match() recursion limit = 7
4434   0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz   0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
4435   1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa   1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4436    aaaaaaaaaaaaaz\M    aaaaaaaaaaaaaz\M
4437  Minimum match() limit = 32768  Minimum match() limit = 32768
4438  Minimum match() recursion limit = 42  Minimum match() recursion limit = 43
4439  No match  No match
4440    
4441  /(aaa(?C1)bbb|ab)/I  /(aaa(?C1)bbb|ab)/I
# Line 4538  Need char = ']' Line 4597  Need char = ']'
4597          a          a
4598          CBra 2          CBra 2
4599          b          b
         Once  
4600          Recurse          Recurse
         Ket  
4601          c          c
4602          Ket          Ket
4603          Ket          Ket
# Line 4560  No need char Line 4617  No need char
4617          a          a
4618          CBra 2          CBra 2
4619          b          b
         Once  
4620          Recurse          Recurse
         Ket  
4621          c          c
4622          Ket          Ket
4623          KetRmax          KetRmax
# Line 4583  No need char Line 4638  No need char
4638          a          a
4639          CBra 2          CBra 2
4640          b          b
         Once  
4641          Recurse          Recurse
         Ket  
4642          c          c
4643          Ket          Ket
4644          Ket          Ket
# Line 4594  No need char Line 4647  No need char
4647          a          a
4648          CBra 2          CBra 2
4649          b          b
         Once  
4650          Recurse          Recurse
         Ket  
4651          c          c
4652          Ket          Ket
4653          Ket          Ket
# Line 4637  Capturing subpattern count = 3 Line 4688  Capturing subpattern count = 3
4688  Options: caseless  Options: caseless
4689  No first char  No first char
4690  Need char = 'g' (caseless)  Need char = 'g' (caseless)
4691  Study returned NULL  Subject length lower bound = 8
4692    No set of starting bytes
4693       Baby Bjorn Active Carrier - With free SHIPPING!!       Baby Bjorn Active Carrier - With free SHIPPING!!
4694   0: Baby Bjorn Active Carrier - With free SHIPPING!!   0: Baby Bjorn Active Carrier - With free SHIPPING!!
4695   1: Baby Bjorn Active Carrier - With free SHIPPING!!   1: Baby Bjorn Active Carrier - With free SHIPPING!!
# Line 4655  Capturing subpattern count = 0 Line 4707  Capturing subpattern count = 0
4707  No options  No options
4708  No first char  No first char
4709  Need char = 'b'  Need char = 'b'
4710  Study returned NULL  Subject length lower bound = 1
4711    No set of starting bytes
4712    
4713  /(a|b)*.?c/ISDZ  /(a|b)*.?c/ISDZ
4714  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 4675  Capturing subpattern count = 1 Line 4728  Capturing subpattern count = 1
4728  No options  No options
4729  No first char  No first char
4730  Need char = 'c'  Need char = 'c'
4731  Study returned NULL  Subject length lower bound = 1
4732    No set of starting bytes
4733    
4734  /abc(?C255)de(?C)f/DZ  /abc(?C255)de(?C)f/DZ
4735  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 4732  Need char = 'e' Line 4786  Need char = 'e'
4786   +4 ^   ^      e   +4 ^   ^      e
4787  No match  No match
4788    
4789  /a*b/ICDZ  /a*b/ICDZS
4790    ------------------------------------------------------------------
4791            Bra
4792            Callout 255 0 2
4793            a*+
4794            Callout 255 2 1
4795            b
4796            Callout 255 3 0
4797            Ket
4798            End
4799    ------------------------------------------------------------------
4800    Capturing subpattern count = 0
4801    Options:
4802    No first char
4803    Need char = 'b'
4804    Subject length lower bound = 1
4805    Starting byte set: a b
4806      ab
4807    --->ab
4808     +0 ^      a*
4809     +2 ^^     b
4810     +3 ^ ^
4811     0: ab
4812      aaaab
4813    --->aaaab
4814     +0 ^         a*
4815     +2 ^   ^     b
4816     +3 ^    ^
4817     0: aaaab
4818      aaaacb
4819    --->aaaacb
4820     +0 ^          a*
4821     +2 ^   ^      b
4822     +0  ^         a*
4823     +2  ^  ^      b
4824     +0   ^        a*
4825     +2   ^ ^      b
4826     +0    ^       a*
4827     +2    ^^      b
4828     +0      ^     a*
4829     +2      ^     b
4830     +3      ^^
4831     0: b
4832    
4833    /a*b/ICDZSS
4834  ------------------------------------------------------------------  ------------------------------------------------------------------
4835          Bra          Bra
4836          Callout 255 0 2          Callout 255 0 2
# Line 4815  Need char = 'b' Line 4913  Need char = 'b'
4913   +2    ^^      b   +2    ^^      b
4914  No match  No match
4915    
4916  /(abc|def)x/ICDZ  /(abc|def)x/ICDZS
4917    ------------------------------------------------------------------
4918            Bra
4919            Callout 255 0 9
4920            CBra 1
4921            Callout 255 1 1
4922            a
4923            Callout 255 2 1
4924            b
4925            Callout 255 3 1
4926            c
4927            Callout 255 4 0
4928            Alt
4929            Callout 255 5 1
4930            d
4931            Callout 255 6 1
4932            e
4933            Callout 255 7 1
4934            f
4935            Callout 255 8 0
4936            Ket
4937            Callout 255 9 1
4938            x
4939            Callout 255 10 0
4940            Ket
4941            End
4942    ------------------------------------------------------------------
4943    Capturing subpattern count = 1
4944    Options:
4945    No first char
4946    Need char = 'x'
4947    Subject length lower bound = 4
4948    Starting byte set: a d
4949      abcx
4950    --->abcx
4951     +0 ^        (abc|def)
4952     +1 ^        a
4953     +2 ^^       b
4954     +3 ^ ^      c
4955     +4 ^  ^     |
4956     +9 ^  ^     x
4957    +10 ^   ^
4958     0: abcx
4959     1: abc
4960      defx
4961    --->defx
4962     +0 ^        (abc|def)
4963     +1 ^        a
4964     +5 ^        d
4965     +6 ^^       e
4966     +7 ^ ^      f
4967     +8 ^  ^     )
4968     +9 ^  ^     x
4969    +10 ^   ^
4970     0: defx
4971     1: def
4972      ** Failers
4973    No match
4974      abcdefzx
4975    --->abcdefzx
4976     +0 ^            (abc|def)
4977     +1 ^            a
4978     +2 ^^           b
4979     +3 ^ ^          c
4980     +4 ^  ^         |
4981     +9 ^  ^         x
4982     +5 ^            d
4983     +0    ^         (abc|def)
4984     +1    ^         a
4985     +5    ^         d
4986     +6    ^^        e
4987     +7    ^ ^       f
4988     +8    ^  ^      )
4989     +9    ^  ^      x
4990    No match
4991    
4992    /(abc|def)x/ICDZSS
4993  ------------------------------------------------------------------  ------------------------------------------------------------------
4994          Bra          Bra
4995          Callout 255 0 9          Callout 255 0 9
# Line 4869  Need char = 'x' Line 5043  Need char = 'x'
5043  +10 ^   ^  +10 ^   ^
5044   0: defx   0: defx
5045   1: def   1: def
5046      ** Failers
5047    No match
5048    abcdefzx    abcdefzx
5049  --->abcdefzx  --->abcdefzx
5050   +0 ^            (abc|def)   +0 ^            (abc|def)
# Line 4969  No need char Line 5145  No need char
5145   0: abcdcdcd   0: abcdcdcd
5146   1: cd   1: cd
5147    
5148  /([ab]{,4}c|xy)/ICDZ  /([ab]{,4}c|xy)/ICDZS
5149  ------------------------------------------------------------------  ------------------------------------------------------------------
5150          Bra          Bra
5151          Callout 255 0 14          Callout 255 0 14
# Line 5002  Capturing subpattern count = 1 Line 5178  Capturing subpattern count = 1
5178  Options:  Options:
5179  No first char  No first char
5180  No need char  No need char
5181    Subject length lower bound = 2
5182    Starting byte set: a b x
5183      Note: that { does NOT introduce a quantifier      Note: that { does NOT introduce a quantifier
5184  --->Note: that { does NOT introduce a quantifier  --->Note: that { does NOT introduce a quantifier
  +0 ^                                                ([ab]{,4}c|xy)  
  +1 ^                                                [ab]  
 +11 ^                                                x  
  +0  ^                                               ([ab]{,4}c|xy)  
  +1  ^                                               [ab]  
 +11  ^                                               x  
  +0   ^                                              ([ab]{,4}c|xy)  
  +1   ^                                              [ab]  
 +11   ^                                              x  
  +0    ^                                             ([ab]{,4}c|xy)  
  +1    ^                                             [ab]  
 +11    ^                                             x  
  +0     ^                                            ([ab]{,4}c|xy)  
  +1     ^                                            [ab]  
 +11     ^                                            x  
  +0      ^                                           ([ab]{,4}c|xy)  
  +1      ^                                           [ab]  
 +11      ^                                           x  
  +0       ^                                          ([ab]{,4}c|xy)  
  +1       ^                                          [ab]  
 +11       ^                                          x  
  +0        ^                                         ([ab]{,4}c|xy)  
  +1        ^                                         [ab]  
 +11        ^                                         x  
5185   +0         ^                                        ([ab]{,4}c|xy)   +0         ^                                        ([ab]{,4}c|xy)
5186   +1         ^                                        [ab]   +1         ^                                        [ab]
5187   +5         ^^                                       {   +5         ^^                                       {
5188  +11         ^                                        x  +11         ^                                        x
5189   +0          ^                                       ([ab]{,4}c|xy)   +0                                 ^                ([ab]{,4}c|xy)
5190   +1          ^                                       [ab]   +1                                 ^                [ab]
5191  +11          ^                                       x   +5                                 ^^               {
5192   +0           ^                                      ([ab]{,4}c|xy)  +11                                 ^                x
5193   +1           ^                                      [ab]   +0                                     ^            ([ab]{,4}c|xy)
5194  +11           ^                                      x   +1                                     ^            [ab]
5195   +0            ^                                     ([ab]{,4}c|xy)   +5                                     ^^           {
5196    +11                                     ^            x
5197    No match
5198    
5199    /([ab]{,4}c|xy)/ICDZSS
5200    ------------------------------------------------------------------
5201            Bra
5202            Callout 255 0 14
5203            CBra 1
5204            Callout 255 1 4
5205            [ab]
5206            Callout 255 5 1
5207            {
5208            Callout 255 6 1
5209            ,
5210            Callout 255 7 1
5211            4
5212            Callout 255 8 1
5213            }
5214            Callout 255 9 1
5215            c
5216            Callout 255 10 0
5217            Alt
5218            Callout 255 11 1
5219            x
5220            Callout 255 12 1
5221            y
5222            Callout 255 13 0
5223            Ket
5224            Callout 255 14 0
5225            Ket
5226            End
5227    ------------------------------------------------------------------
5228    Capturing subpattern count = 1
5229    Options:
5230    No first char
5231    No need char
5232        Note: that { does NOT introduce a quantifier
5233    --->Note: that { does NOT introduce a quantifier
5234     +0 ^                                                ([ab]{,4}c|xy)
5235     +1 ^                                                [ab]
5236    +11 ^                                                x
5237     +0  ^                                               ([ab]{,4}c|xy)
5238     +1  ^                                               [ab]
5239    +11  ^                                               x
5240     +0   ^                                              ([ab]{,4}c|xy)
5241     +1   ^                                              [ab]
5242    +11   ^                                              x
5243     +0    ^                                             ([ab]{,4}c|xy)
5244     +1    ^                                             [ab]
5245    +11    ^                                             x
5246     +0     ^                                            ([ab]{,4}c|xy)
5247     +1     ^                                            [ab]
5248    +11     ^                                            x
5249     +0      ^                                           ([ab]{,4}c|xy)
5250     +1      ^                                           [ab]
5251    +11      ^                                           x
5252     +0       ^                                          ([ab]{,4}c|xy)
5253     +1       ^                                          [ab]
5254    +11       ^                                          x
5255     +0        ^                                         ([ab]{,4}c|xy)
5256     +1        ^                                         [ab]
5257    +11        ^                                         x
5258     +0         ^                                        ([ab]{,4}c|xy)
5259     +1         ^                                        [ab]
5260     +5         ^^                                       {
5261    +11         ^                                        x
5262     +0          ^                                       ([ab]{,4}c|xy)
5263     +1          ^                                       [ab]
5264    +11          ^                                       x
5265     +0           ^                                      ([ab]{,4}c|xy)
5266     +1           ^                                      [ab]
5267    +11           ^                                      x
5268     +0            ^                                     ([ab]{,4}c|xy)
5269   +1            ^                                     [ab]   +1            ^                                     [ab]
5270  +11            ^                                     x  +11            ^                                     x
5271   +0             ^                                    ([ab]{,4}c|xy)   +0             ^                                    ([ab]{,4}c|xy)
# Line 5421  No match Line 5648  No match
5648      123456\P      123456\P
5649  No match  No match
5650    
5651  /abc/I>testsavedregex  /abc/IS>testsavedregex
5652    Capturing subpattern count = 0
5653    No options
5654    First char = 'a'
5655    Need char = 'c'
5656    Subject length lower bound = 3
5657    No set of starting bytes
5658    Compiled pattern written to testsavedregex
5659    Study data written to testsavedregex
5660    <testsavedregex
5661    Compiled pattern loaded from testsavedregex
5662    Study data loaded from testsavedregex
5663        abc
5664     0: abc
5665        ** Failers
5666    No match
5667        bca
5668    No match
5669    
5670    /abc/ISS>testsavedregex
5671  Capturing subpattern count = 0  Capturing subpattern count = 0
5672  No options  No options
5673  First char = 'a'  First char = 'a'
5674  Need char = 'c'  Need char = 'c'
5675  Compiled regex written to testsavedregex  Compiled pattern written to testsavedregex
5676  <testsavedregex  <testsavedregex
5677  Compiled regex loaded from testsavedregex  Compiled pattern loaded from testsavedregex
5678  No study data  No study data
5679      abc      abc
5680   0: abc   0: abc
# Line 5437  No match Line 5683  No match
5683      bca      bca
5684  No match  No match
5685    
5686  /abc/IF>testsavedregex  /abc/IFS>testsavedregex
5687    Capturing subpattern count = 0
5688    No options
5689    First char = 'a'
5690    Need char = 'c'
5691    Subject length lower bound = 3
5692    No set of starting bytes
5693    Compiled pattern written to testsavedregex
5694    Study data written to testsavedregex
5695    <testsavedregex
5696    Compiled pattern (byte-inverted) loaded from testsavedregex
5697    Study data loaded from testsavedregex
5698        abc
5699     0: abc
5700        ** Failers
5701    No match
5702        bca
5703    No match
5704    
5705    /abc/IFSS>testsavedregex
5706  Capturing subpattern count = 0  Capturing subpattern count = 0
5707  No options  No options
5708  First char = 'a'  First char = 'a'
5709  Need char = 'c'  Need char = 'c'
5710  Compiled regex written to testsavedregex  Compiled pattern written to testsavedregex
5711  <testsavedregex  <testsavedregex
5712  Compiled regex (byte-inverted) loaded from testsavedregex  Compiled pattern (byte-inverted) loaded from testsavedregex
5713  No study data  No study data
5714      abc      abc
5715   0: abc   0: abc
# Line 5458  Capturing subpattern count = 1 Line 5723  Capturing subpattern count = 1
5723  No options  No options
5724  No first char  No first char
5725  No need char  No need char
5726    Subject length lower bound = 1
5727  Starting byte set: a b  Starting byte set: a b
5728  Compiled regex written to testsavedregex  Compiled pattern written to testsavedregex
5729  Study data written to testsavedregex  Study data written to testsavedregex
5730  <testsavedregex  <testsavedregex
5731  Compiled regex loaded from testsavedregex  Compiled pattern loaded from testsavedregex
5732  Study data loaded from testsavedregex  Study data loaded from testsavedregex
5733      abc      abc
5734   0: a   0: a
# Line 5473  Study data loaded from testsavedregex Line 5739  Study data loaded from testsavedregex
5739      def      def
5740  No match  No match
5741    
5742    /(a|b)/ISS>testsavedregex
5743    Capturing subpattern count = 1
5744    No options
5745    No first char
5746    No need char
5747    Compiled pattern written to testsavedregex
5748    <testsavedregex
5749    Compiled pattern loaded from testsavedregex
5750    No study data
5751        abc
5752     0: a
5753     1: a
5754        ** Failers
5755     0: a
5756     1: a
5757        def
5758    No match
5759    
5760  /(a|b)/ISF>testsavedregex  /(a|b)/ISF>testsavedregex
5761  Capturing subpattern count = 1  Capturing subpattern count = 1
5762  No options  No options
5763  No first char  No first char
5764  No need char  No need char
5765    Subject length lower bound = 1
5766  Starting byte set: a b  Starting byte set: a b
5767  Compiled regex written to testsavedregex  Compiled pattern written to testsavedregex
5768  Study data written to testsavedregex  Study data written to testsavedregex
5769  <testsavedregex  <testsavedregex
5770  Compiled regex (byte-inverted) loaded from testsavedregex  Compiled pattern (byte-inverted) loaded from testsavedregex
5771  Study data loaded from testsavedregex  Study data loaded from testsavedregex
5772      abc      abc
5773   0: a   0: a
# Line 5493  Study data loaded from testsavedregex Line 5778  Study data loaded from testsavedregex
5778      def      def
5779  No match  No match
5780    
5781    /(a|b)/ISSF>testsavedregex
5782    Capturing subpattern count = 1
5783    No options
5784    No first char
5785    No need char
5786    Compiled pattern written to testsavedregex
5787    <testsavedregex
5788    Compiled pattern (byte-inverted) loaded from testsavedregex
5789    No study data
5790        abc
5791     0: a
5792     1: a
5793        ** Failers
5794     0: a
5795     1: a
5796        def
5797    No match
5798    
5799  ~<(\w+)/?>(.)*</(\1)>~smgI  ~<(\w+)/?>(.)*</(\1)>~smgI
5800  Capturing subpattern count = 3  Capturing subpattern count = 3
5801  Max back reference = 1  Max back reference = 1
# Line 5548  No match Line 5851  No match
5851      line one\nthis is a line\nbreak in the second line      line one\nthis is a line\nbreak in the second line
5852  No match  No match
5853    
5854  /ab.cd/IP  /ab.cd/P
5855      ab-cd      ab-cd
5856   0: ab-cd   0: ab-cd
5857      ab=cd      ab=cd
# Line 5558  No match: POSIX code 17: match failed Line 5861  No match: POSIX code 17: match failed
5861      ab\ncd      ab\ncd
5862  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
5863    
5864  /ab.cd/IPs  /ab.cd/Ps
5865      ab-cd      ab-cd
5866   0: ab-cd   0: ab-cd
5867      ab=cd      ab=cd
# Line 5858  No need char Line 6161  No need char
6161      ((this))      ((this))
6162   0: ((this))   0: ((this))
6163    
6164  /a(b)c/IPN  /a(b)c/PN
6165      abc      abc
6166  Matched with REG_NOSUB  Matched with REG_NOSUB
6167    
6168  /a(?P<name>b)c/IPN  /a(?P<name>b)c/PN
6169      abc      abc
6170  Matched with REG_NOSUB  Matched with REG_NOSUB
6171    
# Line 6190  Capturing subpattern count = 0 Line 6493  Capturing subpattern count = 0
6493  No options  No options
6494  No first char  No first char
6495  Need char = ','  Need char = ','
6496    Subject length lower bound = 1
6497  Starting byte set: \x09 \x0a \x0c \x0d \x20 ,  Starting byte set: \x09 \x0a \x0c \x0d \x20 ,
6498      \x0b,\x0b      \x0b,\x0b
6499   0: ,   0: ,
# Line 6362  No first char Line 6666  No first char
6666  No need char  No need char
6667     /* this is a C style comment */\M     /* this is a C style comment */\M
6668  Minimum match() limit = 120  Minimum match() limit = 120
6669  Minimum match() recursion limit = 6  Minimum match() recursion limit = 35
6670   0: /* this is a C style comment */   0: /* this is a C style comment */
6671   1: /* this is a C style comment */   1: /* this is a C style comment */
6672    
# Line 6494  Capturing subpattern count = 1 Line 6798  Capturing subpattern count = 1
6798  No options  No options
6799  No first char  No first char
6800  No need char  No need char
6801    Subject length lower bound = 1
6802  Starting byte set: C a b c d  Starting byte set: C a b c d
6803    
6804  /()[ab]xyz/IS  /()[ab]xyz/IS
# Line 6501  Capturing subpattern count = 1 Line 6806  Capturing subpattern count = 1
6806  No options  No options
6807  No first char  No first char
6808  Need char = 'z'  Need char = 'z'
6809    Subject length lower bound = 4
6810  Starting byte set: a b  Starting byte set: a b
6811    
6812  /(|)[ab]xyz/IS  /(|)[ab]xyz/IS
# Line 6508  Capturing subpattern count = 1 Line 6814  Capturing subpattern count = 1
6814  No options  No options
6815  No first char  No first char
6816  Need char = 'z'  Need char = 'z'
6817    Subject length lower bound = 4
6818  Starting byte set: a b  Starting byte set: a b
6819    
6820  /(|c)[ab]xyz/IS  /(|c)[ab]xyz/IS
# Line 6515  Capturing subpattern count = 1 Line 6822  Capturing subpattern count = 1
6822  No options  No options
6823  No first char  No first char
6824  Need char = 'z'  Need char = 'z'
6825    Subject length lower bound = 4
6826  Starting byte set: a b c  Starting byte set: a b c
6827    
6828  /(|c?)[ab]xyz/IS  /(|c?)[ab]xyz/IS
# Line 6522  Capturing subpattern count = 1 Line 6830  Capturing subpattern count = 1
6830  No options  No options
6831  No first char  No first char
6832  Need char = 'z'  Need char = 'z'
6833    Subject length lower bound = 4
6834  Starting byte set: a b c  Starting byte set: a b c
6835    
6836  /(d?|c?)[ab]xyz/IS  /(d?|c?)[ab]xyz/IS
# Line 6529  Capturing subpattern count = 1 Line 6838  Capturing subpattern count = 1
6838  No options  No options
6839  No first char  No first char
6840  Need char = 'z'  Need char = 'z'
6841    Subject length lower bound = 4
6842  Starting byte set: a b c d  Starting byte set: a b c d
6843    
6844  /(d?|c)[ab]xyz/IS  /(d?|c)[ab]xyz/IS
# Line 6536  Capturing subpattern count = 1 Line 6846  Capturing subpattern count = 1
6846  No options  No options
6847  No first char  No first char
6848  Need char = 'z'  Need char = 'z'
6849    Subject length lower bound = 4
6850  Starting byte set: a b c d  Starting byte set: a b c d
6851    
6852  /^a*b\d/DZ  /^a*b\d/DZ
# Line 6608  No match Line 6919  No match
6919  ------------------------------------------------------------------  ------------------------------------------------------------------
6920          Bra          Bra
6921          ^          ^
6922          a*       /i a*
6923       NC A       /i A
6924          \d          \d
6925          Ket          Ket
6926          End          End
# Line 6628  Capturing subpattern count = 1 Line 6939  Capturing subpattern count = 1
6939  No options  No options
6940  No first char  No first char
6941  No need char  No need char
6942    Subject length lower bound = 1
6943  Starting byte set: a b c d  Starting byte set: a b c d
6944    
6945  /(a+|b*)[cd]/IS  /(a+|b*)[cd]/IS
# Line 6635  Capturing subpattern count = 1 Line 6947  Capturing subpattern count = 1
6947  No options  No options
6948  No first char  No first char
6949  No need char  No need char
6950    Subject length lower bound = 1
6951  Starting byte set: a b c d  Starting byte set: a b c d
6952    
6953  /(a*|b+)[cd]/IS  /(a*|b+)[cd]/IS
# Line 6642  Capturing subpattern count = 1 Line 6955  Capturing subpattern count = 1
6955  No options  No options
6956  No first char  No first char
6957  No need char  No need char
6958    Subject length lower bound = 1
6959  Starting byte set: a b c d  Starting byte set: a b c d
6960    
6961  /(a+|b+)[cd]/IS  /(a+|b+)[cd]/IS
# Line 6649  Capturing subpattern count = 1 Line 6963  Capturing subpattern count = 1
6963  No options  No options
6964  No first char  No first char
6965  No need char  No need char
6966    Subject length lower bound = 2
6967  Starting byte set: a b  Starting byte set: a b
6968    
6969  /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((  /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
# Line 7233  Matched, but too many substrings Line 7548  Matched, but too many substrings
7548  /[^a]+a/BZi  /[^a]+a/BZi
7549  ------------------------------------------------------------------  ------------------------------------------------------------------
7550          Bra          Bra
7551          [^A]++       /i [^A]++
7552       NC a       /i a
7553          Ket          Ket
7554          End          End
7555  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 7242  Matched, but too many substrings Line 7557  Matched, but too many substrings
7557  /[^a]+A/BZi  /[^a]+A/BZi
7558  ------------------------------------------------------------------  ------------------------------------------------------------------
7559          Bra          Bra
7560          [^A]++       /i [^A]++
7561       NC A       /i A
7562          Ket          Ket
7563          End          End
7564  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 7438  No match Line 7753  No match
7753  ------------------------------------------------------------------  ------------------------------------------------------------------
7754          Bra          Bra
7755          ^          ^
         Once  
7756          Recurse          Recurse
         Ket  
7757          [()]          [()]
7758          CBra 1          CBra 1
7759          Ket          Ket
# Line 7454  No match Line 7767  No match
7767          ^          ^
7768          CBra 1          CBra 1
7769          Cond          Cond
7770        2 Cond ref        2 Cond nref
7771          y          y
7772          Ket          Ket
7773          [()]          [()]
# Line 7474  No match Line 7787  No match
7787  ------------------------------------------------------------------  ------------------------------------------------------------------
7788          Bra          Bra
7789          ^          ^
         Once  
7790          Recurse          Recurse
         Ket  
7791          ()          ()
7792          CBra 1          CBra 1
7793          Ket          Ket
# Line 7488  No match Line 7799  No match
7799  ------------------------------------------------------------------  ------------------------------------------------------------------
7800          Bra          Bra
7801          ^          ^
         Once  
7802          Recurse          Recurse
         Ket  
7803          [(\]a]          [(\]a]
7804          CBra 1          CBra 1
7805          Ket          Ket
# Line 7503  No match Line 7812  No match
7812  ------------------------------------------------------------------  ------------------------------------------------------------------
7813          Bra          Bra
7814          ^          ^
         Once  
7815          Recurse          Recurse
         Ket  
7816          CBra 1          CBra 1
7817          Ket          Ket
7818          Ket          Ket
# Line 7572  Need char = ':' Line 7879  Need char = ':'
7879   0: abcd:   0: abcd:
7880   1: abcd   1: abcd
7881    
 /(?'abc'\w+):\k<abc>{2}/  
     a:aaxyz  
  0: a:aa  
  1: a  
     ab:ababxyz  
  0: ab:abab  
  1: ab  
     ** Failers  
 No match  
     a:axyz  
 No match  
     ab:abxyz  
 No match  
   
7882  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
7883      adaa      adaa
7884   0: adaa   0: adaa
# Line 7612  No match Line 7905  No match
7905      bddd      bddd
7906  No match  No match
7907    
 /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x  
     abd  
  0: abd  
  1: a  
     ce  
  0: ce  
   
7908  /(?(<bc))/  /(?(<bc))/
7909  Failed: malformed number or name after (?( at offset 6  Failed: malformed number or name after (?( at offset 6
7910    
# Line 7649  Failed: reference to non-existent subpat Line 7935  Failed: reference to non-existent subpat
7935   1: abcabc1Xabc2XabcX   1: abcabc1Xabc2XabcX
7936   2: abcabc1Xabc2XabcX   2: abcabc1Xabc2XabcX
7937    
 /^(?(DEFINE) (?<A> a) (?<B> b) )  (?&A) (?&B) /x  
     abcd  
  0: ab  
  1: <unset>  
  2: <unset>  
   
 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))  
   (?(DEFINE)  
   (?<NAME_PAT>[a-z]+)  
   (?<ADDRESS_PAT>\d+)  
   )/x  
     metcalfe 33  
  0: metcalfe 33  
  1: metcalfe  
  2: 33  
  3: <unset>  
  4: <unset>  
   
7938  /^(?(DEFINE) abc | xyz ) /x  /^(?(DEFINE) abc | xyz ) /x
7939  Failed: DEFINE group contains more than one branch at offset 22  Failed: DEFINE group contains more than one branch at offset 22
7940    
# Line 7844  Need char = 'P' Line 8112  Need char = 'P'
8112   0: PXP   0: PXP
8113   1: P   1: P
8114    
 /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/  
     1.2.3.4  
  0: 1.2.3.4  
  1: <unset>  
  2: .4  
     131.111.10.206  
  0: 131.111.10.206  
  1: <unset>  
  2: .206  
     10.0.0.0  
  0: 10.0.0.0  
  1: <unset>  
  2: .0  
     ** Failers  
 No match  
     10.6  
 No match  
     455.3.4.5  
 No match  
   
 /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/  
     1.2.3.4  
  0: 1.2.3.4  
  1: .4  
  2: <unset>  
     131.111.10.206  
  0: 131.111.10.206  
  1: .206  
  2: <unset>  
     10.0.0.0  
  0: 10.0.0.0  
  1: .0  
  2: <unset>  
     ** Failers  
 No match  
     10.6  
 No match  
     455.3.4.5  
 No match  
   
8115  /(?:a(?&abc)b)*(?<abc>x)/  /(?:a(?&abc)b)*(?<abc>x)/
8116      123axbaxbaxbx456      123axbaxbaxbx456
8117   0: axbaxbaxbx   0: axbaxbaxbx
# Line 7921  No match Line 8149  No match
8149     DEFabcABCXYZ     DEFabcABCXYZ
8150  No match  No match
8151    
 /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/  
     ababababbbabZXXXX  
  0: ababababbbabZ  
  1: ab  
  2: b  
   
8152  /^(a)\g-2/  /^(a)\g-2/
8153  Failed: reference to non-existent subpattern at offset 7  Failed: reference to non-existent subpattern at offset 7
8154    
# Line 8042  No match Line 8264  No match
8264          Alt          Alt
8265          c          c
8266          Ket          Ket
         Once  
8267          Recurse          Recurse
8268          Ket          Ket
         Ket  
8269          End          End
8270  ------------------------------------------------------------------  ------------------------------------------------------------------
8271      abc      abc
# Line 8056  No match Line 8276  No match
8276  ------------------------------------------------------------------  ------------------------------------------------------------------
8277          Bra          Bra
8278          xy          xy
         Once  
8279          Recurse          Recurse
         Ket  
8280          CBra 1          CBra 1
8281          abc          abc
8282          Ket          Ket
# Line 8182  Failed: reference to non-existent subpat Line 8400  Failed: reference to non-existent subpat
8400   0: Y!   0: Y!
8401   1: !   1: !
8402    
 /(foo)\Kbar/  
     foobar  
  0: bar  
  1: foo  
   
 /(foo)(\Kbar|baz)/  
     foobar  
  0: bar  
  1: foo  
  2: bar  
     foobaz  
  0: foobaz  
  1: foo  
  2: baz  
   
 /(foo\Kbar)baz/  
     foobarbaz  
  0: barbaz  
  1: foobar  
   
8403  /(?<A>tom|bon)-\k{A}/  /(?<A>tom|bon)-\k{A}/
8404      tom-tom      tom-tom
8405   0: tom-tom   0: tom-tom
# Line 8214  No match Line 8412  No match
8412      tom-bon      tom-bon
8413  No match  No match
8414    
 /(?<A>tom|bon)-\g{A}/  
     tom-tom  
  0: tom-tom  
  1: tom  
     bon-bon  
  0: bon-bon  
  1: bon  
   
8415  /\g{A/  /\g{A/
8416  Failed: syntax error in subpattern name (missing terminator) at offset 4  Failed: syntax error in subpattern name (missing terminator) at offset 4
8417    
# Line 8316  Failed: syntax error in subpattern name Line 8506  Failed: syntax error in subpattern name
8506   3: <unset>   3: <unset>
8507   4: x   4: x
8508    
 /(?|(abc)|(xyz))\1/  
     abcabc  
  0: abcabc  
  1: abc  
     xyzxyz  
  0: xyzxyz  
  1: xyz  
     ** Failers  
 No match  
     abcxyz  
 No match  
     xyzabc  
 No match  
   
 /(?|(abc)|(xyz))(?1)/  
     abcabc  
  0: abcabc  
  1: abc  
     xyzabc  
  0: xyzabc  
  1: xyz  
     ** Failers  
 No match  
     xyzxyz  
 No match  
   
 /\H\h\V\v/  
     X X\x0a  
  0: X X\x0a  
     X\x09X\x0b  
  0: X\x09X\x0b  
     ** Failers  
 No match  
     \xa0 X\x0a  
 No match  
   
 /\H*\h+\V?\v{3,4}/  
     \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a  
  0: \x09 \xa0X\x0a\x0b\x0c\x0d  
     \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a  
  0: \x09 \xa0\x0a\x0b\x0c\x0d  
     \x09\x20\xa0\x0a\x0b\x0c  
  0: \x09 \xa0\x0a\x0b\x0c  
     ** Failers  
 No match  
     \x09\x20\xa0\x0a\x0b  
 No match  
   
 /\H{3,4}/  
     XY  ABCDE  
  0: ABCD  
     XY  PQR ST  
  0: PQR  
   
 /.\h{3,4}./  
     XY  AB    PQRS  
  0: B    P  
   
 /\h*X\h?\H+Y\H?Z/  
     >XNNNYZ  
  0: XNNNYZ  
     >  X NYQZ  
  0:   X NYQZ  
     ** Failers  
 No match  
     >XYZ  
 No match  
     >  X NY Z  
 No match  
   
 /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/  
     >XY\x0aZ\x0aA\x0bNN\x0c  
  0: XY\x0aZ\x0aA\x0bNN\x0c  
     >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c  
  0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c  
   
8509  /[\h]/BZ  /[\h]/BZ
8510  ------------------------------------------------------------------  ------------------------------------------------------------------
8511          Bra          Bra
# Line 8688  Failed: missing terminating ] for charac Line 8802  Failed: missing terminating ] for charac
8802          End          End
8803  ------------------------------------------------------------------  ------------------------------------------------------------------
8804    
 /^a+(*FAIL)/  
     aaaaaa  
 No match  
   
 /a+b?c+(*FAIL)/  
     aaabccc  
 No match  
   
 /a+b?(*PRUNE)c+(*FAIL)/  
     aaabccc  
 No match  
   
 /a+b?(*COMMIT)c+(*FAIL)/  
     aaabccc  
 No match  
   
 /a+b?(*SKIP)c+(*FAIL)/  
     aaabcccaaabccc  
 No match  
   
 /^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/  
     aaaxxxxxx  
  0: aaaxxxxxx  
     aaa++++++  
  0: aaa  
     bbbxxxxx  
  0: bbbxxxxx  
     bbb+++++  
  0: bbb  
     cccxxxx  
  0: cccxxxx  
     ccc++++  
  0: ccc  
     dddddddd  
  0: ddd  
   
 /^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/  
     aaaxxxxxx  
  0: aaaxxxxxx  
  1: aaaxxxxxx  
     aaa++++++  
  0: aaa  
  1: aaa  
     bbbxxxxx  
  0: bbbxxxxx  
  1: bbbxxxxx  
     bbb+++++  
  0: bbb  
  1: bbb  
     cccxxxx  
  0: cccxxxx  
  1: cccxxxx  
     ccc++++  
  0: ccc  
  1: ccc  
     dddddddd  
  0: ddd  
  1: ddd  
   
 /a+b?(*THEN)c+(*FAIL)/  
     aaabccc  
 No match  
   
 /(A (A|B(*ACCEPT)|C) D)(E)/x  
     ABX  
  0: AB  
     AADE  
  0: AADE  
  1: AAD  
  2: A  
  3: E  
     ACDE  
  0: ACDE  
  1: ACD  
  2: C  
  3: E  
     ** Failers  
 No match  
     AD  
 No match  
   
8805  /^a+(*FAIL)/C  /^a+(*FAIL)/C
8806      aaaaaa      aaaaaa
8807  --->aaaaaa  --->aaaaaa
# Line 8897  No match Line 8930  No match
8930  +13   ^  ^      (*FAIL)  +13   ^  ^      (*FAIL)
8931  No match  No match
8932    
 /a(*PRUNE:XXX)b/  
 Failed: (*VERB) with an argument is not supported at offset 8  
   
8933  /a(*MARK)b/  /a(*MARK)b/
8934  Failed: (*VERB) not recognized at offset 7  Failed: (*MARK) must have an argument at offset 7
8935    
8936  /(?i:A{1,}\6666666666)/  /(?i:A{1,}\6666666666)/
8937  Failed: number is too big at offset 19  Failed: number is too big at offset 19
# Line 8990  No match Line 9020  No match
9020  No match  No match
9021      a\x85b      a\x85b
9022  No match  No match
9023    
9024    /(*ANY).*/g
9025        abc\r\ndef
9026     0: abc
9027     0:
9028     0: def
9029     0:
9030    
9031    /(*ANYCRLF).*/g
9032        abc\r\ndef
9033     0: abc
9034     0:
9035     0: def
9036     0:
9037    
9038    /(*CRLF).*/g
9039        abc\r\ndef
9040     0: abc
9041     0:
9042     0: def
9043     0:
9044    
9045  /a\Rb/I<bsr_anycrlf>  /a\Rb/I<bsr_anycrlf>
9046  Capturing subpattern count = 0  Capturing subpattern count = 0
# Line 9240  Failed: unknown POSIX class name at offs Line 9291  Failed: unknown POSIX class name at offs
9291  /[[:a\dz:]]/  /[[:a\dz:]]/
9292  Failed: unknown POSIX class name at offset 3  Failed: unknown POSIX class name at offset 3
9293    
 /^(?<name>a|b\g<name>c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /^(?<name>a|b\g'name'c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /^(a|b\g<1>c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /^(a|b\g'1'c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /^(a|b\g'-1'c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /(^(a|b\g<-1>c))/  
     aaaa  
  0: a  
  1: a  
  2: a  
     bacxxx  
  0: bac  
  1: bac  
  2: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
  2: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
  2: bbbaccc  
   
9294  /(^(a|b\g<-1'c))/  /(^(a|b\g<-1'c))/
9295  Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15  Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15
9296    
 /(^(a|b\g{-1}))/  
     bacxxx  
 No match  
   
 /(?-i:\g<name>)(?i:(?<name>a))/  
     XaaX  
  0: aa  
  1: a  
     XAAX  
  0: AA  
  1: A  
   
 /(?i:\g<name>)(?-i:(?<name>a))/  
     XaaX  
  0: aa  
  1: a  
     ** Failers  
 No match  
     XAAX  
 No match  
   
 /(?-i:\g<+1>)(?i:(a))/  
     XaaX  
  0: aa  
  1: a  
     XAAX  
  0: AA  
  1: A  
   
 /(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/  
   
 /(?<n>a|b|c)\g<n>*/  
    abc  
  0: abc  
  1: a  
    accccbbb  
  0: accccbbb  
  1: a  
   
9297  /^(?+1)(?<a>x|y){0}z/  /^(?+1)(?<a>x|y){0}z/
9298      xzxx      xzxx
9299   0: xz   0: xz
  1: <unset>  
9300      yzyy      yzyy
9301   0: yz   0: yz
  1: <unset>  
9302      ** Failers      ** Failers
9303  No match  No match
9304      xxz      xxz
# Line 9491  Capturing subpattern count = 1 Line 9413  Capturing subpattern count = 1
9413  No options  No options
9414  No first char  No first char
9415  No need char  No need char
9416    Subject length lower bound = 1
9417  Starting byte set: x y z  Starting byte set: x y z
9418    
9419  /(?(?=.*b)b|^)/CI  /(?(?=.*b)b|^)/CI
# Line 9604  No match Line 9527  No match
9527   +0        ^     x   +0        ^     x
9528   +0         ^    x   +0         ^    x
9529  No match  No match
9530    
9531    /(*NO_START_OPT)xyz/C
9532      abcxyz
9533    --->abcxyz
9534    +15 ^          x
9535    +15  ^         x
9536    +15   ^        x
9537    +15    ^       x
9538    +16    ^^      y
9539    +17    ^ ^     z
9540    +18    ^  ^
9541     0: xyz
9542    
9543    /xyz/CY
9544      abcxyz
9545    --->abcxyz
9546     +0 ^          x
9547     +0  ^         x
9548     +0   ^        x
9549     +0    ^       x
9550     +1    ^^      y
9551     +2    ^ ^     z
9552     +3    ^  ^
9553     0: xyz
9554    
9555  /^"((?(?=[a])[^"])|b)*"$/C  /^"((?(?=[a])[^"])|b)*"$/C
9556      "ab"      "ab"
# Line 9638  No match Line 9585  No match
9585   0: "ab"   0: "ab"
9586   1:   1:
9587    
 /^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/  
     XYabcdY  
  0: XYabcdY  
  1: a  
  2: b  
  3: c  
  4: d  
  5: Y  
   
9588  /^X(?5)(a)(?|(b)|(q))(c)(d)Y/  /^X(?5)(a)(?|(b)|(q))(c)(d)Y/
9589  Failed: reference to non-existent subpattern at offset 5  Failed: reference to non-existent subpattern at offset 5
9590    
# Line 9659  Failed: reference to non-existent subpat Line 9597  Failed: reference to non-existent subpat
9597   4: d   4: d
9598   5: Y   5: Y
9599    
 /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/  
     XYabcdY  
  0: XYabcdY  
  1: a  
  2: b  
  3: <unset>  
  4: <unset>  
  5: c  
  6: d  
  7: Y  
   
 /^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/  
     XYabcdY  
  0: XYabcdY  
  1: a  
  2: b  
  3: <unset>  
  4: <unset>  
  5: c  
  6: d  
  7: Y  
   
 /^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/  
     XYabcdY  
  0: XYabcdY  
  1: a  
  2: b  
  3: <unset>  
  4: <unset>  
  5: c  
  6: d  
  7: Y  
   
9600  /Xa{2,4}b/  /Xa{2,4}b/
9601      X\P      X\P
9602  Partial match: X  Partial match: X
# Line 9963  Partial match: the cat Line 9868  Partial match: the cat
9868   0: abc   0: abc
9869     abc\P\P     abc\P\P
9870   0: abc   0: abc
9871    
9872    /\w+A/P
9873       CDAAAAB
9874     0: CDAAAA
9875    
9876    /\w+A/PU
9877       CDAAAAB
9878     0: CDA
9879    
9880    /abc\K123/
9881        xyzabc123pqr
9882     0: 123
9883        xyzabc12\P
9884    Partial match: abc12
9885        xyzabc12\P\P
9886    Partial match: abc12
9887    
9888    /(?<=abc)123/
9889        xyzabc123pqr
9890     0: 123
9891        xyzabc12\P
9892    Partial match: abc12
9893        xyzabc12\P\P
9894    Partial match: abc12
9895    
9896    /\babc\b/
9897        +++abc+++
9898     0: abc
9899        +++ab\P
9900    Partial match: +ab
9901        +++ab\P\P
9902    Partial match: +ab
9903    
9904    /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
9905    ------------------------------------------------------------------
9906            Bra
9907            Recurse
9908            Recurse
9909            Cond
9910            Cond def
9911            CBra 1
9912            <
9913            [^m]
9914            [^>]
9915            >
9916            [^<]
9917            Ket
9918            CBra 2
9919            \w*+
9920            Ket
9921            Ket
9922            Ket
9923            End
9924    ------------------------------------------------------------------
9925    
9926    /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
9927    ------------------------------------------------------------------
9928            Bra
9929            Recurse
9930            Recurse
9931            Cond
9932            Cond def
9933            CBra 1
9934            <
9935            [\x00-/:-\xff] (neg)
9936            [^>]
9937            >
9938            [^<]
9939            Ket
9940            CBra 2
9941            \w*+
9942            Ket
9943            Ket
9944            Ket
9945            End
9946    ------------------------------------------------------------------
9947    
9948    /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
9949    ------------------------------------------------------------------
9950            Bra
9951            CBra 1
9952            ab
9953            Ket
9954            CBra 2
9955            x
9956            CBra 3
9957            y
9958            Ket
9959            z
9960            CBra 4
9961            cd
9962            Close 4
9963            Close 2
9964            *ACCEPT
9965            Ket
9966            Ket
9967            pq
9968            Ket
9969            End
9970    ------------------------------------------------------------------
9971    
9972    /abc\K/+
9973        abcdef
9974     0:
9975     0+ def
9976        abcdef\N\N
9977     0:
9978     0+ def
9979        xyzabcdef\N\N
9980     0:
9981     0+ def
9982        ** Failers
9983    No match
9984        abcdef\N
9985    No match
9986        xyzabcdef\N
9987    No match
9988    
9989    /^(?:(?=abc)|abc\K)/+
9990        abcdef
9991     0:
9992     0+ abcdef
9993        abcdef\N\N
9994     0:
9995     0+ def
9996        ** Failers
9997    No match
9998        abcdef\N
9999    No match
10000    
10001    /a?b?/+
10002        xyz
10003     0:
10004     0+ xyz
10005        xyzabc
10006     0:
10007     0+ xyzabc
10008        xyzabc\N
10009     0: ab
10010     0+ c
10011        xyzabc\N\N
10012     0:
10013     0+ yzabc
10014        xyz\N\N
10015     0:
10016     0+ yz
10017        ** Failers
10018     0:
10019     0+ ** Failers
10020        xyz\N
10021    No match
10022    
10023    /^a?b?/+
10024        xyz
10025     0:
10026     0+ xyz
10027        xyzabc
10028     0:
10029     0+ xyzabc
10030        ** Failers
10031     0:
10032     0+ ** Failers
10033        xyzabc\N
10034    No match
10035        xyzabc\N\N
10036    No match
10037        xyz\N\N
10038    No match
10039        xyz\N
10040    No match
10041    
10042    /^(?<name>a|b\g<name>c)/
10043        aaaa
10044     0: a
10045     1: a
10046        bacxxx
10047     0: bac
10048     1: bac
10049        bbaccxxx
10050     0: bbacc
10051     1: bbacc
10052        bbbacccxx
10053     0: bbbaccc
10054     1: bbbaccc
10055    
10056    /^(?<name>a|b\g'name'c)/
10057        aaaa
10058     0: a
10059     1: a
10060        bacxxx
10061     0: bac
10062     1: bac
10063        bbaccxxx
10064     0: bbacc
10065     1: bbacc
10066        bbbacccxx
10067     0: bbbaccc
10068     1: bbbaccc
10069    
10070    /^(a|b\g<1>c)/
10071        aaaa
10072     0: a
10073     1: a
10074        bacxxx
10075     0: bac
10076     1: bac
10077        bbaccxxx
10078     0: bbacc
10079     1: bbacc
10080        bbbacccxx
10081     0: bbbaccc
10082     1: bbbaccc
10083    
10084    /^(a|b\g'1'c)/
10085        aaaa
10086     0: a
10087     1: a
10088        bacxxx
10089     0: bac
10090     1: bac
10091        bbaccxxx
10092     0: bbacc
10093     1: bbacc
10094        bbbacccxx
10095     0: bbbaccc
10096     1: bbbaccc
10097    
10098    /^(a|b\g'-1'c)/
10099        aaaa
10100     0: a
10101     1: a
10102        bacxxx
10103     0: bac
10104     1: bac
10105        bbaccxxx
10106     0: bbacc
10107     1: bbacc
10108        bbbacccxx
10109     0: bbbaccc
10110     1: bbbaccc
10111    
10112    /(^(a|b\g<-1>c))/
10113        aaaa
10114     0: a
10115     1: a
10116     2: a
10117        bacxxx
10118     0: bac
10119     1: bac
10120     2: bac
10121        bbaccxxx
10122     0: bbacc
10123     1: bbacc
10124     2: bbacc
10125        bbbacccxx
10126     0: bbbaccc
10127     1: bbbaccc
10128     2: bbbaccc
10129    
10130    /(?-i:\g<name>)(?i:(?<name>a))/
10131        XaaX
10132     0: aa
10133     1: a
10134        XAAX
10135     0: AA
10136     1: A
10137    
10138    /(?i:\g<name>)(?-i:(?<name>a))/
10139        XaaX
10140     0: aa
10141     1: a
10142        ** Failers
10143    No match
10144        XAAX
10145    No match
10146    
10147    /(?-i:\g<+1>)(?i:(a))/
10148        XaaX
10149     0: aa
10150     1: a
10151        XAAX
10152     0: AA
10153     1: A
10154    
10155    /(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/
10156    
10157    /(?<n>a|b|c)\g<n>*/
10158       abc
10159     0: abc
10160     1: a
10161       accccbbb
10162     0: accccbbb
10163     1: a
10164    
10165    /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
10166        XYabcdY
10167     0: XYabcdY
10168     1: a
10169     2: b
10170     3: <unset>
10171     4: <unset>
10172     5: c
10173     6: d
10174     7: Y
10175    
10176    /(?<=b(?1)|zzz)(a)/
10177        xbaax
10178     0: a
10179     1: a
10180        xzzzax
10181     0: a
10182     1: a
10183    
10184    /(a)(?<=b\1)/
10185    Failed: lookbehind assertion is not fixed length at offset 10
10186    
10187    /(a)(?<=b+(?1))/
10188    Failed: lookbehind assertion is not fixed length at offset 13
10189    
10190    /(a+)(?<=b(?1))/
10191    Failed: lookbehind assertion is not fixed length at offset 14
10192    
10193    /(a(?<=b(?1)))/
10194    Failed: lookbehind assertion is not fixed length at offset 13
10195    
10196    /(?<=b(?1))xyz/
10197    Failed: reference to non-existent subpattern at offset 8
10198    
10199    /(?<=b(?1))xyz(b+)pqrstuvew/
10200    Failed: lookbehind assertion is not fixed length at offset 26
10201    
10202    /(a|bc)\1/SI
10203    Capturing subpattern count = 1
10204    Max back reference = 1
10205    No options
10206    No first char
10207    No need char
10208    Subject length lower bound = 2
10209    Starting byte set: a b
10210    
10211    /(a|bc)\1{2,3}/SI
10212    Capturing subpattern count = 1
10213    Max back reference = 1
10214    No options
10215    No first char
10216    No need char
10217    Subject length lower bound = 3
10218    Starting byte set: a b
10219    
10220    /(a|bc)(?1)/SI
10221    Capturing subpattern count = 1
10222    No options
10223    No first char
10224    No need char
10225    Subject length lower bound = 2
10226    Starting byte set: a b
10227    
10228    /(a|b\1)(a|b\1)/SI
10229    Capturing subpattern count = 2
10230    Max back reference = 1
10231    No options
10232    No first char
10233    No need char
10234    Subject length lower bound = 2
10235    Starting byte set: a b
10236    
10237    /(a|b\1){2}/SI
10238    Capturing subpattern count = 1
10239    Max back reference = 1
10240    No options
10241    No first char
10242    No need char
10243    Subject length lower bound = 2
10244    Starting byte set: a b
10245    
10246    /(a|bbbb\1)(a|bbbb\1)/SI
10247    Capturing subpattern count = 2
10248    Max back reference = 1
10249    No options
10250    No first char
10251    No need char
10252    Subject length lower bound = 2
10253    Starting byte set: a b
10254    
10255    /(a|bbbb\1){2}/SI
10256    Capturing subpattern count = 1
10257    Max back reference = 1
10258    No options
10259    No first char
10260    No need char
10261    Subject length lower bound = 2
10262    Starting byte set: a b
10263    
10264    /^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/SI
10265    Capturing subpattern count = 1
10266    Options: anchored
10267    No first char
10268    Need char = ':'
10269    Subject length lower bound = 22
10270    No set of starting bytes
10271    
10272    /  (?: [\040\t] |  \(
10273    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10274    \)  )*                          # optional leading comment
10275    (?:    (?:
10276    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10277    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10278    |
10279    " (?:                      # opening quote...
10280    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10281    |                     #    or
10282    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10283    )* "  # closing quote
10284    )                    # initial word
10285    (?:  (?: [\040\t] |  \(
10286    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10287    \)  )*  \.  (?: [\040\t] |  \(
10288    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10289    \)  )*   (?:
10290    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10291    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10292    |
10293    " (?:                      # opening quote...
10294    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10295    |                     #    or
10296    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10297    )* "  # closing quote
10298    )  )* # further okay, if led by a period
10299    (?: [\040\t] |  \(
10300    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10301    \)  )*  @  (?: [\040\t] |  \(
10302    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10303    \)  )*    (?:
10304    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10305    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10306    |   \[                         # [
10307    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10308    \]                        #           ]
10309    )                           # initial subdomain
10310    (?:                                  #
10311    (?: [\040\t] |  \(
10312    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10313    \)  )*  \.                        # if led by a period...
10314    (?: [\040\t] |  \(
10315    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10316    \)  )*   (?:
10317    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10318    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10319    |   \[                         # [
10320    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10321    \]                        #           ]
10322    )                     #   ...further okay
10323    )*
10324    # address
10325    |                     #  or
10326    (?:
10327    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10328    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10329    |
10330    " (?:                      # opening quote...
10331    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10332    |                     #    or
10333    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10334    )* "  # closing quote
10335    )             # one word, optionally followed by....
10336    (?:
10337    [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
10338    \(
10339    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10340    \)       |  # comments, or...
10341    
10342    " (?:                      # opening quote...
10343    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10344    |                     #    or
10345    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10346    )* "  # closing quote
10347    # quoted strings
10348    )*
10349    <  (?: [\040\t] |  \(
10350    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10351    \)  )*                     # leading <
10352    (?:  @  (?: [\040\t] |  \(
10353    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10354    \)  )*    (?:
10355    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10356    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10357    |   \[                         # [
10358    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10359    \]                        #           ]
10360    )                           # initial subdomain
10361    (?:                                  #
10362    (?: [\040\t] |  \(
10363    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10364    \)  )*  \.                        # if led by a period...
10365    (?: [\040\t] |  \(
10366    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10367    \)  )*   (?:
10368    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10369    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10370    |   \[                         # [
10371    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10372    \]                        #           ]
10373    )                     #   ...further okay
10374    )*
10375    
10376    (?:  (?: [\040\t] |  \(
10377    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10378    \)  )*  ,  (?: [\040\t] |  \(
10379    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10380    \)  )*  @  (?: [\040\t] |  \(
10381    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10382    \)  )*    (?:
10383    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10384    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10385    |   \[                         # [
10386    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10387    \]                        #           ]
10388    )                           # initial subdomain
10389    (?:                                  #
10390    (?: [\040\t] |  \(
10391    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10392    \)  )*  \.                        # if led by a period...
10393    (?: [\040\t] |  \(
10394    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10395    \)  )*   (?:
10396    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10397    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10398    |   \[                         # [
10399    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10400    \]                        #           ]
10401    )                     #   ...further okay
10402    )*
10403    )* # further okay, if led by comma
10404    :                                # closing colon
10405    (?: [\040\t] |  \(
10406    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10407    \)  )*  )? #       optional route
10408    (?:
10409    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10410    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10411    |
10412    " (?:                      # opening quote...
10413    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10414    |                     #    or
10415    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10416    )* "  # closing quote
10417    )                    # initial word
10418    (?:  (?: [\040\t] |  \(
10419    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10420    \)  )*  \.  (?: [\040\t] |  \(
10421    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10422    \)  )*   (?:
10423    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10424    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10425    |
10426    " (?:                      # opening quote...
10427    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10428    |                     #    or
10429    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10430    )* "  # closing quote
10431    )  )* # further okay, if led by a period
10432    (?: [\040\t] |  \(
10433    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10434    \)  )*  @  (?: [\040\t] |  \(
10435    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10436    \)  )*    (?:
10437    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10438    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10439    |   \[                         # [
10440    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10441    \]                        #           ]
10442    )                           # initial subdomain
10443    (?:                                  #
10444    (?: [\040\t] |  \(
10445    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10446    \)  )*  \.                        # if led by a period...
10447    (?: [\040\t] |  \(
10448    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10449    \)  )*   (?:
10450    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10451    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10452    |   \[                         # [
10453    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10454    \]                        #           ]
10455    )                     #   ...further okay
10456    )*
10457    #       address spec
10458    (?: [\040\t] |  \(
10459    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10460    \)  )*  > #                  trailing >
10461    # name and address
10462    )  (?: [\040\t] |  \(
10463    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10464    \)  )*                       # optional trailing comment
10465    /xSI
10466    Capturing subpattern count = 0
10467    Contains explicit CR or LF match
10468    Options: extended
10469    No first char
10470    No need char
10471    Subject length lower bound = 3
10472    Starting byte set: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8
10473      9 = ? 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 ^ _ ` a b c d e
10474      f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
10475    
10476    /<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS
10477    Capturing subpattern count = 11
10478    Options: caseless dotall
10479    First char = '<'
10480    Need char = '>'
10481    Subject length lower bound = 47
10482    No set of starting bytes
10483    
10484    "(?>.*/)foo"SI
10485    Capturing subpattern count = 0
10486    No options
10487    First char at start or follows newline
10488    Need char = 'o'
10489    Subject length lower bound = 4
10490    No set of starting bytes
10491    
10492    /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /xSI
10493    Capturing subpattern count = 0
10494    Options: extended
10495    No first char
10496    Need char = '-'
10497    Subject length lower bound = 8
10498    No set of starting bytes
10499    
10500    /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
10501    Capturing subpattern count = 1
10502    Options: caseless
10503    No first char
10504    No need char
10505    Subject length lower bound = 1
10506    Starting byte set: A B C a b c
10507    
10508    /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
10509    Capturing subpattern count = 0
10510    No options
10511    No first char
10512    Need char = 'b'
10513    Subject length lower bound = 41
10514    Starting byte set: c d
10515    
10516    /<a[\s]+href[\s]*=[\s]*          # find <a href=
10517     ([\"\'])?                       # find single or double quote
10518     (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
10519                                     # quote, otherwise match up to next space
10520    /isxSI
10521    Capturing subpattern count = 3
10522    Max back reference = 1
10523    Options: caseless extended dotall
10524    First char = '<'
10525    Need char = '='
10526    Subject length lower bound = 9
10527    No set of starting bytes
10528    
10529    /^(?!:)                       # colon disallowed at start
10530      (?:                         # start of item
10531        (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
10532        (?(1)0 | () ) )           # if null previously matched, fail; else null
10533        :                         # followed by colon
10534      ){1,7}                      # end item; 1-7 of them required
10535      [0-9a-f]{1,4} $             # final hex number at end of string
10536      (?(1)|.)                    # check that there was an empty component
10537      /xiIS
10538    Capturing subpattern count = 1
10539    Options: anchored caseless extended
10540    No first char
10541    Need char = ':'
10542    Subject length lower bound = 2
10543    No set of starting bytes
10544    
10545    /(?|(?<a>A)|(?<a>B))/I
10546    Capturing subpattern count = 1
10547    Named capturing subpatterns:
10548      a   1
10549      a   1
10550    No options
10551    No first char
10552    No need char
10553        AB\Ca
10554     0: A
10555     1: A
10556      C A (1) a
10557        BA\Ca
10558     0: B
10559     1: B
10560      C B (1) a
10561    
10562    /(?|(?<a>A)|(?<b>B))/
10563    Failed: different names for subpatterns of the same number are not allowed at offset 15
10564    
10565    /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
10566        b(?<quote> (?<apostrophe>')|(?<realquote>")) )
10567        (?('quote')[a-z]+|[0-9]+)/JIx
10568    Capturing subpattern count = 6
10569    Named capturing subpatterns:
10570      apostrophe   2
10571      apostrophe   5
10572      quote        1
10573      quote        4
10574      realquote    3
10575      realquote    6
10576    Options: extended dupnames
10577    No first char
10578    No need char
10579        a"aaaaa
10580     0: a"aaaaa
10581     1: "
10582     2: <unset>
10583     3: "
10584        b"aaaaa
10585     0: b"aaaaa
10586     1: <unset>
10587     2: <unset>
10588     3: <unset>
10589     4: "
10590     5: <unset>
10591     6: "
10592        ** Failers
10593    No match
10594        b"11111
10595    No match
10596        a"11111
10597    No match
10598    
10599    /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
10600    ------------------------------------------------------------------
10601            Bra
10602            ^
10603            Bra
10604            CBra 1
10605            a
10606            Ket
10607            CBra 2
10608            b
10609            Ket
10610            CBra 3
10611            c
10612            Ket
10613            CBra 4
10614            d
10615            Ket
10616            Alt
10617            CBra 1
10618            e
10619            Ket
10620            Ket
10621            Cond
10622          4 Cond nref
10623            X
10624            Alt
10625            Y
10626            Ket
10627            Ket
10628            End
10629    ------------------------------------------------------------------
10630    Capturing subpattern count = 4
10631    Named capturing subpatterns:
10632      D   4
10633      D   1
10634    Options: anchored extended dupnames
10635    No first char
10636    No need char
10637        abcdX
10638     0: abcdX
10639     1: a
10640     2: b
10641     3: c
10642     4: d
10643        eX
10644     0: eX
10645     1: e
10646        ** Failers
10647    No match
10648        abcdY
10649    No match
10650        ey
10651    No match
10652    
10653    /(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
10654    ------------------------------------------------------------------
10655            Bra
10656            CBra 1
10657            a
10658            Ket
10659            CBra 2
10660            b
10661            Ket
10662            CBra 3
10663            c
10664            Ket
10665            CBra 4
10666            d
10667            Cond
10668            Cond nrecurse 1
10669            $
10670            Alt
10671            Recurse
10672            Ket
10673            Ket
10674            Ket
10675            End
10676    ------------------------------------------------------------------
10677    Capturing subpattern count = 4
10678    Named capturing subpatterns:
10679      A   1
10680      A   4
10681    Options: extended dupnames
10682    First char = 'a'
10683    Need char = 'd'
10684        abcdd
10685     0: abcdd
10686     1: a
10687     2: b
10688     3: c
10689     4: dd
10690        ** Failers
10691    No match
10692        abcdde
10693    No match
10694    
10695    /abcd*/
10696        xxxxabcd\P
10697     0: abcd
10698        xxxxabcd\P\P
10699    Partial match: abcd
10700    
10701    /abcd*/i
10702        xxxxabcd\P
10703     0: abcd
10704        xxxxabcd\P\P
10705    Partial match: abcd
10706        XXXXABCD\P
10707     0: ABCD
10708        XXXXABCD\P\P
10709    Partial match: ABCD
10710    
10711    /abc\d*/
10712        xxxxabc1\P
10713     0: abc1
10714        xxxxabc1\P\P
10715    Partial match: abc1
10716    
10717    /(a)bc\1*/
10718        xxxxabca\P
10719     0: abca
10720     1: a
10721        xxxxabca\P\P
10722    Partial match: abca
10723    
10724    /abc[de]*/
10725        xxxxabcde\P
10726     0: abcde
10727        xxxxabcde\P\P
10728    Partial match: abcde
10729    
10730    /-- This is not in the Perl >= 5.10 test because Perl seems currently to be
10731        broken and not behaving as specified in that it *does* bumpalong after
10732        hitting (*COMMIT). --/
10733    
10734    /(?1)(A(*COMMIT)|B)D/
10735        ABD
10736     0: ABD
10737     1: B
10738        XABD
10739     0: ABD
10740     1: B
10741        BAD
10742     0: BAD
10743     1: A
10744        ABXABD
10745     0: ABD
10746     1: B
10747        ** Failers
10748    No match
10749        ABX
10750    No match
10751        BAXBAD
10752    No match
10753    
10754    /(\3)(\1)(a)/<JS>
10755        cat
10756     0: a
10757     1:
10758     2:
10759     3: a
10760    
10761    /(\3)(\1)(a)/SI<JS>
10762    Capturing subpattern count = 3
10763    Max back reference = 3
10764    Options:
10765    No first char
10766    Need char = 'a'
10767    Subject length lower bound = 1
10768    No set of starting bytes
10769        cat
10770     0: a
10771     1:
10772     2:
10773     3: a
10774    
10775    /(\3)(\1)(a)/SI
10776    Capturing subpattern count = 3
10777    Max back reference = 3
10778    No options
10779    No first char
10780    Need char = 'a'
10781    Subject length lower bound = 3
10782    No set of starting bytes
10783        cat
10784    No match
10785    
10786    /i(?(DEFINE)(?<s>a))/SI
10787    Capturing subpattern count = 1
10788    Named capturing subpatterns:
10789      s   1
10790    No options
10791    First char = 'i'
10792    No need char
10793    Subject length lower bound = 1
10794    No set of starting bytes
10795        i
10796     0: i
10797    
10798    /()i(?(1)a)/SI
10799    Capturing subpattern count = 1
10800    No options
10801    No first char
10802    Need char = 'i'
10803    Subject length lower bound = 1
10804    Starting byte set: i
10805        ia
10806     0: ia
10807     1:
10808    
10809    /(?i)a(?-i)b|c/BZ
10810    ------------------------------------------------------------------
10811            Bra
10812         /i a
10813            b
10814            Alt
10815            c
10816            Ket
10817            End
10818    ------------------------------------------------------------------
10819        XabX
10820     0: ab
10821        XAbX
10822     0: Ab
10823        CcC
10824     0: c
10825        ** Failers
10826    No match
10827        XABX
10828    No match
10829    
10830    /(?i)a(?s)b|c/BZ
10831    ------------------------------------------------------------------
10832            Bra
10833         /i ab
10834            Alt
10835         /i c
10836            Ket
10837            End
10838    ------------------------------------------------------------------
10839    
10840    /(?i)a(?s-i)b|c/BZ
10841    ------------------------------------------------------------------
10842            Bra
10843         /i a
10844            b
10845            Alt
10846            c
10847            Ket
10848            End
10849    ------------------------------------------------------------------
10850    
10851    /^(ab(c\1)d|x){2}$/BZ
10852    ------------------------------------------------------------------
10853            Bra
10854            ^
10855            Once
10856            CBra 1
10857            ab
10858            CBra 2
10859            c
10860            \1
10861            Ket
10862            d
10863            Alt
10864            x
10865            Ket
10866            Ket
10867            Once
10868            CBra 1
10869            ab
10870            CBra 2
10871            c
10872            \1
10873            Ket
10874            d
10875            Alt
10876            x
10877            Ket
10878            Ket
10879            $
10880            Ket
10881            End
10882    ------------------------------------------------------------------
10883        xabcxd
10884     0: xabcxd
10885     1: abcxd
10886     2: cx
10887    
10888    /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
10889    ------------------------------------------------------------------
10890            Bra
10891            ^
10892            Braposzero
10893            SBraPos
10894            Recurse
10895            KetRpos
10896            Cond
10897            Cond def
10898            CBra 1
10899            Any
10900            Ket
10901            Ket
10902            $
10903            Ket
10904            End
10905    ------------------------------------------------------------------
10906    
10907    /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
10908    ------------------------------------------------------------------
10909            Bra
10910            ^
10911            Brazero
10912            Once
10913            Recurse
10914            KetRmax
10915            Cond
10916            Cond def
10917            CBra 1
10918            Any
10919            Ket
10920            Ket
10921            $
10922            Ket
10923            End
10924    ------------------------------------------------------------------
10925    
10926    / -- The first four of these are not in the Perl >= 5.10 test because Perl
10927         documents that the use of \K in assertions is "not well defined". The
10928         last is here because Perl gives the match as "b" rather than "ab". I
10929         believe this to be a Perl bug. --/
10930    
10931    /(?=a\Kb)ab/
10932        ab
10933     0: b
10934    
10935    /(?!a\Kb)ac/
10936        ac
10937     0: ac
10938    
10939    /^abc(?<=b\Kc)d/
10940        abcd
10941     0: cd
10942    
10943    /^abc(?<!b\Kq)d/
10944        abcd
10945     0: abcd
10946    
10947    /(?>a\Kb)z|(ab)/
10948        ab
10949     0: ab
10950     1: ab
10951    
10952    /----------------------/
10953    
10954    /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
10955    Failed: recursive call could loop indefinitely at offset 31
10956    
10957    /abc(*MARK:)pqr/
10958    Failed: (*MARK) must have an argument at offset 10
10959    
10960    /abc(*:)pqr/
10961    Failed: (*MARK) must have an argument at offset 6
10962    
10963    /abc(*FAIL:123)xyz/
10964    Failed: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) at offset 13
10965    
10966    /--- This should, and does, fail. In Perl, it does not, which I think is a
10967         bug because replacing the B in the pattern by (B|D) does make it fail. ---/
10968    
10969    /A(*COMMIT)B/+K
10970        ACABX
10971    No match
10972    
10973    /--- These should be different, but in Perl 5.11 are not, which I think
10974         is a bug in Perl. ---/
10975    
10976    /A(*THEN)B|A(*THEN)C/K
10977        AC
10978     0: AC
10979    
10980    /A(*PRUNE)B|A(*PRUNE)C/K
10981        AC
10982    No match
10983    
10984    /--- A whole lot of tests of verbs with arguments are here rather than in test
10985         11 because Perl doesn't seem to follow its specification entirely
10986         correctly. ---/
10987    
10988    /--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
10989         not clear how Perl defines "involved in the failure of the match". ---/
10990    
10991    /^(A(*THEN:A)B|C(*THEN:B)D)/K
10992        AB
10993     0: AB
10994     1: AB
10995        CD
10996     0: CD
10997     1: CD
10998        ** Failers
10999    No match
11000        AC
11001    No match
11002        CB
11003    No match, mark = B
11004    
11005    /--- Check the use of names for success and failure. PCRE doesn't show these
11006    names for success, though Perl does, contrary to its spec. ---/
11007    
11008    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
11009        AB
11010     0: AB
11011     1: AB
11012        CD
11013     0: CD
11014     1: CD
11015        ** Failers
11016    No match
11017        AC
11018    No match, mark = A
11019        CB
11020    No match, mark = B
11021    
11022    /--- An empty name does not pass back an empty string. It is the same as if no
11023    name were given. ---/
11024    
11025    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
11026        AB
11027     0: AB
11028     1: AB
11029        CD
11030     0: CD
11031     1: CD
11032    
11033    /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
11034    
11035    /A(*PRUNE:A)B/K
11036        ACAB
11037     0: AB
11038    
11039    /(*MARK:A)(*PRUNE:B)(C|X)/KS
11040        C
11041     0: C
11042     1: C
11043    MK: A
11044        D
11045    No match
11046    
11047    /(*MARK:A)(*PRUNE:B)(C|X)/KSS
11048        C
11049     0: C
11050     1: C
11051    MK: A
11052        D
11053    No match, mark = B
11054    
11055    /(*MARK:A)(*THEN:B)(C|X)/KS
11056        C
11057     0: C
11058     1: C
11059    MK: A
11060        D
11061    No match
11062    
11063    /(*MARK:A)(*THEN:B)(C|X)/KSS
11064        C
11065     0: C
11066     1: C
11067    MK: A
11068        D
11069    No match, mark = B
11070    
11071    /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
11072    
11073    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
11074        AAAC
11075    No match
11076    
11077    /--- Same --/
11078    
11079    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
11080        AAAC
11081    No match
11082    
11083    /--- This should fail; the SKIP advances by one, but when we get to AC, the
11084         PRUNE kills it. ---/
11085    
11086    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
11087        AAAC
11088    No match
11089    
11090    /A(*:A)A+(*SKIP)(B|Z) | AC/xK
11091        AAAC
11092    No match
11093    
11094    /--- This should fail, as a null name is the same as no name ---/
11095    
11096    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
11097        AAAC
11098    No match
11099    
11100    /--- This fails in PCRE, and I think that is in accordance with Perl's
11101         documentation, though in Perl it succeeds. ---/
11102    
11103    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
11104        AAAC
11105    No match
11106    
11107    /--- Mark names can be duplicated ---/
11108    
11109    /A(*:A)B|X(*:A)Y/K
11110        AABC
11111     0: AB
11112    MK: A
11113        XXYZ
11114     0: XY
11115    MK: A
11116    
11117    /^A(*:A)B|^X(*:A)Y/K
11118        ** Failers
11119    No match
11120        XAQQ
11121    No match, mark = A
11122    
11123    /--- A check on what happens after hitting a mark and them bumping along to
11124    something that does not even start. Perl reports tags after the failures here,
11125    though it does not when the individual letters are made into something
11126    more complicated. ---/
11127    
11128    /A(*:A)B|XX(*:B)Y/K
11129        AABC
11130     0: AB
11131    MK: A
11132        XXYZ
11133     0: XXY
11134    MK: B
11135        ** Failers
11136    No match
11137        XAQQ
11138    No match
11139        XAQQXZZ
11140    No match
11141        AXQQQ
11142    No match
11143        AXXQQQ
11144    No match
11145    
11146    /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
11147    optimizations defeat this. So does the PCRE optimization unless we disable it
11148    with \Y. ---/
11149    
11150    /(*COMMIT)ABC/
11151        ABCDEFG
11152     0: ABC
11153        ** Failers
11154    No match
11155        DEFGABC\Y
11156    No match
11157    
11158    /--- Repeat some tests with added studying. ---/
11159    
11160    /A(*COMMIT)B/+KS
11161        ACABX
11162    No match
11163    
11164    /A(*THEN)B|A(*THEN)C/KS
11165        AC
11166     0: AC
11167    
11168    /A(*PRUNE)B|A(*PRUNE)C/KS
11169        AC
11170    No match
11171    
11172    /^(A(*THEN:A)B|C(*THEN:B)D)/KS
11173        AB
11174     0: AB
11175     1: AB
11176        CD
11177     0: CD
11178     1: CD
11179        ** Failers
11180    No match
11181        AC
11182    No match
11183        CB
11184    No match, mark = B
11185    
11186    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
11187        AB
11188     0: AB
11189     1: AB
11190        CD
11191     0: CD
11192     1: CD
11193        ** Failers
11194    No match
11195        AC
11196    No match, mark = A
11197        CB
11198    No match, mark = B
11199    
11200    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
11201        AB
11202     0: AB
11203     1: AB
11204        CD
11205     0: CD
11206     1: CD
11207    
11208    /A(*PRUNE:A)B/KS
11209        ACAB
11210     0: AB
11211    
11212    /(*MARK:A)(*PRUNE:B)(C|X)/KS
11213        C
11214     0: C
11215     1: C
11216    MK: A
11217        D
11218    No match
11219    
11220    /(*MARK:A)(*THEN:B)(C|X)/KS
11221        C
11222     0: C
11223     1: C
11224    MK: A
11225        D
11226    No match
11227    
11228    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
11229        AAAC
11230    No match
11231    
11232    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
11233        AAAC
11234    No match
11235    
11236    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
11237        AAAC
11238    No match
11239    
11240    /A(*:A)A+(*SKIP)(B|Z) | AC/xKS
11241        AAAC
11242    No match
11243    
11244    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
11245        AAAC
11246    No match
11247    
11248    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
11249        AAAC
11250    No match
11251    
11252    /A(*:A)B|XX(*:B)Y/KS
11253        AABC
11254     0: AB
11255    MK: A
11256        XXYZ
11257     0: XXY
11258    MK: B
11259        ** Failers
11260    No match
11261        XAQQ
11262    No match
11263        XAQQXZZ
11264    No match
11265        AXQQQ
11266    No match
11267        AXXQQQ
11268    No match
11269    
11270    /(*COMMIT)ABC/
11271        ABCDEFG
11272     0: ABC
11273        ** Failers
11274    No match
11275        DEFGABC\Y
11276    No match
11277    
11278    /^(ab (c+(*THEN)cd) | xyz)/x
11279        abcccd
11280    No match
11281    
11282    /^(ab (c+(*PRUNE)cd) | xyz)/x
11283        abcccd
11284    No match
11285    
11286    /^(ab (c+(*FAIL)cd) | xyz)/x
11287        abcccd
11288    No match
11289    
11290    /--- Perl 5.11 gets some of these wrong ---/
11291    
11292    /(?>.(*ACCEPT))*?5/
11293        abcde
11294     0: a
11295    
11296    /(.(*ACCEPT))*?5/
11297        abcde
11298     0: a
11299     1: a
11300    
11301    /(.(*ACCEPT))5/
11302        abcde
11303     0: a
11304     1: a
11305    
11306    /(.(*ACCEPT))*5/
11307        abcde
11308     0: a
11309     1: a
11310    
11311    /A\NB./BZ
11312    ------------------------------------------------------------------
11313            Bra
11314            A
11315            Any
11316            B
11317            Any
11318            Ket
11319            End
11320    ------------------------------------------------------------------
11321        ACBD
11322     0: ACBD
11323        *** Failers
11324    No match
11325        A\nB
11326    No match
11327        ACB\n
11328    No match
11329    
11330    /A\NB./sBZ
11331    ------------------------------------------------------------------
11332            Bra
11333            A
11334            Any
11335            B
11336            AllAny
11337            Ket
11338            End
11339    ------------------------------------------------------------------
11340        ACBD
11341     0: ACBD
11342        ACB\n
11343     0: ACB\x0a
11344        *** Failers
11345    No match
11346        A\nB
11347    No match
11348    
11349    /A\NB/<crlf>
11350        A\nB
11351     0: A\x0aB
11352        A\rB
11353     0: A\x0dB
11354        ** Failers
11355    No match
11356        A\r\nB
11357    No match
11358    
11359    /\R+b/BZ
11360    ------------------------------------------------------------------
11361            Bra
11362            \R++
11363            b
11364            Ket
11365            End
11366    ------------------------------------------------------------------
11367    
11368    /\R+\n/BZ
11369    ------------------------------------------------------------------
11370            Bra
11371            \R+
11372            \x0a
11373            Ket
11374            End
11375    ------------------------------------------------------------------
11376    
11377    /\R+\d/BZ
11378    ------------------------------------------------------------------
11379            Bra
11380            \R++
11381            \d
11382            Ket
11383            End
11384    ------------------------------------------------------------------
11385    
11386    /\d*\R/BZ
11387    ------------------------------------------------------------------
11388            Bra
11389            \d*+
11390            \R
11391            Ket
11392            End
11393    ------------------------------------------------------------------
11394    
11395    /\s*\R/BZ
11396    ------------------------------------------------------------------
11397            Bra
11398            \s*+
11399            \R
11400            Ket
11401            End
11402    ------------------------------------------------------------------
11403    
11404    /-- Perl treats this one differently, not failing the second string. I believe
11405        that is a bug in Perl. --/
11406    
11407    /^((abc|abcx)(*THEN)y|abcd)/
11408        abcd
11409     0: abcd
11410     1: abcd
11411        *** Failers
11412    No match
11413        abcxy
11414    No match
11415    
11416    /(?<=abc)def/
11417        abc\P\P
11418    Partial match: abc
11419    
11420    /abc$/
11421        abc
11422     0: abc
11423        abc\P
11424     0: abc
11425        abc\P\P
11426    Partial match: abc
11427    
11428    /abc$/m
11429        abc
11430     0: abc
11431        abc\n
11432     0: abc
11433        abc\P\P
11434    Partial match: abc
11435        abc\n\P\P
11436     0: abc
11437        abc\P
11438     0: abc
11439        abc\n\P
11440     0: abc
11441    
11442    /abc\z/
11443        abc
11444     0: abc
11445        abc\P
11446     0: abc
11447        abc\P\P
11448    Partial match: abc
11449    
11450    /abc\Z/
11451        abc
11452     0: abc
11453        abc\P
11454     0: abc
11455        abc\P\P
11456    Partial match: abc
11457    
11458    /abc\b/
11459        abc
11460     0: abc
11461        abc\P
11462     0: abc
11463        abc\P\P
11464    Partial match: abc
11465    
11466    /abc\B/
11467        abc
11468    No match
11469        abc\P
11470    Partial match: abc
11471        abc\P\P
11472    Partial match: abc
11473    
11474    /.+/
11475        abc\>0
11476     0: abc
11477        abc\>1
11478     0: bc
11479        abc\>2
11480     0: c
11481        abc\>3
11482    No match
11483        abc\>4
11484    Error -24 (bad offset value)
11485        abc\>-4
11486    Error -24 (bad offset value)
11487    
11488    /^\cģ/
11489    Failed: \c must be followed by an ASCII character at offset 3
11490    
11491    /(?P<abn>(?P=abn)xxx)/BZ
11492    ------------------------------------------------------------------
11493            Bra
11494            Once
11495            CBra 1
11496            \1
11497            xxx
11498            Ket
11499            Ket
11500            Ket
11501            End
11502    ------------------------------------------------------------------
11503    
11504    /(a\1z)/BZ
11505    ------------------------------------------------------------------
11506            Bra
11507            Once
11508            CBra 1
11509            a
11510            \1
11511            z
11512            Ket
11513            Ket
11514            Ket
11515            End
11516    ------------------------------------------------------------------
11517    
11518    /(?P<abn>(?P=abn)(?<badstufxxx)/BZ
11519    Failed: syntax error in subpattern name (missing terminator) at offset 29
11520    
11521    /(?P<abn>(?P=axn)xxx)/BZ
11522    Failed: reference to non-existent subpattern at offset 15
11523    
11524    /(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
11525    ------------------------------------------------------------------
11526            Bra
11527            CBra 1
11528            \2
11529            xxx
11530            Ket
11531            CBra 2
11532            yy
11533            Ket
11534            Ket
11535            End
11536    ------------------------------------------------------------------
11537    
11538    /-- These tests are here because Perl gets the first one wrong. --/
11539    
11540    /(\R*)(.)/s
11541        \r\n
11542     0: \x0d
11543     1:
11544     2: \x0d
11545        \r\r\n\n\r
11546     0: \x0d\x0d\x0a\x0a\x0d
11547     1: \x0d\x0d\x0a\x0a
11548     2: \x0d
11549        \r\r\n\n\r\n
11550     0: \x0d\x0d\x0a\x0a\x0d
11551     1: \x0d\x0d\x0a\x0a
11552     2: \x0d
11553    
11554    /(\R)*(.)/s
11555        \r\n
11556     0: \x0d
11557     1: <unset>
11558     2: \x0d
11559        \r\r\n\n\r
11560     0: \x0d\x0d\x0a\x0a\x0d
11561     1: \x0a
11562     2: \x0d
11563        \r\r\n\n\r\n
11564     0: \x0d\x0d\x0a\x0a\x0d
11565     1: \x0a
11566     2: \x0d
11567    
11568    /((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
11569        \r\n
11570     0: \x0d
11571     1:
11572     2: \x0d
11573        \r\r\n\n\r
11574     0: \x0d\x0d\x0a\x0a\x0d
11575     1: \x0d\x0d\x0a\x0a
11576     2: \x0d
11577        \r\r\n\n\r\n
11578     0: \x0d\x0d\x0a\x0a\x0d
11579     1: \x0d\x0d\x0a\x0a
11580     2: \x0d
11581    
11582    /-- --/
11583    
11584    /^abc$/BZ
11585    ------------------------------------------------------------------
11586            Bra
11587            ^
11588            abc
11589            $
11590            Ket
11591            End
11592    ------------------------------------------------------------------
11593    
11594    /^abc$/BZm
11595    ------------------------------------------------------------------
11596            Bra
11597         /m ^
11598            abc
11599         /m $
11600            Ket
11601            End
11602    ------------------------------------------------------------------
11603    
11604    /^(a)*+(\w)/S
11605        aaaaX
11606     0: aaaaX
11607     1: a
11608     2: X
11609        ** Failers
11610    No match
11611        aaaa
11612    No match
11613    
11614    /^(?:a)*+(\w)/S
11615        aaaaX
11616     0: aaaaX
11617     1: X
11618        ** Failers
11619    No match
11620        aaaa
11621    No match
11622    
11623    /(a)++1234/SDZ
11624    ------------------------------------------------------------------
11625            Bra
11626            CBraPos 1
11627            a
11628            KetRpos
11629            1234
11630            Ket
11631            End
11632    ------------------------------------------------------------------
11633    Capturing subpattern count = 1
11634    No options
11635    First char = 'a'
11636    Need char = '4'
11637    Subject length lower bound = 5
11638    No set of starting bytes
11639    
11640    /([abc])++1234/SI
11641    Capturing subpattern count = 1
11642    No options
11643    No first char
11644    Need char = '4'
11645    Subject length lower bound = 5
11646    Starting byte set: a b c
11647    
11648    /(?<=(abc)+)X/
11649    Failed: lookbehind assertion is not fixed length at offset 10
11650    
11651    /(^ab)/I
11652    Capturing subpattern count = 1
11653    Options: anchored
11654    No first char
11655    No need char
11656    
11657    /(^ab)++/I
11658    Capturing subpattern count = 1
11659    Options: anchored
11660    No first char
11661    No need char
11662    
11663    /(^ab|^)+/I
11664    Capturing subpattern count = 1
11665    Options: anchored
11666    No first char
11667    No need char
11668    
11669    /(^ab|^)++/I
11670    Capturing subpattern count = 1
11671    Options: anchored
11672    No first char
11673    No need char
11674    
11675    /(?:^ab)/I
11676    Capturing subpattern count = 0
11677    Options: anchored
11678    No first char
11679    No need char
11680    
11681    /(?:^ab)++/I
11682    Capturing subpattern count = 0
11683    Options: anchored
11684    No first char
11685    No need char
11686    
11687    /(?:^ab|^)+/I
11688    Capturing subpattern count = 0
11689    Options: anchored
11690    No first char
11691    No need char
11692    
11693    /(?:^ab|^)++/I
11694    Capturing subpattern count = 0
11695    Options: anchored
11696    No first char
11697    No need char
11698    
11699    /(.*ab)/I
11700    Capturing subpattern count = 1
11701    No options
11702    First char at start or follows newline
11703    Need char = 'b'
11704    
11705    /(.*ab)++/I
11706    Capturing subpattern count = 1
11707    No options
11708    First char at start or follows newline
11709    Need char = 'b'
11710    
11711    /(.*ab|.*)+/I
11712    Capturing subpattern count = 1
11713    No options
11714    First char at start or follows newline
11715    No need char
11716    
11717    /(.*ab|.*)++/I
11718    Capturing subpattern count = 1
11719    No options
11720    First char at start or follows newline
11721    No need char
11722    
11723    /(?:.*ab)/I
11724    Capturing subpattern count = 0
11725    No options
11726    First char at start or follows newline
11727    Need char = 'b'
11728    
11729    /(?:.*ab)++/I
11730    Capturing subpattern count = 0
11731    No options
11732    First char at start or follows newline
11733    Need char = 'b'
11734    
11735    /(?:.*ab|.*)+/I
11736    Capturing subpattern count = 0
11737    No options
11738    First char at start or follows newline
11739    No need char
11740    
11741    /(?:.*ab|.*)++/I
11742    Capturing subpattern count = 0
11743    No options
11744    First char at start or follows newline
11745    No need char
11746    
11747    /(?=a)[bcd]/I
11748    Capturing subpattern count = 0
11749    No options
11750    First char = 'a'
11751    No need char
11752    
11753    /((?=a))[bcd]/I
11754    Capturing subpattern count = 1
11755    No options
11756    First char = 'a'
11757    No need char
11758    
11759    /((?=a))+[bcd]/I
11760    Capturing subpattern count = 1
11761    No options
11762    First char = 'a'
11763    No need char
11764    
11765    /((?=a))++[bcd]/I
11766    Capturing subpattern count = 1
11767    No options
11768    First char = 'a'
11769    No need char
11770    
11771    /(?=a+)[bcd]/iI
11772    Capturing subpattern count = 0
11773    Options: caseless
11774    First char = 'a' (caseless)
11775    No need char
11776    
11777    /(?=a+?)[bcd]/iI
11778    Capturing subpattern count = 0
11779    Options: caseless
11780    First char = 'a' (caseless)
11781    No need char
11782    
11783    /(?=a++)[bcd]/iI
11784    Capturing subpattern count = 0
11785    Options: caseless
11786    First char = 'a' (caseless)
11787    No need char
11788    
11789    /(?=a{3})[bcd]/iI
11790    Capturing subpattern count = 0
11791    Options: caseless
11792    First char = 'a' (caseless)
11793    Need char = 'a' (caseless)
11794    
11795    /(abc)\1+/S
11796    
11797    /-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
11798    
11799    /(?1)(?:(b(*ACCEPT))){0}/
11800        b
11801     0: b
11802    
11803    /(?1)(?:(b(*ACCEPT))){0}c/
11804        bc
11805     0: bc
11806        ** Failers
11807    No match
11808        b
11809    No match
11810    
11811    /(?1)(?:((*ACCEPT))){0}c/
11812        c
11813     0: c
11814        c\N
11815     0: c
11816    
11817    /^.*?(?(?=a)a|b(*THEN)c)/
11818        ba
11819     0: ba
11820    
11821    /^.*?(?(?=a)a|bc)/
11822        ba
11823     0: ba
11824    
11825    /-- --/
11826    
11827    /-- These studied versions are here because they are not Perl-compatible; the
11828        studying means the mark is not seen. --/
11829    
11830    /(*MARK:A)(*SKIP:B)(C|X)/KS
11831        C
11832     0: C
11833     1: C
11834    MK: A
11835        D
11836    No match
11837    
11838    /(*:A)A+(*SKIP:A)(B|Z)/KS
11839        AAAC
11840    No match
11841    
11842    /-- --/
11843    
11844    "(?=a*(*ACCEPT)b)c"
11845        c
11846     0: c
11847        c\N
11848     0: c
11849    
11850    /(?1)c(?(DEFINE)((*ACCEPT)b))/
11851        c
11852     0: c
11853        c\N
11854     0: c
11855    
11856    /(?>(*ACCEPT)b)c/
11857        c
11858     0:
11859        c\N
11860    No match
11861    
11862    /(?:(?>(a)))+a%/++
11863        %aa%
11864     0: aa%
11865     0+
11866     1: a
11867     1+ a%
11868    
11869    /(a)b|ac/++
11870        ac\O3
11871    Matched, but too many substrings
11872     0: ac
11873     0+
11874    
11875    /(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
11876    Capturing subpattern count = 2
11877    No options
11878    No first char
11879    No need char
11880    Subject length lower bound = 1
11881    No set of starting bytes
11882