/[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 449 by ph10, Wed Sep 16 08:48:17 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    /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
9610    ------------------------------------------------------------------
9611            Bra
9612            CBra 1
9613            ab
9614            Ket
9615            CBra 2
9616            x
9617            CBra 3
9618            y
9619            Ket
9620            z
9621            CBra 4
9622            cd
9623            Close 4
9624            Close 2
9625            *ACCEPT
9626            Ket
9627            Ket
9628            pq
9629            Ket
9630            End
9631    ------------------------------------------------------------------
9632    
9633    /abc\K/+
9634        abcdef
9635     0:
9636     0+ def
9637        abcdef\N\N
9638     0:
9639     0+ def
9640        xyzabcdef\N\N
9641     0:
9642     0+ def
9643        ** Failers
9644    No match
9645        abcdef\N
9646    No match
9647        xyzabcdef\N
9648    No match
9649    
9650    /^(?:(?=abc)|abc\K)/+
9651        abcdef
9652     0:
9653     0+ abcdef
9654        abcdef\N\N
9655     0:
9656     0+ def
9657        ** Failers
9658    No match
9659        abcdef\N
9660    No match
9661    
9662    /a?b?/+
9663        xyz
9664     0:
9665     0+ xyz
9666        xyzabc
9667     0:
9668     0+ xyzabc
9669        xyzabc\N
9670     0: ab
9671     0+ c
9672        xyzabc\N\N
9673     0:
9674     0+ yzabc
9675        xyz\N\N
9676     0:
9677     0+ yz
9678        ** Failers
9679     0:
9680     0+ ** Failers
9681        xyz\N
9682    No match
9683    
9684    /^a?b?/+
9685        xyz
9686     0:
9687     0+ xyz
9688        xyzabc
9689     0:
9690     0+ xyzabc
9691        ** Failers
9692     0:
9693     0+ ** Failers
9694        xyzabc\N
9695    No match
9696        xyzabc\N\N
9697    No match
9698        xyz\N\N
9699    No match
9700        xyz\N
9701    No match
9702    
9703    /^(?<name>a|b\g<name>c)/
9704        aaaa
9705     0: a
9706     1: a
9707        bacxxx
9708     0: bac
9709     1: bac
9710        bbaccxxx
9711     0: bbacc
9712     1: bbacc
9713        bbbacccxx
9714     0: bbbaccc
9715     1: bbbaccc
9716    
9717    /^(?<name>a|b\g'name'c)/
9718        aaaa
9719     0: a
9720     1: a
9721        bacxxx
9722     0: bac
9723     1: bac
9724        bbaccxxx
9725     0: bbacc
9726     1: bbacc
9727        bbbacccxx
9728     0: bbbaccc
9729     1: bbbaccc
9730    
9731    /^(a|b\g<1>c)/
9732        aaaa
9733     0: a
9734     1: a
9735        bacxxx
9736     0: bac
9737     1: bac
9738        bbaccxxx
9739     0: bbacc
9740     1: bbacc
9741        bbbacccxx
9742     0: bbbaccc
9743     1: bbbaccc
9744    
9745    /^(a|b\g'1'c)/
9746        aaaa
9747     0: a
9748     1: a
9749        bacxxx
9750     0: bac
9751     1: bac
9752        bbaccxxx
9753     0: bbacc
9754     1: bbacc
9755        bbbacccxx
9756     0: bbbaccc
9757     1: bbbaccc
9758    
9759    /^(a|b\g'-1'c)/
9760        aaaa
9761     0: a
9762     1: a
9763        bacxxx
9764     0: bac
9765     1: bac
9766        bbaccxxx
9767     0: bbacc
9768     1: bbacc
9769        bbbacccxx
9770     0: bbbaccc
9771     1: bbbaccc
9772    
9773    /(^(a|b\g<-1>c))/
9774        aaaa
9775     0: a
9776     1: a
9777     2: a
9778        bacxxx
9779     0: bac
9780     1: bac
9781     2: bac
9782        bbaccxxx
9783     0: bbacc
9784     1: bbacc
9785     2: bbacc
9786        bbbacccxx
9787     0: bbbaccc
9788     1: bbbaccc
9789     2: bbbaccc
9790    
9791    /(?-i:\g<name>)(?i:(?<name>a))/
9792        XaaX
9793     0: aa
9794     1: a
9795        XAAX
9796     0: AA
9797     1: A
9798    
9799    /(?i:\g<name>)(?-i:(?<name>a))/
9800        XaaX
9801     0: aa
9802     1: a
9803        ** Failers
9804    No match
9805        XAAX
9806    No match
9807    
9808    /(?-i:\g<+1>)(?i:(a))/
9809        XaaX
9810     0: aa
9811     1: a
9812        XAAX
9813     0: AA
9814     1: A
9815    
9816    /(?=(?<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>\})\}))\{/
9817    
9818    /(?<n>a|b|c)\g<n>*/
9819       abc
9820     0: abc
9821     1: a
9822       accccbbb
9823     0: accccbbb
9824     1: a
9825    
9826    /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
9827        XYabcdY
9828     0: XYabcdY
9829     1: a
9830     2: b
9831     3: <unset>
9832     4: <unset>
9833     5: c
9834     6: d
9835     7: Y
9836    
9837  / End of testinput2 /  / End of testinput2 /

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

  ViewVC Help
Powered by ViewVC 1.1.5