/[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 448 by ph10, Tue Sep 15 19:11:48 2009 UTC revision 510 by ph10, Sat Mar 27 17:45:29 2010 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 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 833  No match Line 857  No match
857      a      a
858  No match  No match
859    
860  /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
861  Capturing subpattern count = 0  Capturing subpattern count = 0
862  No options  No options
863  First char = 'T'  First char = 'T'
# Line 845  Max back reference = 1 Line 869  Max back reference = 1
869  Options: anchored  Options: anchored
870  No first char  No first char
871  No need char  No need char
872        aaaa
873    No match
874      aaaaaa      aaaaaa
875   0: aaaaaa  No match
876   1: aa  
877    /Perl does not fail these two for the final subjects. Neither did PCRE until/
878    /release 8.01. The problem is in backtracking into a subpattern that contains/
879    No match
880    /a recursive reference to itself. PCRE has now made these into atomic patterns./
881    No match
882    
883    /^(xa|=?\1a){2}$/
884        xa=xaa
885     0: xa=xaa
886     1: =xaa
887        ** Failers
888    No match
889        xa=xaaa
890    No match
891    
892    /^(xa|=?\1a)+$/
893        xa=xaa
894     0: xa=xaa
895     1: =xaa
896        ** Failers
897    No match
898        xa=xaaa
899    No match
900    
901  /These are syntax tests from Perl 5.005/I  /These are syntax tests from Perl 5.005/I
902  Capturing subpattern count = 0  Capturing subpattern count = 0
# Line 1647  Capturing subpattern count = 0 Line 1696  Capturing subpattern count = 0
1696  Options: anchored  Options: anchored
1697  No first char  No first char
1698  Need char = 'd'  Need char = 'd'
1699  Study returned NULL  Subject length lower bound = 4
1700    No set of starting bytes
1701    
1702  /\(             # ( at start  /\(             # ( at start
1703    (?:           # Non-capturing bracket    (?:           # Non-capturing bracket
# Line 1879  Capturing subpattern count = 0 Line 1929  Capturing subpattern count = 0
1929  No options  No options
1930  No first char  No first char
1931  No need char  No need char
1932    Subject length lower bound = 1
1933  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
1934    _ 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
1935    
# Line 1940  Contains explicit CR or LF match Line 1991  Contains explicit CR or LF match
1991  No options  No options
1992  No first char  No first char
1993  No need char  No need char
1994    Subject length lower bound = 1
1995  Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20  Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
1996    
1997  /^[[:cntrl:]]/DZ  /^[[:cntrl:]]/DZ
# Line 3410  Capturing subpattern count = 0 Line 3462  Capturing subpattern count = 0
3462  No options  No options
3463  No first char  No first char
3464  No need char  No need char
3465    Subject length lower bound = 1
3466  Starting byte set: a b  Starting byte set: a b
3467    
3468  /[^a]/I  /[^a]/I
# Line 3429  Capturing subpattern count = 0 Line 3482  Capturing subpattern count = 0
3482  No options  No options
3483  No first char  No first char
3484  Need char = '6'  Need char = '6'
3485    Subject length lower bound = 4
3486  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
3487    
3488  /a^b/I  /a^b/I
# Line 3462  Capturing subpattern count = 0 Line 3516  Capturing subpattern count = 0
3516  Options: caseless  Options: caseless
3517  No first char  No first char
3518  No need char  No need char
3519    Subject length lower bound = 1
3520  Starting byte set: A B a b  Starting byte set: A B a b
3521    
3522  /[ab](?i)cd/IS  /[ab](?i)cd/IS
# Line 3469  Capturing subpattern count = 0 Line 3524  Capturing subpattern count = 0
3524  No options  No options
3525  No first char  No first char
3526  Need char = 'd' (caseless)  Need char = 'd' (caseless)
3527    Subject length lower bound = 3
3528  Starting byte set: a b  Starting byte set: a b
3529    
3530  /abc(?C)def/I  /abc(?C)def/I
# Line 3819  Capturing subpattern count = 0 Line 3875  Capturing subpattern count = 0
3875  No options  No options
3876  No first char  No first char
3877  No need char  No need char
3878    Subject length lower bound = 1
3879  Starting byte set: a b  Starting byte set: a b
3880    
3881  /(?R)/I  /(?R)/I
# Line 3938  No options Line 3995  No options
3995  First char = 'a'  First char = 'a'
3996  Need char = 'b'  Need char = 'b'
3997    
 /^\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  
   
3998  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
3999  Capturing subpattern count = 2  Capturing subpattern count = 2
4000  Options: anchored  Options: anchored
# Line 4636  Capturing subpattern count = 3 Line 4660  Capturing subpattern count = 3
4660  Options: caseless  Options: caseless
4661  No first char  No first char
4662  Need char = 'g' (caseless)  Need char = 'g' (caseless)
4663  Study returned NULL  Subject length lower bound = 8
4664    No set of starting bytes
4665       Baby Bjorn Active Carrier - With free SHIPPING!!       Baby Bjorn Active Carrier - With free SHIPPING!!
4666   0: Baby Bjorn Active Carrier - With free SHIPPING!!   0: Baby Bjorn Active Carrier - With free SHIPPING!!
4667   1: Baby Bjorn Active Carrier - With free SHIPPING!!   1: Baby Bjorn Active Carrier - With free SHIPPING!!
# Line 4654  Capturing subpattern count = 0 Line 4679  Capturing subpattern count = 0
4679  No options  No options
4680  No first char  No first char
4681  Need char = 'b'  Need char = 'b'
4682  Study returned NULL  Subject length lower bound = 1
4683    No set of starting bytes
4684    
4685  /(a|b)*.?c/ISDZ  /(a|b)*.?c/ISDZ
4686  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 4674  Capturing subpattern count = 1 Line 4700  Capturing subpattern count = 1
4700  No options  No options
4701  No first char  No first char
4702  Need char = 'c'  Need char = 'c'
4703  Study returned NULL  Subject length lower bound = 1
4704    No set of starting bytes
4705    
4706  /abc(?C255)de(?C)f/DZ  /abc(?C255)de(?C)f/DZ
4707  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 5457  Capturing subpattern count = 1 Line 5484  Capturing subpattern count = 1
5484  No options  No options
5485  No first char  No first char
5486  No need char  No need char
5487    Subject length lower bound = 1
5488  Starting byte set: a b  Starting byte set: a b
5489  Compiled regex written to testsavedregex  Compiled regex written to testsavedregex
5490  Study data written to testsavedregex  Study data written to testsavedregex
# Line 5477  Capturing subpattern count = 1 Line 5505  Capturing subpattern count = 1
5505  No options  No options
5506  No first char  No first char
5507  No need char  No need char
5508    Subject length lower bound = 1
5509  Starting byte set: a b  Starting byte set: a b
5510  Compiled regex written to testsavedregex  Compiled regex written to testsavedregex
5511  Study data written to testsavedregex  Study data written to testsavedregex
# Line 6189  Capturing subpattern count = 0 Line 6218  Capturing subpattern count = 0
6218  No options  No options
6219  No first char  No first char
6220  Need char = ','  Need char = ','
6221    Subject length lower bound = 1
6222  Starting byte set: \x09 \x0a \x0c \x0d \x20 ,  Starting byte set: \x09 \x0a \x0c \x0d \x20 ,
6223      \x0b,\x0b      \x0b,\x0b
6224   0: ,   0: ,
# Line 6493  Capturing subpattern count = 1 Line 6523  Capturing subpattern count = 1
6523  No options  No options
6524  No first char  No first char
6525  No need char  No need char
6526    Subject length lower bound = 1
6527  Starting byte set: C a b c d  Starting byte set: C a b c d
6528    
6529  /()[ab]xyz/IS  /()[ab]xyz/IS
# Line 6500  Capturing subpattern count = 1 Line 6531  Capturing subpattern count = 1
6531  No options  No options
6532  No first char  No first char
6533  Need char = 'z'  Need char = 'z'
6534    Subject length lower bound = 4
6535  Starting byte set: a b  Starting byte set: a b
6536    
6537  /(|)[ab]xyz/IS  /(|)[ab]xyz/IS
# Line 6507  Capturing subpattern count = 1 Line 6539  Capturing subpattern count = 1
6539  No options  No options
6540  No first char  No first char
6541  Need char = 'z'  Need char = 'z'
6542    Subject length lower bound = 4
6543  Starting byte set: a b  Starting byte set: a b
6544    
6545  /(|c)[ab]xyz/IS  /(|c)[ab]xyz/IS
# Line 6514  Capturing subpattern count = 1 Line 6547  Capturing subpattern count = 1
6547  No options  No options
6548  No first char  No first char
6549  Need char = 'z'  Need char = 'z'
6550    Subject length lower bound = 4
6551  Starting byte set: a b c  Starting byte set: a b c
6552    
6553  /(|c?)[ab]xyz/IS  /(|c?)[ab]xyz/IS
# Line 6521  Capturing subpattern count = 1 Line 6555  Capturing subpattern count = 1
6555  No options  No options
6556  No first char  No first char
6557  Need char = 'z'  Need char = 'z'
6558    Subject length lower bound = 4
6559  Starting byte set: a b c  Starting byte set: a b c
6560    
6561  /(d?|c?)[ab]xyz/IS  /(d?|c?)[ab]xyz/IS
# Line 6528  Capturing subpattern count = 1 Line 6563  Capturing subpattern count = 1
6563  No options  No options
6564  No first char  No first char
6565  Need char = 'z'  Need char = 'z'
6566    Subject length lower bound = 4
6567  Starting byte set: a b c d  Starting byte set: a b c d
6568    
6569  /(d?|c)[ab]xyz/IS  /(d?|c)[ab]xyz/IS
# Line 6535  Capturing subpattern count = 1 Line 6571  Capturing subpattern count = 1
6571  No options  No options
6572  No first char  No first char
6573  Need char = 'z'  Need char = 'z'
6574    Subject length lower bound = 4
6575  Starting byte set: a b c d  Starting byte set: a b c d
6576    
6577  /^a*b\d/DZ  /^a*b\d/DZ
# Line 6627  Capturing subpattern count = 1 Line 6664  Capturing subpattern count = 1
6664  No options  No options
6665  No first char  No first char
6666  No need char  No need char
6667    Subject length lower bound = 1
6668  Starting byte set: a b c d  Starting byte set: a b c d
6669    
6670  /(a+|b*)[cd]/IS  /(a+|b*)[cd]/IS
# Line 6634  Capturing subpattern count = 1 Line 6672  Capturing subpattern count = 1
6672  No options  No options
6673  No first char  No first char
6674  No need char  No need char
6675    Subject length lower bound = 1
6676  Starting byte set: a b c d  Starting byte set: a b c d
6677    
6678  /(a*|b+)[cd]/IS  /(a*|b+)[cd]/IS
# Line 6641  Capturing subpattern count = 1 Line 6680  Capturing subpattern count = 1
6680  No options  No options
6681  No first char  No first char
6682  No need char  No need char
6683    Subject length lower bound = 1
6684  Starting byte set: a b c d  Starting byte set: a b c d
6685    
6686  /(a+|b+)[cd]/IS  /(a+|b+)[cd]/IS
# Line 6648  Capturing subpattern count = 1 Line 6688  Capturing subpattern count = 1
6688  No options  No options
6689  No first char  No first char
6690  No need char  No need char
6691    Subject length lower bound = 2
6692  Starting byte set: a b  Starting byte set: a b
6693    
6694  /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((  /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
# Line 7453  No match Line 7494  No match
7494          ^          ^
7495          CBra 1          CBra 1
7496          Cond          Cond
7497        2 Cond ref        2 Cond nref
7498          y          y
7499          Ket          Ket
7500          [()]          [()]
# Line 8626  No match Line 8667  No match
8667  +13   ^  ^      (*FAIL)  +13   ^  ^      (*FAIL)
8668  No match  No match
8669    
 /a(*PRUNE:XXX)b/  
 Failed: (*VERB) with an argument is not supported at offset 8  
   
8670  /a(*MARK)b/  /a(*MARK)b/
8671  Failed: (*VERB) not recognized at offset 7  Failed: (*MARK) must have an argument at offset 7
8672    
8673  /(?i:A{1,}\6666666666)/  /(?i:A{1,}\6666666666)/
8674  Failed: number is too big at offset 19  Failed: number is too big at offset 19
# Line 9091  Capturing subpattern count = 1 Line 9129  Capturing subpattern count = 1
9129  No options  No options
9130  No first char  No first char
9131  No need char  No need char
9132    Subject length lower bound = 1
9133  Starting byte set: x y z  Starting byte set: x y z
9134    
9135  /(?(?=.*b)b|^)/CI  /(?(?=.*b)b|^)/CI
# Line 9606  Partial match: +ab Line 9645  Partial match: +ab
9645          End          End
9646  ------------------------------------------------------------------  ------------------------------------------------------------------
9647    
9648    /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
9649    ------------------------------------------------------------------
9650            Bra
9651            CBra 1
9652            ab
9653            Ket
9654            CBra 2
9655            x
9656            CBra 3
9657            y
9658            Ket
9659            z
9660            CBra 4
9661            cd
9662            Close 4
9663            Close 2
9664            *ACCEPT
9665            Ket
9666            Ket
9667            pq
9668            Ket
9669            End
9670    ------------------------------------------------------------------
9671    
9672  /abc\K/+  /abc\K/+
9673      abcdef      abcdef
9674   0:   0:
# Line 9810  No match Line 9873  No match
9873   6: d   6: d
9874   7: Y   7: Y
9875    
9876  / End of testinput2 /  /(?<=b(?1)|zzz)(a)/
9877        xbaax
9878     0: a
9879     1: a
9880        xzzzax
9881     0: a
9882     1: a
9883    
9884    /(a)(?<=b\1)/
9885    Failed: lookbehind assertion is not fixed length at offset 10
9886    
9887    /(a)(?<=b+(?1))/
9888    Failed: lookbehind assertion is not fixed length at offset 13
9889    
9890    /(a+)(?<=b(?1))/
9891    Failed: lookbehind assertion is not fixed length at offset 14
9892    
9893    /(a(?<=b(?1)))/
9894    Failed: lookbehind assertion is not fixed length at offset 13
9895    
9896    /(?<=b(?1))xyz/
9897    Failed: reference to non-existent subpattern at offset 8
9898    
9899    /(?<=b(?1))xyz(b+)pqrstuvew/
9900    Failed: lookbehind assertion is not fixed length at offset 26
9901    
9902    /(a|bc)\1/SI
9903    Capturing subpattern count = 1
9904    Max back reference = 1
9905    No options
9906    No first char
9907    No need char
9908    Subject length lower bound = 2
9909    Starting byte set: a b
9910    
9911    /(a|bc)\1{2,3}/SI
9912    Capturing subpattern count = 1
9913    Max back reference = 1
9914    No options
9915    No first char
9916    No need char
9917    Subject length lower bound = 3
9918    Starting byte set: a b
9919    
9920    /(a|bc)(?1)/SI
9921    Capturing subpattern count = 1
9922    No options
9923    No first char
9924    No need char
9925    Subject length lower bound = 2
9926    Starting byte set: a b
9927    
9928    /(a|b\1)(a|b\1)/SI
9929    Capturing subpattern count = 2
9930    Max back reference = 1
9931    No options
9932    No first char
9933    No need char
9934    Subject length lower bound = 2
9935    Starting byte set: a b
9936    
9937    /(a|b\1){2}/SI
9938    Capturing subpattern count = 1
9939    Max back reference = 1
9940    No options
9941    No first char
9942    No need char
9943    Subject length lower bound = 2
9944    Starting byte set: a b
9945    
9946    /(a|bbbb\1)(a|bbbb\1)/SI
9947    Capturing subpattern count = 2
9948    Max back reference = 1
9949    No options
9950    No first char
9951    No need char
9952    Subject length lower bound = 2
9953    Starting byte set: a b
9954    
9955    /(a|bbbb\1){2}/SI
9956    Capturing subpattern count = 1
9957    Max back reference = 1
9958    No options
9959    No first char
9960    No need char
9961    Subject length lower bound = 2
9962    Starting byte set: a b
9963    
9964    /^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
9965    Capturing subpattern count = 1
9966    Options: anchored
9967    No first char
9968    Need char = ':'
9969    Subject length lower bound = 22
9970    No set of starting bytes
9971    
9972    /  (?: [\040\t] |  \(
9973    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9974    \)  )*                          # optional leading comment
9975    (?:    (?:
9976    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
9977    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
9978    |
9979    " (?:                      # opening quote...
9980    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
9981    |                     #    or
9982    \\ [^\x80-\xff]           #   Escaped something (something != CR)
9983    )* "  # closing quote
9984    )                    # initial word
9985    (?:  (?: [\040\t] |  \(
9986    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9987    \)  )*  \.  (?: [\040\t] |  \(
9988    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
9989    \)  )*   (?:
9990    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
9991    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
9992    |
9993    " (?:                      # opening quote...
9994    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
9995    |                     #    or
9996    \\ [^\x80-\xff]           #   Escaped something (something != CR)
9997    )* "  # closing quote
9998    )  )* # further okay, if led by a period
9999    (?: [\040\t] |  \(
10000    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10001    \)  )*  @  (?: [\040\t] |  \(
10002    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10003    \)  )*    (?:
10004    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10005    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10006    |   \[                         # [
10007    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10008    \]                        #           ]
10009    )                           # initial subdomain
10010    (?:                                  #
10011    (?: [\040\t] |  \(
10012    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10013    \)  )*  \.                        # if led by a period...
10014    (?: [\040\t] |  \(
10015    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10016    \)  )*   (?:
10017    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10018    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10019    |   \[                         # [
10020    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10021    \]                        #           ]
10022    )                     #   ...further okay
10023    )*
10024    # address
10025    |                     #  or
10026    (?:
10027    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10028    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10029    |
10030    " (?:                      # opening quote...
10031    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10032    |                     #    or
10033    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10034    )* "  # closing quote
10035    )             # one word, optionally followed by....
10036    (?:
10037    [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
10038    \(
10039    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10040    \)       |  # comments, or...
10041    
10042    " (?:                      # opening quote...
10043    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10044    |                     #    or
10045    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10046    )* "  # closing quote
10047    # quoted strings
10048    )*
10049    <  (?: [\040\t] |  \(
10050    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10051    \)  )*                     # leading <
10052    (?:  @  (?: [\040\t] |  \(
10053    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10054    \)  )*    (?:
10055    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10056    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10057    |   \[                         # [
10058    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10059    \]                        #           ]
10060    )                           # initial subdomain
10061    (?:                                  #
10062    (?: [\040\t] |  \(
10063    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10064    \)  )*  \.                        # if led by a period...
10065    (?: [\040\t] |  \(
10066    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10067    \)  )*   (?:
10068    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10069    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10070    |   \[                         # [
10071    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10072    \]                        #           ]
10073    )                     #   ...further okay
10074    )*
10075    
10076    (?:  (?: [\040\t] |  \(
10077    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10078    \)  )*  ,  (?: [\040\t] |  \(
10079    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10080    \)  )*  @  (?: [\040\t] |  \(
10081    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10082    \)  )*    (?:
10083    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10084    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10085    |   \[                         # [
10086    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10087    \]                        #           ]
10088    )                           # initial subdomain
10089    (?:                                  #
10090    (?: [\040\t] |  \(
10091    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10092    \)  )*  \.                        # if led by a period...
10093    (?: [\040\t] |  \(
10094    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10095    \)  )*   (?:
10096    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10097    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10098    |   \[                         # [
10099    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10100    \]                        #           ]
10101    )                     #   ...further okay
10102    )*
10103    )* # further okay, if led by comma
10104    :                                # closing colon
10105    (?: [\040\t] |  \(
10106    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10107    \)  )*  )? #       optional route
10108    (?:
10109    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10110    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10111    |
10112    " (?:                      # opening quote...
10113    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10114    |                     #    or
10115    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10116    )* "  # closing quote
10117    )                    # initial word
10118    (?:  (?: [\040\t] |  \(
10119    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10120    \)  )*  \.  (?: [\040\t] |  \(
10121    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10122    \)  )*   (?:
10123    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10124    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10125    |
10126    " (?:                      # opening quote...
10127    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
10128    |                     #    or
10129    \\ [^\x80-\xff]           #   Escaped something (something != CR)
10130    )* "  # closing quote
10131    )  )* # further okay, if led by a period
10132    (?: [\040\t] |  \(
10133    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10134    \)  )*  @  (?: [\040\t] |  \(
10135    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10136    \)  )*    (?:
10137    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10138    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10139    |   \[                         # [
10140    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10141    \]                        #           ]
10142    )                           # initial subdomain
10143    (?:                                  #
10144    (?: [\040\t] |  \(
10145    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10146    \)  )*  \.                        # if led by a period...
10147    (?: [\040\t] |  \(
10148    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10149    \)  )*   (?:
10150    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
10151    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
10152    |   \[                         # [
10153    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
10154    \]                        #           ]
10155    )                     #   ...further okay
10156    )*
10157    #       address spec
10158    (?: [\040\t] |  \(
10159    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10160    \)  )*  > #                  trailing >
10161    # name and address
10162    )  (?: [\040\t] |  \(
10163    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
10164    \)  )*                       # optional trailing comment
10165    /xSI
10166    Capturing subpattern count = 0
10167    Contains explicit CR or LF match
10168    Options: extended
10169    No first char
10170    No need char
10171    Subject length lower bound = 3
10172    Starting byte set: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8
10173      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
10174      f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
10175    
10176    /<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
10177    Capturing subpattern count = 11
10178    Options: caseless dotall
10179    First char = '<'
10180    Need char = '>'
10181    Subject length lower bound = 47
10182    No set of starting bytes
10183    
10184    "(?>.*/)foo"SI
10185    Capturing subpattern count = 0
10186    No options
10187    First char at start or follows newline
10188    Need char = 'o'
10189    Subject length lower bound = 4
10190    No set of starting bytes
10191    
10192    /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /xSI
10193    Capturing subpattern count = 0
10194    Options: extended
10195    No first char
10196    Need char = '-'
10197    Subject length lower bound = 8
10198    No set of starting bytes
10199    
10200    /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
10201    Capturing subpattern count = 1
10202    Options: caseless
10203    No first char
10204    No need char
10205    Subject length lower bound = 1
10206    Starting byte set: A B C a b c
10207    
10208    /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
10209    Capturing subpattern count = 0
10210    No options
10211    No first char
10212    Need char = 'b'
10213    Subject length lower bound = 41
10214    Starting byte set: c d
10215    
10216    /<a[\s]+href[\s]*=[\s]*          # find <a href=
10217     ([\"\'])?                       # find single or double quote
10218     (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
10219                                     # quote, otherwise match up to next space
10220    /isxSI
10221    Capturing subpattern count = 3
10222    Max back reference = 1
10223    Options: caseless extended dotall
10224    First char = '<'
10225    Need char = '='
10226    Subject length lower bound = 9
10227    No set of starting bytes
10228    
10229    /^(?!:)                       # colon disallowed at start
10230      (?:                         # start of item
10231        (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
10232        (?(1)0 | () ) )           # if null previously matched, fail; else null
10233        :                         # followed by colon
10234      ){1,7}                      # end item; 1-7 of them required
10235      [0-9a-f]{1,4} $             # final hex number at end of string
10236      (?(1)|.)                    # check that there was an empty component
10237      /xiIS
10238    Capturing subpattern count = 1
10239    Options: anchored caseless extended
10240    No first char
10241    Need char = ':'
10242    Subject length lower bound = 2
10243    No set of starting bytes
10244    
10245    /(?|(?<a>A)|(?<a>B))/I
10246    Capturing subpattern count = 1
10247    Named capturing subpatterns:
10248      a   1
10249      a   1
10250    No options
10251    No first char
10252    No need char
10253        AB\Ca
10254     0: A
10255     1: A
10256      C A (1) a
10257        BA\Ca
10258     0: B
10259     1: B
10260      C B (1) a
10261    
10262    /(?|(?<a>A)|(?<b>B))/
10263    Failed: different names for subpatterns of the same number are not allowed at offset 15
10264    
10265    /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
10266        b(?<quote> (?<apostrophe>')|(?<realquote>")) )
10267        (?('quote')[a-z]+|[0-9]+)/JIx
10268    Capturing subpattern count = 6
10269    Named capturing subpatterns:
10270      apostrophe   2
10271      apostrophe   5
10272      quote        1
10273      quote        4
10274      realquote    3
10275      realquote    6
10276    Options: extended dupnames
10277    No first char
10278    No need char
10279        a"aaaaa
10280     0: a"aaaaa
10281     1: "
10282     2: <unset>
10283     3: "
10284        b"aaaaa
10285     0: b"aaaaa
10286     1: <unset>
10287     2: <unset>
10288     3: <unset>
10289     4: "
10290     5: <unset>
10291     6: "
10292        ** Failers
10293    No match
10294        b"11111
10295    No match
10296        a"11111
10297    No match
10298    
10299    /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
10300    ------------------------------------------------------------------
10301            Bra
10302            ^
10303            Bra
10304            CBra 1
10305            a
10306            Ket
10307            CBra 2
10308            b
10309            Ket
10310            CBra 3
10311            c
10312            Ket
10313            CBra 4
10314            d
10315            Ket
10316            Alt
10317            CBra 1
10318            e
10319            Ket
10320            Ket
10321            Cond
10322          4 Cond nref
10323            X
10324            Alt
10325            Y
10326            Ket
10327            Ket
10328            End
10329    ------------------------------------------------------------------
10330    Capturing subpattern count = 4
10331    Named capturing subpatterns:
10332      D   4
10333      D   1
10334    Options: anchored extended dupnames
10335    No first char
10336    No need char
10337        abcdX
10338     0: abcdX
10339     1: a
10340     2: b
10341     3: c
10342     4: d
10343        eX
10344     0: eX
10345     1: e
10346        ** Failers
10347    No match
10348        abcdY
10349    No match
10350        ey
10351    No match
10352    
10353    /(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
10354    ------------------------------------------------------------------
10355            Bra
10356            CBra 1
10357            a
10358            Ket
10359            CBra 2
10360            b
10361            Ket
10362            CBra 3
10363            c
10364            Ket
10365            CBra 4
10366            d
10367            Cond
10368            Cond nrecurse 1
10369            $
10370            Alt
10371            Once
10372            Recurse
10373            Ket
10374            Ket
10375            Ket
10376            Ket
10377            End
10378    ------------------------------------------------------------------
10379    Capturing subpattern count = 4
10380    Named capturing subpatterns:
10381      A   1
10382      A   4
10383    Options: extended dupnames
10384    First char = 'a'
10385    Need char = 'd'
10386        abcdd
10387     0: abcdd
10388     1: a
10389     2: b
10390     3: c
10391     4: dd
10392        ** Failers
10393    No match
10394        abcdde
10395    No match
10396    
10397    /abcd*/
10398        xxxxabcd\P
10399     0: abcd
10400        xxxxabcd\P\P
10401    Partial match: abcd
10402    
10403    /abcd*/i
10404        xxxxabcd\P
10405     0: abcd
10406        xxxxabcd\P\P
10407    Partial match: abcd
10408        XXXXABCD\P
10409     0: ABCD
10410        XXXXABCD\P\P
10411    Partial match: ABCD
10412    
10413    /abc\d*/
10414        xxxxabc1\P
10415     0: abc1
10416        xxxxabc1\P\P
10417    Partial match: abc1
10418    
10419    /(a)bc\1*/
10420        xxxxabca\P
10421     0: abca
10422     1: a
10423        xxxxabca\P\P
10424    Partial match: abca
10425    
10426    /abc[de]*/
10427        xxxxabcde\P
10428     0: abcde
10429        xxxxabcde\P\P
10430    Partial match: abcde
10431    
10432    /-- This is not in the Perl 5.10 test because Perl seems currently to be broken
10433        and not behaving as specified in that it *does* bumpalong after hitting
10434        (*COMMIT). --/
10435    
10436    /(?1)(A(*COMMIT)|B)D/
10437        ABD
10438     0: ABD
10439     1: B
10440        XABD
10441     0: ABD
10442     1: B
10443        BAD
10444     0: BAD
10445     1: A
10446        ABXABD
10447     0: ABD
10448     1: B
10449        ** Failers
10450    No match
10451        ABX
10452    No match
10453        BAXBAD
10454    No match
10455    
10456    /(\3)(\1)(a)/<JS>
10457        cat
10458     0: a
10459     1:
10460     2:
10461     3: a
10462    
10463    /(\3)(\1)(a)/SI<JS>
10464    Capturing subpattern count = 3
10465    Max back reference = 3
10466    Options:
10467    No first char
10468    Need char = 'a'
10469    Subject length lower bound = 1
10470    No set of starting bytes
10471        cat
10472     0: a
10473     1:
10474     2:
10475     3: a
10476    
10477    /(\3)(\1)(a)/SI
10478    Capturing subpattern count = 3
10479    Max back reference = 3
10480    No options
10481    No first char
10482    Need char = 'a'
10483    Subject length lower bound = 3
10484    No set of starting bytes
10485        cat
10486    No match
10487    
10488    /i(?(DEFINE)(?<s>a))/SI
10489    Capturing subpattern count = 1
10490    Named capturing subpatterns:
10491      s   1
10492    No options
10493    First char = 'i'
10494    No need char
10495    Subject length lower bound = 1
10496    No set of starting bytes
10497        i
10498     0: i
10499    
10500    /()i(?(1)a)/SI
10501    Capturing subpattern count = 1
10502    No options
10503    No first char
10504    Need char = 'i'
10505    Subject length lower bound = 1
10506    Starting byte set: i
10507        ia
10508     0: ia
10509     1:
10510    
10511    /(?i)a(?-i)b|c/BZ
10512    ------------------------------------------------------------------
10513            Bra
10514         NC a
10515         00 Opt
10516            b
10517            Alt
10518         00 Opt
10519            c
10520            Ket
10521            End
10522    ------------------------------------------------------------------
10523        XabX
10524     0: ab
10525        XAbX
10526     0: Ab
10527        CcC
10528     0: c
10529        ** Failers
10530    No match
10531        XABX
10532    No match
10533    
10534    /(?i)a(?s)b|c/BZ
10535    ------------------------------------------------------------------
10536            Bra
10537         NC a
10538         05 Opt
10539         NC b
10540            Alt
10541         05 Opt
10542         NC c
10543            Ket
10544            End
10545    ------------------------------------------------------------------
10546    
10547    /(?i)a(?s-i)b|c/BZ
10548    ------------------------------------------------------------------
10549            Bra
10550         NC a
10551         04 Opt
10552            b
10553            Alt
10554         04 Opt
10555            c
10556            Ket
10557            End
10558    ------------------------------------------------------------------
10559    
10560    /^(ab(c\1)d|x){2}$/BZ
10561    ------------------------------------------------------------------
10562            Bra
10563            ^
10564            Once
10565            CBra 1
10566            ab
10567            CBra 2
10568            c
10569            \1
10570            Ket
10571            d
10572            Alt
10573            x
10574            Ket
10575            Ket
10576            Once
10577            CBra 1
10578            ab
10579            CBra 2
10580            c
10581            \1
10582            Ket
10583            d
10584            Alt
10585            x
10586            Ket
10587            Ket
10588            $
10589            Ket
10590            End
10591    ------------------------------------------------------------------
10592        xabcxd
10593     0: xabcxd
10594     1: abcxd
10595     2: cx
10596    
10597    /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
10598    ------------------------------------------------------------------
10599            Bra
10600            ^
10601            Once
10602            Brazero
10603            Once
10604            Recurse
10605            KetRmax
10606            Ket
10607            Cond
10608            Cond def
10609            CBra 1
10610            Any
10611            Ket
10612            Ket
10613            $
10614            Ket
10615            End
10616    ------------------------------------------------------------------
10617    
10618    /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
10619    ------------------------------------------------------------------
10620            Bra
10621            ^
10622            Brazero
10623            Once
10624            Recurse
10625            KetRmax
10626            Cond
10627            Cond def
10628            CBra 1
10629            Any
10630            Ket
10631            Ket
10632            $
10633            Ket
10634            End
10635    ------------------------------------------------------------------
10636    
10637    / -- The first four of these are not in the Perl 5.10 test because Perl
10638         documents that the use of \K in assertions is "not well defined". The
10639         last is here because Perl gives the match as "b" rather than "ab". I
10640         believe this to be a Perl bug. --/
10641    
10642    /(?=a\Kb)ab/
10643        ab
10644     0: b
10645    
10646    /(?!a\Kb)ac/
10647        ac
10648     0: ac
10649    
10650    /^abc(?<=b\Kc)d/
10651        abcd
10652     0: cd
10653    
10654    /^abc(?<!b\Kq)d/
10655        abcd
10656     0: abcd
10657    
10658    /(?>a\Kb)z|(ab)/
10659        ab
10660     0: ab
10661     1: ab
10662    
10663    /----------------------/
10664    
10665    /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
10666    Failed: recursive call could loop indefinitely at offset 31
10667    
10668    /abc(*MARK:)pqr/
10669    Failed: (*MARK) must have an argument at offset 10
10670    
10671    /abc(*:)pqr/
10672    Failed: (*MARK) must have an argument at offset 6
10673    
10674    /abc(*FAIL:123)xyz/
10675    Failed: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) at offset 13
10676    
10677    /--- This should, and does, fail. In Perl, it does not, which I think is a
10678         bug because replacing the B in the pattern by (B|D) does make it fail. ---/
10679    
10680    /A(*COMMIT)B/+K
10681        ACABX
10682    No match
10683    
10684    /--- These should be different, but in Perl 5.11 are not, which I think
10685         is a bug in Perl. ---/
10686    
10687    /A(*THEN)B|A(*THEN)C/K
10688        AC
10689     0: AC
10690    
10691    /A(*PRUNE)B|A(*PRUNE)C/K
10692        AC
10693    No match
10694    
10695    /--- A whole lot of tests of verbs with arguments are here rather than in test
10696         11 because Perl doesn't seem to follow its specification entirely
10697         correctly. ---/
10698    
10699    /--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
10700         not clear how Perl defines "involved in the failure of the match". ---/
10701    
10702    /^(A(*THEN:A)B|C(*THEN:B)D)/K
10703        AB
10704     0: AB
10705     1: AB
10706        CD
10707     0: CD
10708     1: CD
10709        ** Failers
10710    No match
10711        AC
10712    No match
10713        CB
10714    No match, mark = B
10715    
10716    /--- Check the use of names for success and failure. PCRE doesn't show these
10717    names for success, though Perl does, contrary to its spec. ---/
10718    
10719    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
10720        AB
10721     0: AB
10722     1: AB
10723        CD
10724     0: CD
10725     1: CD
10726        ** Failers
10727    No match
10728        AC
10729    No match, mark = A
10730        CB
10731    No match, mark = B
10732    
10733    /--- An empty name does not pass back an empty string. It is the same as if no
10734    name were given. ---/
10735    
10736    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
10737        AB
10738     0: AB
10739     1: AB
10740        CD
10741     0: CD
10742     1: CD
10743    
10744    /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
10745    
10746    /A(*PRUNE:A)B/K
10747        ACAB
10748     0: AB
10749    
10750    /(*MARK:A)(*PRUNE:B)(C|X)/K
10751        C
10752     0: C
10753     1: C
10754    MK: A
10755        D
10756    No match, mark = B
10757    
10758    /(*MARK:A)(*THEN:B)(C|X)/K
10759        C
10760     0: C
10761     1: C
10762    MK: A
10763        D
10764    No match, mark = B
10765    
10766    /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
10767    
10768    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
10769        AAAC
10770    No match
10771    
10772    /--- Same --/
10773    
10774    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
10775        AAAC
10776    No match
10777    
10778    /--- This should fail; the SKIP advances by one, but when we get to AC, the
10779         PRUNE kills it. ---/
10780    
10781    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
10782        AAAC
10783    No match
10784    
10785    /A(*:A)A+(*SKIP)(B|Z) | AC/xK
10786        AAAC
10787    No match
10788    
10789    /--- This should fail, as a null name is the same as no name ---/
10790    
10791    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
10792        AAAC
10793    No match
10794    
10795    /--- This fails in PCRE, and I think that is in accordance with Perl's
10796         documentation, though in Perl it succeeds. ---/
10797    
10798    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
10799        AAAC
10800    No match
10801    
10802    /--- Mark names can be duplicated ---/
10803    
10804    /A(*:A)B|X(*:A)Y/K
10805        AABC
10806     0: AB
10807    MK: A
10808        XXYZ
10809     0: XY
10810    MK: A
10811    
10812    /^A(*:A)B|^X(*:A)Y/K
10813        ** Failers
10814    No match
10815        XAQQ
10816    No match, mark = A
10817    
10818    /--- A check on what happens after hitting a mark and them bumping along to
10819    something that does not even start. Perl reports tags after the failures here,
10820    though it does not when the individual letters are made into something
10821    more complicated. ---/
10822    
10823    /A(*:A)B|XX(*:B)Y/K
10824        AABC
10825     0: AB
10826    MK: A
10827        XXYZ
10828     0: XXY
10829    MK: B
10830        ** Failers
10831    No match
10832        XAQQ
10833    No match
10834        XAQQXZZ
10835    No match
10836        AXQQQ
10837    No match
10838        AXXQQQ
10839    No match
10840    
10841    /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
10842    optimizations defeat this. So does the PCRE optimization unless we disable it
10843    with \Y. ---/
10844    
10845    /(*COMMIT)ABC/
10846        ABCDEFG
10847     0: ABC
10848        ** Failers
10849    No match
10850        DEFGABC\Y
10851    No match
10852    
10853    /--- Repeat some tests with added studying. ---/
10854    
10855    /A(*COMMIT)B/+KS
10856        ACABX
10857    No match
10858    
10859    /A(*THEN)B|A(*THEN)C/KS
10860        AC
10861     0: AC
10862    
10863    /A(*PRUNE)B|A(*PRUNE)C/KS
10864        AC
10865    No match
10866    
10867    /^(A(*THEN:A)B|C(*THEN:B)D)/KS
10868        AB
10869     0: AB
10870     1: AB
10871        CD
10872     0: CD
10873     1: CD
10874        ** Failers
10875    No match
10876        AC
10877    No match
10878        CB
10879    No match, mark = B
10880    
10881    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
10882        AB
10883     0: AB
10884     1: AB
10885        CD
10886     0: CD
10887     1: CD
10888        ** Failers
10889    No match
10890        AC
10891    No match, mark = A
10892        CB
10893    No match, mark = B
10894    
10895    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
10896        AB
10897     0: AB
10898     1: AB
10899        CD
10900     0: CD
10901     1: CD
10902    
10903    /A(*PRUNE:A)B/KS
10904        ACAB
10905     0: AB
10906    
10907    /(*MARK:A)(*PRUNE:B)(C|X)/KS
10908        C
10909     0: C
10910     1: C
10911    MK: A
10912        D
10913    No match
10914    
10915    /(*MARK:A)(*THEN:B)(C|X)/KS
10916        C
10917     0: C
10918     1: C
10919    MK: A
10920        D
10921    No match
10922    
10923    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
10924        AAAC
10925    No match
10926    
10927    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
10928        AAAC
10929    No match
10930    
10931    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
10932        AAAC
10933    No match
10934    
10935    /A(*:A)A+(*SKIP)(B|Z) | AC/xKS
10936        AAAC
10937    No match
10938    
10939    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
10940        AAAC
10941    No match
10942    
10943    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
10944        AAAC
10945    No match
10946    
10947    /A(*:A)B|XX(*:B)Y/KS
10948        AABC
10949     0: AB
10950    MK: A
10951        XXYZ
10952     0: XXY
10953    MK: B
10954        ** Failers
10955    No match
10956        XAQQ
10957    No match
10958        XAQQXZZ
10959    No match
10960        AXQQQ
10961    No match
10962        AXXQQQ
10963    No match
10964    
10965    /(*COMMIT)ABC/
10966        ABCDEFG
10967     0: ABC
10968        ** Failers
10969    No match
10970        DEFGABC\Y
10971    No match
10972    
10973    /^(ab (c+(*THEN)cd) | xyz)/x
10974        abcccd
10975    No match
10976    
10977    /^(ab (c+(*PRUNE)cd) | xyz)/x
10978        abcccd
10979    No match
10980    
10981    /^(ab (c+(*FAIL)cd) | xyz)/x
10982        abcccd
10983    No match
10984    
10985    /-- End of testinput2 --/

Legend:
Removed from v.448  
changed lines
  Added in v.510

  ViewVC Help
Powered by ViewVC 1.1.5