version 1.1.1.1, 2012/02/21 23:05:52
|
version 1.1.1.2, 2012/02/21 23:50:25
|
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 445
|
Line 407
|
|
|
/abc/\ |
/abc/\ |
|
|
/abc/\P |
|
|
|
/abc/\i |
/abc/\i |
|
|
/(a)bc(d)/I |
/(a)bc(d)/I |
Line 494
|
Line 454
|
/\Biss\B/I+ |
/\Biss\B/I+ |
Mississippi |
Mississippi |
|
|
/\Biss\B/I+P |
|
Mississippi |
|
|
|
/iss/IG+ |
/iss/IG+ |
Mississippi |
Mississippi |
|
|
Line 632
|
Line 589
|
*** 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 1442
|
** 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 1492
|
(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 1569 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 2171 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 2530 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 2721 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 2864 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 3875 replaced by single letters. --/
|
Line 3580 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 |
|
|
/-- End of testinput2 --/ |
/-- End of testinput2 --/ |