/[pcre]/code/trunk/testdata/testoutput2
ViewVC logotype

Diff of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 426 by ph10, Wed Aug 26 15:38:32 2009 UTC revision 448 by ph10, Tue Sep 15 19:11:48 2009 UTC
# Line 331  No need char Line 331  No need char
331   2: <unset>   2: <unset>
332   3: def   3: def
333    
334  /abc/IP  /abc/P
335      abc      abc
336   0: abc   0: abc
337      *** Failers      *** Failers
338  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
339    
340  /^abc|def/IP  /^abc|def/P
341      abcdef      abcdef
342   0: abc   0: abc
343      abcdef\B      abcdef\B
344   0: def   0: def
345    
346  /.*((abc)$|(def))/IP  /.*((abc)$|(def))/P
347      defabc      defabc
348   0: defabc   0: defabc
349   1: abc   1: abc
# Line 353  No match: POSIX code 17: match failed Line 353  No match: POSIX code 17: match failed
353   1: def   1: def
354   3: def   3: def
355    
356  /the quick brown fox/IP  /the quick brown fox/P
357      the quick brown fox      the quick brown fox
358   0: the quick brown fox   0: the quick brown fox
359      *** Failers      *** Failers
# Line 361  No match: POSIX code 17: match failed Line 361  No match: POSIX code 17: match failed
361      The Quick Brown Fox      The Quick Brown Fox
362  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
363    
364  /the quick brown fox/IPi  /the quick brown fox/Pi
365      the quick brown fox      the quick brown fox
366   0: the quick brown fox   0: the quick brown fox
367      The Quick Brown Fox      The Quick Brown Fox
368   0: The Quick Brown Fox   0: The Quick Brown Fox
369    
370  /abc.def/IP  /abc.def/P
371      *** Failers      *** Failers
372  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
373      abc\ndef      abc\ndef
374  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
375    
376  /abc$/IP  /abc$/P
377      abc      abc
378   0: abc   0: abc
379      abc\n      abc\n
380   0: abc   0: abc
381    
382  /(abc)\2/IP  /(abc)\2/P
383  Failed: POSIX code 15: bad back reference at offset 7  Failed: POSIX code 15: bad back reference at offset 7
384    
385  /(abc\1)/IP  /(abc\1)/P
386      abc      abc
387  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
388    
# Line 1615  No need char Line 1615  No need char
1615      \Nabc      \Nabc
1616  No match  No match
1617    
1618  /a*(b+)(z)(z)/IP  /a*(b+)(z)(z)/P
1619      aaaabbbbzzzz      aaaabbbbzzzz
1620   0: aaaabbbbzz   0: aaaabbbbzz
1621   1: bbbb   1: bbbb
# Line 1805  Need char = ')' Line 1805  Need char = ')'
1805   0: (abcd(xyz<p>qrs)123)   0: (abcd(xyz<p>qrs)123)
1806   1: abcd(xyz<p>qrs)123   1: abcd(xyz<p>qrs)123
1807   2: 123   2: 123
  3: <unset>  
1808    
1809  /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix  /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
1810  Capturing subpattern count = 3  Capturing subpattern count = 3
# Line 5548  No match Line 5547  No match
5547      line one\nthis is a line\nbreak in the second line      line one\nthis is a line\nbreak in the second line
5548  No match  No match
5549    
5550  /ab.cd/IP  /ab.cd/P
5551      ab-cd      ab-cd
5552   0: ab-cd   0: ab-cd
5553      ab=cd      ab=cd
# Line 5558  No match: POSIX code 17: match failed Line 5557  No match: POSIX code 17: match failed
5557      ab\ncd      ab\ncd
5558  No match: POSIX code 17: match failed  No match: POSIX code 17: match failed
5559    
5560  /ab.cd/IPs  /ab.cd/Ps
5561      ab-cd      ab-cd
5562   0: ab-cd   0: ab-cd
5563      ab=cd      ab=cd
# Line 5858  No need char Line 5857  No need char
5857      ((this))      ((this))
5858   0: ((this))   0: ((this))
5859    
5860  /a(b)c/IPN  /a(b)c/PN
5861      abc      abc
5862  Matched with REG_NOSUB  Matched with REG_NOSUB
5863    
5864  /a(?P<name>b)c/IPN  /a(?P<name>b)c/PN
5865      abc      abc
5866  Matched with REG_NOSUB  Matched with REG_NOSUB
5867    
# Line 7572  Need char = ':' Line 7571  Need char = ':'
7571   0: abcd:   0: abcd:
7572   1: abcd   1: abcd
7573    
 /(?'abc'\w+):\k<abc>{2}/  
     a:aaxyz  
  0: a:aa  
  1: a  
     ab:ababxyz  
  0: ab:abab  
  1: ab  
     ** Failers  
 No match  
     a:axyz  
 No match  
     ab:abxyz  
 No match  
   
7574  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
7575      adaa      adaa
7576   0: adaa   0: adaa
# Line 7612  No match Line 7597  No match
7597      bddd      bddd
7598  No match  No match
7599    
 /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x  
     abd  
  0: abd  
  1: a  
     ce  
  0: ce  
   
7600  /(?(<bc))/  /(?(<bc))/
7601  Failed: malformed number or name after (?( at offset 6  Failed: malformed number or name after (?( at offset 6
7602    
# Line 7649  Failed: reference to non-existent subpat Line 7627  Failed: reference to non-existent subpat
7627   1: abcabc1Xabc2XabcX   1: abcabc1Xabc2XabcX
7628   2: abcabc1Xabc2XabcX   2: abcabc1Xabc2XabcX
7629    
 /^(?(DEFINE) (?<A> a) (?<B> b) )  (?&A) (?&B) /x  
     abcd  
  0: ab  
  1: <unset>  
  2: <unset>  
   
 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))  
   (?(DEFINE)  
   (?<NAME_PAT>[a-z]+)  
   (?<ADDRESS_PAT>\d+)  
   )/x  
     metcalfe 33  
  0: metcalfe 33  
  1: metcalfe  
  2: 33  
  3: <unset>  
  4: <unset>  
   
7630  /^(?(DEFINE) abc | xyz ) /x  /^(?(DEFINE) abc | xyz ) /x
7631  Failed: DEFINE group contains more than one branch at offset 22  Failed: DEFINE group contains more than one branch at offset 22
7632    
# Line 7844  Need char = 'P' Line 7804  Need char = 'P'
7804   0: PXP   0: PXP
7805   1: P   1: P
7806    
 /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/  
     1.2.3.4  
  0: 1.2.3.4  
  1: <unset>  
  2: .4  
     131.111.10.206  
  0: 131.111.10.206  
  1: <unset>  
  2: .206  
     10.0.0.0  
  0: 10.0.0.0  
  1: <unset>  
  2: .0  
     ** Failers  
 No match  
     10.6  
 No match  
     455.3.4.5  
 No match  
   
 /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/  
     1.2.3.4  
  0: 1.2.3.4  
  1: .4  
  2: <unset>  
     131.111.10.206  
  0: 131.111.10.206  
  1: .206  
  2: <unset>  
     10.0.0.0  
  0: 10.0.0.0  
  1: .0  
  2: <unset>  
     ** Failers  
 No match  
     10.6  
 No match  
     455.3.4.5  
 No match  
   
7807  /(?:a(?&abc)b)*(?<abc>x)/  /(?:a(?&abc)b)*(?<abc>x)/
7808      123axbaxbaxbx456      123axbaxbaxbx456
7809   0: axbaxbaxbx   0: axbaxbaxbx
# Line 7921  No match Line 7841  No match
7841     DEFabcABCXYZ     DEFabcABCXYZ
7842  No match  No match
7843    
 /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/  
     ababababbbabZXXXX  
  0: ababababbbabZ  
  1: ab  
  2: b  
   
7844  /^(a)\g-2/  /^(a)\g-2/
7845  Failed: reference to non-existent subpattern at offset 7  Failed: reference to non-existent subpattern at offset 7
7846    
# Line 8182  Failed: reference to non-existent subpat Line 8096  Failed: reference to non-existent subpat
8096   0: Y!   0: Y!
8097   1: !   1: !
8098    
 /(foo)\Kbar/  
     foobar  
  0: bar  
  1: foo  
   
 /(foo)(\Kbar|baz)/  
     foobar  
  0: bar  
  1: foo  
  2: bar  
     foobaz  
  0: foobaz  
  1: foo  
  2: baz  
   
 /(foo\Kbar)baz/  
     foobarbaz  
  0: barbaz  
  1: foobar  
   
8099  /(?<A>tom|bon)-\k{A}/  /(?<A>tom|bon)-\k{A}/
8100      tom-tom      tom-tom
8101   0: tom-tom   0: tom-tom
# Line 8214  No match Line 8108  No match
8108      tom-bon      tom-bon
8109  No match  No match
8110    
 /(?<A>tom|bon)-\g{A}/  
     tom-tom  
  0: tom-tom  
  1: tom  
     bon-bon  
  0: bon-bon  
  1: bon  
   
8111  /\g{A/  /\g{A/
8112  Failed: syntax error in subpattern name (missing terminator) at offset 4  Failed: syntax error in subpattern name (missing terminator) at offset 4
8113    
# Line 8316  Failed: syntax error in subpattern name Line 8202  Failed: syntax error in subpattern name
8202   3: <unset>   3: <unset>
8203   4: x   4: x
8204    
 /(?|(abc)|(xyz))\1/  
     abcabc  
  0: abcabc  
  1: abc  
     xyzxyz  
  0: xyzxyz  
  1: xyz  
     ** Failers  
 No match  
     abcxyz  
 No match  
     xyzabc  
 No match  
   
 /(?|(abc)|(xyz))(?1)/  
     abcabc  
  0: abcabc  
  1: abc  
     xyzabc  
  0: xyzabc  
  1: xyz  
     ** Failers  
 No match  
     xyzxyz  
 No match  
   
 /\H\h\V\v/  
     X X\x0a  
  0: X X\x0a  
     X\x09X\x0b  
  0: X\x09X\x0b  
     ** Failers  
 No match  
     \xa0 X\x0a  
 No match  
   
 /\H*\h+\V?\v{3,4}/  
     \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a  
  0: \x09 \xa0X\x0a\x0b\x0c\x0d  
     \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a  
  0: \x09 \xa0\x0a\x0b\x0c\x0d  
     \x09\x20\xa0\x0a\x0b\x0c  
  0: \x09 \xa0\x0a\x0b\x0c  
     ** Failers  
 No match  
     \x09\x20\xa0\x0a\x0b  
 No match  
   
 /\H{3,4}/  
     XY  ABCDE  
  0: ABCD  
     XY  PQR ST  
  0: PQR  
   
 /.\h{3,4}./  
     XY  AB    PQRS  
  0: B    P  
   
 /\h*X\h?\H+Y\H?Z/  
     >XNNNYZ  
  0: XNNNYZ  
     >  X NYQZ  
  0:   X NYQZ  
     ** Failers  
 No match  
     >XYZ  
 No match  
     >  X NY Z  
 No match  
   
 /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/  
     >XY\x0aZ\x0aA\x0bNN\x0c  
  0: XY\x0aZ\x0aA\x0bNN\x0c  
     >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c  
  0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c  
   
8205  /[\h]/BZ  /[\h]/BZ
8206  ------------------------------------------------------------------  ------------------------------------------------------------------
8207          Bra          Bra
# Line 8688  Failed: missing terminating ] for charac Line 8498  Failed: missing terminating ] for charac
8498          End          End
8499  ------------------------------------------------------------------  ------------------------------------------------------------------
8500    
 /^a+(*FAIL)/  
     aaaaaa  
 No match  
   
 /a+b?c+(*FAIL)/  
     aaabccc  
 No match  
   
 /a+b?(*PRUNE)c+(*FAIL)/  
     aaabccc  
 No match  
   
 /a+b?(*COMMIT)c+(*FAIL)/  
     aaabccc  
 No match  
   
 /a+b?(*SKIP)c+(*FAIL)/  
     aaabcccaaabccc  
 No match  
   
 /^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/  
     aaaxxxxxx  
  0: aaaxxxxxx  
     aaa++++++  
  0: aaa  
     bbbxxxxx  
  0: bbbxxxxx  
     bbb+++++  
  0: bbb  
     cccxxxx  
  0: cccxxxx  
     ccc++++  
  0: ccc  
     dddddddd  
  0: ddd  
   
 /^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/  
     aaaxxxxxx  
  0: aaaxxxxxx  
  1: aaaxxxxxx  
     aaa++++++  
  0: aaa  
  1: aaa  
     bbbxxxxx  
  0: bbbxxxxx  
  1: bbbxxxxx  
     bbb+++++  
  0: bbb  
  1: bbb  
     cccxxxx  
  0: cccxxxx  
  1: cccxxxx  
     ccc++++  
  0: ccc  
  1: ccc  
     dddddddd  
  0: ddd  
  1: ddd  
   
 /a+b?(*THEN)c+(*FAIL)/  
     aaabccc  
 No match  
   
 /(A (A|B(*ACCEPT)|C) D)(E)/x  
     ABX  
  0: AB  
     AADE  
  0: AADE  
  1: AAD  
  2: A  
  3: E  
     ACDE  
  0: ACDE  
  1: ACD  
  2: C  
  3: E  
     ** Failers  
 No match  
     AD  
 No match  
   
8501  /^a+(*FAIL)/C  /^a+(*FAIL)/C
8502      aaaaaa      aaaaaa
8503  --->aaaaaa  --->aaaaaa
# Line 9240  Failed: unknown POSIX class name at offs Line 8969  Failed: unknown POSIX class name at offs
8969  /[[:a\dz:]]/  /[[:a\dz:]]/
8970  Failed: unknown POSIX class name at offset 3  Failed: unknown POSIX class name at offset 3
8971    
 /^(?<name>a|b\g<name>c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /^(?<name>a|b\g'name'c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /^(a|b\g<1>c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /^(a|b\g'1'c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /^(a|b\g'-1'c)/  
     aaaa  
  0: a  
  1: a  
     bacxxx  
  0: bac  
  1: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
   
 /(^(a|b\g<-1>c))/  
     aaaa  
  0: a  
  1: a  
  2: a  
     bacxxx  
  0: bac  
  1: bac  
  2: bac  
     bbaccxxx  
  0: bbacc  
  1: bbacc  
  2: bbacc  
     bbbacccxx  
  0: bbbaccc  
  1: bbbaccc  
  2: bbbaccc  
   
8972  /(^(a|b\g<-1'c))/  /(^(a|b\g<-1'c))/
8973  Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15  Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15
8974    
 /(^(a|b\g{-1}))/  
     bacxxx  
 No match  
   
 /(?-i:\g<name>)(?i:(?<name>a))/  
     XaaX  
  0: aa  
  1: a  
     XAAX  
  0: AA  
  1: A  
   
 /(?i:\g<name>)(?-i:(?<name>a))/  
     XaaX  
  0: aa  
  1: a  
     ** Failers  
 No match  
     XAAX  
 No match  
   
 /(?-i:\g<+1>)(?i:(a))/  
     XaaX  
  0: aa  
  1: a  
     XAAX  
  0: AA  
  1: A  
   
 /(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/  
   
 /(?<n>a|b|c)\g<n>*/  
    abc  
  0: abc  
  1: a  
    accccbbb  
  0: accccbbb  
  1: a  
   
8975  /^(?+1)(?<a>x|y){0}z/  /^(?+1)(?<a>x|y){0}z/
8976      xzxx      xzxx
8977   0: xz   0: xz
  1: <unset>  
8978      yzyy      yzyy
8979   0: yz   0: yz
  1: <unset>  
8980      ** Failers      ** Failers
8981  No match  No match
8982      xxz      xxz
# Line 9638  No match Line 9238  No match
9238   0: "ab"   0: "ab"
9239   1:   1:
9240    
 /^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/  
     XYabcdY  
  0: XYabcdY  
  1: a  
  2: b  
  3: c  
  4: d  
  5: Y  
   
9241  /^X(?5)(a)(?|(b)|(q))(c)(d)Y/  /^X(?5)(a)(?|(b)|(q))(c)(d)Y/
9242  Failed: reference to non-existent subpattern at offset 5  Failed: reference to non-existent subpattern at offset 5
9243    
# Line 9659  Failed: reference to non-existent subpat Line 9250  Failed: reference to non-existent subpat
9250   4: d   4: d
9251   5: Y   5: Y
9252    
 /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/  
     XYabcdY  
  0: XYabcdY  
  1: a  
  2: b  
  3: <unset>  
  4: <unset>  
  5: c  
  6: d  
  7: Y  
   
 /^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/  
     XYabcdY  
  0: XYabcdY  
  1: a  
  2: b  
  3: <unset>  
  4: <unset>  
  5: c  
  6: d  
  7: Y  
   
 /^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/  
     XYabcdY  
  0: XYabcdY  
  1: a  
  2: b  
  3: <unset>  
  4: <unset>  
  5: c  
  6: d  
  7: Y  
   
9253  /Xa{2,4}b/  /Xa{2,4}b/
9254      X\P      X\P
9255  Partial match: X  Partial match: X
# Line 9918  Partial match: 123999 Line 9476  Partial match: 123999
9476    
9477  /Z(*F)/  /Z(*F)/
9478      Z\P      Z\P
9479  Partial match: Z  No match
9480      ZA\P      ZA\P
9481  No match  No match
9482    
9483  /Z(?!)/  /Z(?!)/
9484      Z\P      Z\P
9485  Partial match: Z  No match
9486      ZA\P      ZA\P
9487  No match  No match
9488    
9489    /dog(sbody)?/
9490        dogs\P
9491     0: dog
9492        dogs\P\P
9493    Partial match: dogs
9494    
9495    /dog(sbody)??/
9496        dogs\P
9497     0: dog
9498        dogs\P\P
9499     0: dog
9500    
9501    /dog|dogsbody/
9502        dogs\P
9503     0: dog
9504        dogs\P\P
9505     0: dog
9506    
9507    /dogsbody|dog/
9508        dogs\P
9509     0: dog
9510        dogs\P\P
9511    Partial match: dogs
9512    
9513    /\bthe cat\b/
9514        the cat\P
9515     0: the cat
9516        the cat\P\P
9517    Partial match: the cat
9518    
9519    /abc/
9520       abc\P
9521     0: abc
9522       abc\P\P
9523     0: abc
9524    
9525    /\w+A/P
9526       CDAAAAB
9527     0: CDAAAA
9528    
9529    /\w+A/PU
9530       CDAAAAB
9531     0: CDA
9532    
9533    /abc\K123/
9534        xyzabc123pqr
9535     0: 123
9536        xyzabc12\P
9537    Partial match: abc12
9538        xyzabc12\P\P
9539    Partial match: abc12
9540    
9541    /(?<=abc)123/
9542        xyzabc123pqr
9543     0: 123
9544        xyzabc12\P
9545    Partial match: abc12
9546        xyzabc12\P\P
9547    Partial match: abc12
9548    
9549    /\babc\b/
9550        +++abc+++
9551     0: abc
9552        +++ab\P
9553    Partial match: +ab
9554        +++ab\P\P
9555    Partial match: +ab
9556    
9557    /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
9558    ------------------------------------------------------------------
9559            Bra
9560            Once
9561            Recurse
9562            Ket
9563            Once
9564            Recurse
9565            Ket
9566            Cond
9567            Cond def
9568            CBra 1
9569            <
9570            [^m]
9571            [^>]
9572            >
9573            [^<]
9574            Ket
9575            CBra 2
9576            \w*+
9577            Ket
9578            Ket
9579            Ket
9580            End
9581    ------------------------------------------------------------------
9582    
9583    /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
9584    ------------------------------------------------------------------
9585            Bra
9586            Once
9587            Recurse
9588            Ket
9589            Once
9590            Recurse
9591            Ket
9592            Cond
9593            Cond def
9594            CBra 1
9595            <
9596            [\x00-/:-\xff] (neg)
9597            [^>]
9598            >
9599            [^<]
9600            Ket
9601            CBra 2
9602            \w*+
9603            Ket
9604            Ket
9605            Ket
9606            End
9607    ------------------------------------------------------------------
9608    
9609    /abc\K/+
9610        abcdef
9611     0:
9612     0+ def
9613        abcdef\N\N
9614     0:
9615     0+ def
9616        xyzabcdef\N\N
9617     0:
9618     0+ def
9619        ** Failers
9620    No match
9621        abcdef\N
9622    No match
9623        xyzabcdef\N
9624    No match
9625    
9626    /^(?:(?=abc)|abc\K)/+
9627        abcdef
9628     0:
9629     0+ abcdef
9630        abcdef\N\N
9631     0:
9632     0+ def
9633        ** Failers
9634    No match
9635        abcdef\N
9636    No match
9637    
9638    /a?b?/+
9639        xyz
9640     0:
9641     0+ xyz
9642        xyzabc
9643     0:
9644     0+ xyzabc
9645        xyzabc\N
9646     0: ab
9647     0+ c
9648        xyzabc\N\N
9649     0:
9650     0+ yzabc
9651        xyz\N\N
9652     0:
9653     0+ yz
9654        ** Failers
9655     0:
9656     0+ ** Failers
9657        xyz\N
9658    No match
9659    
9660    /^a?b?/+
9661        xyz
9662     0:
9663     0+ xyz
9664        xyzabc
9665     0:
9666     0+ xyzabc
9667        ** Failers
9668     0:
9669     0+ ** Failers
9670        xyzabc\N
9671    No match
9672        xyzabc\N\N
9673    No match
9674        xyz\N\N
9675    No match
9676        xyz\N
9677    No match
9678    
9679    /^(?<name>a|b\g<name>c)/
9680        aaaa
9681     0: a
9682     1: a
9683        bacxxx
9684     0: bac
9685     1: bac
9686        bbaccxxx
9687     0: bbacc
9688     1: bbacc
9689        bbbacccxx
9690     0: bbbaccc
9691     1: bbbaccc
9692    
9693    /^(?<name>a|b\g'name'c)/
9694        aaaa
9695     0: a
9696     1: a
9697        bacxxx
9698     0: bac
9699     1: bac
9700        bbaccxxx
9701     0: bbacc
9702     1: bbacc
9703        bbbacccxx
9704     0: bbbaccc
9705     1: bbbaccc
9706    
9707    /^(a|b\g<1>c)/
9708        aaaa
9709     0: a
9710     1: a
9711        bacxxx
9712     0: bac
9713     1: bac
9714        bbaccxxx
9715     0: bbacc
9716     1: bbacc
9717        bbbacccxx
9718     0: bbbaccc
9719     1: bbbaccc
9720    
9721    /^(a|b\g'1'c)/
9722        aaaa
9723     0: a
9724     1: a
9725        bacxxx
9726     0: bac
9727     1: bac
9728        bbaccxxx
9729     0: bbacc
9730     1: bbacc
9731        bbbacccxx
9732     0: bbbaccc
9733     1: bbbaccc
9734    
9735    /^(a|b\g'-1'c)/
9736        aaaa
9737     0: a
9738     1: a
9739        bacxxx
9740     0: bac
9741     1: bac
9742        bbaccxxx
9743     0: bbacc
9744     1: bbacc
9745        bbbacccxx
9746     0: bbbaccc
9747     1: bbbaccc
9748    
9749    /(^(a|b\g<-1>c))/
9750        aaaa
9751     0: a
9752     1: a
9753     2: a
9754        bacxxx
9755     0: bac
9756     1: bac
9757     2: bac
9758        bbaccxxx
9759     0: bbacc
9760     1: bbacc
9761     2: bbacc
9762        bbbacccxx
9763     0: bbbaccc
9764     1: bbbaccc
9765     2: bbbaccc
9766    
9767    /(?-i:\g<name>)(?i:(?<name>a))/
9768        XaaX
9769     0: aa
9770     1: a
9771        XAAX
9772     0: AA
9773     1: A
9774    
9775    /(?i:\g<name>)(?-i:(?<name>a))/
9776        XaaX
9777     0: aa
9778     1: a
9779        ** Failers
9780    No match
9781        XAAX
9782    No match
9783    
9784    /(?-i:\g<+1>)(?i:(a))/
9785        XaaX
9786     0: aa
9787     1: a
9788        XAAX
9789     0: AA
9790     1: A
9791    
9792    /(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/
9793    
9794    /(?<n>a|b|c)\g<n>*/
9795       abc
9796     0: abc
9797     1: a
9798       accccbbb
9799     0: accccbbb
9800     1: a
9801    
9802    /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
9803        XYabcdY
9804     0: XYabcdY
9805     1: a
9806     2: b
9807     3: <unset>
9808     4: <unset>
9809     5: c
9810     6: d
9811     7: Y
9812    
9813  / End of testinput2 /  / End of testinput2 /

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

  ViewVC Help
Powered by ViewVC 1.1.5