summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/testdata/testinput2
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/pcrelib/testdata/testinput2')
-rw-r--r--ext/pcre/pcrelib/testdata/testinput21133
1 files changed, 666 insertions, 467 deletions
diff --git a/ext/pcre/pcrelib/testdata/testinput2 b/ext/pcre/pcrelib/testdata/testinput2
index 7cc8761650..883d52e63b 100644
--- a/ext/pcre/pcrelib/testdata/testinput2
+++ b/ext/pcre/pcrelib/testdata/testinput2
@@ -3,12 +3,11 @@
It also checks the non-Perl syntax the PCRE supports (Python, .NET,
Oniguruma). Finally, there are some tests where PCRE and Perl differ,
either because PCRE can't be compatible, or there is a possible Perl
- bug. --/
+ bug.
+
+ NOTE: This is a non-UTF set of tests. When UTF support is needed, use
+ 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
/abc/I
@@ -144,40 +143,6 @@
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/
@@ -442,8 +407,6 @@
/abc/\
-/abc/\P
-
/abc/\i
/(a)bc(d)/I
@@ -491,9 +454,6 @@
/\Biss\B/I+
Mississippi
-/\Biss\B/I+P
- Mississippi
-
/iss/IG+
Mississippi
@@ -629,15 +589,6 @@
*** Failers
\Nabc
-/a*(b+)(z)(z)/P
- aaaabbbbzzzz
- aaaabbbbzzzz\O0
- aaaabbbbzzzz\O1
- aaaabbbbzzzz\O2
- aaaabbbbzzzz\O3
- aaaabbbbzzzz\O4
- aaaabbbbzzzz\O5
-
/^.?abcd/IS
/\( # ( at start
@@ -1061,7 +1012,12 @@
/abc(?C)de(?C1)f/I
123abcdef
-/(?C1)\dabc(?C2)def/I
+/(?C1)\dabc(?C2)def/IS
+ 1234abcdef
+ *** Failers
+ abcdef
+
+/(?C1)\dabc(?C2)def/ISS
1234abcdef
*** Failers
abcdef
@@ -1310,7 +1266,12 @@
abcde
abcdfe
-/a*b/ICDZ
+/a*b/ICDZS
+ ab
+ aaaab
+ aaaacb
+
+/a*b/ICDZSS
ab
aaaab
aaaacb
@@ -1320,9 +1281,16 @@
aaaab
aaaacb
-/(abc|def)x/ICDZ
+/(abc|def)x/ICDZS
abcx
defx
+ ** Failers
+ abcdefzx
+
+/(abc|def)x/ICDZSS
+ abcx
+ defx
+ ** Failers
abcdefzx
/(ab|cd){3,4}/IC
@@ -1330,7 +1298,10 @@
abcdabcd
abcdcdcdcdcd
-/([ab]{,4}c|xy)/ICDZ
+/([ab]{,4}c|xy)/ICDZS
+ Note: that { does NOT introduce a quantifier
+
+/([ab]{,4}c|xy)/ICDZSS
Note: that { does NOT introduce a quantifier
/([ab]{1,4}c|xy){4,5}?123/ICDZ
@@ -1404,13 +1375,25 @@
1X
123456\P
-/abc/I>testsavedregex
+/abc/IS>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ bca
+
+/abc/ISS>testsavedregex
<testsavedregex
abc
** Failers
bca
-/abc/IF>testsavedregex
+/abc/IFS>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ bca
+
+/abc/IFSS>testsavedregex
<testsavedregex
abc
** Failers
@@ -1422,14 +1405,26 @@
** Failers
def
+/(a|b)/ISS>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ def
+
/(a|b)/ISF>testsavedregex
<testsavedregex
abc
** Failers
def
+/(a|b)/ISSF>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ def
+
~<(\w+)/?>(.)*</(\1)>~smgI
- <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
+ \J1024<!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
/^a/IF
@@ -1447,17 +1442,6 @@
** Failers
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
AbCd
** Failers
@@ -1508,14 +1492,6 @@
(this)
((this))
-/a(b)c/PN
- abc
-
-/a(?P<name>b)c/PN
- abc
-
-/\x{100}/I
-
/\x{0000ff}/I
/^((?P<A>a1)|(?P<A>a2)b)/I
@@ -1593,8 +1569,6 @@ a random value. /Ix
/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
bXXaYYaY
-/\777/I
-
/\s*,\s*/IS
\x0b,\x0b
\x0c,\x0d
@@ -1976,8 +1950,6 @@ a random value. /Ix
/(?(DEFINE) abc) xyz/xI
-/(?(DEFINE) abc){3} xyz/x
-
/(a|)*\d/
\O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
@@ -2199,22 +2171,6 @@ a random value. /Ix
xabcpqrx
xxyzx
-/[\h]/BZ
- >\x09<
-
-/[\h]+/BZ
- >\x09\x20\xa0<
-
-/[\v]/BZ
-
-/[\H]/BZ
-
-/[^\h]/BZ
-
-/[\V]/BZ
-
-/[\x0a\V]/BZ
-
/\H++X/BZ
** Failers
XXXX
@@ -2255,7 +2211,7 @@ a random value. /Ix
/\V+\v\V+\w/BZ
/\( (?: [^()]* | (?R) )* \)/x
-(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0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0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
/[\E]AAA/
@@ -2295,7 +2251,7 @@ a random value. /Ix
/\g6666666666/
-/[\g6666666666]/
+/[\g6666666666]/BZ
/(?1)\c[/
@@ -2453,6 +2409,10 @@ a random value. /Ix
/\k{}/
+/\k/
+
+/\kabc/
+
/(?P=)/
/(?P>)/
@@ -2570,11 +2530,6 @@ a random value. /Ix
/(?(?=.*b).*b|^d)/I
-/a?|b?/P
- abc
- ** Failers
- ddd\N
-
/xyz/C
xyz
abcxyz
@@ -2766,12 +2721,6 @@ a random value. /Ix
abc\P
abc\P\P
-/\w+A/P
- CDAAAAB
-
-/\w+A/PU
- CDAAAAB
-
/abc\K123/
xyzabc123pqr
xyzabc12\P
@@ -2915,201 +2864,6 @@ 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
-/ (?: [\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
"(?>.*/)foo"SI
@@ -3276,104 +3030,19 @@ a random value. /Ix
/A(*PRUNE)B|A(*PRUNE)C/K
AC
-/--- A whole lot of tests of verbs with arguments are here rather than in test
- 11 because Perl doesn't seem to follow its specification entirely
- correctly. ---/
-
-/--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
- not clear how Perl defines "involved in the failure of the match". ---/
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/K
- AB
- CD
- ** Failers
- AC
- CB
-
-/--- Check the use of names for success and failure. PCRE doesn't show these
-names for success, though Perl does, contrary to its spec. ---/
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
- AB
- CD
- ** Failers
- AC
- CB
-
-/--- An empty name does not pass back an empty string. It is the same as if no
-name were given. ---/
-
-/^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
- AB
- CD
-
-/--- PRUNE goes to next bumpalong; COMMIT does not. ---/
-
-/A(*PRUNE:A)B/K
- ACAB
-
-/(*MARK:A)(*PRUNE:B)(C|X)/K
- C
- D
-
-/(*MARK:A)(*THEN:B)(C|X)/K
- C
- D
-
-/--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
-
-/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-
-/--- Same --/
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
- AAAC
-
/--- This should fail; the SKIP advances by one, but when we get to AC, the
- PRUNE kills it. ---/
+ PRUNE kills it. Perl behaves differently. ---/
/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
AAAC
-/A(*:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-
-/--- This should fail, as a null name is the same as no name ---/
-
-/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
- AAAC
-
-/--- This fails in PCRE, and I think that is in accordance with Perl's
- documentation, though in Perl it succeeds. ---/
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
- AAAC
+/--- Mark names can be duplicated. Perl doesn't give a mark for this one,
+though PCRE does. ---/
-/--- Mark names can be duplicated ---/
-
-/A(*:A)B|X(*:A)Y/K
- AABC
- XXYZ
-
/^A(*:A)B|^X(*:A)Y/K
** Failers
XAQQ
-/--- A check on what happens after hitting a mark and them bumping along to
-something that does not even start. Perl reports tags after the failures here,
-though it does not when the individual letters are made into something
-more complicated. ---/
-
-/A(*:A)B|XX(*:B)Y/K
- AABC
- XXYZ
- ** Failers
- XAQQ
- XAQQXZZ
- AXQQQ
- AXXQQQ
-
/--- COMMIT at the start of a pattern should be the same as an anchor. Perl
optimizations defeat this. So does the PCRE optimization unless we disable it
with \Y. ---/
@@ -3383,78 +3052,6 @@ with \Y. ---/
** Failers
DEFGABC\Y
-/--- Repeat some tests with added studying. ---/
-
-/A(*COMMIT)B/+KS
- ACABX
-
-/A(*THEN)B|A(*THEN)C/KS
- AC
-
-/A(*PRUNE)B|A(*PRUNE)C/KS
- AC
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/KS
- AB
- CD
- ** Failers
- AC
- CB
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
- AB
- CD
- ** Failers
- AC
- CB
-
-/^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
- AB
- CD
-
-/A(*PRUNE:A)B/KS
- ACAB
-
-/(*MARK:A)(*PRUNE:B)(C|X)/KS
- C
- D
-
-/(*MARK:A)(*THEN:B)(C|X)/KS
- C
- D
-
-/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
- AAAC
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
- AAAC
-
-/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
- AAAC
-
-/A(*:A)A+(*SKIP)(B|Z) | AC/xKS
- AAAC
-
-/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
- AAAC
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
- AAAC
-
-/A(*:A)B|XX(*:B)Y/KS
- AABC
- XXYZ
- ** Failers
- XAQQ
- XAQQXZZ
- AXQQQ
- AXXQQQ
-
-/(*COMMIT)ABC/
- ABCDEFG
- ** Failers
- DEFGABC\Y
-
/^(ab (c+(*THEN)cd) | xyz)/x
abcccd
@@ -3505,6 +3102,24 @@ with \Y. ---/
/\d*\R/BZ
/\s*\R/BZ
+ \x20\x0a
+ \x20\x0d
+ \x20\x0d\x0a
+
+/\S*\R/BZ
+ a\x0a
+
+/X\h*\R/BZ
+ X\x20\x0a
+
+/X\H*\R/BZ
+ X\x0d\x0a
+
+/X\H+\R/BZ
+ X\x0d\x0a
+
+/X\H++\R/BZ
+ X\x0d\x0a
/-- Perl treats this one differently, not failing the second string. I believe
that is a bug in Perl. --/
@@ -3570,4 +3185,588 @@ with \Y. ---/
/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
+/-- These tests are here because Perl gets the first one wrong. --/
+
+/(\R*)(.)/s
+ \r\n
+ \r\r\n\n\r
+ \r\r\n\n\r\n
+
+/(\R)*(.)/s
+ \r\n
+ \r\r\n\n\r
+ \r\r\n\n\r\n
+
+/((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|a(*THEN)b)c/
+ aabc
+
+/-- --/
+
+/-- These studied versions are here because they are not Perl-compatible; the
+ studying means the mark is not seen. --/
+
+/(*MARK:A)(*SKIP:B)(C|X)/KS
+ C
+ D
+
+/(*:A)A+(*SKIP:A)(B|Z)/KS
+ AAAC
+
+/-- --/
+
+"(?=a*(*ACCEPT)b)c"
+ c
+ c\N
+
+/(?1)c(?(DEFINE)((*ACCEPT)b))/
+ c
+ c\N
+
+/(?>(*ACCEPT)b)c/
+ c
+ c\N
+
+/(?:(?>(a)))+a%/++
+ %aa%
+
+/(a)b|ac/++SS
+ ac\O3
+
+/(a)(b)x|abc/++
+ abc\O6
+
+/(a)bc|(a)(b)\2/
+ \O3abc
+ \O4abc
+
+/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
+
+/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
+
+/(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
+
+/(abc)(?1)/SI
+
+/^(?>a)++/
+ aa\M
+ aaaaaaaaa\M
+
+/(a)(?1)++/
+ aa\M
+ aaaaaaaaa\M
+
+/(?:(foo)|(bar)|(baz))X/SS=
+ bazfooX
+ foobazbarX
+ barfooX
+ bazX
+ foobarbazX
+ bazfooX\O0
+ bazfooX\O2
+ bazfooX\O4
+ bazfooX\O6
+ bazfooX\O8
+ bazfooX\O10
+
+/(?=abc){3}abc/BZ
+
+/(?=abc)+abc/BZ
+
+/(?=abc)++abc/BZ
+
+/(?=abc){0}xyz/BZ
+
+/(?=(a))?./BZ
+
+/(?=(a))??./BZ
+
+/^(?=(a)){0}b(?1)/BZ
+
+/(?(DEFINE)(a))?b(?1)/BZ
+
+/^(?=(?1))?[az]([abc])d/BZ
+
+/^(?!a){0}\w+/BZ
+
+/(?<=(abc))?xyz/BZ
+
+/[:a[:abc]b:]/BZ
+
+/((?2))((?1))/SS
+ abc
+
+/((?(R2)a+|(?1)b))/SS
+ aaaabcde
+
+/(?(R)a*(?1)|((?R))b)/SS
+ aaaabcde
+
+/(a+|(?R)b)/
+
+/^(a(*:A)(d|e(*:B))z|aeq)/C
+ adz
+ aez
+ aeqwerty
+
+/.(*F)/
+ \P\Pabc
+
+/\btype\b\W*?\btext\b\W*?\bjavascript\b/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
+
+/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
+ ax
+
+'a*(*ACCEPT)b'+
+ \N\N
+ abc\N\N
+ bbb\N\N
+
+/(*ACCEPT)a/+I
+ bax
+
+/z(*ACCEPT)a/+I
+ baxzbx
+
+/a(?:.)*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+
+/a(?:.(*THEN))*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+
+/a(?:.(*THEN:ABC))*?a/ims
+ \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
+ aaaazzzzb
+ ** Failers
+ aazz
+
+/(.)(\1|a(?2))/
+ bab
+
+/\1|(.)(?R)\1/
+ cbbbc
+
+/(.)((?(1)c|a)|a(?2))/
+ baa
+
+/(?P<abn>(?P=abn)xxx)/BZ
+
+/(a\1z)/BZ
+
+/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
+ \Maabbccddee
+
+/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
+ \Maabbccddee
+
+/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
+ \Maabbccddee
+
+/^a\x41z/<JS>
+ aAz
+ *** Failers
+ ax41z
+
+/^a[m\x41]z/<JS>
+ aAz
+
+/^a\x1z/<JS>
+ ax1z
+
+/^a\u0041z/<JS>
+ aAz
+ *** Failers
+ au0041z
+
+/^a[m\u0041]z/<JS>
+ aAz
+
+/^a\u041z/<JS>
+ au041z
+ *** Failers
+ aAz
+
+/^a\U0041z/<JS>
+ aU0041z
+ *** Failers
+ aAz
+
+/(?(?=c)c|d)++Y/BZ
+
+/(?(?=c)c|d)*+Y/BZ
+
+/a[\NB]c/
+ aNc
+
+/a[B-\Nc]/
+
+/(a)(?2){0,1999}?(b)/
+
+/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
+
+/--- This test, with something more complicated than individual letters, causes
+different behaviour in Perl. Perhaps it disables some optimization; no tag is
+passed back for the failures, whereas in PCRE there is a tag. ---/
+
+/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
+ AABC
+ XXYZ
+ ** Failers
+ XAQQ
+ XAQQXZZ
+ AXQQQ
+ AXXQQQ
+
+/-- Perl doesn't give marks for these, though it does if the alternatives are
+replaced by single letters. --/
+
+/(b|q)(*:m)f|a(*:n)w/K
+ aw
+ ** Failers
+ abc
+
+/(q|b)(*:m)f|a(*:n)w/K
+ aw
+ ** Failers
+ abc
+
+/-- After a partial match, the behaviour is as for a failure. --/
+
+/^a(*:X)bcde/K
+ 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
+
+/-- These two are here because Perl does not match: it seems to allow the
+COMMIT to escape from the assertion. --/
+
+/(?=a(*COMMIT)b|ac)ac|ac/
+ ac
+
+/(?=a(*COMMIT)b|(ac)) ac | (a)c/x
+ ac
+
+"AB(C(D))(E(F))?(?(?=\2)(?=\4))"
+ ABCDGHI\O03
+
+/-- This one is here because Perl does not confine the *COMMIT to the
+assertion, and therefore fails the entire subroutine call. --/
+
+/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
+ ac
+
/-- End of testinput2 --/