/[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 426 by ph10, Wed Aug 26 15:38:32 2009 UTC revision 467 by ph10, Mon Oct 19 11:43:18 2009 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 potential Perl
6        bug. --/
7    
8    /-- Originally, the Perl 5.10 things were in here too, but now I have separated
9        many (most?) of them out into test 11. However, there may still be some
10        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 134  Capturing subpattern count = 0 Line 145  Capturing subpattern count = 0
145  No options  No options
146  No first char  No first char
147  No need char  No need char
148    Subject length lower bound = 3
149  Starting byte set: c d e  Starting byte set: c d e
150      this sentence eventually mentions a cat      this sentence eventually mentions a cat
151   0: cat   0: cat
# Line 145  Capturing subpattern count = 0 Line 157  Capturing subpattern count = 0
157  Options: caseless  Options: caseless
158  No first char  No first char
159  No need char  No need char
160    Subject length lower bound = 3
161  Starting byte set: C D E c d e  Starting byte set: C D E c d e
162      this sentence eventually mentions a CAT cat      this sentence eventually mentions a CAT cat
163   0: CAT   0: CAT
# Line 156  Capturing subpattern count = 0 Line 169  Capturing subpattern count = 0
169  No options  No options
170  No first char  No first char
171  No need char  No need char
172    Subject length lower bound = 1
173  Starting byte set: a b c d  Starting byte set: a b c d
174    
175  /(a|[^\dZ])/IS  /(a|[^\dZ])/IS
# Line 163  Capturing subpattern count = 1 Line 177  Capturing subpattern count = 1
177  No options  No options
178  No first char  No first char
179  No need char  No need char
180    Subject length lower bound = 1
181  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
182    \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
183    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
# Line 183  Capturing subpattern count = 1 Line 198  Capturing subpattern count = 1
198  No options  No options
199  No first char  No first char
200  No need char  No need char
201    Subject length lower bound = 1
202  Starting byte set: \x09 \x0a \x0c \x0d \x20 a b  Starting byte set: \x09 \x0a \x0c \x0d \x20 a b
203    
204  /(ab\2)/  /(ab\2)/
# Line 331  No need char Line 347  No need char
347   2: <unset>   2: <unset>
348   3: def   3: def
349    
350  /abc/IP  /abc/P
351      abc      abc
352   0: abc   0: abc
353      *** Failers      *** Failers
354  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
355    
356  /^abc|def/IP  /^abc|def/P
357      abcdef      abcdef
358   0: abc   0: abc
359      abcdef\B      abcdef\B
360   0: def   0: def
361    
362  /.*((abc)$|(def))/IP  /.*((abc)$|(def))/P
363      defabc      defabc
364   0: defabc   0: defabc
365   1: abc   1: abc
# Line 353  No match: POSIX code 17: match failed Line 369  No match: POSIX code 17: match failed
369   1: def   1: def
370   3: def   3: def
371    
372  /the quick brown fox/IP  /the quick brown fox/P
373      the quick brown fox      the quick brown fox
374   0: the quick brown fox   0: the quick brown fox
375      *** Failers      *** Failers
# Line 361  No match: POSIX code 17: match failed Line 377  No match: POSIX code 17: match failed
377      The Quick Brown Fox      The Quick Brown Fox
378  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
379    
380  /the quick brown fox/IPi  /the quick brown fox/Pi
381      the quick brown fox      the quick brown fox
382   0: the quick brown fox   0: the quick brown fox
383      The Quick Brown Fox      The Quick Brown Fox
384   0: The Quick Brown Fox   0: The Quick Brown Fox
385    
386  /abc.def/IP  /abc.def/P
387      *** Failers      *** Failers
388  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
389      abc\ndef      abc\ndef
390  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
391    
392  /abc$/IP  /abc$/P
393      abc      abc
394   0: abc   0: abc
395      abc\n      abc\n
396   0: abc   0: abc
397    
398  /(abc)\2/IP  /(abc)\2/P
399  Failed: POSIX code 15: bad back reference at offset 7  Failed: POSIX code 15: bad back reference at offset 7
400    
401  /(abc\1)/IP  /(abc\1)/P
402      abc      abc
403  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
404    
# Line 516  Capturing subpattern count = 0 Line 532  Capturing subpattern count = 0
532  No options  No options
533  No first char  No first char
534  No need char  No need char
535    Subject length lower bound = 1
536  Starting byte set: a b c d  Starting byte set: a b c d
537    
538  /(?i)[abcd]/IS  /(?i)[abcd]/IS
# Line 523  Capturing subpattern count = 0 Line 540  Capturing subpattern count = 0
540  Options: caseless  Options: caseless
541  No first char  No first char
542  No need char  No need char
543    Subject length lower bound = 1
544  Starting byte set: A B C D a b c d  Starting byte set: A B C D a b c d
545    
546  /(?m)[xy]|(b|c)/IS  /(?m)[xy]|(b|c)/IS
# Line 530  Capturing subpattern count = 1 Line 548  Capturing subpattern count = 1
548  Options: multiline  Options: multiline
549  No first char  No first char
550  No need char  No need char
551    Subject length lower bound = 1
552  Starting byte set: b c x y  Starting byte set: b c x y
553    
554  /(^a|^b)/Im  /(^a|^b)/Im
# Line 594  Capturing subpattern count = 1 Line 613  Capturing subpattern count = 1
613  No options  No options
614  First char = 'b' (caseless)  First char = 'b' (caseless)
615  No need char  No need char
616  Study returned NULL  Subject length lower bound = 1
617    No set of starting bytes
618    
619  /(a*b|(?i:c*(?-i)d))/IS  /(a*b|(?i:c*(?-i)d))/IS
620  Capturing subpattern count = 1  Capturing subpattern count = 1
621  No options  No options
622  No first char  No first char
623  No need char  No need char
624    Subject length lower bound = 1
625  Starting byte set: C a b c d  Starting byte set: C a b c d
626    
627  /a$/I  /a$/I
# Line 665  Capturing subpattern count = 0 Line 686  Capturing subpattern count = 0
686  No options  No options
687  No first char  No first char
688  No need char  No need char
689    Subject length lower bound = 1
690  Starting byte set: a b  Starting byte set: a b
691    
692  /(?<!foo)(alpha|omega)/IS  /(?<!foo)(alpha|omega)/IS
# Line 672  Capturing subpattern count = 1 Line 694  Capturing subpattern count = 1
694  No options  No options
695  No first char  No first char
696  Need char = 'a'  Need char = 'a'
697    Subject length lower bound = 5
698  Starting byte set: a o  Starting byte set: a o
699    
700  /(?!alphabet)[ab]/IS  /(?!alphabet)[ab]/IS
# Line 679  Capturing subpattern count = 0 Line 702  Capturing subpattern count = 0
702  No options  No options
703  No first char  No first char
704  No need char  No need char
705    Subject length lower bound = 1
706  Starting byte set: a b  Starting byte set: a b
707    
708  /(?<=foo\n)^bar/Im  /(?<=foo\n)^bar/Im
# Line 1615  No need char Line 1639  No need char
1639      \Nabc      \Nabc
1640  No match  No match
1641    
1642  /a*(b+)(z)(z)/IP  /a*(b+)(z)(z)/P
1643      aaaabbbbzzzz      aaaabbbbzzzz
1644   0: aaaabbbbzz   0: aaaabbbbzz
1645   1: bbbb   1: bbbb
# Line 1647  Capturing subpattern count = 0 Line 1671  Capturing subpattern count = 0
1671  Options: anchored  Options: anchored
1672  No first char  No first char
1673  Need char = 'd'  Need char = 'd'
1674  Study returned NULL  Subject length lower bound = 4
1675    No set of starting bytes
1676    
1677  /\(             # ( at start  /\(             # ( at start
1678    (?:           # Non-capturing bracket    (?:           # Non-capturing bracket
# Line 1805  Need char = ')' Line 1830  Need char = ')'
1830   0: (abcd(xyz<p>qrs)123)   0: (abcd(xyz<p>qrs)123)
1831   1: abcd(xyz<p>qrs)123   1: abcd(xyz<p>qrs)123
1832   2: 123   2: 123
  3: <unset>  
1833    
1834  /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix  /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
1835  Capturing subpattern count = 3  Capturing subpattern count = 3
# Line 1880  Capturing subpattern count = 0 Line 1904  Capturing subpattern count = 0
1904  No options  No options
1905  No first char  No first char
1906  No need char  No need char
1907    Subject length lower bound = 1
1908  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
1909    _ 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
1910    
# Line 1941  Contains explicit CR or LF match Line 1966  Contains explicit CR or LF match
1966  No options  No options
1967  No first char  No first char
1968  No need char  No need char
1969    Subject length lower bound = 1
1970  Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20  Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
1971    
1972  /^[[:cntrl:]]/DZ  /^[[:cntrl:]]/DZ
# Line 3411  Capturing subpattern count = 0 Line 3437  Capturing subpattern count = 0
3437  No options  No options
3438  No first char  No first char
3439  No need char  No need char
3440    Subject length lower bound = 1
3441  Starting byte set: a b  Starting byte set: a b
3442    
3443  /[^a]/I  /[^a]/I
# Line 3430  Capturing subpattern count = 0 Line 3457  Capturing subpattern count = 0
3457  No options  No options
3458  No first char  No first char
3459  Need char = '6'  Need char = '6'
3460    Subject length lower bound = 4
3461  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
3462    
3463  /a^b/I  /a^b/I
# Line 3463  Capturing subpattern count = 0 Line 3491  Capturing subpattern count = 0
3491  Options: caseless  Options: caseless
3492  No first char  No first char
3493  No need char  No need char
3494    Subject length lower bound = 1
3495  Starting byte set: A B a b  Starting byte set: A B a b
3496    
3497  /[ab](?i)cd/IS  /[ab](?i)cd/IS
# Line 3470  Capturing subpattern count = 0 Line 3499  Capturing subpattern count = 0
3499  No options  No options
3500  No first char  No first char
3501  Need char = 'd' (caseless)  Need char = 'd' (caseless)
3502    Subject length lower bound = 3
3503  Starting byte set: a b  Starting byte set: a b
3504    
3505  /abc(?C)def/I  /abc(?C)def/I
# Line 3820  Capturing subpattern count = 0 Line 3850  Capturing subpattern count = 0
3850  No options  No options
3851  No first char  No first char
3852  No need char  No need char
3853    Subject length lower bound = 1
3854  Starting byte set: a b  Starting byte set: a b
3855    
3856  /(?R)/I  /(?R)/I
# Line 3939  No options Line 3970  No options
3970  First char = 'a'  First char = 'a'
3971  Need char = 'b'  Need char = 'b'
3972    
 /^\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  
   
3973  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
3974  Capturing subpattern count = 2  Capturing subpattern count = 2
3975  Options: anchored  Options: anchored
# Line 4637  Capturing subpattern count = 3 Line 4635  Capturing subpattern count = 3
4635  Options: caseless  Options: caseless
4636  No first char  No first char
4637  Need char = 'g' (caseless)  Need char = 'g' (caseless)
4638  Study returned NULL  Subject length lower bound = 8
4639    No set of starting bytes
4640       Baby Bjorn Active Carrier - With free SHIPPING!!       Baby Bjorn Active Carrier - With free SHIPPING!!
4641   0: Baby Bjorn Active Carrier - With free SHIPPING!!   0: Baby Bjorn Active Carrier - With free SHIPPING!!
4642   1: Baby Bjorn Active Carrier - With free SHIPPING!!   1: Baby Bjorn Active Carrier - With free SHIPPING!!
# Line 4655  Capturing subpattern count = 0 Line 4654  Capturing subpattern count = 0
4654  No options  No options
4655  No first char  No first char
4656  Need char = 'b'  Need char = 'b'
4657  Study returned NULL  Subject length lower bound = 1
4658    No set of starting bytes
4659    
4660  /(a|b)*.?c/ISDZ  /(a|b)*.?c/ISDZ
4661  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 4675  Capturing subpattern count = 1 Line 4675  Capturing subpattern count = 1
4675  No options  No options
4676  No first char  No first char
4677  Need char = 'c'  Need char = 'c'
4678  Study returned NULL  Subject length lower bound = 1
4679    No set of starting bytes
4680    
4681  /abc(?C255)de(?C)f/DZ  /abc(?C255)de(?C)f/DZ
4682  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 5458  Capturing subpattern count = 1 Line 5459  Capturing subpattern count = 1
5459  No options  No options
5460  No first char  No first char
5461  No need char  No need char
5462    Subject length lower bound = 1
5463  Starting byte set: a b  Starting byte set: a b
5464  Compiled regex written to testsavedregex  Compiled regex written to testsavedregex
5465  Study data written to testsavedregex  Study data written to testsavedregex
# Line 5478  Capturing subpattern count = 1 Line 5480  Capturing subpattern count = 1
5480  No options  No options
5481  No first char  No first char
5482  No need char  No need char
5483    Subject length lower bound = 1
5484  Starting byte set: a b  Starting byte set: a b
5485  Compiled regex written to testsavedregex  Compiled regex written to testsavedregex
5486  Study data written to testsavedregex  Study data written to testsavedregex
# Line 5548  No match Line 5551  No match
5551      line one\nthis is a line\nbreak in the second line      line one\nthis is a line\nbreak in the second line
5552  No match  No match
5553    
5554  /ab.cd/IP  /ab.cd/P
5555      ab-cd      ab-cd
5556   0: ab-cd   0: ab-cd
5557      ab=cd      ab=cd
# Line 5558  No match: POSIX code 17: match failed Line 5561  No match: POSIX code 17: match failed
5561      ab\ncd      ab\ncd
5562  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
5563    
5564  /ab.cd/IPs  /ab.cd/Ps
5565      ab-cd      ab-cd
5566   0: ab-cd   0: ab-cd
5567      ab=cd      ab=cd
# Line 5858  No need char Line 5861  No need char
5861      ((this))      ((this))
5862   0: ((this))   0: ((this))
5863    
5864  /a(b)c/IPN  /a(b)c/PN
5865      abc      abc
5866  Matched with REG_NOSUB  Matched with REG_NOSUB
5867    
5868  /a(?P<name>b)c/IPN  /a(?P<name>b)c/PN
5869      abc      abc
5870  Matched with REG_NOSUB  Matched with REG_NOSUB
5871    
# Line 6190  Capturing subpattern count = 0 Line 6193  Capturing subpattern count = 0
6193  No options  No options
6194  No first char  No first char
6195  Need char = ','  Need char = ','
6196    Subject length lower bound = 1
6197  Starting byte set: \x09 \x0a \x0c \x0d \x20 ,  Starting byte set: \x09 \x0a \x0c \x0d \x20 ,
6198      \x0b,\x0b      \x0b,\x0b
6199   0: ,   0: ,
# Line 6494  Capturing subpattern count = 1 Line 6498  Capturing subpattern count = 1
6498  No options  No options
6499  No first char  No first char
6500  No need char  No need char
6501    Subject length lower bound = 1
6502  Starting byte set: C a b c d  Starting byte set: C a b c d
6503    
6504  /()[ab]xyz/IS  /()[ab]xyz/IS
# Line 6501  Capturing subpattern count = 1 Line 6506  Capturing subpattern count = 1
6506  No options  No options
6507  No first char  No first char
6508  Need char = 'z'  Need char = 'z'
6509    Subject length lower bound = 4
6510  Starting byte set: a b  Starting byte set: a b
6511    
6512  /(|)[ab]xyz/IS  /(|)[ab]xyz/IS
# Line 6508  Capturing subpattern count = 1 Line 6514  Capturing subpattern count = 1
6514  No options  No options
6515  No first char  No first char
6516  Need char = 'z'  Need char = 'z'
6517    Subject length lower bound = 4
6518  Starting byte set: a b  Starting byte set: a b
6519    
6520  /(|c)[ab]xyz/IS  /(|c)[ab]xyz/IS
# Line 6515  Capturing subpattern count = 1 Line 6522  Capturing subpattern count = 1
6522  No options  No options
6523  No first char  No first char
6524  Need char = 'z'  Need char = 'z'
6525    Subject length lower bound = 4
6526  Starting byte set: a b c  Starting byte set: a b c
6527    
6528  /(|c?)[ab]xyz/IS  /(|c?)[ab]xyz/IS
# Line 6522  Capturing subpattern count = 1 Line 6530  Capturing subpattern count = 1
6530  No options  No options
6531  No first char  No first char
6532  Need char = 'z'  Need char = 'z'
6533    Subject length lower bound = 4
6534  Starting byte set: a b c  Starting byte set: a b c
6535    
6536  /(d?|c?)[ab]xyz/IS  /(d?|c?)[ab]xyz/IS
# Line 6529  Capturing subpattern count = 1 Line 6538  Capturing subpattern count = 1
6538  No options  No options
6539  No first char  No first char
6540  Need char = 'z'  Need char = 'z'
6541    Subject length lower bound = 4
6542  Starting byte set: a b c d  Starting byte set: a b c d
6543    
6544  /(d?|c)[ab]xyz/IS  /(d?|c)[ab]xyz/IS
# Line 6536  Capturing subpattern count = 1 Line 6546  Capturing subpattern count = 1
6546  No options  No options
6547  No first char  No first char
6548  Need char = 'z'  Need char = 'z'
6549    Subject length lower bound = 4
6550  Starting byte set: a b c d  Starting byte set: a b c d
6551    
6552  /^a*b\d/DZ  /^a*b\d/DZ
# Line 6628  Capturing subpattern count = 1 Line 6639  Capturing subpattern count = 1
6639  No options  No options
6640  No first char  No first char
6641  No need char  No need char
6642    Subject length lower bound = 1
6643  Starting byte set: a b c d  Starting byte set: a b c d
6644    
6645  /(a+|b*)[cd]/IS  /(a+|b*)[cd]/IS
# Line 6635  Capturing subpattern count = 1 Line 6647  Capturing subpattern count = 1
6647  No options  No options
6648  No first char  No first char
6649  No need char  No need char
6650    Subject length lower bound = 1
6651  Starting byte set: a b c d  Starting byte set: a b c d
6652    
6653  /(a*|b+)[cd]/IS  /(a*|b+)[cd]/IS
# Line 6642  Capturing subpattern count = 1 Line 6655  Capturing subpattern count = 1
6655  No options  No options
6656  No first char  No first char
6657  No need char  No need char
6658    Subject length lower bound = 1
6659  Starting byte set: a b c d  Starting byte set: a b c d
6660    
6661  /(a+|b+)[cd]/IS  /(a+|b+)[cd]/IS
# Line 6649  Capturing subpattern count = 1 Line 6663  Capturing subpattern count = 1
6663  No options  No options
6664  No first char  No first char
6665  No need char  No need char
6666    Subject length lower bound = 2
6667  Starting byte set: a b  Starting byte set: a b
6668    
6669  /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((  /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
# Line 7454  No match Line 7469  No match
7469          ^          ^
7470          CBra 1          CBra 1
7471          Cond          Cond
7472        2 Cond ref        2 Cond nref
7473          y          y
7474          Ket          Ket
7475          [()]          [()]
# Line 7572  Need char = ':' Line 7587  Need char = ':'
7587   0: abcd:   0: abcd:
7588   1: abcd   1: abcd
7589    
 /(?'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  
   
7590  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
7591      adaa      adaa
7592   0: adaa   0: adaa
# Line 7612  No match Line 7613  No match
7613      bddd      bddd
7614  No match  No match
7615    
 /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x  
     abd  
  0: abd  
  1: a  
     ce  
  0: ce  
   
7616  /(?(<bc))/  /(?(<bc))/
7617  Failed: malformed number or name after (?( at offset 6  Failed: malformed number or name after (?( at offset 6
7618    
# Line 7649  Failed: reference to non-existent subpat Line 7643  Failed: reference to non-existent subpat
7643   1: abcabc1Xabc2XabcX   1: abcabc1Xabc2XabcX
7644   2: abcabc1Xabc2XabcX   2: abcabc1Xabc2XabcX
7645    
 /^(?(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>  
   
7646  /^(?(DEFINE) abc | xyz ) /x  /^(?(DEFINE) abc | xyz ) /x
7647  Failed: DEFINE group contains more than one branch at offset 22  Failed: DEFINE group contains more than one branch at offset 22
7648    
# Line 7844  Need char = 'P' Line 7820  Need char = 'P'
7820   0: PXP   0: PXP
7821   1: P   1: P
7822    
 /(?(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  
   
7823  /(?:a(?&abc)b)*(?<abc>x)/  /(?:a(?&abc)b)*(?<abc>x)/
7824      123axbaxbaxbx456      123axbaxbaxbx456
7825   0: axbaxbaxbx   0: axbaxbaxbx
# Line 7921  No match Line 7857  No match
7857     DEFabcABCXYZ     DEFabcABCXYZ
7858  No match  No match
7859    
 /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/  
     ababababbbabZXXXX  
  0: ababababbbabZ  
  1: ab  
  2: b  
   
7860  /^(a)\g-2/  /^(a)\g-2/
7861  Failed: reference to non-existent subpattern at offset 7  Failed: reference to non-existent subpattern at offset 7
7862    
# Line 8182  Failed: reference to non-existent subpat Line 8112  Failed: reference to non-existent subpat
8112   0: Y!   0: Y!
8113   1: !   1: !
8114    
 /(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  
   
8115  /(?<A>tom|bon)-\k{A}/  /(?<A>tom|bon)-\k{A}/
8116      tom-tom      tom-tom
8117   0: tom-tom   0: tom-tom
# Line 8214  No match Line 8124  No match
8124      tom-bon      tom-bon
8125  No match  No match
8126    
 /(?<A>tom|bon)-\g{A}/  
     tom-tom  
  0: tom-tom  
  1: tom  
     bon-bon  
  0: bon-bon  
  1: bon  
   
8127  /\g{A/  /\g{A/
8128  Failed: syntax error in subpattern name (missing terminator) at offset 4  Failed: syntax error in subpattern name (missing terminator) at offset 4
8129    
# Line 8316  Failed: syntax error in subpattern name Line 8218  Failed: syntax error in subpattern name
8218   3: <unset>   3: <unset>
8219   4: x   4: x
8220    
 /(?|(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  
   
8221  /[\h]/BZ  /[\h]/BZ
8222  ------------------------------------------------------------------  ------------------------------------------------------------------
8223          Bra          Bra
# Line 8688  Failed: missing terminating ] for charac Line 8514  Failed: missing terminating ] for charac
8514          End          End
8515  ------------------------------------------------------------------  ------------------------------------------------------------------
8516    
 /^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  
   
8517  /^a+(*FAIL)/C  /^a+(*FAIL)/C
8518      aaaaaa      aaaaaa
8519  --->aaaaaa  --->aaaaaa
# Line 9240  Failed: unknown POSIX class name at offs Line 8985  Failed: unknown POSIX class name at offs
8985  /[[:a\dz:]]/  /[[:a\dz:]]/
8986  Failed: unknown POSIX class name at offset 3  Failed: unknown POSIX class name at offset 3
8987    
8988  /^(?<name>a|b\g<name>c)/  /(^(a|b\g<-1'c))/
8989      aaaa  Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15
  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  
8990    
8991  /^(a|b\g<1>c)/  /^(?+1)(?<a>x|y){0}z/
8992      aaaa      xzxx
8993   0: a   0: xz
8994   1: a      yzyy
8995      bacxxx   0: yz
8996   0: bac      ** Failers
8997   1: bac  No match
8998      bbaccxxx      xxz
8999   0: bbacc  No match
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
9000    
9001  /^(a|b\g'1'c)/  /(\3)(\1)(a)/
9002      aaaa      cat
9003   0: a  No match
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
9004    
9005  /^(a|b\g'-1'c)/  /(\3)(\1)(a)/<JS>
9006      aaaa      cat
9007   0: a   0: a
9008   1: a   1:
9009      bacxxx   2:
9010   0: bac   3: a
9011   1: bac  
9012      bbaccxxx  /TA]/
9013   0: bbacc      The ACTA] comes
9014   1: bbacc   0: TA]
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
9015    
9016  /(^(a|b\g<-1>c))/  /TA]/<JS>
9017      aaaa  Failed: ] is an invalid data character in JavaScript compatibility mode at offset 2
  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  
9018    
9019  /(^(a|b\g<-1'c))/  /(?2)[]a()b](abc)/
9020  Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15  Failed: reference to non-existent subpattern at offset 3
9021    
9022  /(^(a|b\g{-1}))/  /(?2)[^]a()b](abc)/
9023      bacxxx  Failed: reference to non-existent subpattern at offset 3
 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  
   
 /^(?+1)(?<a>x|y){0}z/  
     xzxx  
  0: xz  
  1: <unset>  
     yzyy  
  0: yz  
  1: <unset>  
     ** Failers  
 No match  
     xxz  
 No match  
   
 /(\3)(\1)(a)/  
     cat  
 No match  
   
 /(\3)(\1)(a)/<JS>  
     cat  
  0: a  
  1:  
  2:  
  3: a  
   
 /TA]/  
     The ACTA] comes  
  0: TA]  
   
 /TA]/<JS>  
 Failed: ] is an invalid data character in JavaScript compatibility mode at offset 2  
   
 /(?2)[]a()b](abc)/  
 Failed: reference to non-existent subpattern at offset 3  
   
 /(?2)[^]a()b](abc)/  
 Failed: reference to non-existent subpattern at offset 3  
9024    
9025  /(?1)[]a()b](abc)/  /(?1)[]a()b](abc)/
9026      abcbabc      abcbabc
# Line 9491  Capturing subpattern count = 1 Line 9107  Capturing subpattern count = 1
9107  No options  No options
9108  No first char  No first char
9109  No need char  No need char
9110    Subject length lower bound = 1
9111  Starting byte set: x y z  Starting byte set: x y z
9112    
9113  /(?(?=.*b)b|^)/CI  /(?(?=.*b)b|^)/CI
# Line 9638  No match Line 9255  No match
9255   0: "ab"   0: "ab"
9256   1:   1:
9257    
 /^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/  
     XYabcdY  
  0: XYabcdY  
  1: a  
  2: b  
  3: c  
  4: d  
  5: Y  
   
9258  /^X(?5)(a)(?|(b)|(q))(c)(d)Y/  /^X(?5)(a)(?|(b)|(q))(c)(d)Y/
9259  Failed: reference to non-existent subpattern at offset 5  Failed: reference to non-existent subpattern at offset 5
9260    
# Line 9659  Failed: reference to non-existent subpat Line 9267  Failed: reference to non-existent subpat
9267   4: d   4: d
9268   5: Y   5: Y
9269    
 /^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  
   
9270  /Xa{2,4}b/  /Xa{2,4}b/
9271      X\P      X\P
9272  Partial match: X  Partial match: X
# Line 9918  Partial match: 123999 Line 9493  Partial match: 123999
9493    
9494  /Z(*F)/  /Z(*F)/
9495      Z\P      Z\P
9496  Partial match: Z  No match
9497      ZA\P      ZA\P
9498  No match  No match
9499    
9500  /Z(?!)/  /Z(?!)/
9501      Z\P      Z\P
9502  Partial match: Z  No match
9503      ZA\P      ZA\P
9504  No match  No match
9505    
9506  / End of testinput2 /  /dog(sbody)?/
9507        dogs\P
9508     0: dog
9509        dogs\P\P
9510    Partial match: dogs
9511    
9512    /dog(sbody)??/
9513        dogs\P
9514     0: dog
9515        dogs\P\P
9516     0: dog
9517    
9518    /dog|dogsbody/
9519        dogs\P
9520     0: dog
9521        dogs\P\P
9522     0: dog
9523    
9524    /dogsbody|dog/
9525        dogs\P
9526     0: dog
9527        dogs\P\P
9528    Partial match: dogs
9529    
9530    /\bthe cat\b/
9531        the cat\P
9532     0: the cat
9533        the cat\P\P
9534    Partial match: the cat
9535    
9536    /abc/
9537       abc\P
9538     0: abc
9539       abc\P\P
9540     0: abc
9541    
9542    /\w+A/P
9543       CDAAAAB
9544     0: CDAAAA
9545    
9546    /\w+A/PU
9547       CDAAAAB
9548     0: CDA
9549    
9550    /abc\K123/
9551        xyzabc123pqr
9552     0: 123
9553        xyzabc12\P
9554    Partial match: abc12
9555        xyzabc12\P\P
9556    Partial match: abc12
9557    
9558    /(?<=abc)123/
9559        xyzabc123pqr
9560     0: 123
9561        xyzabc12\P
9562    Partial match: abc12
9563        xyzabc12\P\P
9564    Partial match: abc12
9565    
9566    /\babc\b/
9567        +++abc+++
9568     0: abc
9569        +++ab\P
9570    Partial match: +ab
9571        +++ab\P\P
9572    Partial match: +ab
9573    
9574    /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
9575    ------------------------------------------------------------------
9576            Bra
9577            Once
9578            Recurse
9579            Ket
9580            Once
9581            Recurse
9582            Ket
9583            Cond
9584            Cond def
9585            CBra 1
9586            <
9587            [^m]
9588            [^>]
9589            >
9590            [^<]
9591            Ket
9592            CBra 2
9593            \w*+
9594            Ket
9595            Ket
9596            Ket
9597            End
9598    ------------------------------------------------------------------
9599    
9600    /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
9601    ------------------------------------------------------------------
9602            Bra
9603            Once
9604            Recurse
9605            Ket
9606            Once
9607            Recurse
9608            Ket
9609            Cond
9610            Cond def
9611            CBra 1
9612            <
9613            [\x00-/:-\xff] (neg)
9614            [^>]
9615            >
9616            [^<]
9617            Ket
9618            CBra 2
9619            \w*+
9620            Ket
9621            Ket
9622            Ket
9623            End
9624    ------------------------------------------------------------------
9625    
9626    /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
9627    ------------------------------------------------------------------
9628            Bra
9629            CBra 1
9630            ab
9631            Ket
9632            CBra 2
9633            x
9634            CBra 3
9635            y
9636            Ket
9637            z
9638            CBra 4
9639            cd
9640            Close 4
9641            Close 2
9642            *ACCEPT
9643            Ket
9644            Ket
9645            pq
9646            Ket
9647            End
9648    ------------------------------------------------------------------
9649    
9650    /abc\K/+
9651        abcdef
9652     0:
9653     0+ def
9654        abcdef\N\N
9655     0:
9656     0+ def
9657        xyzabcdef\N\N
9658     0:
9659     0+ def
9660        ** Failers
9661    No match
9662        abcdef\N
9663    No match
9664        xyzabcdef\N
9665    No match
9666    
9667    /^(?:(?=abc)|abc\K)/+
9668        abcdef
9669     0:
9670     0+ abcdef
9671        abcdef\N\N
9672     0:
9673     0+ def
9674        ** Failers
9675    No match
9676        abcdef\N
9677    No match
9678    
9679    /a?b?/+
9680        xyz
9681     0:
9682     0+ xyz
9683        xyzabc
9684     0:
9685     0+ xyzabc
9686        xyzabc\N
9687     0: ab
9688     0+ c
9689        xyzabc\N\N
9690     0:
9691     0+ yzabc
9692        xyz\N\N
9693     0:
9694     0+ yz
9695        ** Failers
9696     0:
9697     0+ ** Failers
9698        xyz\N
9699    No match
9700    
9701    /^a?b?/+
9702        xyz
9703     0:
9704     0+ xyz
9705        xyzabc
9706     0:
9707     0+ xyzabc
9708        ** Failers
9709     0:
9710     0+ ** Failers
9711        xyzabc\N
9712    No match
9713        xyzabc\N\N
9714    No match
9715        xyz\N\N
9716    No match
9717        xyz\N
9718    No match
9719    
9720    /^(?<name>a|b\g<name>c)/
9721        aaaa
9722     0: a
9723     1: a
9724        bacxxx
9725     0: bac
9726     1: bac
9727        bbaccxxx
9728     0: bbacc
9729     1: bbacc
9730        bbbacccxx
9731     0: bbbaccc
9732     1: bbbaccc
9733    
9734    /^(?<name>a|b\g'name'c)/
9735        aaaa
9736     0: a
9737     1: a
9738        bacxxx
9739     0: bac
9740     1: bac
9741        bbaccxxx
9742     0: bbacc
9743     1: bbacc
9744        bbbacccxx
9745     0: bbbaccc
9746     1: bbbaccc
9747    
9748    /^(a|b\g<1>c)/
9749        aaaa
9750     0: a
9751     1: a
9752        bacxxx
9753     0: bac
9754     1: bac
9755        bbaccxxx
9756     0: bbacc
9757     1: bbacc
9758        bbbacccxx
9759     0: bbbaccc
9760     1: bbbaccc
9761    
9762    /^(a|b\g'1'c)/
9763        aaaa
9764     0: a
9765     1: a
9766        bacxxx
9767     0: bac
9768     1: bac
9769        bbaccxxx
9770     0: bbacc
9771     1: bbacc
9772        bbbacccxx
9773     0: bbbaccc
9774     1: bbbaccc
9775    
9776    /^(a|b\g'-1'c)/
9777        aaaa
9778     0: a
9779     1: a
9780        bacxxx
9781     0: bac
9782     1: bac
9783        bbaccxxx
9784     0: bbacc
9785     1: bbacc
9786        bbbacccxx
9787     0: bbbaccc
9788     1: bbbaccc
9789    
9790    /(^(a|b\g<-1>c))/
9791        aaaa
9792     0: a
9793     1: a
9794     2: a
9795        bacxxx
9796     0: bac
9797     1: bac
9798     2: bac
9799        bbaccxxx
9800     0: bbacc
9801     1: bbacc
9802     2: bbacc
9803        bbbacccxx
9804     0: bbbaccc
9805     1: bbbaccc
9806     2: bbbaccc
9807    
9808    /(?-i:\g<name>)(?i:(?<name>a))/
9809        XaaX
9810     0: aa
9811     1: a
9812        XAAX
9813     0: AA
9814     1: A
9815    
9816    /(?i:\g<name>)(?-i:(?<name>a))/
9817        XaaX
9818     0: aa
9819     1: a
9820        ** Failers
9821    No match
9822        XAAX
9823    No match
9824    
9825    /(?-i:\g<+1>)(?i:(a))/
9826        XaaX
9827     0: aa
9828     1: a
9829        XAAX
9830     0: AA
9831     1: A
9832    
9833    /(?=(?<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>\})\}))\{/
9834    
9835    /(?<n>a|b|c)\g<n>*/
9836       abc
9837     0: abc
9838     1: a
9839       accccbbb
9840     0: accccbbb
9841     1: a
9842    
9843    /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
9844        XYabcdY
9845     0: XYabcdY
9846     1: a
9847     2: b
9848     3: <unset>
9849     4: <unset>
9850     5: c
9851     6: d
9852     7: Y
9853    
9854    /(?<=b(?1)|zzz)(a)/
9855        xbaax
9856     0: a
9857     1: a
9858        xzzzax
9859     0: a
9860     1: a
9861    
9862    /(a)(?<=b\1)/
9863    Failed: lookbehind assertion is not fixed length at offset 10
9864    
9865    /(a)(?<=b+(?1))/
9866    Failed: lookbehind assertion is not fixed length at offset 13
9867    
9868    /(a+)(?<=b(?1))/
9869    Failed: lookbehind assertion is not fixed length at offset 14
9870    
9871    /(a(?<=b(?1)))/
9872    Failed: lookbehind assertion is not fixed length at offset 13
9873    
9874    /(?<=b(?1))xyz/
9875    Failed: reference to non-existent subpattern at offset 8
9876    
9877    /(?<=b(?1))xyz(b+)pqrstuvew/
9878    Failed: lookbehind assertion is not fixed length at offset 26
9879    
9880    /(a|bc)\1/SI
9881    Capturing subpattern count = 1
9882    Max back reference = 1
9883    No options
9884    No first char
9885    No need char
9886    Subject length lower bound = 2
9887    Starting byte set: a b
9888    
9889    /(a|bc)\1{2,3}/SI
9890    Capturing subpattern count = 1
9891    Max back reference = 1
9892    No options
9893    No first char
9894    No need char
9895    Subject length lower bound = 3
9896    Starting byte set: a b
9897    
9898    /(a|bc)(?1)/SI
9899    Capturing subpattern count = 1
9900    No options
9901    No first char
9902    No need char
9903    Subject length lower bound = 2
9904    Starting byte set: a b
9905    
9906    /(a|b\1)(a|b\1)/SI
9907    Capturing subpattern count = 2
9908    Max back reference = 1
9909    No options
9910    No first char
9911    No need char
9912    Subject length lower bound = 2
9913    Starting byte set: a b
9914    
9915    /(a|b\1){2}/SI
9916    Capturing subpattern count = 1
9917    Max back reference = 1
9918    No options
9919    No first char
9920    No need char
9921    Subject length lower bound = 2
9922    Starting byte set: a b
9923    
9924    /(a|bbbb\1)(a|bbbb\1)/SI
9925    Capturing subpattern count = 2
9926    Max back reference = 1
9927    No options
9928    No first char
9929    No need char
9930    Subject length lower bound = 2
9931    Starting byte set: a b
9932    
9933    /(a|bbbb\1){2}/SI
9934    Capturing subpattern count = 1
9935    Max back reference = 1
9936    No options
9937    No first char
9938    No need char
9939    Subject length lower bound = 2
9940    Starting byte set: a b
9941    
9942    /^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
9943    Capturing subpattern count = 1
9944    Options: anchored
9945    No first char
9946    Need char = ':'
9947    Subject length lower bound = 22
9948    No set of starting bytes
9949    
9950    /  (?: [\040\t] |  \(
9951    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9952    \)  )*                          # optional leading comment
9953    (?:    (?:
9954    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
9955    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
9956    |
9957    " (?:                      # opening quote...
9958    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
9959    |                     #    or
9960    \\ [^\x80-\xff]           #   Escaped something (something != CR)
9961    )* "  # closing quote
9962    )                    # initial word
9963    (?:  (?: [\040\t] |  \(
9964    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9965    \)  )*  \.  (?: [\040\t] |  \(
9966    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9967    \)  )*   (?:
9968    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
9969    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
9970    |
9971    " (?:                      # opening quote...
9972    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
9973    |                     #    or
9974    \\ [^\x80-\xff]           #   Escaped something (something != CR)
9975    )* "  # closing quote
9976    )  )* # further okay, if led by a period
9977    (?: [\040\t] |  \(
9978    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9979    \)  )*  @  (?: [\040\t] |  \(
9980    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9981    \)  )*    (?:
9982    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
9983    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
9984    |   \[                         # [
9985    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
9986    \]                        #           ]
9987    )                           # initial subdomain
9988    (?:                                  #
9989    (?: [\040\t] |  \(
9990    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9991    \)  )*  \.                        # if led by a period...
9992    (?: [\040\t] |  \(
9993    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9994    \)  )*   (?:
9995    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
9996    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
9997    |   \[                         # [
9998    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
9999    \]                        #           ]
10000    )                     #   ...further okay
10001    )*
10002    # address
10003    |                     #  or
10004    (?:
10005    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10006    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10007    |
10008    " (?:                      # opening quote...
10009    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10010    |                     #    or
10011    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10012    )* "  # closing quote
10013    )             # one word, optionally followed by....
10014    (?:
10015    [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
10016    \(
10017    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10018    \)       |  # comments, or...
10019    
10020    " (?:                      # opening quote...
10021    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10022    |                     #    or
10023    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10024    )* "  # closing quote
10025    # quoted strings
10026    )*
10027    <  (?: [\040\t] |  \(
10028    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10029    \)  )*                     # leading <
10030    (?:  @  (?: [\040\t] |  \(
10031    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10032    \)  )*    (?:
10033    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10034    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10035    |   \[                         # [
10036    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10037    \]                        #           ]
10038    )                           # initial subdomain
10039    (?:                                  #
10040    (?: [\040\t] |  \(
10041    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10042    \)  )*  \.                        # if led by a period...
10043    (?: [\040\t] |  \(
10044    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10045    \)  )*   (?:
10046    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10047    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10048    |   \[                         # [
10049    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10050    \]                        #           ]
10051    )                     #   ...further okay
10052    )*
10053    
10054    (?:  (?: [\040\t] |  \(
10055    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10056    \)  )*  ,  (?: [\040\t] |  \(
10057    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10058    \)  )*  @  (?: [\040\t] |  \(
10059    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10060    \)  )*    (?:
10061    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10062    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10063    |   \[                         # [
10064    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10065    \]                        #           ]
10066    )                           # initial subdomain
10067    (?:                                  #
10068    (?: [\040\t] |  \(
10069    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10070    \)  )*  \.                        # if led by a period...
10071    (?: [\040\t] |  \(
10072    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10073    \)  )*   (?:
10074    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10075    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10076    |   \[                         # [
10077    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10078    \]                        #           ]
10079    )                     #   ...further okay
10080    )*
10081    )* # further okay, if led by comma
10082    :                                # closing colon
10083    (?: [\040\t] |  \(
10084    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10085    \)  )*  )? #       optional route
10086    (?:
10087    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10088    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10089    |
10090    " (?:                      # opening quote...
10091    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10092    |                     #    or
10093    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10094    )* "  # closing quote
10095    )                    # initial word
10096    (?:  (?: [\040\t] |  \(
10097    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10098    \)  )*  \.  (?: [\040\t] |  \(
10099    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10100    \)  )*   (?:
10101    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10102    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10103    |
10104    " (?:                      # opening quote...
10105    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10106    |                     #    or
10107    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10108    )* "  # closing quote
10109    )  )* # further okay, if led by a period
10110    (?: [\040\t] |  \(
10111    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10112    \)  )*  @  (?: [\040\t] |  \(
10113    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10114    \)  )*    (?:
10115    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10116    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10117    |   \[                         # [
10118    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10119    \]                        #           ]
10120    )                           # initial subdomain
10121    (?:                                  #
10122    (?: [\040\t] |  \(
10123    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10124    \)  )*  \.                        # if led by a period...
10125    (?: [\040\t] |  \(
10126    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10127    \)  )*   (?:
10128    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10129    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10130    |   \[                         # [
10131    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10132    \]                        #           ]
10133    )                     #   ...further okay
10134    )*
10135    #       address spec
10136    (?: [\040\t] |  \(
10137    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10138    \)  )*  > #                  trailing >
10139    # name and address
10140    )  (?: [\040\t] |  \(
10141    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10142    \)  )*                       # optional trailing comment
10143    /xSI
10144    Capturing subpattern count = 0
10145    Contains explicit CR or LF match
10146    Options: extended
10147    No first char
10148    No need char
10149    Subject length lower bound = 3
10150    Starting byte set: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8
10151      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
10152      f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
10153    
10154    /<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
10155    Capturing subpattern count = 11
10156    Options: caseless dotall
10157    First char = '<'
10158    Need char = '>'
10159    Subject length lower bound = 47
10160    No set of starting bytes
10161    
10162    "(?>.*/)foo"SI
10163    Capturing subpattern count = 0
10164    No options
10165    First char at start or follows newline
10166    Need char = 'o'
10167    Subject length lower bound = 4
10168    No set of starting bytes
10169    
10170    /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /xSI
10171    Capturing subpattern count = 0
10172    Options: extended
10173    No first char
10174    Need char = '-'
10175    Subject length lower bound = 8
10176    No set of starting bytes
10177    
10178    /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
10179    Capturing subpattern count = 1
10180    Options: caseless
10181    No first char
10182    No need char
10183    Subject length lower bound = 1
10184    Starting byte set: A B C a b c
10185    
10186    /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
10187    Capturing subpattern count = 0
10188    No options
10189    No first char
10190    Need char = 'b'
10191    Subject length lower bound = 41
10192    Starting byte set: c d
10193    
10194    /<a[\s]+href[\s]*=[\s]*          # find <a href=
10195     ([\"\'])?                       # find single or double quote
10196     (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
10197                                     # quote, otherwise match up to next space
10198    /isxSI
10199    Capturing subpattern count = 3
10200    Max back reference = 1
10201    Options: caseless extended dotall
10202    First char = '<'
10203    Need char = '='
10204    Subject length lower bound = 9
10205    No set of starting bytes
10206    
10207    /^(?!:)                       # colon disallowed at start
10208      (?:                         # start of item
10209        (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
10210        (?(1)0 | () ) )           # if null previously matched, fail; else null
10211        :                         # followed by colon
10212      ){1,7}                      # end item; 1-7 of them required
10213      [0-9a-f]{1,4} $             # final hex number at end of string
10214      (?(1)|.)                    # check that there was an empty component
10215      /xiIS
10216    Capturing subpattern count = 1
10217    Options: anchored caseless extended
10218    No first char
10219    Need char = ':'
10220    Subject length lower bound = 2
10221    No set of starting bytes
10222    
10223    /(?|(?<a>A)|(?<a>B))/I
10224    Capturing subpattern count = 1
10225    Named capturing subpatterns:
10226      a   1
10227      a   1
10228    No options
10229    No first char
10230    No need char
10231        AB\Ca
10232     0: A
10233     1: A
10234      C A (1) a
10235        BA\Ca
10236     0: B
10237     1: B
10238      C B (1) a
10239    
10240    /(?|(?<a>A)|(?<b>B))/
10241    Failed: different names for subpatterns of the same number are not allowed at offset 15
10242    
10243    /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
10244        b(?<quote> (?<apostrophe>')|(?<realquote>")) )
10245        (?('quote')[a-z]+|[0-9]+)/JIx
10246    Capturing subpattern count = 6
10247    Named capturing subpatterns:
10248      apostrophe   2
10249      apostrophe   5
10250      quote        1
10251      quote        4
10252      realquote    3
10253      realquote    6
10254    Options: extended dupnames
10255    No first char
10256    No need char
10257        a"aaaaa
10258     0: a"aaaaa
10259     1: "
10260     2: <unset>
10261     3: "
10262        b"aaaaa
10263     0: b"aaaaa
10264     1: <unset>
10265     2: <unset>
10266     3: <unset>
10267     4: "
10268     5: <unset>
10269     6: "
10270        ** Failers
10271    No match
10272        b"11111
10273    No match
10274        a"11111
10275    No match
10276    
10277    /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
10278    ------------------------------------------------------------------
10279            Bra
10280            ^
10281            Bra
10282            CBra 1
10283            a
10284            Ket
10285            CBra 2
10286            b
10287            Ket
10288            CBra 3
10289            c
10290            Ket
10291            CBra 4
10292            d
10293            Ket
10294            Alt
10295            CBra 1
10296            e
10297            Ket
10298            Ket
10299            Cond
10300          4 Cond nref
10301            X
10302            Alt
10303            Y
10304            Ket
10305            Ket
10306            End
10307    ------------------------------------------------------------------
10308    Capturing subpattern count = 4
10309    Named capturing subpatterns:
10310      D   4
10311      D   1
10312    Options: anchored extended dupnames
10313    No first char
10314    No need char
10315        abcdX
10316     0: abcdX
10317     1: a
10318     2: b
10319     3: c
10320     4: d
10321        eX
10322     0: eX
10323     1: e
10324        ** Failers
10325    No match
10326        abcdY
10327    No match
10328        ey
10329    No match
10330    
10331    /(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
10332    ------------------------------------------------------------------
10333            Bra
10334            CBra 1
10335            a
10336            Ket
10337            CBra 2
10338            b
10339            Ket
10340            CBra 3
10341            c
10342            Ket
10343            CBra 4
10344            d
10345            Cond
10346            Cond nrecurse 1
10347            $
10348            Alt
10349            Once
10350            Recurse
10351            Ket
10352            Ket
10353            Ket
10354            Ket
10355            End
10356    ------------------------------------------------------------------
10357    Capturing subpattern count = 4
10358    Named capturing subpatterns:
10359      A   1
10360      A   4
10361    Options: extended dupnames
10362    First char = 'a'
10363    Need char = 'd'
10364        abcdd
10365     0: abcdd
10366     1: a
10367     2: b
10368     3: c
10369     4: dd
10370        ** Failers
10371    No match
10372        abcdde
10373    No match
10374    
10375    /abcd*/
10376        xxxxabcd\P
10377     0: abcd
10378        xxxxabcd\P\P
10379    Partial match: abcd
10380    
10381    /abcd*/i
10382        xxxxabcd\P
10383     0: abcd
10384        xxxxabcd\P\P
10385    Partial match: abcd
10386        XXXXABCD\P
10387     0: ABCD
10388        XXXXABCD\P\P
10389    Partial match: ABCD
10390    
10391    /abc\d*/
10392        xxxxabc1\P
10393     0: abc1
10394        xxxxabc1\P\P
10395    Partial match: abc1
10396    
10397    /(a)bc\1*/
10398        xxxxabca\P
10399     0: abca
10400     1: a
10401        xxxxabca\P\P
10402    Partial match: abca
10403    
10404    /abc[de]*/
10405        xxxxabcde\P
10406     0: abcde
10407        xxxxabcde\P\P
10408    Partial match: abcde
10409    
10410    /-- This is not in the Perl 5.10 test because Perl seems currently to be broken
10411        and not behaving as specified in that it *does* bumpalong after hitting
10412        (*COMMIT). --/
10413    
10414    /(?1)(A(*COMMIT)|B)D/
10415        ABD
10416     0: ABD
10417     1: B
10418        XABD
10419     0: ABD
10420     1: B
10421        BAD
10422     0: BAD
10423     1: A
10424        ABXABD
10425     0: ABD
10426     1: B
10427        ** Failers
10428    No match
10429        ABX
10430    No match
10431        BAXBAD
10432    No match
10433    
10434    /(\3)(\1)(a)/<JS>
10435        cat
10436     0: a
10437     1:
10438     2:
10439     3: a
10440    
10441    /(\3)(\1)(a)/SI<JS>
10442    Capturing subpattern count = 3
10443    Max back reference = 3
10444    Options:
10445    No first char
10446    Need char = 'a'
10447    Subject length lower bound = 1
10448    No set of starting bytes
10449        cat
10450     0: a
10451     1:
10452     2:
10453     3: a
10454    
10455    /(\3)(\1)(a)/SI
10456    Capturing subpattern count = 3
10457    Max back reference = 3
10458    No options
10459    No first char
10460    Need char = 'a'
10461    Subject length lower bound = 3
10462    No set of starting bytes
10463        cat
10464    No match
10465    
10466    /-- End of testinput2 --/

Legend:
Removed from v.426  
changed lines
  Added in v.467

  ViewVC Help
Powered by ViewVC 1.1.5