OSSP CVS Repository

ossp - ossp-pkg/pcre/pcre_test.d/testinput2 1.5
Not logged in
[Honeypot]  [Browse]  [Directory]  [Home]  [Login
[Reports]  [Search]  [Ticket]  [Timeline
  [Raw

ossp-pkg/pcre/pcre_test.d/testinput2 1.5
/(a)b|/

/abc/
    abc
    defabc
    \Aabc
    *** Failers
    \Adefabc
    ABC

/^abc/
    abc
    \Aabc
    *** Failers
    defabc
    \Adefabc

/a+bc/

/a*bc/

/a{3}bc/

/(abc|a+z)/

/^abc$/
    abc
    *** Failers
    def\nabc

/ab\gdef/X

/(?X)ab\gdef/X

/x{5,4}/

/z{65536}/

/[abcd/

/[\B]/

/[z-a]/

/^*/

/(abc/

/(?# abc/

/(?z)abc/

/.*b/

/.*?b/

/cat|dog|elephant/
    this sentence eventually mentions a cat
    this sentences rambles on and on for a while and then reaches elephant

/cat|dog|elephant/S
    this sentence eventually mentions a cat
    this sentences rambles on and on for a while and then reaches elephant

/cat|dog|elephant/iS
    this sentence eventually mentions a CAT cat
    this sentences rambles on and on for a while to elephant ElePhant

/a|[bcd]/S

/(a|[^\dZ])/S

/(a|b)*[\s]/S

/(ab\2)/

/{4,5}abc/

/(a)(b)(c)\2/
    abcb
    \O0abcb
    \O3abcb
    \O6abcb
    \O9abcb
    \O12abcb 

/(a)bc|(a)(b)\2/
    abc
    \O0abc
    \O3abc
    \O6abc
    aba
    \O0aba
    \O3aba
    \O6aba
    \O9aba
    \O12aba

/abc$/E
    abc
    *** Failers
    abc\n
    abc\ndef

/(a)(b)(c)(d)(e)\6/

/the quick brown fox/
    the quick brown fox
    this is a line with the quick brown fox

/the quick brown fox/A
    the quick brown fox
    *** Failers
    this is a line with the quick brown fox

/ab(?z)cd/

/^abc|def/
    abcdef
    abcdef\B

/.*((abc)$|(def))/
    defabc
    \Zdefabc

/abc/P
    abc
    *** Failers
    
/^abc|def/P
    abcdef
    abcdef\B

/.*((abc)$|(def))/P
    defabc
    \Zdefabc
  
/the quick brown fox/P
    the quick brown fox
    *** Failers 
    The Quick Brown Fox 

/the quick brown fox/Pi
    the quick brown fox
    The Quick Brown Fox 

/abc.def/P
    *** Failers
    abc\ndef
    
/abc$/P
    abc
    abc\n 

/(abc)\2/P

/(abc\1)/P
    abc

/)/

/a[]b/

/[^aeiou ]{3,}/
    co-processors, and for 
    
/<.*>/
    abc<def>ghi<klm>nop

/<.*?>/
    abc<def>ghi<klm>nop

/<.*>/U
    abc<def>ghi<klm>nop
    
/<.*>(?U)/
    abc<def>ghi<klm>nop

/<.*?>/U
    abc<def>ghi<klm>nop
    
/={3,}/U
    abc========def
    
/(?U)={3,}?/
    abc========def
    
/(?<!bar|cattle)foo/
    foo
    catfoo 
    *** Failers
    the barfoo
    and cattlefoo   

/(?<=a+)b/

/(?<=aaa|b{0,3})b/

/(?<!(foo)a\1)bar/

/(?i)abc/

/(a|(?m)a)/

/(?i)^1234/

/(^b|(?i)^d)/

/(?s).*/

/[abcd]/S

/(?i)[abcd]/S

/(?m)[xy]|(b|c)/S

/(^a|^b)/m

/(?i)(^a|^b)/m

/(a)(?(1)a|b|c)/

/(?(?=a)a|b|c)/

/(?(1a)/

/(?(?i))/

/(?(abc))/

/(?(?<ab))/

/((?s)blah)\s+\1/

/((?i)blah)\s+\1/

/((?i)b)/DS

/(a*b|(?i:c*(?-i)d))/S

/a$/
    a
    a\n
    *** Failers 
    \Za
    \Za\n   

/a$/m
    a
    a\n
    \Za\n   
    *** Failers 
    \Za
    
/\Aabc/m

/^abc/m 

/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
  aaaaabbbbbcccccdef

/(?<=foo)[ab]/S

/(?<!foo)(alpha|omega)/S

/(?!alphabet)[ab]/S

/(?<=foo\n)^bar/m

/(?>^abc)/m
    abc
    def\nabc
    *** Failers
    defabc   

/(?<=ab(c+)d)ef/

/(?<=ab(?<=c+)d)ef/

/(?<=ab(c|de)f)g/

/The next three are in testinput2 because they have variable length branches/

/(?<=bullock|donkey)-cart/
    the bullock-cart
    a donkey-cart race
    *** Failers
    cart
    horse-and-cart    
      
/(?<=ab(?i)x|y|z)/

/(?>.*)(?<=(abcd)|(xyz))/
    alphabetabcd
    endingxyz

/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/
    abxyZZ
    abXyZZ
    ZZZ
    zZZ
    bZZ
    BZZ     
    *** Failers
    ZZ 
    abXYZZ 
    zzz
    bzz  

/(?<!(foo)a)bar/
    bar
    foobbar 
    *** Failers
    fooabar  

/This one is here because Perl 5.005_02 doesn't fail it/

/^(a)?(?(1)a|b)+$/
    *** Failers
    a 

/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/

/^(a\1?){4}$/
    aaaaaa
    
/These are syntax tests from Perl 5.005/

/a[b-a]/

/a[]b/

/a[/

/*a/

/(*)b/

/abc)/

/(abc/

/a**/

/)(/

/\1/

/\2/

/(a)|\2/

/a[b-a]/i

/a[]b/i

/a[/i

/*a/i

/(*)b/i

/abc)/i

/(abc/i

/a**/i

/)(/i

/:(?:/

/(?<%)b/

/a(?{)b/

/a(?{{})b/

/a(?{}})b/

/a(?{"{"})b/

/a(?{"{"}})b/

/(?(1?)a|b)/

/(?(1)a|b|c)/

/[a[:xyz:/

/(?<=x+)y/

/a{37,17}/

/abc/\

/abc/\P

/abc/\i

/(a)bc(d)/
    abcd
    abcd\C2
    abcd\C5
     
/(.{20})/
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz\C1
    abcdefghijklmnopqrstuvwxyz\G1
     
/(.{15})/
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz\C1\G1

/(.{16})/
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz\C1\G1\L
    
/^(a|(bc))de(f)/
    adef\G1\G2\G3\G4\L 
    bcdef\G1\G2\G3\G4\L 
    adefghijk\C0 
    
/^abc\00def/
    abc\00def\L\C0 
    
/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ 
)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ 
)?)?)?)?)?)?)?)?)?otherword/M

/.*X/D

/.*X/Ds

/(.*X|^B)/D

/(.*X|^B)/Ds
    
/(?s)(.*X|^B)/D

/(?s:.*X|^B)/D

/\Biss\B/+
    Mississippi

/\Biss\B/+P
    Mississippi

/iss/G+
    Mississippi

/\Biss\B/G+
    Mississippi

/\Biss\B/g+
    Mississippi
    *** Failers
    Mississippi\A

/(?<=[Ms])iss/g+
    Mississippi

/(?<=[Ms])iss/G+
    Mississippi

/^iss/g+
    ississippi
    
/.*iss/g+
    abciss\nxyzisspqr 

/.i./+g
    Mississippi
    Mississippi\A
    Missouri river
    Missouri river\A  

/^.is/+g
    Mississippi

/^ab\n/g+
    ab\nab\ncd

/^ab\n/mg+
    ab\nab\ncd

/abc/

/abc|bac/

/(abc|bac)/

/(abc|(c|dc))/

/(abc|(d|de)c)/

/a*/

/a+/

/(baa|a+)/

/a{0,3}/

/baa{3,}/

/"([^\\"]+|\\.)*"/

/(abc|ab[cd])/

/(a|.)/

/a|ba|\w/

/abc(?=pqr)/

/...(?<=abc)/

/abc(?!pqr)/

/ab./

/ab[xyz]/

/abc*/

/ab.c*/

/a.c*/

/.c*/

/ac*/

/(a.c*|b.c*)/

/a.c*|aba/

/.+a/

/(?=abcda)a.*/

/(?=a)a.*/

/a(b)*/

/a\d*/

/ab\d*/

/a(\d)*/

/abcde{0,0}/

/ab\d+/

/a(?(1)b)/

/a(?(1)bag|big)/

/a(?(1)bag|big)*/

/a(?(1)bag|big)+/

/a(?(1)b..|b..)/

/ab\d{0}e/

/a?b?/
    a
    b
    ab
    \
    *** Failers
    \N     
    
/|-/
    abcd
    -abc
    \Nab-c
    *** Failers
    \Nabc     

/a*(b+)(z)(z)/P
    aaaabbbbzzzz
    aaaabbbbzzzz\O0
    aaaabbbbzzzz\O1
    aaaabbbbzzzz\O2
    aaaabbbbzzzz\O3
    aaaabbbbzzzz\O4
    aaaabbbbzzzz\O5
    
/^.?abcd/S 

/\(             # ( at start
  (?:           # Non-capturing bracket
  (?>[^()]+)    # Either a sequence of non-brackets (no backtracking)
  |             # Or
  (?R)          # Recurse - i.e. nested bracketed string
  )*            # Zero or more contents
  \)            # Closing )
  /x
    (abcd)
    (abcd)xyz
    xyz(abcd)
    (ab(xy)cd)pqr 
    (ab(xycd)pqr 
    () abc () 
    12(abcde(fsh)xyz(foo(bar))lmno)89
    *** Failers
    abcd 
    abcd)
    (abcd  

/\(  ( (?>[^()]+) | (?R) )* \) /xg
    (ab(xy)cd)pqr 
    1(abcd)(x(y)z)pqr

/\(  (?: (?>[^()]+) | (?R) ) \) /x
    (abcd)
    (ab(xy)cd)
    (a(b(c)d)e) 
    ((ab)) 
    *** Failers
    ()   

/\(  (?: (?>[^()]+) | (?R) )? \) /x
    ()
    12(abcde(fsh)xyz(foo(bar))lmno)89

/\(  ( (?>[^()]+) | (?R) )* \) /x
    (ab(xy)cd)

/\( ( ( (?>[^()]+) | (?R) )* ) \) /x
    (ab(xy)cd)

/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x
    (ab(xy)cd)
    (123ab(xy)cd)

/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x
    (ab(xy)cd)
    (123ab(xy)cd)

/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x
    (ab(xy)cd)

/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x
    (abcd(xyz<p>qrs)123)

/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x
    (ab(cd)ef)
    (ab(cd(ef)gh)ij)

/^[[:alnum:]]/D

/^[[:alpha:]]/D
             
/^[[:ascii:]]/D

/^[[:cntrl:]]/D

/^[[:digit:]]/D

/^[[:graph:]]/D

/^[[:lower:]]/D

/^[[:print:]]/D

/^[[:punct:]]/D

/^[[:space:]]/D

/^[[:upper:]]/D

/^[[:xdigit:]]/D

/^[[:word:]]/D

/^[[:^cntrl:]]/D

/^[12[:^digit:]]/D

/[01[:alpha:]%]/D

/[[.ch.]]/

/[[=ch=]]/

/[[:rhubarb:]]/

/[[:upper:]]/i
    A
    a 
    
/[[:lower:]]/i
    A
    a 

/((?-i)[[:lower:]])[[:lower:]]/i
    ab
    aB
    *** Failers
    Ab
    AB        

/[\200-\410]/

/^(?(0)f|b)oo/

/ End of testinput2 /

CVSTrac 2.0.1