/[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 488 by ph10, Mon Jan 11 15:29:42 2010 UTC revision 629 by ph10, Fri Jul 22 09:18:11 2011 UTC
# Line 2  Line 2 
2      of PCRE's API, error diagnostics, and the compiled code of some patterns.      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,      It also checks the non-Perl syntax the PCRE supports (Python, .NET,
4      Oniguruma). Finally, there are some tests where PCRE and Perl differ,      Oniguruma). Finally, there are some tests where PCRE and Perl differ,
5      either because PCRE can't be compatible, or there is potential Perl      either because PCRE can't be compatible, or there is a possible Perl
6      bug. --/      bug. --/
7    
8  /-- Originally, the Perl 5.10 things were in here too, but now I have separated  /-- Originally, the Perl >= 5.10 things were in here too, but now I have
9      many (most?) of them out into test 11. However, there may still be some      separated many (most?) of them out into test 11. However, there may still
10      that were overlooked. --/      be some that were overlooked. --/
11    
12  /(a)b|/I  /(a)b|/I
13  Capturing subpattern count = 1  Capturing subpattern count = 1
# Line 103  Failed: missing terminating ] for charac Line 103  Failed: missing terminating ] for charac
103  /(?X)[\B]/  /(?X)[\B]/
104  Failed: invalid escape sequence in character class at offset 6  Failed: invalid escape sequence in character class at offset 6
105    
106    /(?X)[\R]/
107    Failed: invalid escape sequence in character class at offset 6
108    
109    /(?X)[\X]/
110    Failed: invalid escape sequence in character class at offset 6
111    
112    /[\B]/BZ
113    ------------------------------------------------------------------
114            Bra
115            B
116            Ket
117            End
118    ------------------------------------------------------------------
119    
120    /[\R]/BZ
121    ------------------------------------------------------------------
122            Bra
123            R
124            Ket
125            End
126    ------------------------------------------------------------------
127    
128    /[\X]/BZ
129    ------------------------------------------------------------------
130            Bra
131            X
132            Ket
133            End
134    ------------------------------------------------------------------
135    
136  /[z-a]/  /[z-a]/
137  Failed: range out of order in character class at offset 3  Failed: range out of order in character class at offset 3
138    
# Line 602  Need char = 'h' (caseless) Line 632  Need char = 'h' (caseless)
632  ------------------------------------------------------------------  ------------------------------------------------------------------
633          Bra          Bra
634          CBra 1          CBra 1
635       01 Opt       /i b
      NC b  
636          Ket          Ket
      00 Opt  
637          Ket          Ket
638          End          End
639  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1217  No need char Line 1245  No need char
1245  ------------------------------------------------------------------  ------------------------------------------------------------------
1246          Bra          Bra
1247          Bra          Bra
      04 Opt  
1248          AllAny*          AllAny*
1249          X          X
1250          Alt          Alt
      04 Opt  
1251          ^          ^
1252          B          B
1253          Ket          Ket
      00 Opt  
1254          Ket          Ket
1255          End          End
1256  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 2734  No need char Line 2759  No need char
2759  ------------------------------------------------------------------  ------------------------------------------------------------------
2760          Bra          Bra
2761          a          a
2762       01 Opt       /i b
      NC b  
2763          Ket          Ket
2764          End          End
2765  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 2757  No match Line 2781  No match
2781          Bra          Bra
2782          CBra 1          CBra 1
2783          a          a
2784       01 Opt       /i b
      NC b  
2785          Ket          Ket
      00 Opt  
2786          Ket          Ket
2787          End          End
2788  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 2782  No match Line 2804  No match
2804  /   (?i)abc/IxDZ  /   (?i)abc/IxDZ
2805  ------------------------------------------------------------------  ------------------------------------------------------------------
2806          Bra          Bra
2807       NC abc       /i abc
2808          Ket          Ket
2809          End          End
2810  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 2795  Need char = 'c' (caseless) Line 2817  Need char = 'c' (caseless)
2817    (?i)abc/IxDZ    (?i)abc/IxDZ
2818  ------------------------------------------------------------------  ------------------------------------------------------------------
2819          Bra          Bra
2820       NC abc       /i abc
2821          Ket          Ket
2822          End          End
2823  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 2968  No need char Line 2990  No need char
2990  /(x)*+/DZ  /(x)*+/DZ
2991  ------------------------------------------------------------------  ------------------------------------------------------------------
2992          Bra          Bra
2993          Once          Braposzero
2994          Brazero          CBraPos 1
         CBra 1  
2995          x          x
2996          KetRmax          KetRpos
         Ket  
2997          Ket          Ket
2998          End          End
2999  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 3198  Failed: POSIX collating elements are not Line 3218  Failed: POSIX collating elements are not
3218  Failed: POSIX named classes are supported only within a class at offset 0  Failed: POSIX named classes are supported only within a class at offset 0
3219    
3220  /\l/I  /\l/I
3221  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3222    
3223  /\L/I  /\L/I
3224  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3225    
3226  /\N{name}/I  /\N{name}/I
3227  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3228    
3229  /\u/I  /\u/I
3230  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3231    
3232  /\U/I  /\U/I
3233  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3234    
3235  /[/I  /[/I
3236  Failed: missing terminating ] for character class at offset 1  Failed: missing terminating ] for character class at offset 1
# Line 3560  Need char = 'f' Line 3580  Need char = 'f'
3580    1    ^    ^     f    1    ^    ^     f
3581   0: abcdef   0: abcdef
3582    
3583  /(?C1)\dabc(?C2)def/I  /(?C1)\dabc(?C2)def/IS
3584    Capturing subpattern count = 0
3585    No options
3586    No first char
3587    Need char = 'f'
3588    Subject length lower bound = 7
3589    Starting byte set: 0 1 2 3 4 5 6 7 8 9
3590        1234abcdef
3591    --->1234abcdef
3592      1 ^              \d
3593      1  ^             \d
3594      1   ^            \d
3595      1    ^           \d
3596      2    ^   ^       d
3597     0: 4abcdef
3598        *** Failers
3599    No match
3600        abcdef
3601    No match
3602    
3603    /(?C1)\dabc(?C2)def/ISS
3604  Capturing subpattern count = 0  Capturing subpattern count = 0
3605  No options  No options
3606  No first char  No first char
# Line 3964  Need char = '<' Line 4004  Need char = '<'
4004          Bra          Bra
4005          CBra 1          CBra 1
4006          a          a
         Once  
4007          Recurse          Recurse
         Ket  
4008          b          b
4009          Ket          Ket
4010          Ket          Ket
# Line 4187  Need char = 'a' Line 4225  Need char = 'a'
4225          Any          Any
4226          \1          \1
4227          bbb          bbb
         Once  
4228          Recurse          Recurse
         Ket  
4229          d          d
4230          Ket          Ket
4231          End          End
# Line 4394  No first char Line 4430  No first char
4430  Need char = 'z'  Need char = 'z'
4431    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
4432  Minimum match() limit = 8  Minimum match() limit = 8
4433  Minimum match() recursion limit = 6  Minimum match() recursion limit = 7
4434   0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz   0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
4435   1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa   1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4436    aaaaaaaaaaaaaz\M    aaaaaaaaaaaaaz\M
4437  Minimum match() limit = 32768  Minimum match() limit = 32768
4438  Minimum match() recursion limit = 42  Minimum match() recursion limit = 43
4439  No match  No match
4440    
4441  /(aaa(?C1)bbb|ab)/I  /(aaa(?C1)bbb|ab)/I
# Line 4561  Need char = ']' Line 4597  Need char = ']'
4597          a          a
4598          CBra 2          CBra 2
4599          b          b
         Once  
4600          Recurse          Recurse
         Ket  
4601          c          c
4602          Ket          Ket
4603          Ket          Ket
# Line 4583  No need char Line 4617  No need char
4617          a          a
4618          CBra 2          CBra 2
4619          b          b
         Once  
4620          Recurse          Recurse
         Ket  
4621          c          c
4622          Ket          Ket
4623          KetRmax          KetRmax
# Line 4606  No need char Line 4638  No need char
4638          a          a
4639          CBra 2          CBra 2
4640          b          b
         Once  
4641          Recurse          Recurse
         Ket  
4642          c          c
4643          Ket          Ket
4644          Ket          Ket
# Line 4617  No need char Line 4647  No need char
4647          a          a
4648          CBra 2          CBra 2
4649          b          b
         Once  
4650          Recurse          Recurse
         Ket  
4651          c          c
4652          Ket          Ket
4653          Ket          Ket
# Line 4758  Need char = 'e' Line 4786  Need char = 'e'
4786   +4 ^   ^      e   +4 ^   ^      e
4787  No match  No match
4788    
4789  /a*b/ICDZ  /a*b/ICDZS
4790    ------------------------------------------------------------------
4791            Bra
4792            Callout 255 0 2
4793            a*+
4794            Callout 255 2 1
4795            b
4796            Callout 255 3 0
4797            Ket
4798            End
4799    ------------------------------------------------------------------
4800    Capturing subpattern count = 0
4801    Options:
4802    No first char
4803    Need char = 'b'
4804    Subject length lower bound = 1
4805    Starting byte set: a b
4806      ab
4807    --->ab
4808     +0 ^      a*
4809     +2 ^^     b
4810     +3 ^ ^
4811     0: ab
4812      aaaab
4813    --->aaaab
4814     +0 ^         a*
4815     +2 ^   ^     b
4816     +3 ^    ^
4817     0: aaaab
4818      aaaacb
4819    --->aaaacb
4820     +0 ^          a*
4821     +2 ^   ^      b
4822     +0  ^         a*
4823     +2  ^  ^      b
4824     +0   ^        a*
4825     +2   ^ ^      b
4826     +0    ^       a*
4827     +2    ^^      b
4828     +0      ^     a*
4829     +2      ^     b
4830     +3      ^^
4831     0: b
4832    
4833    /a*b/ICDZSS
4834  ------------------------------------------------------------------  ------------------------------------------------------------------
4835          Bra          Bra
4836          Callout 255 0 2          Callout 255 0 2
# Line 4841  Need char = 'b' Line 4913  Need char = 'b'
4913   +2    ^^      b   +2    ^^      b
4914  No match  No match
4915    
4916  /(abc|def)x/ICDZ  /(abc|def)x/ICDZS
4917    ------------------------------------------------------------------
4918            Bra
4919            Callout 255 0 9
4920            CBra 1
4921            Callout 255 1 1
4922            a
4923            Callout 255 2 1
4924            b
4925            Callout 255 3 1
4926            c
4927            Callout 255 4 0
4928            Alt
4929            Callout 255 5 1
4930            d
4931            Callout 255 6 1
4932            e
4933            Callout 255 7 1
4934            f
4935            Callout 255 8 0
4936            Ket
4937            Callout 255 9 1
4938            x
4939            Callout 255 10 0
4940            Ket
4941            End
4942    ------------------------------------------------------------------
4943    Capturing subpattern count = 1
4944    Options:
4945    No first char
4946    Need char = 'x'
4947    Subject length lower bound = 4
4948    Starting byte set: a d
4949      abcx
4950    --->abcx
4951     +0 ^        (abc|def)
4952     +1 ^        a
4953     +2 ^^       b
4954     +3 ^ ^      c
4955     +4 ^  ^     |
4956     +9 ^  ^     x
4957    +10 ^   ^
4958     0: abcx
4959     1: abc
4960      defx
4961    --->defx
4962     +0 ^        (abc|def)
4963     +1 ^        a
4964     +5 ^        d
4965     +6 ^^       e
4966     +7 ^ ^      f
4967     +8 ^  ^     )
4968     +9 ^  ^     x
4969    +10 ^   ^
4970     0: defx
4971     1: def
4972      ** Failers
4973    No match
4974      abcdefzx
4975    --->abcdefzx
4976     +0 ^            (abc|def)
4977     +1 ^            a
4978     +2 ^^           b
4979     +3 ^ ^          c
4980     +4 ^  ^         |
4981     +9 ^  ^         x
4982     +5 ^            d
4983     +0    ^         (abc|def)
4984     +1    ^         a
4985     +5    ^         d
4986     +6    ^^        e
4987     +7    ^ ^       f
4988     +8    ^  ^      )
4989     +9    ^  ^      x
4990    No match
4991    
4992    /(abc|def)x/ICDZSS
4993  ------------------------------------------------------------------  ------------------------------------------------------------------
4994          Bra          Bra
4995          Callout 255 0 9          Callout 255 0 9
# Line 4895  Need char = 'x' Line 5043  Need char = 'x'
5043  +10 ^   ^  +10 ^   ^
5044   0: defx   0: defx
5045   1: def   1: def
5046      ** Failers
5047    No match
5048    abcdefzx    abcdefzx
5049  --->abcdefzx  --->abcdefzx
5050   +0 ^            (abc|def)   +0 ^            (abc|def)
# Line 4995  No need char Line 5145  No need char
5145   0: abcdcdcd   0: abcdcdcd
5146   1: cd   1: cd
5147    
5148  /([ab]{,4}c|xy)/ICDZ  /([ab]{,4}c|xy)/ICDZS
5149    ------------------------------------------------------------------
5150            Bra
5151            Callout 255 0 14
5152            CBra 1
5153            Callout 255 1 4
5154            [ab]
5155            Callout 255 5 1
5156            {
5157            Callout 255 6 1
5158            ,
5159            Callout 255 7 1
5160            4
5161            Callout 255 8 1
5162            }
5163            Callout 255 9 1
5164            c
5165            Callout 255 10 0
5166            Alt
5167            Callout 255 11 1
5168            x
5169            Callout 255 12 1
5170            y
5171            Callout 255 13 0
5172            Ket
5173            Callout 255 14 0
5174            Ket
5175            End
5176    ------------------------------------------------------------------
5177    Capturing subpattern count = 1
5178    Options:
5179    No first char
5180    No need char
5181    Subject length lower bound = 2
5182    Starting byte set: a b x
5183        Note: that { does NOT introduce a quantifier
5184    --->Note: that { does NOT introduce a quantifier
5185     +0         ^                                        ([ab]{,4}c|xy)
5186     +1         ^                                        [ab]
5187     +5         ^^                                       {
5188    +11         ^                                        x
5189     +0                                 ^                ([ab]{,4}c|xy)
5190     +1                                 ^                [ab]
5191     +5                                 ^^               {
5192    +11                                 ^                x
5193     +0                                     ^            ([ab]{,4}c|xy)
5194     +1                                     ^            [ab]
5195     +5                                     ^^           {
5196    +11                                     ^            x
5197    No match
5198    
5199    /([ab]{,4}c|xy)/ICDZSS
5200  ------------------------------------------------------------------  ------------------------------------------------------------------
5201          Bra          Bra
5202          Callout 255 0 14          Callout 255 0 14
# Line 5447  No match Line 5648  No match
5648      123456\P      123456\P
5649  No match  No match
5650    
5651  /abc/I>testsavedregex  /abc/IS>testsavedregex
5652  Capturing subpattern count = 0  Capturing subpattern count = 0
5653  No options  No options
5654  First char = 'a'  First char = 'a'
5655  Need char = 'c'  Need char = 'c'
5656  Compiled regex written to testsavedregex  Subject length lower bound = 3
5657    No set of starting bytes
5658    Compiled pattern written to testsavedregex
5659    Study data written to testsavedregex
5660  <testsavedregex  <testsavedregex
5661  Compiled regex loaded from testsavedregex  Compiled pattern loaded from testsavedregex
5662  No study data  Study data loaded from testsavedregex
5663      abc      abc
5664   0: abc   0: abc
5665      ** Failers      ** Failers
# Line 5463  No match Line 5667  No match
5667      bca      bca
5668  No match  No match
5669    
5670  /abc/IF>testsavedregex  /abc/ISS>testsavedregex
5671  Capturing subpattern count = 0  Capturing subpattern count = 0
5672  No options  No options
5673  First char = 'a'  First char = 'a'
5674  Need char = 'c'  Need char = 'c'
5675  Compiled regex written to testsavedregex  Compiled pattern written to testsavedregex
5676  <testsavedregex  <testsavedregex
5677  Compiled regex (byte-inverted) loaded from testsavedregex  Compiled pattern loaded from testsavedregex
5678  No study data  No study data
5679      abc      abc
5680   0: abc   0: abc
# Line 5479  No match Line 5683  No match
5683      bca      bca
5684  No match  No match
5685    
5686  /(a|b)/IS>testsavedregex  /abc/IFS>testsavedregex
5687  Capturing subpattern count = 1  Capturing subpattern count = 0
5688  No options  No options
5689  No first char  First char = 'a'
5690  No need char  Need char = 'c'
5691  Subject length lower bound = 1  Subject length lower bound = 3
5692  Starting byte set: a b  No set of starting bytes
5693  Compiled regex written to testsavedregex  Compiled pattern written to testsavedregex
5694  Study data written to testsavedregex  Study data written to testsavedregex
5695  <testsavedregex  <testsavedregex
5696  Compiled regex loaded from testsavedregex  Compiled pattern (byte-inverted) loaded from testsavedregex
5697  Study data loaded from testsavedregex  Study data loaded from testsavedregex
5698      abc      abc
5699   0: a   0: abc
  1: a  
5700      ** Failers      ** Failers
5701   0: a  No match
5702   1: a      bca
     def  
5703  No match  No match
5704    
5705  /(a|b)/ISF>testsavedregex  /abc/IFSS>testsavedregex
5706  Capturing subpattern count = 1  Capturing subpattern count = 0
5707  No options  No options
5708  No first char  First char = 'a'
5709  No need char  Need char = 'c'
5710    Compiled pattern written to testsavedregex
5711    <testsavedregex
5712    Compiled pattern (byte-inverted) loaded from testsavedregex
5713    No study data
5714        abc
5715     0: abc
5716        ** Failers
5717    No match
5718        bca
5719    No match
5720    
5721    /(a|b)/IS>testsavedregex
5722    Capturing subpattern count = 1
5723    No options
5724    No first char
5725    No need char
5726    Subject length lower bound = 1
5727    Starting byte set: a b
5728    Compiled pattern written to testsavedregex
5729    Study data written to testsavedregex
5730    <testsavedregex
5731    Compiled pattern loaded from testsavedregex
5732    Study data loaded from testsavedregex
5733        abc
5734     0: a
5735     1: a
5736        ** Failers
5737     0: a
5738     1: a
5739        def
5740    No match
5741    
5742    /(a|b)/ISS>testsavedregex
5743    Capturing subpattern count = 1
5744    No options
5745    No first char
5746    No need char
5747    Compiled pattern written to testsavedregex
5748    <testsavedregex
5749    Compiled pattern loaded from testsavedregex
5750    No study data
5751        abc
5752     0: a
5753     1: a
5754        ** Failers
5755     0: a
5756     1: a
5757        def
5758    No match
5759    
5760    /(a|b)/ISF>testsavedregex
5761    Capturing subpattern count = 1
5762    No options
5763    No first char
5764    No need char
5765  Subject length lower bound = 1  Subject length lower bound = 1
5766  Starting byte set: a b  Starting byte set: a b
5767  Compiled regex written to testsavedregex  Compiled pattern written to testsavedregex
5768  Study data written to testsavedregex  Study data written to testsavedregex
5769  <testsavedregex  <testsavedregex
5770  Compiled regex (byte-inverted) loaded from testsavedregex  Compiled pattern (byte-inverted) loaded from testsavedregex
5771  Study data loaded from testsavedregex  Study data loaded from testsavedregex
5772      abc      abc
5773   0: a   0: a
# Line 5521  Study data loaded from testsavedregex Line 5778  Study data loaded from testsavedregex
5778      def      def
5779  No match  No match
5780    
5781    /(a|b)/ISSF>testsavedregex
5782    Capturing subpattern count = 1
5783    No options
5784    No first char
5785    No need char
5786    Compiled pattern written to testsavedregex
5787    <testsavedregex
5788    Compiled pattern (byte-inverted) loaded from testsavedregex
5789    No study data
5790        abc
5791     0: a
5792     1: a
5793        ** Failers
5794     0: a
5795     1: a
5796        def
5797    No match
5798    
5799  ~<(\w+)/?>(.)*</(\1)>~smgI  ~<(\w+)/?>(.)*</(\1)>~smgI
5800  Capturing subpattern count = 3  Capturing subpattern count = 3
5801  Max back reference = 1  Max back reference = 1
# Line 6391  No first char Line 6666  No first char
6666  No need char  No need char
6667     /* this is a C style comment */\M     /* this is a C style comment */\M
6668  Minimum match() limit = 120  Minimum match() limit = 120
6669  Minimum match() recursion limit = 6  Minimum match() recursion limit = 35
6670   0: /* this is a C style comment */   0: /* this is a C style comment */
6671   1: /* this is a C style comment */   1: /* this is a C style comment */
6672    
# Line 6644  No match Line 6919  No match
6919  ------------------------------------------------------------------  ------------------------------------------------------------------
6920          Bra          Bra
6921          ^          ^
6922          a*       /i a*
6923       NC A       /i A
6924          \d          \d
6925          Ket          Ket
6926          End          End
# Line 7273  Matched, but too many substrings Line 7548  Matched, but too many substrings
7548  /[^a]+a/BZi  /[^a]+a/BZi
7549  ------------------------------------------------------------------  ------------------------------------------------------------------
7550          Bra          Bra
7551          [^A]++       /i [^A]++
7552       NC a       /i a
7553          Ket          Ket
7554          End          End
7555  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 7282  Matched, but too many substrings Line 7557  Matched, but too many substrings
7557  /[^a]+A/BZi  /[^a]+A/BZi
7558  ------------------------------------------------------------------  ------------------------------------------------------------------
7559          Bra          Bra
7560          [^A]++       /i [^A]++
7561       NC A       /i A
7562          Ket          Ket
7563          End          End
7564  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 7478  No match Line 7753  No match
7753  ------------------------------------------------------------------  ------------------------------------------------------------------
7754          Bra          Bra
7755          ^          ^
         Once  
7756          Recurse          Recurse
         Ket  
7757          [()]          [()]
7758          CBra 1          CBra 1
7759          Ket          Ket
# Line 7514  No match Line 7787  No match
7787  ------------------------------------------------------------------  ------------------------------------------------------------------
7788          Bra          Bra
7789          ^          ^
         Once  
7790          Recurse          Recurse
         Ket  
7791          ()          ()
7792          CBra 1          CBra 1
7793          Ket          Ket
# Line 7528  No match Line 7799  No match
7799  ------------------------------------------------------------------  ------------------------------------------------------------------
7800          Bra          Bra
7801          ^          ^
         Once  
7802          Recurse          Recurse
         Ket  
7803          [(\]a]          [(\]a]
7804          CBra 1          CBra 1
7805          Ket          Ket
# Line 7543  No match Line 7812  No match
7812  ------------------------------------------------------------------  ------------------------------------------------------------------
7813          Bra          Bra
7814          ^          ^
         Once  
7815          Recurse          Recurse
         Ket  
7816          CBra 1          CBra 1
7817          Ket          Ket
7818          Ket          Ket
# Line 7997  No match Line 8264  No match
8264          Alt          Alt
8265          c          c
8266          Ket          Ket
         Once  
8267          Recurse          Recurse
8268          Ket          Ket
         Ket  
8269          End          End
8270  ------------------------------------------------------------------  ------------------------------------------------------------------
8271      abc      abc
# Line 8011  No match Line 8276  No match
8276  ------------------------------------------------------------------  ------------------------------------------------------------------
8277          Bra          Bra
8278          xy          xy
         Once  
8279          Recurse          Recurse
         Ket  
8280          CBra 1          CBra 1
8281          abc          abc
8282          Ket          Ket
# Line 8667  No match Line 8930  No match
8930  +13   ^  ^      (*FAIL)  +13   ^  ^      (*FAIL)
8931  No match  No match
8932    
 /a(*PRUNE:XXX)b/  
 Failed: (*VERB) with an argument is not supported at offset 8  
   
8933  /a(*MARK)b/  /a(*MARK)b/
8934  Failed: (*VERB) not recognized at offset 7  Failed: (*MARK) must have an argument at offset 7
8935    
8936  /(?i:A{1,}\6666666666)/  /(?i:A{1,}\6666666666)/
8937  Failed: number is too big at offset 19  Failed: number is too big at offset 19
# Line 8760  No match Line 9020  No match
9020  No match  No match
9021      a\x85b      a\x85b
9022  No match  No match
9023    
9024    /(*ANY).*/g
9025        abc\r\ndef
9026     0: abc
9027     0:
9028     0: def
9029     0:
9030    
9031    /(*ANYCRLF).*/g
9032        abc\r\ndef
9033     0: abc
9034     0:
9035     0: def
9036     0:
9037    
9038    /(*CRLF).*/g
9039        abc\r\ndef
9040     0: abc
9041     0:
9042     0: def
9043     0:
9044    
9045  /a\Rb/I<bsr_anycrlf>  /a\Rb/I<bsr_anycrlf>
9046  Capturing subpattern count = 0  Capturing subpattern count = 0
# Line 8965  Failed: subpattern name expected at offs Line 9246  Failed: subpattern name expected at offs
9246  /\k{}/  /\k{}/
9247  Failed: subpattern name expected at offset 3  Failed: subpattern name expected at offset 3
9248    
9249    /\k/
9250    Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 2
9251    
9252    /\kabc/
9253    Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 5
9254    
9255  /(?P=)/  /(?P=)/
9256  Failed: subpattern name expected at offset 4  Failed: subpattern name expected at offset 4
9257    
# Line 9246  No match Line 9533  No match
9533   +0        ^     x   +0        ^     x
9534   +0         ^    x   +0         ^    x
9535  No match  No match
9536    
9537    /(*NO_START_OPT)xyz/C
9538      abcxyz
9539    --->abcxyz
9540    +15 ^          x
9541    +15  ^         x
9542    +15   ^        x
9543    +15    ^       x
9544    +16    ^^      y
9545    +17    ^ ^     z
9546    +18    ^  ^
9547     0: xyz
9548    
9549    /xyz/CY
9550      abcxyz
9551    --->abcxyz
9552     +0 ^          x
9553     +0  ^         x
9554     +0   ^        x
9555     +0    ^       x
9556     +1    ^^      y
9557     +2    ^ ^     z
9558     +3    ^  ^
9559     0: xyz
9560    
9561  /^"((?(?=[a])[^"])|b)*"$/C  /^"((?(?=[a])[^"])|b)*"$/C
9562      "ab"      "ab"
# Line 9599  Partial match: +ab Line 9910  Partial match: +ab
9910  /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ  /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
9911  ------------------------------------------------------------------  ------------------------------------------------------------------
9912          Bra          Bra
         Once  
9913          Recurse          Recurse
         Ket  
         Once  
9914          Recurse          Recurse
         Ket  
9915          Cond          Cond
9916          Cond def          Cond def
9917          CBra 1          CBra 1
# Line 9625  Partial match: +ab Line 9932  Partial match: +ab
9932  /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ  /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
9933  ------------------------------------------------------------------  ------------------------------------------------------------------
9934          Bra          Bra
         Once  
9935          Recurse          Recurse
         Ket  
         Once  
9936          Recurse          Recurse
         Ket  
9937          Cond          Cond
9938          Cond def          Cond def
9939          CBra 1          CBra 1
# Line 10371  No match Line 10674  No match
10674          Cond nrecurse 1          Cond nrecurse 1
10675          $          $
10676          Alt          Alt
         Once  
10677          Recurse          Recurse
10678          Ket          Ket
10679          Ket          Ket
10680          Ket          Ket
         Ket  
10681          End          End
10682  ------------------------------------------------------------------  ------------------------------------------------------------------
10683  Capturing subpattern count = 4  Capturing subpattern count = 4
# Line 10432  Partial match: abca Line 10733  Partial match: abca
10733      xxxxabcde\P\P      xxxxabcde\P\P
10734  Partial match: abcde  Partial match: abcde
10735    
10736  /-- This is not in the Perl 5.10 test because Perl seems currently to be broken  /-- This is not in the Perl >= 5.10 test because Perl seems currently to be
10737      and not behaving as specified in that it *does* bumpalong after hitting      broken and not behaving as specified in that it *does* bumpalong after
10738      (*COMMIT). --/      hitting (*COMMIT). --/
10739    
10740  /(?1)(A(*COMMIT)|B)D/  /(?1)(A(*COMMIT)|B)D/
10741      ABD      ABD
# Line 10514  Starting byte set: i Line 10815  Starting byte set: i
10815  /(?i)a(?-i)b|c/BZ  /(?i)a(?-i)b|c/BZ
10816  ------------------------------------------------------------------  ------------------------------------------------------------------
10817          Bra          Bra
10818       NC a       /i a
      00 Opt  
10819          b          b
10820          Alt          Alt
      00 Opt  
10821          c          c
10822          Ket          Ket
10823          End          End
# Line 10537  No match Line 10836  No match
10836  /(?i)a(?s)b|c/BZ  /(?i)a(?s)b|c/BZ
10837  ------------------------------------------------------------------  ------------------------------------------------------------------
10838          Bra          Bra
10839       NC a       /i ab
      05 Opt  
      NC b  
10840          Alt          Alt
10841       05 Opt       /i c
      NC c  
10842          Ket          Ket
10843          End          End
10844  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 10550  No match Line 10846  No match
10846  /(?i)a(?s-i)b|c/BZ  /(?i)a(?s-i)b|c/BZ
10847  ------------------------------------------------------------------  ------------------------------------------------------------------
10848          Bra          Bra
10849       NC a       /i a
      04 Opt  
10850          b          b
10851          Alt          Alt
      04 Opt  
10852          c          c
10853          Ket          Ket
10854          End          End
# Line 10596  No match Line 10890  No match
10890   0: xabcxd   0: xabcxd
10891   1: abcxd   1: abcxd
10892   2: cx   2: cx
10893    
10894    /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
10895    ------------------------------------------------------------------
10896            Bra
10897            ^
10898            Braposzero
10899            SBraPos
10900            Recurse
10901            KetRpos
10902            Cond
10903            Cond def
10904            CBra 1
10905            Any
10906            Ket
10907            Ket
10908            $
10909            Ket
10910            End
10911    ------------------------------------------------------------------
10912    
10913    /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
10914    ------------------------------------------------------------------
10915            Bra
10916            ^
10917            Brazero
10918            Once
10919            Recurse
10920            KetRmax
10921            Cond
10922            Cond def
10923            CBra 1
10924            Any
10925            Ket
10926            Ket
10927            $
10928            Ket
10929            End
10930    ------------------------------------------------------------------
10931    
10932    / -- The first four of these are not in the Perl >= 5.10 test because Perl
10933         documents that the use of \K in assertions is "not well defined". The
10934         last is here because Perl gives the match as "b" rather than "ab". I
10935         believe this to be a Perl bug. --/
10936    
10937    /(?=a\Kb)ab/
10938        ab
10939     0: b
10940    
10941    /(?!a\Kb)ac/
10942        ac
10943     0: ac
10944    
10945    /^abc(?<=b\Kc)d/
10946        abcd
10947     0: cd
10948    
10949    /^abc(?<!b\Kq)d/
10950        abcd
10951     0: abcd
10952    
10953    /(?>a\Kb)z|(ab)/
10954        ab
10955     0: ab
10956     1: ab
10957    
10958    /----------------------/
10959    
10960    /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
10961    Failed: recursive call could loop indefinitely at offset 31
10962    
10963    /abc(*MARK:)pqr/
10964    Failed: (*MARK) must have an argument at offset 10
10965    
10966    /abc(*:)pqr/
10967    Failed: (*MARK) must have an argument at offset 6
10968    
10969    /abc(*FAIL:123)xyz/
10970    Failed: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) at offset 13
10971    
10972    /--- This should, and does, fail. In Perl, it does not, which I think is a
10973         bug because replacing the B in the pattern by (B|D) does make it fail. ---/
10974    
10975    /A(*COMMIT)B/+K
10976        ACABX
10977    No match
10978    
10979    /--- These should be different, but in Perl 5.11 are not, which I think
10980         is a bug in Perl. ---/
10981    
10982    /A(*THEN)B|A(*THEN)C/K
10983        AC
10984     0: AC
10985    
10986    /A(*PRUNE)B|A(*PRUNE)C/K
10987        AC
10988    No match
10989    
10990    /--- A whole lot of tests of verbs with arguments are here rather than in test
10991         11 because Perl doesn't seem to follow its specification entirely
10992         correctly. ---/
10993    
10994    /--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
10995         not clear how Perl defines "involved in the failure of the match". ---/
10996    
10997    /^(A(*THEN:A)B|C(*THEN:B)D)/K
10998        AB
10999     0: AB
11000     1: AB
11001        CD
11002     0: CD
11003     1: CD
11004        ** Failers
11005    No match
11006        AC
11007    No match
11008        CB
11009    No match, mark = B
11010    
11011    /--- Check the use of names for success and failure. PCRE doesn't show these
11012    names for success, though Perl does, contrary to its spec. ---/
11013    
11014    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
11015        AB
11016     0: AB
11017     1: AB
11018        CD
11019     0: CD
11020     1: CD
11021        ** Failers
11022    No match
11023        AC
11024    No match, mark = A
11025        CB
11026    No match, mark = B
11027    
11028    /--- An empty name does not pass back an empty string. It is the same as if no
11029    name were given. ---/
11030    
11031    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
11032        AB
11033     0: AB
11034     1: AB
11035        CD
11036     0: CD
11037     1: CD
11038    
11039    /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
11040    
11041    /A(*PRUNE:A)B/K
11042        ACAB
11043     0: AB
11044    
11045    /(*MARK:A)(*PRUNE:B)(C|X)/KS
11046        C
11047     0: C
11048     1: C
11049    MK: A
11050        D
11051    No match
11052    
11053    /(*MARK:A)(*PRUNE:B)(C|X)/KSS
11054        C
11055     0: C
11056     1: C
11057    MK: A
11058        D
11059    No match, mark = B
11060    
11061    /(*MARK:A)(*THEN:B)(C|X)/KS
11062        C
11063     0: C
11064     1: C
11065    MK: A
11066        D
11067    No match
11068    
11069    /(*MARK:A)(*THEN:B)(C|X)/KSS
11070        C
11071     0: C
11072     1: C
11073    MK: A
11074        D
11075    No match, mark = B
11076    
11077    /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
11078    
11079    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
11080        AAAC
11081    No match
11082    
11083    /--- Same --/
11084    
11085    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
11086        AAAC
11087    No match
11088    
11089    /--- This should fail; the SKIP advances by one, but when we get to AC, the
11090         PRUNE kills it. ---/
11091    
11092    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
11093        AAAC
11094    No match
11095    
11096    /A(*:A)A+(*SKIP)(B|Z) | AC/xK
11097        AAAC
11098    No match
11099    
11100    /--- This should fail, as a null name is the same as no name ---/
11101    
11102    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
11103        AAAC
11104    No match
11105    
11106    /--- This fails in PCRE, and I think that is in accordance with Perl's
11107         documentation, though in Perl it succeeds. ---/
11108    
11109    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
11110        AAAC
11111    No match
11112    
11113    /--- Mark names can be duplicated ---/
11114    
11115    /A(*:A)B|X(*:A)Y/K
11116        AABC
11117     0: AB
11118    MK: A
11119        XXYZ
11120     0: XY
11121    MK: A
11122    
11123    /^A(*:A)B|^X(*:A)Y/K
11124        ** Failers
11125    No match
11126        XAQQ
11127    No match, mark = A
11128    
11129    /--- A check on what happens after hitting a mark and them bumping along to
11130    something that does not even start. Perl reports tags after the failures here,
11131    though it does not when the individual letters are made into something
11132    more complicated. ---/
11133    
11134    /A(*:A)B|XX(*:B)Y/K
11135        AABC
11136     0: AB
11137    MK: A
11138        XXYZ
11139     0: XXY
11140    MK: B
11141        ** Failers
11142    No match
11143        XAQQ
11144    No match
11145        XAQQXZZ
11146    No match
11147        AXQQQ
11148    No match
11149        AXXQQQ
11150    No match
11151    
11152    /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
11153    optimizations defeat this. So does the PCRE optimization unless we disable it
11154    with \Y. ---/
11155    
11156    /(*COMMIT)ABC/
11157        ABCDEFG
11158     0: ABC
11159        ** Failers
11160    No match
11161        DEFGABC\Y
11162    No match
11163    
11164    /--- Repeat some tests with added studying. ---/
11165    
11166    /A(*COMMIT)B/+KS
11167        ACABX
11168    No match
11169    
11170    /A(*THEN)B|A(*THEN)C/KS
11171        AC
11172     0: AC
11173    
11174    /A(*PRUNE)B|A(*PRUNE)C/KS
11175        AC
11176    No match
11177    
11178    /^(A(*THEN:A)B|C(*THEN:B)D)/KS
11179        AB
11180     0: AB
11181     1: AB
11182        CD
11183     0: CD
11184     1: CD
11185        ** Failers
11186    No match
11187        AC
11188    No match
11189        CB
11190    No match, mark = B
11191    
11192    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
11193        AB
11194     0: AB
11195     1: AB
11196        CD
11197     0: CD
11198     1: CD
11199        ** Failers
11200    No match
11201        AC
11202    No match, mark = A
11203        CB
11204    No match, mark = B
11205    
11206    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
11207        AB
11208     0: AB
11209     1: AB
11210        CD
11211     0: CD
11212     1: CD
11213    
11214    /A(*PRUNE:A)B/KS
11215        ACAB
11216     0: AB
11217    
11218    /(*MARK:A)(*PRUNE:B)(C|X)/KS
11219        C
11220     0: C
11221     1: C
11222    MK: A
11223        D
11224    No match
11225    
11226    /(*MARK:A)(*THEN:B)(C|X)/KS
11227        C
11228     0: C
11229     1: C
11230    MK: A
11231        D
11232    No match
11233    
11234    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
11235        AAAC
11236    No match
11237    
11238    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
11239        AAAC
11240    No match
11241    
11242    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
11243        AAAC
11244    No match
11245    
11246    /A(*:A)A+(*SKIP)(B|Z) | AC/xKS
11247        AAAC
11248    No match
11249    
11250    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
11251        AAAC
11252    No match
11253    
11254    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
11255        AAAC
11256    No match
11257    
11258    /A(*:A)B|XX(*:B)Y/KS
11259        AABC
11260     0: AB
11261    MK: A
11262        XXYZ
11263     0: XXY
11264    MK: B
11265        ** Failers
11266    No match
11267        XAQQ
11268    No match
11269        XAQQXZZ
11270    No match
11271        AXQQQ
11272    No match
11273        AXXQQQ
11274    No match
11275    
11276    /(*COMMIT)ABC/
11277        ABCDEFG
11278     0: ABC
11279        ** Failers
11280    No match
11281        DEFGABC\Y
11282    No match
11283    
11284    /^(ab (c+(*THEN)cd) | xyz)/x
11285        abcccd
11286    No match
11287    
11288    /^(ab (c+(*PRUNE)cd) | xyz)/x
11289        abcccd
11290    No match
11291    
11292    /^(ab (c+(*FAIL)cd) | xyz)/x
11293        abcccd
11294    No match
11295    
11296    /--- Perl 5.11 gets some of these wrong ---/
11297    
11298    /(?>.(*ACCEPT))*?5/
11299        abcde
11300     0: a
11301    
11302    /(.(*ACCEPT))*?5/
11303        abcde
11304     0: a
11305     1: a
11306    
11307    /(.(*ACCEPT))5/
11308        abcde
11309     0: a
11310     1: a
11311    
11312    /(.(*ACCEPT))*5/
11313        abcde
11314     0: a
11315     1: a
11316    
11317    /A\NB./BZ
11318    ------------------------------------------------------------------
11319            Bra
11320            A
11321            Any
11322            B
11323            Any
11324            Ket
11325            End
11326    ------------------------------------------------------------------
11327        ACBD
11328     0: ACBD
11329        *** Failers
11330    No match
11331        A\nB
11332    No match
11333        ACB\n
11334    No match
11335    
11336    /A\NB./sBZ
11337    ------------------------------------------------------------------
11338            Bra
11339            A
11340            Any
11341            B
11342            AllAny
11343            Ket
11344            End
11345    ------------------------------------------------------------------
11346        ACBD
11347     0: ACBD
11348        ACB\n
11349     0: ACB\x0a
11350        *** Failers
11351    No match
11352        A\nB
11353    No match
11354    
11355    /A\NB/<crlf>
11356        A\nB
11357     0: A\x0aB
11358        A\rB
11359     0: A\x0dB
11360        ** Failers
11361    No match
11362        A\r\nB
11363    No match
11364    
11365    /\R+b/BZ
11366    ------------------------------------------------------------------
11367            Bra
11368            \R++
11369            b
11370            Ket
11371            End
11372    ------------------------------------------------------------------
11373    
11374    /\R+\n/BZ
11375    ------------------------------------------------------------------
11376            Bra
11377            \R+
11378            \x0a
11379            Ket
11380            End
11381    ------------------------------------------------------------------
11382    
11383    /\R+\d/BZ
11384    ------------------------------------------------------------------
11385            Bra
11386            \R++
11387            \d
11388            Ket
11389            End
11390    ------------------------------------------------------------------
11391    
11392    /\d*\R/BZ
11393    ------------------------------------------------------------------
11394            Bra
11395            \d*+
11396            \R
11397            Ket
11398            End
11399    ------------------------------------------------------------------
11400    
11401    /\s*\R/BZ
11402    ------------------------------------------------------------------
11403            Bra
11404            \s*+
11405            \R
11406            Ket
11407            End
11408    ------------------------------------------------------------------
11409    
11410    /-- Perl treats this one differently, not failing the second string. I believe
11411        that is a bug in Perl. --/
11412    
11413    /^((abc|abcx)(*THEN)y|abcd)/
11414        abcd
11415     0: abcd
11416     1: abcd
11417        *** Failers
11418    No match
11419        abcxy
11420    No match
11421    
11422    /(?<=abc)def/
11423        abc\P\P
11424    Partial match: abc
11425    
11426    /abc$/
11427        abc
11428     0: abc
11429        abc\P
11430     0: abc
11431        abc\P\P
11432    Partial match: abc
11433    
11434    /abc$/m
11435        abc
11436     0: abc
11437        abc\n
11438     0: abc
11439        abc\P\P
11440    Partial match: abc
11441        abc\n\P\P
11442     0: abc
11443        abc\P
11444     0: abc
11445        abc\n\P
11446     0: abc
11447    
11448    /abc\z/
11449        abc
11450     0: abc
11451        abc\P
11452     0: abc
11453        abc\P\P
11454    Partial match: abc
11455    
11456    /abc\Z/
11457        abc
11458     0: abc
11459        abc\P
11460     0: abc
11461        abc\P\P
11462    Partial match: abc
11463    
11464    /abc\b/
11465        abc
11466     0: abc
11467        abc\P
11468     0: abc
11469        abc\P\P
11470    Partial match: abc
11471    
11472    /abc\B/
11473        abc
11474    No match
11475        abc\P
11476    Partial match: abc
11477        abc\P\P
11478    Partial match: abc
11479    
11480    /.+/
11481        abc\>0
11482     0: abc
11483        abc\>1
11484     0: bc
11485        abc\>2
11486     0: c
11487        abc\>3
11488    No match
11489        abc\>4
11490    Error -24 (bad offset value)
11491        abc\>-4
11492    Error -24 (bad offset value)
11493    
11494    /^\cģ/
11495    Failed: \c must be followed by an ASCII character at offset 3
11496    
11497    /(?P<abn>(?P=abn)xxx)/BZ
11498    ------------------------------------------------------------------
11499            Bra
11500            Once
11501            CBra 1
11502            \1
11503            xxx
11504            Ket
11505            Ket
11506            Ket
11507            End
11508    ------------------------------------------------------------------
11509    
11510    /(a\1z)/BZ
11511    ------------------------------------------------------------------
11512            Bra
11513            Once
11514            CBra 1
11515            a
11516            \1
11517            z
11518            Ket
11519            Ket
11520            Ket
11521            End
11522    ------------------------------------------------------------------
11523    
11524    /(?P<abn>(?P=abn)(?<badstufxxx)/BZ
11525    Failed: syntax error in subpattern name (missing terminator) at offset 29
11526    
11527    /(?P<abn>(?P=axn)xxx)/BZ
11528    Failed: reference to non-existent subpattern at offset 15
11529    
11530    /(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
11531    ------------------------------------------------------------------
11532            Bra
11533            CBra 1
11534            \2
11535            xxx
11536            Ket
11537            CBra 2
11538            yy
11539            Ket
11540            Ket
11541            End
11542    ------------------------------------------------------------------
11543    
11544    /-- These tests are here because Perl gets the first one wrong. --/
11545    
11546    /(\R*)(.)/s
11547        \r\n
11548     0: \x0d
11549     1:
11550     2: \x0d
11551        \r\r\n\n\r
11552     0: \x0d\x0d\x0a\x0a\x0d
11553     1: \x0d\x0d\x0a\x0a
11554     2: \x0d
11555        \r\r\n\n\r\n
11556     0: \x0d\x0d\x0a\x0a\x0d
11557     1: \x0d\x0d\x0a\x0a
11558     2: \x0d
11559    
11560    /(\R)*(.)/s
11561        \r\n
11562     0: \x0d
11563     1: <unset>
11564     2: \x0d
11565        \r\r\n\n\r
11566     0: \x0d\x0d\x0a\x0a\x0d
11567     1: \x0a
11568     2: \x0d
11569        \r\r\n\n\r\n
11570     0: \x0d\x0d\x0a\x0a\x0d
11571     1: \x0a
11572     2: \x0d
11573    
11574    /((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
11575        \r\n
11576     0: \x0d
11577     1:
11578     2: \x0d
11579        \r\r\n\n\r
11580     0: \x0d\x0d\x0a\x0a\x0d
11581     1: \x0d\x0d\x0a\x0a
11582     2: \x0d
11583        \r\r\n\n\r\n
11584     0: \x0d\x0d\x0a\x0a\x0d
11585     1: \x0d\x0d\x0a\x0a
11586     2: \x0d
11587    
11588    /-- --/
11589    
11590    /^abc$/BZ
11591    ------------------------------------------------------------------
11592            Bra
11593            ^
11594            abc
11595            $
11596            Ket
11597            End
11598    ------------------------------------------------------------------
11599    
11600    /^abc$/BZm
11601    ------------------------------------------------------------------
11602            Bra
11603         /m ^
11604            abc
11605         /m $
11606            Ket
11607            End
11608    ------------------------------------------------------------------
11609    
11610    /^(a)*+(\w)/S
11611        aaaaX
11612     0: aaaaX
11613     1: a
11614     2: X
11615        ** Failers
11616    No match
11617        aaaa
11618    No match
11619    
11620    /^(?:a)*+(\w)/S
11621        aaaaX
11622     0: aaaaX
11623     1: X
11624        ** Failers
11625    No match
11626        aaaa
11627    No match
11628    
11629    /(a)++1234/SDZ
11630    ------------------------------------------------------------------
11631            Bra
11632            CBraPos 1
11633            a
11634            KetRpos
11635            1234
11636            Ket
11637            End
11638    ------------------------------------------------------------------
11639    Capturing subpattern count = 1
11640    No options
11641    First char = 'a'
11642    Need char = '4'
11643    Subject length lower bound = 5
11644    No set of starting bytes
11645    
11646    /([abc])++1234/SI
11647    Capturing subpattern count = 1
11648    No options
11649    No first char
11650    Need char = '4'
11651    Subject length lower bound = 5
11652    Starting byte set: a b c
11653    
11654    /(?<=(abc)+)X/
11655    Failed: lookbehind assertion is not fixed length at offset 10
11656    
11657    /(^ab)/I
11658    Capturing subpattern count = 1
11659    Options: anchored
11660    No first char
11661    No need char
11662    
11663    /(^ab)++/I
11664    Capturing subpattern count = 1
11665    Options: anchored
11666    No first char
11667    No need char
11668    
11669    /(^ab|^)+/I
11670    Capturing subpattern count = 1
11671    Options: anchored
11672    No first char
11673    No need char
11674    
11675    /(^ab|^)++/I
11676    Capturing subpattern count = 1
11677    Options: anchored
11678    No first char
11679    No need char
11680    
11681    /(?:^ab)/I
11682    Capturing subpattern count = 0
11683    Options: anchored
11684    No first char
11685    No need char
11686    
11687    /(?:^ab)++/I
11688    Capturing subpattern count = 0
11689    Options: anchored
11690    No first char
11691    No need char
11692    
11693    /(?:^ab|^)+/I
11694    Capturing subpattern count = 0
11695    Options: anchored
11696    No first char
11697    No need char
11698    
11699    /(?:^ab|^)++/I
11700    Capturing subpattern count = 0
11701    Options: anchored
11702    No first char
11703    No need char
11704    
11705    /(.*ab)/I
11706    Capturing subpattern count = 1
11707    No options
11708    First char at start or follows newline
11709    Need char = 'b'
11710    
11711    /(.*ab)++/I
11712    Capturing subpattern count = 1
11713    No options
11714    First char at start or follows newline
11715    Need char = 'b'
11716    
11717    /(.*ab|.*)+/I
11718    Capturing subpattern count = 1
11719    No options
11720    First char at start or follows newline
11721    No need char
11722    
11723    /(.*ab|.*)++/I
11724    Capturing subpattern count = 1
11725    No options
11726    First char at start or follows newline
11727    No need char
11728    
11729    /(?:.*ab)/I
11730    Capturing subpattern count = 0
11731    No options
11732    First char at start or follows newline
11733    Need char = 'b'
11734    
11735    /(?:.*ab)++/I
11736    Capturing subpattern count = 0
11737    No options
11738    First char at start or follows newline
11739    Need char = 'b'
11740    
11741    /(?:.*ab|.*)+/I
11742    Capturing subpattern count = 0
11743    No options
11744    First char at start or follows newline
11745    No need char
11746    
11747    /(?:.*ab|.*)++/I
11748    Capturing subpattern count = 0
11749    No options
11750    First char at start or follows newline
11751    No need char
11752    
11753    /(?=a)[bcd]/I
11754    Capturing subpattern count = 0
11755    No options
11756    First char = 'a'
11757    No need char
11758    
11759    /((?=a))[bcd]/I
11760    Capturing subpattern count = 1
11761    No options
11762    First char = 'a'
11763    No need char
11764    
11765    /((?=a))+[bcd]/I
11766    Capturing subpattern count = 1
11767    No options
11768    First char = 'a'
11769    No need char
11770    
11771    /((?=a))++[bcd]/I
11772    Capturing subpattern count = 1
11773    No options
11774    First char = 'a'
11775    No need char
11776    
11777    /(?=a+)[bcd]/iI
11778    Capturing subpattern count = 0
11779    Options: caseless
11780    First char = 'a' (caseless)
11781    No need char
11782    
11783    /(?=a+?)[bcd]/iI
11784    Capturing subpattern count = 0
11785    Options: caseless
11786    First char = 'a' (caseless)
11787    No need char
11788    
11789    /(?=a++)[bcd]/iI
11790    Capturing subpattern count = 0
11791    Options: caseless
11792    First char = 'a' (caseless)
11793    No need char
11794    
11795    /(?=a{3})[bcd]/iI
11796    Capturing subpattern count = 0
11797    Options: caseless
11798    First char = 'a' (caseless)
11799    Need char = 'a' (caseless)
11800    
11801    /(abc)\1+/S
11802    
11803    /-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
11804    
11805    /(?1)(?:(b(*ACCEPT))){0}/
11806        b
11807     0: b
11808    
11809    /(?1)(?:(b(*ACCEPT))){0}c/
11810        bc
11811     0: bc
11812        ** Failers
11813    No match
11814        b
11815    No match
11816    
11817    /(?1)(?:((*ACCEPT))){0}c/
11818        c
11819     0: c
11820        c\N
11821     0: c
11822    
11823    /^.*?(?(?=a)a|b(*THEN)c)/
11824        ba
11825     0: ba
11826    
11827    /^.*?(?(?=a)a|bc)/
11828        ba
11829     0: ba
11830    
11831    /-- --/
11832    
11833    /-- These studied versions are here because they are not Perl-compatible; the
11834        studying means the mark is not seen. --/
11835    
11836    /(*MARK:A)(*SKIP:B)(C|X)/KS
11837        C
11838     0: C
11839     1: C
11840    MK: A
11841        D
11842    No match
11843    
11844    /(*:A)A+(*SKIP:A)(B|Z)/KS
11845        AAAC
11846    No match
11847    
11848    /-- --/
11849    
11850    "(?=a*(*ACCEPT)b)c"
11851        c
11852     0: c
11853        c\N
11854     0: c
11855    
11856    /(?1)c(?(DEFINE)((*ACCEPT)b))/
11857        c
11858     0: c
11859        c\N
11860     0: c
11861    
11862    /(?>(*ACCEPT)b)c/
11863        c
11864     0:
11865        c\N
11866    No match
11867    
11868    /(?:(?>(a)))+a%/++
11869        %aa%
11870     0: aa%
11871     0+
11872     1: a
11873     1+ a%
11874    
11875    /(a)b|ac/++
11876        ac\O3
11877    Matched, but too many substrings
11878     0: ac
11879     0+
11880    
11881    /(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
11882    Capturing subpattern count = 2
11883    No options
11884    No first char
11885    No need char
11886    Subject length lower bound = 1
11887    No set of starting bytes
11888    
11889    /(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
11890    Capturing subpattern count = 2
11891    No options
11892    No first char
11893    No need char
11894    Subject length lower bound = 3
11895    Starting byte set: a b
11896    
11897    /(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
11898    Capturing subpattern count = 2
11899    No options
11900    No first char
11901    No need char
11902    Subject length lower bound = 4
11903    Starting byte set: a b
11904    
11905    /(abc)(?1)/SI
11906    Capturing subpattern count = 1
11907    No options
11908    First char = 'a'
11909    Need char = 'c'
11910    Subject length lower bound = 6
11911    No set of starting bytes
11912    
11913    /^(?>a)++/
11914        aa\M
11915    Minimum match() limit = 5
11916    Minimum match() recursion limit = 3
11917     0: aa
11918        aaaaaaaaa\M
11919    Minimum match() limit = 12
11920    Minimum match() recursion limit = 3
11921     0: aaaaaaaaa
11922    
11923    /(a)(?1)++/
11924        aa\M
11925    Minimum match() limit = 7
11926    Minimum match() recursion limit = 5
11927     0: aa
11928     1: a
11929        aaaaaaaaa\M
11930    Minimum match() limit = 21
11931    Minimum match() recursion limit = 5
11932     0: aaaaaaaaa
11933     1: a
11934    
11935    /(?:(foo)|(bar)|(baz))X/=
11936        bazfooX
11937     0: fooX
11938     1: foo
11939     2: <unset>
11940     3: <unset>
11941        foobazbarX
11942     0: barX
11943     1: <unset>
11944     2: bar
11945     3: <unset>
11946        barfooX
11947     0: fooX
11948     1: foo
11949     2: <unset>
11950     3: <unset>
11951        bazX
11952     0: bazX
11953     1: <unset>
11954     2: <unset>
11955     3: baz
11956        foobarbazX
11957     0: bazX
11958     1: <unset>
11959     2: <unset>
11960     3: baz
11961        bazfooX\O0
11962    Matched, but too many substrings
11963        bazfooX\O2
11964    Matched, but too many substrings
11965     0: fooX
11966        bazfooX\O4
11967    Matched, but too many substrings
11968     0: fooX
11969     1: <unset>
11970        bazfooX\O6
11971    Matched, but too many substrings
11972     0: fooX
11973     1: foo
11974     2: <unset>
11975        bazfooX\O8
11976    Matched, but too many substrings
11977     0: fooX
11978     1: foo
11979     2: <unset>
11980     3: <unset>
11981        bazfooX\O10
11982    Matched, but too many substrings
11983     0: fooX
11984     1: foo
11985     2: <unset>
11986     3: <unset>
11987    
11988  /-- End of testinput2 --/  /-- End of testinput2 --/

Legend:
Removed from v.488  
changed lines
  Added in v.629

  ViewVC Help
Powered by ViewVC 1.1.5