version 1.1.1.1, 2012/02/21 23:05:52
|
version 1.1.1.4, 2013/07/22 08:25:57
|
Line 5
|
Line 5
|
either because PCRE can't be compatible, or there is a possible Perl |
either because PCRE can't be compatible, or there is a possible Perl |
bug. |
bug. |
|
|
NOTE: This is a non-UTF-8 set of tests. When UTF-8 is needed, use test | NOTE: This is a non-UTF set of tests. When UTF support is needed, use |
5, and if Unicode Property Support is needed, use test 13. --/ | test 5, and if Unicode Property Support is needed, use test 7. --/ |
|
|
/-- Originally, the Perl >= 5.10 things were in here too, but now I have |
|
separated many (most?) of them out into test 11. However, there may still |
|
be some that were overlooked. --/ |
|
|
|
/(a)b|/I |
/(a)b|/I |
|
|
/abc/I |
/abc/I |
Line 147
|
Line 143
|
defabc |
defabc |
\Zdefabc |
\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/ |
/a[]b/ |
Line 351
|
Line 313
|
*** Failers |
*** Failers |
fooabar |
fooabar |
|
|
/This one is here because Perl 5.005_02 doesn't fail it/I |
|
|
|
/^(a)?(?(1)a|b)+$/I |
|
*** Failers |
|
a |
|
|
|
/This one is here because Perl behaves differently; see also the following/I |
/This one is here because Perl behaves differently; see also the following/I |
|
|
/^(a\1?){4}$/I |
/^(a\1?){4}$/I |
Line 445
|
Line 401
|
|
|
/abc/\ |
/abc/\ |
|
|
/abc/\P |
|
|
|
/abc/\i |
/abc/\i |
|
|
/(a)bc(d)/I |
/(a)bc(d)/I |
Line 494
|
Line 448
|
/\Biss\B/I+ |
/\Biss\B/I+ |
Mississippi |
Mississippi |
|
|
/\Biss\B/I+P |
|
Mississippi |
|
|
|
/iss/IG+ |
/iss/IG+ |
Mississippi |
Mississippi |
|
|
Line 632
|
Line 583
|
*** Failers |
*** Failers |
\Nabc |
\Nabc |
|
|
/a*(b+)(z)(z)/P |
|
aaaabbbbzzzz |
|
aaaabbbbzzzz\O0 |
|
aaaabbbbzzzz\O1 |
|
aaaabbbbzzzz\O2 |
|
aaaabbbbzzzz\O3 |
|
aaaabbbbzzzz\O4 |
|
aaaabbbbzzzz\O5 |
|
|
|
/^.?abcd/IS |
/^.?abcd/IS |
|
|
/\( # ( at start |
/\( # ( at start |
Line 1494
|
Line 1436
|
** Failers |
** Failers |
line one\nthis is a line\nbreak in the second line |
line one\nthis is a line\nbreak in the second line |
|
|
/ab.cd/P |
|
ab-cd |
|
ab=cd |
|
** Failers |
|
ab\ncd |
|
|
|
/ab.cd/Ps |
|
ab-cd |
|
ab=cd |
|
ab\ncd |
|
|
|
/(?i)(?-i)AbCd/I |
/(?i)(?-i)AbCd/I |
AbCd |
AbCd |
** Failers |
** Failers |
Line 1555
|
Line 1486
|
(this) |
(this) |
((this)) |
((this)) |
|
|
/a(b)c/PN |
|
abc |
|
|
|
/a(?P<name>b)c/PN |
|
abc |
|
|
|
/\x{100}/I |
|
|
|
/\x{0000ff}/I |
/\x{0000ff}/I |
|
|
/^((?P<A>a1)|(?P<A>a2)b)/I |
/^((?P<A>a1)|(?P<A>a2)b)/I |
Line 1640 a random value. /Ix
|
Line 1563 a random value. /Ix
|
/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I |
/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I |
bXXaYYaY |
bXXaYYaY |
|
|
/\777/I |
|
|
|
/\s*,\s*/IS |
/\s*,\s*/IS |
\x0b,\x0b |
\x0b,\x0b |
\x0c,\x0d |
\x0c,\x0d |
Line 2244 a random value. /Ix
|
Line 2165 a random value. /Ix
|
xabcpqrx |
xabcpqrx |
xxyzx |
xxyzx |
|
|
/[\h]/BZ |
|
>\x09< |
|
|
|
/[\h]+/BZ |
|
>\x09\x20\xa0< |
|
|
|
/[\v]/BZ |
|
|
|
/[\H]/BZ |
|
|
|
/[^\h]/BZ |
|
|
|
/[\V]/BZ |
|
|
|
/[\x0a\V]/BZ |
|
|
|
/\H++X/BZ |
/\H++X/BZ |
** Failers |
** Failers |
XXXX |
XXXX |
Line 2619 a random value. /Ix
|
Line 2524 a random value. /Ix
|
|
|
/(?(?=.*b).*b|^d)/I |
/(?(?=.*b).*b|^d)/I |
|
|
/a?|b?/P |
|
abc |
|
** Failers |
|
ddd\N |
|
|
|
/xyz/C |
/xyz/C |
xyz |
xyz |
abcxyz |
abcxyz |
Line 2815 a random value. /Ix
|
Line 2715 a random value. /Ix
|
abc\P |
abc\P |
abc\P\P |
abc\P\P |
|
|
/\w+A/P |
|
CDAAAAB |
|
|
|
/\w+A/PU |
|
CDAAAAB |
|
|
|
/abc\K123/ |
/abc\K123/ |
xyzabc123pqr |
xyzabc123pqr |
xyzabc12\P |
xyzabc12\P |
Line 2964 a random value. /Ix
|
Line 2858 a random value. /Ix
|
|
|
/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/SI |
/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/SI |
|
|
/ (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* # optional leading comment |
|
(?: (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| |
|
" (?: # opening quote... |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
|
| # or |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
|
)* " # closing quote |
|
) # initial word |
|
(?: (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* \. (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| |
|
" (?: # opening quote... |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
|
| # or |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
|
)* " # closing quote |
|
) )* # further okay, if led by a period |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* @ (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| \[ # [ |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
|
\] # ] |
|
) # initial subdomain |
|
(?: # |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* \. # if led by a period... |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| \[ # [ |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
|
\] # ] |
|
) # ...further okay |
|
)* |
|
# address |
|
| # or |
|
(?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| |
|
" (?: # opening quote... |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
|
| # or |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
|
)* " # closing quote |
|
) # one word, optionally followed by.... |
|
(?: |
|
[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or... |
|
\( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) | # comments, or... |
|
|
|
" (?: # opening quote... |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
|
| # or |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
|
)* " # closing quote |
|
# quoted strings |
|
)* |
|
< (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* # leading < |
|
(?: @ (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| \[ # [ |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
|
\] # ] |
|
) # initial subdomain |
|
(?: # |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* \. # if led by a period... |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| \[ # [ |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
|
\] # ] |
|
) # ...further okay |
|
)* |
|
|
|
(?: (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* , (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* @ (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| \[ # [ |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
|
\] # ] |
|
) # initial subdomain |
|
(?: # |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* \. # if led by a period... |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| \[ # [ |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
|
\] # ] |
|
) # ...further okay |
|
)* |
|
)* # further okay, if led by comma |
|
: # closing colon |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* )? # optional route |
|
(?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| |
|
" (?: # opening quote... |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
|
| # or |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
|
)* " # closing quote |
|
) # initial word |
|
(?: (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* \. (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| |
|
" (?: # opening quote... |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
|
| # or |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
|
)* " # closing quote |
|
) )* # further okay, if led by a period |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* @ (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| \[ # [ |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
|
\] # ] |
|
) # initial subdomain |
|
(?: # |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* \. # if led by a period... |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* (?: |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
|
| \[ # [ |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
|
\] # ] |
|
) # ...further okay |
|
)* |
|
# address spec |
|
(?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* > # trailing > |
|
# name and address |
|
) (?: [\040\t] | \( |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
|
\) )* # optional trailing comment |
|
/xSI |
|
|
|
/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS |
/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS |
|
|
"(?>.*/)foo"SI |
"(?>.*/)foo"SI |
Line 3234 a random value. /Ix
|
Line 2933 a random value. /Ix
|
xxxxabcde\P |
xxxxabcde\P |
xxxxabcde\P\P |
xxxxabcde\P\P |
|
|
/-- This is not in the Perl >= 5.10 test because Perl seems currently to be | /-- This is not in the Perl-compatible test because Perl seems currently to be |
broken and not behaving as specified in that it *does* bumpalong after |
broken and not behaving as specified in that it *does* bumpalong after |
hitting (*COMMIT). --/ |
hitting (*COMMIT). --/ |
|
|
Line 3280 a random value. /Ix
|
Line 2979 a random value. /Ix
|
|
|
/^(?&t)*(?(DEFINE)(?<t>.))$/BZ |
/^(?&t)*(?(DEFINE)(?<t>.))$/BZ |
|
|
/ -- The first four of these are not in the Perl >= 5.10 test because Perl | / -- This one is here because Perl gives the match as "b" rather than "ab". I |
documents that the use of \K in assertions is "not well defined". The | |
last is here because Perl gives the match as "b" rather than "ab". I | |
believe this to be a Perl bug. --/ |
believe this to be a Perl bug. --/ |
|
|
/(?=a\Kb)ab/ |
|
ab |
|
|
|
/(?!a\Kb)ac/ |
|
ac |
|
|
|
/^abc(?<=b\Kc)d/ |
|
abcd |
|
|
|
/^abc(?<!b\Kq)d/ |
|
abcd |
|
|
|
/(?>a\Kb)z|(ab)/ |
/(?>a\Kb)z|(ab)/ |
ab |
ab |
|
|
/----------------------/ |
|
|
|
/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/ |
/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/ |
|
|
/abc(*MARK:)pqr/ |
/abc(*MARK:)pqr/ |
Line 3316 a random value. /Ix
|
Line 2999 a random value. /Ix
|
/A(*COMMIT)B/+K |
/A(*COMMIT)B/+K |
ACABX |
ACABX |
|
|
/--- These should be different, but in Perl 5.11 are not, which I think | /--- These should be different, but in Perl they are not, which I think |
is a bug in Perl. ---/ |
is a bug in Perl. ---/ |
|
|
/A(*THEN)B|A(*THEN)C/K |
/A(*THEN)B|A(*THEN)C/K |
Line 3325 a random value. /Ix
|
Line 3008 a random value. /Ix
|
/A(*PRUNE)B|A(*PRUNE)C/K |
/A(*PRUNE)B|A(*PRUNE)C/K |
AC |
AC |
|
|
/--- This should fail; the SKIP advances by one, but when we get to AC, the |
|
PRUNE kills it. Perl behaves differently. ---/ |
|
|
|
/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK |
|
AAAC |
|
|
|
/--- Mark names can be duplicated. Perl doesn't give a mark for this one, |
/--- Mark names can be duplicated. Perl doesn't give a mark for this one, |
though PCRE does. ---/ |
though PCRE does. ---/ |
|
|
Line 3356 with \Y. ---/
|
Line 3033 with \Y. ---/
|
/^(ab (c+(*FAIL)cd) | xyz)/x |
/^(ab (c+(*FAIL)cd) | xyz)/x |
abcccd |
abcccd |
|
|
/--- Perl 5.11 gets some of these wrong ---/ | /--- Perl gets some of these wrong ---/ |
|
|
/(?>.(*ACCEPT))*?5/ |
/(?>.(*ACCEPT))*?5/ |
abcde |
abcde |
Line 3397 with \Y. ---/
|
Line 3074 with \Y. ---/
|
/\d*\R/BZ |
/\d*\R/BZ |
|
|
/\s*\R/BZ |
/\s*\R/BZ |
|
\x20\x0a |
|
\x20\x0d |
|
\x20\x0d\x0a |
|
|
/-- Perl treats this one differently, not failing the second string. I believe | /\S*\R/BZ |
that is a bug in Perl. --/ | a\x0a |
|
|
/^((abc|abcx)(*THEN)y|abcd)/ | /X\h*\R/BZ |
abcd | X\x20\x0a |
*** Failers | |
abcxy | |
|
|
|
/X\H*\R/BZ |
|
X\x0d\x0a |
|
|
|
/X\H+\R/BZ |
|
X\x0d\x0a |
|
|
|
/X\H++\R/BZ |
|
X\x0d\x0a |
|
|
/(?<=abc)def/ |
/(?<=abc)def/ |
abc\P\P |
abc\P\P |
|
|
Line 3704 with \Y. ---/
|
Line 3391 with \Y. ---/
|
|
|
/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS |
/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS |
|
|
/a(*SKIP)c|b(*ACCEPT)|/+SI | /a(*SKIP)c|b(*ACCEPT)|/+S!I |
a |
a |
|
|
/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI |
/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI |
Line 3730 with \Y. ---/
|
Line 3417 with \Y. ---/
|
/a(?:.(*THEN:ABC))*?a/ims |
/a(?:.(*THEN:ABC))*?a/ims |
\Mabbbbbbbbbbbbbbbbbbbbba |
\Mabbbbbbbbbbbbbbbbbbbbba |
|
|
/-- These tests are in agreement with development Perl 5.015, which has fixed |
|
some things, but they don't all work with 5.012, so they aren't in the |
|
Perl-compatible tests. Those after the first come from Perl's own test |
|
files. --/ |
|
|
|
/^((yes|no)(*THEN)(*F))?/ |
|
yes |
|
|
|
/(A (.*) C? (*THEN) | A D) (*FAIL)/x |
|
AbcdCBefgBhiBqz |
|
|
|
/(A (.*) C? (*THEN) | A D) z/x |
|
AbcdCBefgBhiBqz |
|
|
|
/(A (.*) C? (*THEN) | A D) \s* (*FAIL)/x |
|
AbcdCBefgBhiBqz |
|
|
|
/(A (.*) C? (*THEN) | A D) \s* z/x |
|
AbcdCBefgBhiBqz |
|
|
|
/(A (.*) (?:C|) (*THEN) | A D) (*FAIL)/x |
|
AbcdCBefgBhiBqz |
|
|
|
/(A (.*) (?:C|) (*THEN) | A D) z/x |
|
AbcdCBefgBhiBqz |
|
|
|
/(A (.*) C{0,6} (*THEN) | A D) (*FAIL)/x |
|
AbcdCBefgBhiBqz |
|
|
|
/(A (.*) C{0,6} (*THEN) | A D) z/x |
|
AbcdCBefgBhiBqz |
|
|
|
/(A (.*) (CE){0,6} (*THEN) | A D) (*FAIL)/x |
|
AbcdCEBefgBhiBqz |
|
|
|
/(A (.*) (CE){0,6} (*THEN) | A D) z/x |
|
AbcdCEBefgBhiBqz |
|
|
|
/(A (.*) (CE*){0,6} (*THEN) | A D) (*FAIL)/x |
|
AbcdCBefgBhiBqz |
|
|
|
/(A (.*) (CE*){0,6} (*THEN) | A D) z/x |
|
AbcdCBefgBhiBqz |
|
|
|
/-----------------------------------------------/ |
|
|
|
/^(?>a+)(?>(z+))\w/BZ |
/^(?>a+)(?>(z+))\w/BZ |
aaaazzzzb |
aaaazzzzb |
** Failers |
** Failers |
Line 3875 replaced by single letters. --/
|
Line 3516 replaced by single letters. --/
|
|
|
/^a(*:X)bcde/K |
/^a(*:X)bcde/K |
abc\P |
abc\P |
|
|
|
/-- These are here because Perl doesn't return a mark, except for the first --/ |
|
|
|
/(?=(*:x))(q|)/K+ |
|
abc |
|
|
|
/(?=(*:x))((*:y)q|)/K+ |
|
abc |
|
|
|
/(?=(*:x))(?:(*:y)q|)/K+ |
|
abc |
|
|
|
/(?=(*:x))(?>(*:y)q|)/K+ |
|
abc |
|
|
|
/(?=a(*:x))(?!a(*:y)c)/K+ |
|
ab |
|
|
|
/(?=a(*:x))(?=a(*:y)c|)/K+ |
|
ab |
|
|
|
/(..)\1/ |
|
ab\P |
|
aba\P |
|
abab\P |
|
|
|
/(..)\1/i |
|
ab\P |
|
abA\P |
|
aBAb\P |
|
|
|
/(..)\1{2,}/ |
|
ab\P |
|
aba\P |
|
abab\P |
|
ababa\P |
|
ababab\P |
|
ababab\P\P |
|
abababa\P |
|
abababa\P\P |
|
|
|
/(..)\1{2,}/i |
|
ab\P |
|
aBa\P |
|
aBAb\P |
|
AbaBA\P |
|
abABAb\P |
|
aBAbaB\P\P |
|
abABabA\P |
|
abaBABa\P\P |
|
|
|
/(..)\1{2,}?x/i |
|
ab\P |
|
abA\P |
|
aBAb\P |
|
abaBA\P |
|
abAbaB\P |
|
abaBabA\P |
|
abAbABaBx\P |
|
|
|
/^(..)\1/ |
|
aba\P |
|
|
|
/^(..)\1{2,3}x/ |
|
aba\P |
|
ababa\P |
|
ababa\P\P |
|
abababx |
|
ababababx |
|
|
|
/^(..)\1{2,3}?x/ |
|
aba\P |
|
ababa\P |
|
ababa\P\P |
|
abababx |
|
ababababx |
|
|
|
/^(..)(\1{2,3})ab/ |
|
abababab |
|
|
|
/^\R/ |
|
\r\P |
|
\r\P\P |
|
|
|
/^\R{2,3}x/ |
|
\r\P |
|
\r\P\P |
|
\r\r\P |
|
\r\r\P\P |
|
\r\r\r\P |
|
\r\r\r\P\P |
|
\r\rx |
|
\r\r\rx |
|
|
|
/^\R{2,3}?x/ |
|
\r\P |
|
\r\P\P |
|
\r\r\P |
|
\r\r\P\P |
|
\r\r\r\P |
|
\r\r\r\P\P |
|
\r\rx |
|
\r\r\rx |
|
|
|
/^\R?x/ |
|
\r\P |
|
\r\P\P |
|
x |
|
\rx |
|
|
|
/^\R+x/ |
|
\r\P |
|
\r\P\P |
|
\r\n\P |
|
\r\n\P\P |
|
\rx |
|
|
|
/^a$/<CRLF> |
|
a\r\P |
|
a\r\P\P |
|
|
|
/^a$/m<CRLF> |
|
a\r\P |
|
a\r\P\P |
|
|
|
/^(a$|a\r)/<CRLF> |
|
a\r\P |
|
a\r\P\P |
|
|
|
/^(a$|a\r)/m<CRLF> |
|
a\r\P |
|
a\r\P\P |
|
|
|
/./<CRLF> |
|
\r\P |
|
\r\P\P |
|
|
|
/.{2,3}/<CRLF> |
|
\r\P |
|
\r\P\P |
|
\r\r\P |
|
\r\r\P\P |
|
\r\r\r\P |
|
\r\r\r\P\P |
|
|
|
/.{2,3}?/<CRLF> |
|
\r\P |
|
\r\P\P |
|
\r\r\P |
|
\r\r\P\P |
|
\r\r\r\P |
|
\r\r\r\P\P |
|
|
|
"AB(C(D))(E(F))?(?(?=\2)(?=\4))" |
|
ABCDGHI\O03 |
|
|
|
/-- These are all run as real matches in test 1; here we are just checking the |
|
settings of the anchored and startline bits. --/ |
|
|
|
/(?>.*?a)(?<=ba)/I |
|
|
|
/(?:.*?a)(?<=ba)/I |
|
|
|
/.*?a(*PRUNE)b/I |
|
|
|
/.*?a(*PRUNE)b/sI |
|
|
|
/^a(*PRUNE)b/sI |
|
|
|
/.*?a(*SKIP)b/I |
|
|
|
/(?>.*?a)b/sI |
|
|
|
/(?>.*?a)b/I |
|
|
|
/(?>^a)b/sI |
|
|
|
/(?>.*?)(?<=(abcd)|(wxyz))/I |
|
|
|
/(?>.*)(?<=(abcd)|(wxyz))/I |
|
|
|
"(?>.*)foo"I |
|
|
|
"(?>.*?)foo"I |
|
|
|
/(?>^abc)/mI |
|
|
|
/(?>.*abc)/mI |
|
|
|
/(?:.*abc)/mI |
|
|
|
/-- Check PCRE_STUDY_EXTRA_NEEDED --/ |
|
|
|
/.?/S-I |
|
|
|
/.?/S!I |
|
|
|
/(?:(a)+(?C1)bb|aa(?C2)b)/ |
|
aab\C+ |
|
|
|
/(?:(a)++(?C1)bb|aa(?C2)b)/ |
|
aab\C+ |
|
|
|
/(?:(?>(a))(?C1)bb|aa(?C2)b)/ |
|
aab\C+ |
|
|
|
/(?:(?1)(?C1)x|ab(?C2))((a)){0}/ |
|
aab\C+ |
|
|
|
/(?1)(?C1)((a)(?C2)){0}/ |
|
aab\C+ |
|
|
|
/(?:(a)+(?C1)bb|aa(?C2)b)++/ |
|
aab\C+ |
|
aab\C+\O2 |
|
|
|
/(ab)x|ab/ |
|
ab\O3 |
|
ab\O2 |
|
|
|
/(ab)/ |
|
ab\O3 |
|
ab\O2 |
|
|
|
/(?<=123)(*MARK:xx)abc/K |
|
xxxx123a\P\P |
|
xxxx123a\P |
|
|
|
/123\Kabc/ |
|
xxxx123a\P\P |
|
xxxx123a\P |
|
|
|
/^(?(?=a)aa|bb)/C |
|
bb |
|
|
|
/(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/ |
|
bb |
|
|
|
/-- Perl seems to have a bug with this one --/ |
|
|
|
/aaaaa(*COMMIT)(*PRUNE)b|a+c/ |
|
aaaaaac |
|
|
|
/-- Here are some that Perl treats differently because of the way it handles |
|
backtracking verbs. --/ |
|
|
|
/(?!a(*COMMIT)b)ac|ad/ |
|
ac |
|
ad |
|
|
|
/^(?!a(*THEN)b|ac)../ |
|
ac |
|
ad |
|
|
|
/^(?=a(*THEN)b|ac)/ |
|
ac |
|
|
|
/\A.*?(?:a|b(*THEN)c)/ |
|
ba |
|
|
|
/\A.*?(?:a|b(*THEN)c)++/ |
|
ba |
|
|
|
/\A.*?(?:a|b(*THEN)c|d)/ |
|
ba |
|
|
|
/(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/ |
|
aac |
|
|
|
/\A.*?(a|b(*THEN)c)/ |
|
ba |
|
|
|
/^(A(*THEN)B|A(*THEN)D)/ |
|
AD |
|
|
|
/(?!b(*THEN)a)bn|bnn/ |
|
bnn |
|
|
|
/(?(?=b(*SKIP)a)bn|bnn)/ |
|
bnn |
|
|
|
/(?=b(*THEN)a|)bn|bnn/ |
|
bnn |
|
|
|
/-------------------------/ |
|
|
|
/(*LIMIT_MATCH=12bc)abc/ |
|
|
|
/(*LIMIT_MATCH=4294967290)abc/ |
|
|
|
/(*LIMIT_RECURSION=4294967280)abc/I |
|
|
|
/(a+)*zz/ |
|
aaaaaaaaaaaaaz |
|
aaaaaaaaaaaaaz\q3000 |
|
|
|
/(a+)*zz/S- |
|
aaaaaaaaaaaaaz\Q10 |
|
|
|
/(*LIMIT_MATCH=3000)(a+)*zz/I |
|
aaaaaaaaaaaaaz |
|
aaaaaaaaaaaaaz\q60000 |
|
|
|
/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I |
|
aaaaaaaaaaaaaz |
|
|
|
/(*LIMIT_MATCH=60000)(a+)*zz/I |
|
aaaaaaaaaaaaaz |
|
aaaaaaaaaaaaaz\q3000 |
|
|
|
/(*LIMIT_RECURSION=10)(a+)*zz/IS- |
|
aaaaaaaaaaaaaz |
|
aaaaaaaaaaaaaz\Q1000 |
|
|
|
/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/IS- |
|
aaaaaaaaaaaaaz |
|
|
|
/(*LIMIT_RECURSION=1000)(a+)*zz/IS- |
|
aaaaaaaaaaaaaz |
|
aaaaaaaaaaaaaz\Q10 |
|
|
/-- End of testinput2 --/ |
/-- End of testinput2 --/ |