| 1 |
|
/-- This set of tests is not Perl-compatible. It checks on special features |
| 2 |
|
of PCRE's API, error diagnostics, and the compiled code of some patterns. |
| 3 |
|
It also checks the non-Perl syntax the PCRE supports (Python, .NET, |
| 4 |
|
Oniguruma). Finally, there are some tests where PCRE and Perl differ, |
| 5 |
|
either because PCRE can't be compatible, or there is a possible Perl |
| 6 |
|
bug. --/ |
| 7 |
|
|
| 8 |
|
/-- Originally, the Perl >= 5.10 things were in here too, but now I have |
| 9 |
|
separated many (most?) of them out into test 11. However, there may still |
| 10 |
|
be some that were overlooked. --/ |
| 11 |
|
|
| 12 |
/(a)b|/I |
/(a)b|/I |
| 13 |
|
|
| 14 |
/abc/I |
/abc/I |
| 51 |
|
|
| 52 |
/(?X)[\B]/ |
/(?X)[\B]/ |
| 53 |
|
|
| 54 |
|
/(?X)[\R]/ |
| 55 |
|
|
| 56 |
|
/(?X)[\X]/ |
| 57 |
|
|
| 58 |
|
/[\B]/BZ |
| 59 |
|
|
| 60 |
|
/[\R]/BZ |
| 61 |
|
|
| 62 |
|
/[\X]/BZ |
| 63 |
|
|
| 64 |
/[z-a]/ |
/[z-a]/ |
| 65 |
|
|
| 66 |
/^*/ |
/^*/ |
| 144 |
defabc |
defabc |
| 145 |
\Zdefabc |
\Zdefabc |
| 146 |
|
|
| 147 |
/abc/IP |
/abc/P |
| 148 |
abc |
abc |
| 149 |
*** Failers |
*** Failers |
| 150 |
|
|
| 151 |
/^abc|def/IP |
/^abc|def/P |
| 152 |
abcdef |
abcdef |
| 153 |
abcdef\B |
abcdef\B |
| 154 |
|
|
| 155 |
/.*((abc)$|(def))/IP |
/.*((abc)$|(def))/P |
| 156 |
defabc |
defabc |
| 157 |
\Zdefabc |
\Zdefabc |
| 158 |
|
|
| 159 |
/the quick brown fox/IP |
/the quick brown fox/P |
| 160 |
the quick brown fox |
the quick brown fox |
| 161 |
*** Failers |
*** Failers |
| 162 |
The Quick Brown Fox |
The Quick Brown Fox |
| 163 |
|
|
| 164 |
/the quick brown fox/IPi |
/the quick brown fox/Pi |
| 165 |
the quick brown fox |
the quick brown fox |
| 166 |
The Quick Brown Fox |
The Quick Brown Fox |
| 167 |
|
|
| 168 |
/abc.def/IP |
/abc.def/P |
| 169 |
*** Failers |
*** Failers |
| 170 |
abc\ndef |
abc\ndef |
| 171 |
|
|
| 172 |
/abc$/IP |
/abc$/P |
| 173 |
abc |
abc |
| 174 |
abc\n |
abc\n |
| 175 |
|
|
| 176 |
/(abc)\2/IP |
/(abc)\2/P |
| 177 |
|
|
| 178 |
/(abc\1)/IP |
/(abc\1)/P |
| 179 |
abc |
abc |
| 180 |
|
|
| 181 |
/)/ |
/)/ |
| 354 |
*** Failers |
*** Failers |
| 355 |
a |
a |
| 356 |
|
|
| 357 |
/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I |
/This one is here because Perl behaves differently; see also the following/I |
| 358 |
|
|
| 359 |
/^(a\1?){4}$/I |
/^(a\1?){4}$/I |
| 360 |
|
aaaa |
| 361 |
aaaaaa |
aaaaaa |
| 362 |
|
|
| 363 |
|
/Perl does not fail these two for the final subjects. Neither did PCRE until/ |
| 364 |
|
/release 8.01. The problem is in backtracking into a subpattern that contains/ |
| 365 |
|
/a recursive reference to itself. PCRE has now made these into atomic patterns./ |
| 366 |
|
|
| 367 |
|
/^(xa|=?\1a){2}$/ |
| 368 |
|
xa=xaa |
| 369 |
|
** Failers |
| 370 |
|
xa=xaaa |
| 371 |
|
|
| 372 |
|
/^(xa|=?\1a)+$/ |
| 373 |
|
xa=xaa |
| 374 |
|
** Failers |
| 375 |
|
xa=xaaa |
| 376 |
|
|
| 377 |
/These are syntax tests from Perl 5.005/I |
/These are syntax tests from Perl 5.005/I |
| 378 |
|
|
| 629 |
*** Failers |
*** Failers |
| 630 |
\Nabc |
\Nabc |
| 631 |
|
|
| 632 |
/a*(b+)(z)(z)/IP |
/a*(b+)(z)(z)/P |
| 633 |
aaaabbbbzzzz |
aaaabbbbzzzz |
| 634 |
aaaabbbbzzzz\O0 |
aaaabbbbzzzz\O0 |
| 635 |
aaaabbbbzzzz\O1 |
aaaabbbbzzzz\O1 |
| 1061 |
/abc(?C)de(?C1)f/I |
/abc(?C)de(?C1)f/I |
| 1062 |
123abcdef |
123abcdef |
| 1063 |
|
|
| 1064 |
/(?C1)\dabc(?C2)def/I |
/(?C1)\dabc(?C2)def/IS |
| 1065 |
|
1234abcdef |
| 1066 |
|
*** Failers |
| 1067 |
|
abcdef |
| 1068 |
|
|
| 1069 |
|
/(?C1)\dabc(?C2)def/ISS |
| 1070 |
1234abcdef |
1234abcdef |
| 1071 |
*** Failers |
*** Failers |
| 1072 |
abcdef |
abcdef |
| 1163 |
|
|
| 1164 |
/(a(?1)+b)/DZ |
/(a(?1)+b)/DZ |
| 1165 |
|
|
|
/^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/Ii |
|
|
1221 |
|
|
Satan, oscillate my metallic sonatas! |
|
|
A man, a plan, a canal: Panama! |
|
|
Able was I ere I saw Elba. |
|
|
*** Failers |
|
|
The quick brown fox |
|
|
|
|
| 1166 |
/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I |
/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I |
| 1167 |
12 |
12 |
| 1168 |
(((2+2)*-3)-7) |
(((2+2)*-3)-7) |
| 1315 |
abcde |
abcde |
| 1316 |
abcdfe |
abcdfe |
| 1317 |
|
|
| 1318 |
/a*b/ICDZ |
/a*b/ICDZS |
| 1319 |
|
ab |
| 1320 |
|
aaaab |
| 1321 |
|
aaaacb |
| 1322 |
|
|
| 1323 |
|
/a*b/ICDZSS |
| 1324 |
ab |
ab |
| 1325 |
aaaab |
aaaab |
| 1326 |
aaaacb |
aaaacb |
| 1330 |
aaaab |
aaaab |
| 1331 |
aaaacb |
aaaacb |
| 1332 |
|
|
| 1333 |
/(abc|def)x/ICDZ |
/(abc|def)x/ICDZS |
| 1334 |
|
abcx |
| 1335 |
|
defx |
| 1336 |
|
** Failers |
| 1337 |
|
abcdefzx |
| 1338 |
|
|
| 1339 |
|
/(abc|def)x/ICDZSS |
| 1340 |
abcx |
abcx |
| 1341 |
defx |
defx |
| 1342 |
|
** Failers |
| 1343 |
abcdefzx |
abcdefzx |
| 1344 |
|
|
| 1345 |
/(ab|cd){3,4}/IC |
/(ab|cd){3,4}/IC |
| 1347 |
abcdabcd |
abcdabcd |
| 1348 |
abcdcdcdcdcd |
abcdcdcdcdcd |
| 1349 |
|
|
| 1350 |
/([ab]{,4}c|xy)/ICDZ |
/([ab]{,4}c|xy)/ICDZS |
| 1351 |
|
Note: that { does NOT introduce a quantifier |
| 1352 |
|
|
| 1353 |
|
/([ab]{,4}c|xy)/ICDZSS |
| 1354 |
Note: that { does NOT introduce a quantifier |
Note: that { does NOT introduce a quantifier |
| 1355 |
|
|
| 1356 |
/([ab]{1,4}c|xy){4,5}?123/ICDZ |
/([ab]{1,4}c|xy){4,5}?123/ICDZ |
| 1424 |
1X |
1X |
| 1425 |
123456\P |
123456\P |
| 1426 |
|
|
| 1427 |
/abc/I>testsavedregex |
/abc/IS>testsavedregex |
| 1428 |
|
<testsavedregex |
| 1429 |
|
abc |
| 1430 |
|
** Failers |
| 1431 |
|
bca |
| 1432 |
|
|
| 1433 |
|
/abc/ISS>testsavedregex |
| 1434 |
<testsavedregex |
<testsavedregex |
| 1435 |
abc |
abc |
| 1436 |
** Failers |
** Failers |
| 1437 |
bca |
bca |
| 1438 |
|
|
| 1439 |
/abc/IF>testsavedregex |
/abc/IFS>testsavedregex |
| 1440 |
|
<testsavedregex |
| 1441 |
|
abc |
| 1442 |
|
** Failers |
| 1443 |
|
bca |
| 1444 |
|
|
| 1445 |
|
/abc/IFSS>testsavedregex |
| 1446 |
<testsavedregex |
<testsavedregex |
| 1447 |
abc |
abc |
| 1448 |
** Failers |
** Failers |
| 1454 |
** Failers |
** Failers |
| 1455 |
def |
def |
| 1456 |
|
|
| 1457 |
|
/(a|b)/ISS>testsavedregex |
| 1458 |
|
<testsavedregex |
| 1459 |
|
abc |
| 1460 |
|
** Failers |
| 1461 |
|
def |
| 1462 |
|
|
| 1463 |
/(a|b)/ISF>testsavedregex |
/(a|b)/ISF>testsavedregex |
| 1464 |
<testsavedregex |
<testsavedregex |
| 1465 |
abc |
abc |
| 1466 |
** Failers |
** Failers |
| 1467 |
def |
def |
| 1468 |
|
|
| 1469 |
|
/(a|b)/ISSF>testsavedregex |
| 1470 |
|
<testsavedregex |
| 1471 |
|
abc |
| 1472 |
|
** Failers |
| 1473 |
|
def |
| 1474 |
|
|
| 1475 |
~<(\w+)/?>(.)*</(\1)>~smgI |
~<(\w+)/?>(.)*</(\1)>~smgI |
| 1476 |
<!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> |
<!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> |
| 1477 |
|
|
| 1491 |
** Failers |
** Failers |
| 1492 |
line one\nthis is a line\nbreak in the second line |
line one\nthis is a line\nbreak in the second line |
| 1493 |
|
|
| 1494 |
/ab.cd/IP |
/ab.cd/P |
| 1495 |
ab-cd |
ab-cd |
| 1496 |
ab=cd |
ab=cd |
| 1497 |
** Failers |
** Failers |
| 1498 |
ab\ncd |
ab\ncd |
| 1499 |
|
|
| 1500 |
/ab.cd/IPs |
/ab.cd/Ps |
| 1501 |
ab-cd |
ab-cd |
| 1502 |
ab=cd |
ab=cd |
| 1503 |
ab\ncd |
ab\ncd |
| 1552 |
(this) |
(this) |
| 1553 |
((this)) |
((this)) |
| 1554 |
|
|
| 1555 |
/a(b)c/IPN |
/a(b)c/PN |
| 1556 |
abc |
abc |
| 1557 |
|
|
| 1558 |
/a(?P<name>b)c/IPN |
/a(?P<name>b)c/PN |
| 1559 |
abc |
abc |
| 1560 |
|
|
| 1561 |
/\x{100}/I |
/\x{100}/I |
| 1987 |
/(?=(?'abc'\w+))\k<abc>:/I |
/(?=(?'abc'\w+))\k<abc>:/I |
| 1988 |
abcd: |
abcd: |
| 1989 |
|
|
|
/(?'abc'\w+):\k<abc>{2}/ |
|
|
a:aaxyz |
|
|
ab:ababxyz |
|
|
** Failers |
|
|
a:axyz |
|
|
ab:abxyz |
|
|
|
|
| 1990 |
/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J |
/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J |
| 1991 |
adaa |
adaa |
| 1992 |
** Failers |
** Failers |
| 1999 |
** Failers |
** Failers |
| 2000 |
bddd |
bddd |
| 2001 |
|
|
|
/^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x |
|
|
abd |
|
|
ce |
|
|
|
|
| 2002 |
/(?(<bc))/ |
/(?(<bc))/ |
| 2003 |
|
|
| 2004 |
/(?(''))/ |
/(?(''))/ |
| 2016 |
/(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x |
/(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x |
| 2017 |
abcabc1Xabc2XabcXabcabc |
abcabc1Xabc2XabcXabcabc |
| 2018 |
|
|
|
/^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x |
|
|
abcd |
|
|
|
|
|
/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT)) |
|
|
(?(DEFINE) |
|
|
(?<NAME_PAT>[a-z]+) |
|
|
(?<ADDRESS_PAT>\d+) |
|
|
)/x |
|
|
metcalfe 33 |
|
|
|
|
| 2019 |
/^(?(DEFINE) abc | xyz ) /x |
/^(?(DEFINE) abc | xyz ) /x |
| 2020 |
|
|
| 2021 |
/(?(DEFINE) abc) xyz/xI |
/(?(DEFINE) abc) xyz/xI |
| 2039 |
a\rb\<anycrlf> |
a\rb\<anycrlf> |
| 2040 |
|
|
| 2041 |
/^abc./mgx<any> |
/^abc./mgx<any> |
| 2042 |
abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK |
abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK |
| 2043 |
|
|
| 2044 |
/abc.$/mgx<any> |
/abc.$/mgx<any> |
| 2045 |
abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9 |
abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9 |
| 2046 |
|
|
| 2047 |
/a/<cr><any> |
/a/<cr><any> |
| 2048 |
|
|
| 2104 |
/(?1)X(?<abc>P)/I |
/(?1)X(?<abc>P)/I |
| 2105 |
abcPXP123 |
abcPXP123 |
| 2106 |
|
|
|
/(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/ |
|
|
1.2.3.4 |
|
|
131.111.10.206 |
|
|
10.0.0.0 |
|
|
** Failers |
|
|
10.6 |
|
|
455.3.4.5 |
|
|
|
|
|
/\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/ |
|
|
1.2.3.4 |
|
|
131.111.10.206 |
|
|
10.0.0.0 |
|
|
** Failers |
|
|
10.6 |
|
|
455.3.4.5 |
|
|
|
|
| 2107 |
/(?:a(?&abc)b)*(?<abc>x)/ |
/(?:a(?&abc)b)*(?<abc>x)/ |
| 2108 |
123axbaxbaxbx456 |
123axbaxbaxbx456 |
| 2109 |
123axbaxbaxb456 |
123axbaxbaxb456 |
| 2125 |
defabcabcxyz |
defabcabcxyz |
| 2126 |
DEFabcABCXYZ |
DEFabcABCXYZ |
| 2127 |
|
|
|
/^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/ |
|
|
ababababbbabZXXXX |
|
|
|
|
| 2128 |
/^(a)\g-2/ |
/^(a)\g-2/ |
| 2129 |
|
|
| 2130 |
/^(a)\g/ |
/^(a)\g/ |
| 2179 |
abc\r\n\r\n |
abc\r\n\r\n |
| 2180 |
|
|
| 2181 |
/abc.$/mgx<anycrlf> |
/abc.$/mgx<anycrlf> |
| 2182 |
abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9 |
abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9 |
| 2183 |
|
|
| 2184 |
/^X/m |
/^X/m |
| 2185 |
XABC |
XABC |
| 2223 |
/^(?(+1)X|Y)(.)/BZ |
/^(?(+1)X|Y)(.)/BZ |
| 2224 |
Y! |
Y! |
| 2225 |
|
|
|
/(foo)\Kbar/ |
|
|
foobar |
|
|
|
|
|
/(foo)(\Kbar|baz)/ |
|
|
foobar |
|
|
foobaz |
|
|
|
|
|
/(foo\Kbar)baz/ |
|
|
foobarbaz |
|
|
|
|
| 2226 |
/(?<A>tom|bon)-\k{A}/ |
/(?<A>tom|bon)-\k{A}/ |
| 2227 |
tom-tom |
tom-tom |
| 2228 |
bon-bon |
bon-bon |
| 2229 |
** Failers |
** Failers |
| 2230 |
tom-bon |
tom-bon |
| 2231 |
|
|
|
/(?<A>tom|bon)-\g{A}/ |
|
|
tom-tom |
|
|
bon-bon |
|
|
|
|
| 2232 |
/\g{A/ |
/\g{A/ |
| 2233 |
|
|
| 2234 |
/(?|(abc)|(xyz))/BZ |
/(?|(abc)|(xyz))/BZ |
| 2243 |
xabcpqrx |
xabcpqrx |
| 2244 |
xxyzx |
xxyzx |
| 2245 |
|
|
|
/(?|(abc)|(xyz))\1/ |
|
|
abcabc |
|
|
xyzxyz |
|
|
** Failers |
|
|
abcxyz |
|
|
xyzabc |
|
|
|
|
|
/(?|(abc)|(xyz))(?1)/ |
|
|
abcabc |
|
|
xyzabc |
|
|
** Failers |
|
|
xyzxyz |
|
|
|
|
|
/\H\h\V\v/ |
|
|
X X\x0a |
|
|
X\x09X\x0b |
|
|
** Failers |
|
|
\xa0 X\x0a |
|
|
|
|
|
/\H*\h+\V?\v{3,4}/ |
|
|
\x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a |
|
|
\x09\x20\xa0\x0a\x0b\x0c\x0d\x0a |
|
|
\x09\x20\xa0\x0a\x0b\x0c |
|
|
** Failers |
|
|
\x09\x20\xa0\x0a\x0b |
|
|
|
|
|
/\H{3,4}/ |
|
|
XY ABCDE |
|
|
XY PQR ST |
|
|
|
|
|
/.\h{3,4}./ |
|
|
XY AB PQRS |
|
|
|
|
|
/\h*X\h?\H+Y\H?Z/ |
|
|
>XNNNYZ |
|
|
> X NYQZ |
|
|
** Failers |
|
|
>XYZ |
|
|
> X NY Z |
|
|
|
|
|
/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/ |
|
|
>XY\x0aZ\x0aA\x0bNN\x0c |
|
|
>\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c |
|
|
|
|
| 2246 |
/[\h]/BZ |
/[\h]/BZ |
| 2247 |
>\x09< |
>\x09< |
| 2248 |
|
|
| 2315 |
|
|
| 2316 |
/A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ |
/A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ |
| 2317 |
|
|
|
/^a+(*FAIL)/ |
|
|
aaaaaa |
|
|
|
|
|
/a+b?c+(*FAIL)/ |
|
|
aaabccc |
|
|
|
|
|
/a+b?(*PRUNE)c+(*FAIL)/ |
|
|
aaabccc |
|
|
|
|
|
/a+b?(*COMMIT)c+(*FAIL)/ |
|
|
aaabccc |
|
|
|
|
|
/a+b?(*SKIP)c+(*FAIL)/ |
|
|
aaabcccaaabccc |
|
|
|
|
|
/^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/ |
|
|
aaaxxxxxx |
|
|
aaa++++++ |
|
|
bbbxxxxx |
|
|
bbb+++++ |
|
|
cccxxxx |
|
|
ccc++++ |
|
|
dddddddd |
|
|
|
|
|
/^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/ |
|
|
aaaxxxxxx |
|
|
aaa++++++ |
|
|
bbbxxxxx |
|
|
bbb+++++ |
|
|
cccxxxx |
|
|
ccc++++ |
|
|
dddddddd |
|
|
|
|
|
/a+b?(*THEN)c+(*FAIL)/ |
|
|
aaabccc |
|
|
|
|
|
/(A (A|B(*ACCEPT)|C) D)(E)/x |
|
|
ABX |
|
|
AADE |
|
|
ACDE |
|
|
** Failers |
|
|
AD |
|
|
|
|
| 2318 |
/^a+(*FAIL)/C |
/^a+(*FAIL)/C |
| 2319 |
aaaaaa |
aaaaaa |
| 2320 |
|
|
| 2333 |
/a+b?(*THEN)c+(*FAIL)/C |
/a+b?(*THEN)c+(*FAIL)/C |
| 2334 |
aaabccc |
aaabccc |
| 2335 |
|
|
|
/a(*PRUNE:XXX)b/ |
|
|
|
|
| 2336 |
/a(*MARK)b/ |
/a(*MARK)b/ |
| 2337 |
|
|
| 2338 |
/(?i:A{1,}\6666666666)/ |
/(?i:A{1,}\6666666666)/ |
| 2390 |
a\nb |
a\nb |
| 2391 |
a\r\nb |
a\r\nb |
| 2392 |
a\x85b |
a\x85b |
| 2393 |
|
|
| 2394 |
|
/(*ANY).*/g |
| 2395 |
|
abc\r\ndef |
| 2396 |
|
|
| 2397 |
|
/(*ANYCRLF).*/g |
| 2398 |
|
abc\r\ndef |
| 2399 |
|
|
| 2400 |
|
/(*CRLF).*/g |
| 2401 |
|
abc\r\ndef |
| 2402 |
|
|
| 2403 |
/a\Rb/I<bsr_anycrlf> |
/a\Rb/I<bsr_anycrlf> |
| 2404 |
a\rb |
a\rb |
| 2527 |
|
|
| 2528 |
/[[:a\dz:]]/ |
/[[:a\dz:]]/ |
| 2529 |
|
|
| 2530 |
/ End of testinput2 / |
/(^(a|b\g<-1'c))/ |
| 2531 |
|
|
| 2532 |
|
/^(?+1)(?<a>x|y){0}z/ |
| 2533 |
|
xzxx |
| 2534 |
|
yzyy |
| 2535 |
|
** Failers |
| 2536 |
|
xxz |
| 2537 |
|
|
| 2538 |
|
/(\3)(\1)(a)/ |
| 2539 |
|
cat |
| 2540 |
|
|
| 2541 |
|
/(\3)(\1)(a)/<JS> |
| 2542 |
|
cat |
| 2543 |
|
|
| 2544 |
|
/TA]/ |
| 2545 |
|
The ACTA] comes |
| 2546 |
|
|
| 2547 |
|
/TA]/<JS> |
| 2548 |
|
The ACTA] comes |
| 2549 |
|
|
| 2550 |
|
/(?2)[]a()b](abc)/ |
| 2551 |
|
abcbabc |
| 2552 |
|
|
| 2553 |
|
/(?2)[^]a()b](abc)/ |
| 2554 |
|
abcbabc |
| 2555 |
|
|
| 2556 |
|
/(?1)[]a()b](abc)/ |
| 2557 |
|
abcbabc |
| 2558 |
|
** Failers |
| 2559 |
|
abcXabc |
| 2560 |
|
|
| 2561 |
|
/(?1)[^]a()b](abc)/ |
| 2562 |
|
abcXabc |
| 2563 |
|
** Failers |
| 2564 |
|
abcbabc |
| 2565 |
|
|
| 2566 |
|
/(?2)[]a()b](abc)(xyz)/ |
| 2567 |
|
xyzbabcxyz |
| 2568 |
|
|
| 2569 |
|
/(?&N)[]a(?<N>)](?<M>abc)/ |
| 2570 |
|
abc<abc |
| 2571 |
|
|
| 2572 |
|
/(?&N)[]a(?<N>)](abc)/ |
| 2573 |
|
abc<abc |
| 2574 |
|
|
| 2575 |
|
/a[]b/ |
| 2576 |
|
|
| 2577 |
|
/a[^]b/ |
| 2578 |
|
|
| 2579 |
|
/a[]b/<JS> |
| 2580 |
|
** Failers |
| 2581 |
|
ab |
| 2582 |
|
|
| 2583 |
|
/a[]+b/<JS> |
| 2584 |
|
** Failers |
| 2585 |
|
ab |
| 2586 |
|
|
| 2587 |
|
/a[]*+b/<JS> |
| 2588 |
|
** Failers |
| 2589 |
|
ab |
| 2590 |
|
|
| 2591 |
|
/a[^]b/<JS> |
| 2592 |
|
aXb |
| 2593 |
|
a\nb |
| 2594 |
|
** Failers |
| 2595 |
|
ab |
| 2596 |
|
|
| 2597 |
|
/a[^]+b/<JS> |
| 2598 |
|
aXb |
| 2599 |
|
a\nX\nXb |
| 2600 |
|
** Failers |
| 2601 |
|
ab |
| 2602 |
|
|
| 2603 |
|
/a(?!)+b/ |
| 2604 |
|
|
| 2605 |
|
/a(*FAIL)+b/ |
| 2606 |
|
|
| 2607 |
|
/(abc|pqr|123){0}[xyz]/SI |
| 2608 |
|
|
| 2609 |
|
/(?(?=.*b)b|^)/CI |
| 2610 |
|
adc |
| 2611 |
|
abc |
| 2612 |
|
|
| 2613 |
|
/(?(?=b).*b|^d)/I |
| 2614 |
|
|
| 2615 |
|
/(?(?=.*b).*b|^d)/I |
| 2616 |
|
|
| 2617 |
|
/a?|b?/P |
| 2618 |
|
abc |
| 2619 |
|
** Failers |
| 2620 |
|
ddd\N |
| 2621 |
|
|
| 2622 |
|
/xyz/C |
| 2623 |
|
xyz |
| 2624 |
|
abcxyz |
| 2625 |
|
abcxyz\Y |
| 2626 |
|
** Failers |
| 2627 |
|
abc |
| 2628 |
|
abc\Y |
| 2629 |
|
abcxypqr |
| 2630 |
|
abcxypqr\Y |
| 2631 |
|
|
| 2632 |
|
/(*NO_START_OPT)xyz/C |
| 2633 |
|
abcxyz |
| 2634 |
|
|
| 2635 |
|
/xyz/CY |
| 2636 |
|
abcxyz |
| 2637 |
|
|
| 2638 |
|
/^"((?(?=[a])[^"])|b)*"$/C |
| 2639 |
|
"ab" |
| 2640 |
|
|
| 2641 |
|
/^"((?(?=[a])[^"])|b)*"$/ |
| 2642 |
|
"ab" |
| 2643 |
|
|
| 2644 |
|
/^X(?5)(a)(?|(b)|(q))(c)(d)Y/ |
| 2645 |
|
XYabcdY |
| 2646 |
|
|
| 2647 |
|
/^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/ |
| 2648 |
|
XYabcdY |
| 2649 |
|
|
| 2650 |
|
/Xa{2,4}b/ |
| 2651 |
|
X\P |
| 2652 |
|
Xa\P |
| 2653 |
|
Xaa\P |
| 2654 |
|
Xaaa\P |
| 2655 |
|
Xaaaa\P |
| 2656 |
|
|
| 2657 |
|
/Xa{2,4}?b/ |
| 2658 |
|
X\P |
| 2659 |
|
Xa\P |
| 2660 |
|
Xaa\P |
| 2661 |
|
Xaaa\P |
| 2662 |
|
Xaaaa\P |
| 2663 |
|
|
| 2664 |
|
/Xa{2,4}+b/ |
| 2665 |
|
X\P |
| 2666 |
|
Xa\P |
| 2667 |
|
Xaa\P |
| 2668 |
|
Xaaa\P |
| 2669 |
|
Xaaaa\P |
| 2670 |
|
|
| 2671 |
|
/X\d{2,4}b/ |
| 2672 |
|
X\P |
| 2673 |
|
X3\P |
| 2674 |
|
X33\P |
| 2675 |
|
X333\P |
| 2676 |
|
X3333\P |
| 2677 |
|
|
| 2678 |
|
/X\d{2,4}?b/ |
| 2679 |
|
X\P |
| 2680 |
|
X3\P |
| 2681 |
|
X33\P |
| 2682 |
|
X333\P |
| 2683 |
|
X3333\P |
| 2684 |
|
|
| 2685 |
|
/X\d{2,4}+b/ |
| 2686 |
|
X\P |
| 2687 |
|
X3\P |
| 2688 |
|
X33\P |
| 2689 |
|
X333\P |
| 2690 |
|
X3333\P |
| 2691 |
|
|
| 2692 |
|
/X\D{2,4}b/ |
| 2693 |
|
X\P |
| 2694 |
|
Xa\P |
| 2695 |
|
Xaa\P |
| 2696 |
|
Xaaa\P |
| 2697 |
|
Xaaaa\P |
| 2698 |
|
|
| 2699 |
|
/X\D{2,4}?b/ |
| 2700 |
|
X\P |
| 2701 |
|
Xa\P |
| 2702 |
|
Xaa\P |
| 2703 |
|
Xaaa\P |
| 2704 |
|
Xaaaa\P |
| 2705 |
|
|
| 2706 |
|
/X\D{2,4}+b/ |
| 2707 |
|
X\P |
| 2708 |
|
Xa\P |
| 2709 |
|
Xaa\P |
| 2710 |
|
Xaaa\P |
| 2711 |
|
Xaaaa\P |
| 2712 |
|
|
| 2713 |
|
/X[abc]{2,4}b/ |
| 2714 |
|
X\P |
| 2715 |
|
Xa\P |
| 2716 |
|
Xaa\P |
| 2717 |
|
Xaaa\P |
| 2718 |
|
Xaaaa\P |
| 2719 |
|
|
| 2720 |
|
/X[abc]{2,4}?b/ |
| 2721 |
|
X\P |
| 2722 |
|
Xa\P |
| 2723 |
|
Xaa\P |
| 2724 |
|
Xaaa\P |
| 2725 |
|
Xaaaa\P |
| 2726 |
|
|
| 2727 |
|
/X[abc]{2,4}+b/ |
| 2728 |
|
X\P |
| 2729 |
|
Xa\P |
| 2730 |
|
Xaa\P |
| 2731 |
|
Xaaa\P |
| 2732 |
|
Xaaaa\P |
| 2733 |
|
|
| 2734 |
|
/X[^a]{2,4}b/ |
| 2735 |
|
X\P |
| 2736 |
|
Xz\P |
| 2737 |
|
Xzz\P |
| 2738 |
|
Xzzz\P |
| 2739 |
|
Xzzzz\P |
| 2740 |
|
|
| 2741 |
|
/X[^a]{2,4}?b/ |
| 2742 |
|
X\P |
| 2743 |
|
Xz\P |
| 2744 |
|
Xzz\P |
| 2745 |
|
Xzzz\P |
| 2746 |
|
Xzzzz\P |
| 2747 |
|
|
| 2748 |
|
/X[^a]{2,4}+b/ |
| 2749 |
|
X\P |
| 2750 |
|
Xz\P |
| 2751 |
|
Xzz\P |
| 2752 |
|
Xzzz\P |
| 2753 |
|
Xzzzz\P |
| 2754 |
|
|
| 2755 |
|
/(Y)X\1{2,4}b/ |
| 2756 |
|
YX\P |
| 2757 |
|
YXY\P |
| 2758 |
|
YXYY\P |
| 2759 |
|
YXYYY\P |
| 2760 |
|
YXYYYY\P |
| 2761 |
|
|
| 2762 |
|
/(Y)X\1{2,4}?b/ |
| 2763 |
|
YX\P |
| 2764 |
|
YXY\P |
| 2765 |
|
YXYY\P |
| 2766 |
|
YXYYY\P |
| 2767 |
|
YXYYYY\P |
| 2768 |
|
|
| 2769 |
|
/(Y)X\1{2,4}+b/ |
| 2770 |
|
YX\P |
| 2771 |
|
YXY\P |
| 2772 |
|
YXYY\P |
| 2773 |
|
YXYYY\P |
| 2774 |
|
YXYYYY\P |
| 2775 |
|
|
| 2776 |
|
/\++\KZ|\d+X|9+Y/ |
| 2777 |
|
++++123999\P |
| 2778 |
|
++++123999Y\P |
| 2779 |
|
++++Z1234\P |
| 2780 |
|
|
| 2781 |
|
/Z(*F)/ |
| 2782 |
|
Z\P |
| 2783 |
|
ZA\P |
| 2784 |
|
|
| 2785 |
|
/Z(?!)/ |
| 2786 |
|
Z\P |
| 2787 |
|
ZA\P |
| 2788 |
|
|
| 2789 |
|
/dog(sbody)?/ |
| 2790 |
|
dogs\P |
| 2791 |
|
dogs\P\P |
| 2792 |
|
|
| 2793 |
|
/dog(sbody)??/ |
| 2794 |
|
dogs\P |
| 2795 |
|
dogs\P\P |
| 2796 |
|
|
| 2797 |
|
/dog|dogsbody/ |
| 2798 |
|
dogs\P |
| 2799 |
|
dogs\P\P |
| 2800 |
|
|
| 2801 |
|
/dogsbody|dog/ |
| 2802 |
|
dogs\P |
| 2803 |
|
dogs\P\P |
| 2804 |
|
|
| 2805 |
|
/\bthe cat\b/ |
| 2806 |
|
the cat\P |
| 2807 |
|
the cat\P\P |
| 2808 |
|
|
| 2809 |
|
/abc/ |
| 2810 |
|
abc\P |
| 2811 |
|
abc\P\P |
| 2812 |
|
|
| 2813 |
|
/\w+A/P |
| 2814 |
|
CDAAAAB |
| 2815 |
|
|
| 2816 |
|
/\w+A/PU |
| 2817 |
|
CDAAAAB |
| 2818 |
|
|
| 2819 |
|
/abc\K123/ |
| 2820 |
|
xyzabc123pqr |
| 2821 |
|
xyzabc12\P |
| 2822 |
|
xyzabc12\P\P |
| 2823 |
|
|
| 2824 |
|
/(?<=abc)123/ |
| 2825 |
|
xyzabc123pqr |
| 2826 |
|
xyzabc12\P |
| 2827 |
|
xyzabc12\P\P |
| 2828 |
|
|
| 2829 |
|
/\babc\b/ |
| 2830 |
|
+++abc+++ |
| 2831 |
|
+++ab\P |
| 2832 |
|
+++ab\P\P |
| 2833 |
|
|
| 2834 |
|
/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ |
| 2835 |
|
|
| 2836 |
|
/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ |
| 2837 |
|
|
| 2838 |
|
/(ab)(x(y)z(cd(*ACCEPT)))pq/BZ |
| 2839 |
|
|
| 2840 |
|
/abc\K/+ |
| 2841 |
|
abcdef |
| 2842 |
|
abcdef\N\N |
| 2843 |
|
xyzabcdef\N\N |
| 2844 |
|
** Failers |
| 2845 |
|
abcdef\N |
| 2846 |
|
xyzabcdef\N |
| 2847 |
|
|
| 2848 |
|
/^(?:(?=abc)|abc\K)/+ |
| 2849 |
|
abcdef |
| 2850 |
|
abcdef\N\N |
| 2851 |
|
** Failers |
| 2852 |
|
abcdef\N |
| 2853 |
|
|
| 2854 |
|
/a?b?/+ |
| 2855 |
|
xyz |
| 2856 |
|
xyzabc |
| 2857 |
|
xyzabc\N |
| 2858 |
|
xyzabc\N\N |
| 2859 |
|
xyz\N\N |
| 2860 |
|
** Failers |
| 2861 |
|
xyz\N |
| 2862 |
|
|
| 2863 |
|
/^a?b?/+ |
| 2864 |
|
xyz |
| 2865 |
|
xyzabc |
| 2866 |
|
** Failers |
| 2867 |
|
xyzabc\N |
| 2868 |
|
xyzabc\N\N |
| 2869 |
|
xyz\N\N |
| 2870 |
|
xyz\N |
| 2871 |
|
|
| 2872 |
|
/^(?<name>a|b\g<name>c)/ |
| 2873 |
|
aaaa |
| 2874 |
|
bacxxx |
| 2875 |
|
bbaccxxx |
| 2876 |
|
bbbacccxx |
| 2877 |
|
|
| 2878 |
|
/^(?<name>a|b\g'name'c)/ |
| 2879 |
|
aaaa |
| 2880 |
|
bacxxx |
| 2881 |
|
bbaccxxx |
| 2882 |
|
bbbacccxx |
| 2883 |
|
|
| 2884 |
|
/^(a|b\g<1>c)/ |
| 2885 |
|
aaaa |
| 2886 |
|
bacxxx |
| 2887 |
|
bbaccxxx |
| 2888 |
|
bbbacccxx |
| 2889 |
|
|
| 2890 |
|
/^(a|b\g'1'c)/ |
| 2891 |
|
aaaa |
| 2892 |
|
bacxxx |
| 2893 |
|
bbaccxxx |
| 2894 |
|
bbbacccxx |
| 2895 |
|
|
| 2896 |
|
/^(a|b\g'-1'c)/ |
| 2897 |
|
aaaa |
| 2898 |
|
bacxxx |
| 2899 |
|
bbaccxxx |
| 2900 |
|
bbbacccxx |
| 2901 |
|
|
| 2902 |
|
/(^(a|b\g<-1>c))/ |
| 2903 |
|
aaaa |
| 2904 |
|
bacxxx |
| 2905 |
|
bbaccxxx |
| 2906 |
|
bbbacccxx |
| 2907 |
|
|
| 2908 |
|
/(?-i:\g<name>)(?i:(?<name>a))/ |
| 2909 |
|
XaaX |
| 2910 |
|
XAAX |
| 2911 |
|
|
| 2912 |
|
/(?i:\g<name>)(?-i:(?<name>a))/ |
| 2913 |
|
XaaX |
| 2914 |
|
** Failers |
| 2915 |
|
XAAX |
| 2916 |
|
|
| 2917 |
|
/(?-i:\g<+1>)(?i:(a))/ |
| 2918 |
|
XaaX |
| 2919 |
|
XAAX |
| 2920 |
|
|
| 2921 |
|
/(?=(?<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>\})\}))\{/ |
| 2922 |
|
|
| 2923 |
|
/(?<n>a|b|c)\g<n>*/ |
| 2924 |
|
abc |
| 2925 |
|
accccbbb |
| 2926 |
|
|
| 2927 |
|
/^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/ |
| 2928 |
|
XYabcdY |
| 2929 |
|
|
| 2930 |
|
/(?<=b(?1)|zzz)(a)/ |
| 2931 |
|
xbaax |
| 2932 |
|
xzzzax |
| 2933 |
|
|
| 2934 |
|
/(a)(?<=b\1)/ |
| 2935 |
|
|
| 2936 |
|
/(a)(?<=b+(?1))/ |
| 2937 |
|
|
| 2938 |
|
/(a+)(?<=b(?1))/ |
| 2939 |
|
|
| 2940 |
|
/(a(?<=b(?1)))/ |
| 2941 |
|
|
| 2942 |
|
/(?<=b(?1))xyz/ |
| 2943 |
|
|
| 2944 |
|
/(?<=b(?1))xyz(b+)pqrstuvew/ |
| 2945 |
|
|
| 2946 |
|
/(a|bc)\1/SI |
| 2947 |
|
|
| 2948 |
|
/(a|bc)\1{2,3}/SI |
| 2949 |
|
|
| 2950 |
|
/(a|bc)(?1)/SI |
| 2951 |
|
|
| 2952 |
|
/(a|b\1)(a|b\1)/SI |
| 2953 |
|
|
| 2954 |
|
/(a|b\1){2}/SI |
| 2955 |
|
|
| 2956 |
|
/(a|bbbb\1)(a|bbbb\1)/SI |
| 2957 |
|
|
| 2958 |
|
/(a|bbbb\1){2}/SI |
| 2959 |
|
|
| 2960 |
|
/^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 |
| 2961 |
|
|
| 2962 |
|
/ (?: [\040\t] | \( |
| 2963 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 2964 |
|
\) )* # optional leading comment |
| 2965 |
|
(?: (?: |
| 2966 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 2967 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 2968 |
|
| |
| 2969 |
|
" (?: # opening quote... |
| 2970 |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 2971 |
|
| # or |
| 2972 |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
| 2973 |
|
)* " # closing quote |
| 2974 |
|
) # initial word |
| 2975 |
|
(?: (?: [\040\t] | \( |
| 2976 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 2977 |
|
\) )* \. (?: [\040\t] | \( |
| 2978 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 2979 |
|
\) )* (?: |
| 2980 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 2981 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 2982 |
|
| |
| 2983 |
|
" (?: # opening quote... |
| 2984 |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 2985 |
|
| # or |
| 2986 |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
| 2987 |
|
)* " # closing quote |
| 2988 |
|
) )* # further okay, if led by a period |
| 2989 |
|
(?: [\040\t] | \( |
| 2990 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 2991 |
|
\) )* @ (?: [\040\t] | \( |
| 2992 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 2993 |
|
\) )* (?: |
| 2994 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 2995 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 2996 |
|
| \[ # [ |
| 2997 |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 2998 |
|
\] # ] |
| 2999 |
|
) # initial subdomain |
| 3000 |
|
(?: # |
| 3001 |
|
(?: [\040\t] | \( |
| 3002 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3003 |
|
\) )* \. # if led by a period... |
| 3004 |
|
(?: [\040\t] | \( |
| 3005 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3006 |
|
\) )* (?: |
| 3007 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3008 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3009 |
|
| \[ # [ |
| 3010 |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 3011 |
|
\] # ] |
| 3012 |
|
) # ...further okay |
| 3013 |
|
)* |
| 3014 |
|
# address |
| 3015 |
|
| # or |
| 3016 |
|
(?: |
| 3017 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3018 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3019 |
|
| |
| 3020 |
|
" (?: # opening quote... |
| 3021 |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 3022 |
|
| # or |
| 3023 |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
| 3024 |
|
)* " # closing quote |
| 3025 |
|
) # one word, optionally followed by.... |
| 3026 |
|
(?: |
| 3027 |
|
[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or... |
| 3028 |
|
\( |
| 3029 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3030 |
|
\) | # comments, or... |
| 3031 |
|
|
| 3032 |
|
" (?: # opening quote... |
| 3033 |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 3034 |
|
| # or |
| 3035 |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
| 3036 |
|
)* " # closing quote |
| 3037 |
|
# quoted strings |
| 3038 |
|
)* |
| 3039 |
|
< (?: [\040\t] | \( |
| 3040 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3041 |
|
\) )* # leading < |
| 3042 |
|
(?: @ (?: [\040\t] | \( |
| 3043 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3044 |
|
\) )* (?: |
| 3045 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3046 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3047 |
|
| \[ # [ |
| 3048 |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 3049 |
|
\] # ] |
| 3050 |
|
) # initial subdomain |
| 3051 |
|
(?: # |
| 3052 |
|
(?: [\040\t] | \( |
| 3053 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3054 |
|
\) )* \. # if led by a period... |
| 3055 |
|
(?: [\040\t] | \( |
| 3056 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3057 |
|
\) )* (?: |
| 3058 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3059 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3060 |
|
| \[ # [ |
| 3061 |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 3062 |
|
\] # ] |
| 3063 |
|
) # ...further okay |
| 3064 |
|
)* |
| 3065 |
|
|
| 3066 |
|
(?: (?: [\040\t] | \( |
| 3067 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3068 |
|
\) )* , (?: [\040\t] | \( |
| 3069 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3070 |
|
\) )* @ (?: [\040\t] | \( |
| 3071 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3072 |
|
\) )* (?: |
| 3073 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3074 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3075 |
|
| \[ # [ |
| 3076 |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 3077 |
|
\] # ] |
| 3078 |
|
) # initial subdomain |
| 3079 |
|
(?: # |
| 3080 |
|
(?: [\040\t] | \( |
| 3081 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3082 |
|
\) )* \. # if led by a period... |
| 3083 |
|
(?: [\040\t] | \( |
| 3084 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3085 |
|
\) )* (?: |
| 3086 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3087 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3088 |
|
| \[ # [ |
| 3089 |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 3090 |
|
\] # ] |
| 3091 |
|
) # ...further okay |
| 3092 |
|
)* |
| 3093 |
|
)* # further okay, if led by comma |
| 3094 |
|
: # closing colon |
| 3095 |
|
(?: [\040\t] | \( |
| 3096 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3097 |
|
\) )* )? # optional route |
| 3098 |
|
(?: |
| 3099 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3100 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3101 |
|
| |
| 3102 |
|
" (?: # opening quote... |
| 3103 |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 3104 |
|
| # or |
| 3105 |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
| 3106 |
|
)* " # closing quote |
| 3107 |
|
) # initial word |
| 3108 |
|
(?: (?: [\040\t] | \( |
| 3109 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3110 |
|
\) )* \. (?: [\040\t] | \( |
| 3111 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3112 |
|
\) )* (?: |
| 3113 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3114 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3115 |
|
| |
| 3116 |
|
" (?: # opening quote... |
| 3117 |
|
[^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 3118 |
|
| # or |
| 3119 |
|
\\ [^\x80-\xff] # Escaped something (something != CR) |
| 3120 |
|
)* " # closing quote |
| 3121 |
|
) )* # further okay, if led by a period |
| 3122 |
|
(?: [\040\t] | \( |
| 3123 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3124 |
|
\) )* @ (?: [\040\t] | \( |
| 3125 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3126 |
|
\) )* (?: |
| 3127 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3128 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3129 |
|
| \[ # [ |
| 3130 |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 3131 |
|
\] # ] |
| 3132 |
|
) # initial subdomain |
| 3133 |
|
(?: # |
| 3134 |
|
(?: [\040\t] | \( |
| 3135 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3136 |
|
\) )* \. # if led by a period... |
| 3137 |
|
(?: [\040\t] | \( |
| 3138 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3139 |
|
\) )* (?: |
| 3140 |
|
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 3141 |
|
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 3142 |
|
| \[ # [ |
| 3143 |
|
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 3144 |
|
\] # ] |
| 3145 |
|
) # ...further okay |
| 3146 |
|
)* |
| 3147 |
|
# address spec |
| 3148 |
|
(?: [\040\t] | \( |
| 3149 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3150 |
|
\) )* > # trailing > |
| 3151 |
|
# name and address |
| 3152 |
|
) (?: [\040\t] | \( |
| 3153 |
|
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 3154 |
|
\) )* # optional trailing comment |
| 3155 |
|
/xSI |
| 3156 |
|
|
| 3157 |
|
/<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 |
| 3158 |
|
|
| 3159 |
|
"(?>.*/)foo"SI |
| 3160 |
|
|
| 3161 |
|
/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /xSI |
| 3162 |
|
|
| 3163 |
|
/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI |
| 3164 |
|
|
| 3165 |
|
/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI |
| 3166 |
|
|
| 3167 |
|
/<a[\s]+href[\s]*=[\s]* # find <a href= |
| 3168 |
|
([\"\'])? # find single or double quote |
| 3169 |
|
(?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching |
| 3170 |
|
# quote, otherwise match up to next space |
| 3171 |
|
/isxSI |
| 3172 |
|
|
| 3173 |
|
/^(?!:) # colon disallowed at start |
| 3174 |
|
(?: # start of item |
| 3175 |
|
(?: [0-9a-f]{1,4} | # 1-4 hex digits or |
| 3176 |
|
(?(1)0 | () ) ) # if null previously matched, fail; else null |
| 3177 |
|
: # followed by colon |
| 3178 |
|
){1,7} # end item; 1-7 of them required |
| 3179 |
|
[0-9a-f]{1,4} $ # final hex number at end of string |
| 3180 |
|
(?(1)|.) # check that there was an empty component |
| 3181 |
|
/xiIS |
| 3182 |
|
|
| 3183 |
|
/(?|(?<a>A)|(?<a>B))/I |
| 3184 |
|
AB\Ca |
| 3185 |
|
BA\Ca |
| 3186 |
|
|
| 3187 |
|
/(?|(?<a>A)|(?<b>B))/ |
| 3188 |
|
|
| 3189 |
|
/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) | |
| 3190 |
|
b(?<quote> (?<apostrophe>')|(?<realquote>")) ) |
| 3191 |
|
(?('quote')[a-z]+|[0-9]+)/JIx |
| 3192 |
|
a"aaaaa |
| 3193 |
|
b"aaaaa |
| 3194 |
|
** Failers |
| 3195 |
|
b"11111 |
| 3196 |
|
a"11111 |
| 3197 |
|
|
| 3198 |
|
/^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx |
| 3199 |
|
abcdX |
| 3200 |
|
eX |
| 3201 |
|
** Failers |
| 3202 |
|
abcdY |
| 3203 |
|
ey |
| 3204 |
|
|
| 3205 |
|
/(?<A>a) (b)(c) (?<A>d (?(R&A)$ | (?4)) )/JDZx |
| 3206 |
|
abcdd |
| 3207 |
|
** Failers |
| 3208 |
|
abcdde |
| 3209 |
|
|
| 3210 |
|
/abcd*/ |
| 3211 |
|
xxxxabcd\P |
| 3212 |
|
xxxxabcd\P\P |
| 3213 |
|
|
| 3214 |
|
/abcd*/i |
| 3215 |
|
xxxxabcd\P |
| 3216 |
|
xxxxabcd\P\P |
| 3217 |
|
XXXXABCD\P |
| 3218 |
|
XXXXABCD\P\P |
| 3219 |
|
|
| 3220 |
|
/abc\d*/ |
| 3221 |
|
xxxxabc1\P |
| 3222 |
|
xxxxabc1\P\P |
| 3223 |
|
|
| 3224 |
|
/(a)bc\1*/ |
| 3225 |
|
xxxxabca\P |
| 3226 |
|
xxxxabca\P\P |
| 3227 |
|
|
| 3228 |
|
/abc[de]*/ |
| 3229 |
|
xxxxabcde\P |
| 3230 |
|
xxxxabcde\P\P |
| 3231 |
|
|
| 3232 |
|
/-- This is not in the Perl >= 5.10 test because Perl seems currently to be |
| 3233 |
|
broken and not behaving as specified in that it *does* bumpalong after |
| 3234 |
|
hitting (*COMMIT). --/ |
| 3235 |
|
|
| 3236 |
|
/(?1)(A(*COMMIT)|B)D/ |
| 3237 |
|
ABD |
| 3238 |
|
XABD |
| 3239 |
|
BAD |
| 3240 |
|
ABXABD |
| 3241 |
|
** Failers |
| 3242 |
|
ABX |
| 3243 |
|
BAXBAD |
| 3244 |
|
|
| 3245 |
|
/(\3)(\1)(a)/<JS> |
| 3246 |
|
cat |
| 3247 |
|
|
| 3248 |
|
/(\3)(\1)(a)/SI<JS> |
| 3249 |
|
cat |
| 3250 |
|
|
| 3251 |
|
/(\3)(\1)(a)/SI |
| 3252 |
|
cat |
| 3253 |
|
|
| 3254 |
|
/i(?(DEFINE)(?<s>a))/SI |
| 3255 |
|
i |
| 3256 |
|
|
| 3257 |
|
/()i(?(1)a)/SI |
| 3258 |
|
ia |
| 3259 |
|
|
| 3260 |
|
/(?i)a(?-i)b|c/BZ |
| 3261 |
|
XabX |
| 3262 |
|
XAbX |
| 3263 |
|
CcC |
| 3264 |
|
** Failers |
| 3265 |
|
XABX |
| 3266 |
|
|
| 3267 |
|
/(?i)a(?s)b|c/BZ |
| 3268 |
|
|
| 3269 |
|
/(?i)a(?s-i)b|c/BZ |
| 3270 |
|
|
| 3271 |
|
/^(ab(c\1)d|x){2}$/BZ |
| 3272 |
|
xabcxd |
| 3273 |
|
|
| 3274 |
|
/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ |
| 3275 |
|
|
| 3276 |
|
/^(?&t)*(?(DEFINE)(?<t>.))$/BZ |
| 3277 |
|
|
| 3278 |
|
/ -- The first four of these are not in the Perl >= 5.10 test because Perl |
| 3279 |
|
documents that the use of \K in assertions is "not well defined". The |
| 3280 |
|
last is here because Perl gives the match as "b" rather than "ab". I |
| 3281 |
|
believe this to be a Perl bug. --/ |
| 3282 |
|
|
| 3283 |
|
/(?=a\Kb)ab/ |
| 3284 |
|
ab |
| 3285 |
|
|
| 3286 |
|
/(?!a\Kb)ac/ |
| 3287 |
|
ac |
| 3288 |
|
|
| 3289 |
|
/^abc(?<=b\Kc)d/ |
| 3290 |
|
abcd |
| 3291 |
|
|
| 3292 |
|
/^abc(?<!b\Kq)d/ |
| 3293 |
|
abcd |
| 3294 |
|
|
| 3295 |
|
/(?>a\Kb)z|(ab)/ |
| 3296 |
|
ab |
| 3297 |
|
|
| 3298 |
|
/----------------------/ |
| 3299 |
|
|
| 3300 |
|
/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/ |
| 3301 |
|
|
| 3302 |
|
/abc(*MARK:)pqr/ |
| 3303 |
|
|
| 3304 |
|
/abc(*:)pqr/ |
| 3305 |
|
|
| 3306 |
|
/abc(*FAIL:123)xyz/ |
| 3307 |
|
|
| 3308 |
|
/--- This should, and does, fail. In Perl, it does not, which I think is a |
| 3309 |
|
bug because replacing the B in the pattern by (B|D) does make it fail. ---/ |
| 3310 |
|
|
| 3311 |
|
/A(*COMMIT)B/+K |
| 3312 |
|
ACABX |
| 3313 |
|
|
| 3314 |
|
/--- These should be different, but in Perl 5.11 are not, which I think |
| 3315 |
|
is a bug in Perl. ---/ |
| 3316 |
|
|
| 3317 |
|
/A(*THEN)B|A(*THEN)C/K |
| 3318 |
|
AC |
| 3319 |
|
|
| 3320 |
|
/A(*PRUNE)B|A(*PRUNE)C/K |
| 3321 |
|
AC |
| 3322 |
|
|
| 3323 |
|
/--- A whole lot of tests of verbs with arguments are here rather than in test |
| 3324 |
|
11 because Perl doesn't seem to follow its specification entirely |
| 3325 |
|
correctly. ---/ |
| 3326 |
|
|
| 3327 |
|
/--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is |
| 3328 |
|
not clear how Perl defines "involved in the failure of the match". ---/ |
| 3329 |
|
|
| 3330 |
|
/^(A(*THEN:A)B|C(*THEN:B)D)/K |
| 3331 |
|
AB |
| 3332 |
|
CD |
| 3333 |
|
** Failers |
| 3334 |
|
AC |
| 3335 |
|
CB |
| 3336 |
|
|
| 3337 |
|
/--- Check the use of names for success and failure. PCRE doesn't show these |
| 3338 |
|
names for success, though Perl does, contrary to its spec. ---/ |
| 3339 |
|
|
| 3340 |
|
/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K |
| 3341 |
|
AB |
| 3342 |
|
CD |
| 3343 |
|
** Failers |
| 3344 |
|
AC |
| 3345 |
|
CB |
| 3346 |
|
|
| 3347 |
|
/--- An empty name does not pass back an empty string. It is the same as if no |
| 3348 |
|
name were given. ---/ |
| 3349 |
|
|
| 3350 |
|
/^(A(*PRUNE:)B|C(*PRUNE:B)D)/K |
| 3351 |
|
AB |
| 3352 |
|
CD |
| 3353 |
|
|
| 3354 |
|
/--- PRUNE goes to next bumpalong; COMMIT does not. ---/ |
| 3355 |
|
|
| 3356 |
|
/A(*PRUNE:A)B/K |
| 3357 |
|
ACAB |
| 3358 |
|
|
| 3359 |
|
/(*MARK:A)(*PRUNE:B)(C|X)/KS |
| 3360 |
|
C |
| 3361 |
|
D |
| 3362 |
|
|
| 3363 |
|
/(*MARK:A)(*PRUNE:B)(C|X)/KSS |
| 3364 |
|
C |
| 3365 |
|
D |
| 3366 |
|
|
| 3367 |
|
/(*MARK:A)(*THEN:B)(C|X)/KS |
| 3368 |
|
C |
| 3369 |
|
D |
| 3370 |
|
|
| 3371 |
|
/(*MARK:A)(*THEN:B)(C|X)/KSS |
| 3372 |
|
C |
| 3373 |
|
D |
| 3374 |
|
|
| 3375 |
|
/--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/ |
| 3376 |
|
|
| 3377 |
|
/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK |
| 3378 |
|
AAAC |
| 3379 |
|
|
| 3380 |
|
/--- Same --/ |
| 3381 |
|
|
| 3382 |
|
/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK |
| 3383 |
|
AAAC |
| 3384 |
|
|
| 3385 |
|
/--- This should fail; the SKIP advances by one, but when we get to AC, the |
| 3386 |
|
PRUNE kills it. ---/ |
| 3387 |
|
|
| 3388 |
|
/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK |
| 3389 |
|
AAAC |
| 3390 |
|
|
| 3391 |
|
/A(*:A)A+(*SKIP)(B|Z) | AC/xK |
| 3392 |
|
AAAC |
| 3393 |
|
|
| 3394 |
|
/--- This should fail, as a null name is the same as no name ---/ |
| 3395 |
|
|
| 3396 |
|
/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK |
| 3397 |
|
AAAC |
| 3398 |
|
|
| 3399 |
|
/--- This fails in PCRE, and I think that is in accordance with Perl's |
| 3400 |
|
documentation, though in Perl it succeeds. ---/ |
| 3401 |
|
|
| 3402 |
|
/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK |
| 3403 |
|
AAAC |
| 3404 |
|
|
| 3405 |
|
/--- Mark names can be duplicated ---/ |
| 3406 |
|
|
| 3407 |
|
/A(*:A)B|X(*:A)Y/K |
| 3408 |
|
AABC |
| 3409 |
|
XXYZ |
| 3410 |
|
|
| 3411 |
|
/^A(*:A)B|^X(*:A)Y/K |
| 3412 |
|
** Failers |
| 3413 |
|
XAQQ |
| 3414 |
|
|
| 3415 |
|
/--- A check on what happens after hitting a mark and them bumping along to |
| 3416 |
|
something that does not even start. Perl reports tags after the failures here, |
| 3417 |
|
though it does not when the individual letters are made into something |
| 3418 |
|
more complicated. ---/ |
| 3419 |
|
|
| 3420 |
|
/A(*:A)B|XX(*:B)Y/K |
| 3421 |
|
AABC |
| 3422 |
|
XXYZ |
| 3423 |
|
** Failers |
| 3424 |
|
XAQQ |
| 3425 |
|
XAQQXZZ |
| 3426 |
|
AXQQQ |
| 3427 |
|
AXXQQQ |
| 3428 |
|
|
| 3429 |
|
/--- COMMIT at the start of a pattern should be the same as an anchor. Perl |
| 3430 |
|
optimizations defeat this. So does the PCRE optimization unless we disable it |
| 3431 |
|
with \Y. ---/ |
| 3432 |
|
|
| 3433 |
|
/(*COMMIT)ABC/ |
| 3434 |
|
ABCDEFG |
| 3435 |
|
** Failers |
| 3436 |
|
DEFGABC\Y |
| 3437 |
|
|
| 3438 |
|
/--- Repeat some tests with added studying. ---/ |
| 3439 |
|
|
| 3440 |
|
/A(*COMMIT)B/+KS |
| 3441 |
|
ACABX |
| 3442 |
|
|
| 3443 |
|
/A(*THEN)B|A(*THEN)C/KS |
| 3444 |
|
AC |
| 3445 |
|
|
| 3446 |
|
/A(*PRUNE)B|A(*PRUNE)C/KS |
| 3447 |
|
AC |
| 3448 |
|
|
| 3449 |
|
/^(A(*THEN:A)B|C(*THEN:B)D)/KS |
| 3450 |
|
AB |
| 3451 |
|
CD |
| 3452 |
|
** Failers |
| 3453 |
|
AC |
| 3454 |
|
CB |
| 3455 |
|
|
| 3456 |
|
/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS |
| 3457 |
|
AB |
| 3458 |
|
CD |
| 3459 |
|
** Failers |
| 3460 |
|
AC |
| 3461 |
|
CB |
| 3462 |
|
|
| 3463 |
|
/^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS |
| 3464 |
|
AB |
| 3465 |
|
CD |
| 3466 |
|
|
| 3467 |
|
/A(*PRUNE:A)B/KS |
| 3468 |
|
ACAB |
| 3469 |
|
|
| 3470 |
|
/(*MARK:A)(*PRUNE:B)(C|X)/KS |
| 3471 |
|
C |
| 3472 |
|
D |
| 3473 |
|
|
| 3474 |
|
/(*MARK:A)(*THEN:B)(C|X)/KS |
| 3475 |
|
C |
| 3476 |
|
D |
| 3477 |
|
|
| 3478 |
|
/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS |
| 3479 |
|
AAAC |
| 3480 |
|
|
| 3481 |
|
/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS |
| 3482 |
|
AAAC |
| 3483 |
|
|
| 3484 |
|
/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS |
| 3485 |
|
AAAC |
| 3486 |
|
|
| 3487 |
|
/A(*:A)A+(*SKIP)(B|Z) | AC/xKS |
| 3488 |
|
AAAC |
| 3489 |
|
|
| 3490 |
|
/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS |
| 3491 |
|
AAAC |
| 3492 |
|
|
| 3493 |
|
/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS |
| 3494 |
|
AAAC |
| 3495 |
|
|
| 3496 |
|
/A(*:A)B|XX(*:B)Y/KS |
| 3497 |
|
AABC |
| 3498 |
|
XXYZ |
| 3499 |
|
** Failers |
| 3500 |
|
XAQQ |
| 3501 |
|
XAQQXZZ |
| 3502 |
|
AXQQQ |
| 3503 |
|
AXXQQQ |
| 3504 |
|
|
| 3505 |
|
/(*COMMIT)ABC/ |
| 3506 |
|
ABCDEFG |
| 3507 |
|
** Failers |
| 3508 |
|
DEFGABC\Y |
| 3509 |
|
|
| 3510 |
|
/^(ab (c+(*THEN)cd) | xyz)/x |
| 3511 |
|
abcccd |
| 3512 |
|
|
| 3513 |
|
/^(ab (c+(*PRUNE)cd) | xyz)/x |
| 3514 |
|
abcccd |
| 3515 |
|
|
| 3516 |
|
/^(ab (c+(*FAIL)cd) | xyz)/x |
| 3517 |
|
abcccd |
| 3518 |
|
|
| 3519 |
|
/--- Perl 5.11 gets some of these wrong ---/ |
| 3520 |
|
|
| 3521 |
|
/(?>.(*ACCEPT))*?5/ |
| 3522 |
|
abcde |
| 3523 |
|
|
| 3524 |
|
/(.(*ACCEPT))*?5/ |
| 3525 |
|
abcde |
| 3526 |
|
|
| 3527 |
|
/(.(*ACCEPT))5/ |
| 3528 |
|
abcde |
| 3529 |
|
|
| 3530 |
|
/(.(*ACCEPT))*5/ |
| 3531 |
|
abcde |
| 3532 |
|
|
| 3533 |
|
/A\NB./BZ |
| 3534 |
|
ACBD |
| 3535 |
|
*** Failers |
| 3536 |
|
A\nB |
| 3537 |
|
ACB\n |
| 3538 |
|
|
| 3539 |
|
/A\NB./sBZ |
| 3540 |
|
ACBD |
| 3541 |
|
ACB\n |
| 3542 |
|
*** Failers |
| 3543 |
|
A\nB |
| 3544 |
|
|
| 3545 |
|
/A\NB/<crlf> |
| 3546 |
|
A\nB |
| 3547 |
|
A\rB |
| 3548 |
|
** Failers |
| 3549 |
|
A\r\nB |
| 3550 |
|
|
| 3551 |
|
/\R+b/BZ |
| 3552 |
|
|
| 3553 |
|
/\R+\n/BZ |
| 3554 |
|
|
| 3555 |
|
/\R+\d/BZ |
| 3556 |
|
|
| 3557 |
|
/\d*\R/BZ |
| 3558 |
|
|
| 3559 |
|
/\s*\R/BZ |
| 3560 |
|
|
| 3561 |
|
/-- Perl treats this one differently, not failing the second string. I believe |
| 3562 |
|
that is a bug in Perl. --/ |
| 3563 |
|
|
| 3564 |
|
/^((abc|abcx)(*THEN)y|abcd)/ |
| 3565 |
|
abcd |
| 3566 |
|
*** Failers |
| 3567 |
|
abcxy |
| 3568 |
|
|
| 3569 |
|
/(?<=abc)def/ |
| 3570 |
|
abc\P\P |
| 3571 |
|
|
| 3572 |
|
/abc$/ |
| 3573 |
|
abc |
| 3574 |
|
abc\P |
| 3575 |
|
abc\P\P |
| 3576 |
|
|
| 3577 |
|
/abc$/m |
| 3578 |
|
abc |
| 3579 |
|
abc\n |
| 3580 |
|
abc\P\P |
| 3581 |
|
abc\n\P\P |
| 3582 |
|
abc\P |
| 3583 |
|
abc\n\P |
| 3584 |
|
|
| 3585 |
|
/abc\z/ |
| 3586 |
|
abc |
| 3587 |
|
abc\P |
| 3588 |
|
abc\P\P |
| 3589 |
|
|
| 3590 |
|
/abc\Z/ |
| 3591 |
|
abc |
| 3592 |
|
abc\P |
| 3593 |
|
abc\P\P |
| 3594 |
|
|
| 3595 |
|
/abc\b/ |
| 3596 |
|
abc |
| 3597 |
|
abc\P |
| 3598 |
|
abc\P\P |
| 3599 |
|
|
| 3600 |
|
/abc\B/ |
| 3601 |
|
abc |
| 3602 |
|
abc\P |
| 3603 |
|
abc\P\P |
| 3604 |
|
|
| 3605 |
|
/.+/ |
| 3606 |
|
abc\>0 |
| 3607 |
|
abc\>1 |
| 3608 |
|
abc\>2 |
| 3609 |
|
abc\>3 |
| 3610 |
|
abc\>4 |
| 3611 |
|
abc\>-4 |
| 3612 |
|
|
| 3613 |
|
/^\cģ/ |
| 3614 |
|
|
| 3615 |
|
/(?P<abn>(?P=abn)xxx)/BZ |
| 3616 |
|
|
| 3617 |
|
/(a\1z)/BZ |
| 3618 |
|
|
| 3619 |
|
/(?P<abn>(?P=abn)(?<badstufxxx)/BZ |
| 3620 |
|
|
| 3621 |
|
/(?P<abn>(?P=axn)xxx)/BZ |
| 3622 |
|
|
| 3623 |
|
/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ |
| 3624 |
|
|
| 3625 |
|
/-- These tests are here because Perl gets the first one wrong. --/ |
| 3626 |
|
|
| 3627 |
|
/(\R*)(.)/s |
| 3628 |
|
\r\n |
| 3629 |
|
\r\r\n\n\r |
| 3630 |
|
\r\r\n\n\r\n |
| 3631 |
|
|
| 3632 |
|
/(\R)*(.)/s |
| 3633 |
|
\r\n |
| 3634 |
|
\r\r\n\n\r |
| 3635 |
|
\r\r\n\n\r\n |
| 3636 |
|
|
| 3637 |
|
/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s |
| 3638 |
|
\r\n |
| 3639 |
|
\r\r\n\n\r |
| 3640 |
|
\r\r\n\n\r\n |
| 3641 |
|
|
| 3642 |
|
/-- --/ |
| 3643 |
|
|
| 3644 |
|
/^abc$/BZ |
| 3645 |
|
|
| 3646 |
|
/^abc$/BZm |
| 3647 |
|
|
| 3648 |
|
/^(a)*+(\w)/S |
| 3649 |
|
aaaaX |
| 3650 |
|
** Failers |
| 3651 |
|
aaaa |
| 3652 |
|
|
| 3653 |
|
/^(?:a)*+(\w)/S |
| 3654 |
|
aaaaX |
| 3655 |
|
** Failers |
| 3656 |
|
aaaa |
| 3657 |
|
|
| 3658 |
|
/(a)++1234/SDZ |
| 3659 |
|
|
| 3660 |
|
/([abc])++1234/SI |
| 3661 |
|
|
| 3662 |
|
/(?<=(abc)+)X/ |
| 3663 |
|
|
| 3664 |
|
/(^ab)/I |
| 3665 |
|
|
| 3666 |
|
/(^ab)++/I |
| 3667 |
|
|
| 3668 |
|
/(^ab|^)+/I |
| 3669 |
|
|
| 3670 |
|
/(^ab|^)++/I |
| 3671 |
|
|
| 3672 |
|
/(?:^ab)/I |
| 3673 |
|
|
| 3674 |
|
/(?:^ab)++/I |
| 3675 |
|
|
| 3676 |
|
/(?:^ab|^)+/I |
| 3677 |
|
|
| 3678 |
|
/(?:^ab|^)++/I |
| 3679 |
|
|
| 3680 |
|
/(.*ab)/I |
| 3681 |
|
|
| 3682 |
|
/(.*ab)++/I |
| 3683 |
|
|
| 3684 |
|
/(.*ab|.*)+/I |
| 3685 |
|
|
| 3686 |
|
/(.*ab|.*)++/I |
| 3687 |
|
|
| 3688 |
|
/(?:.*ab)/I |
| 3689 |
|
|
| 3690 |
|
/(?:.*ab)++/I |
| 3691 |
|
|
| 3692 |
|
/(?:.*ab|.*)+/I |
| 3693 |
|
|
| 3694 |
|
/(?:.*ab|.*)++/I |
| 3695 |
|
|
| 3696 |
|
/(?=a)[bcd]/I |
| 3697 |
|
|
| 3698 |
|
/((?=a))[bcd]/I |
| 3699 |
|
|
| 3700 |
|
/((?=a))+[bcd]/I |
| 3701 |
|
|
| 3702 |
|
/((?=a))++[bcd]/I |
| 3703 |
|
|
| 3704 |
|
/(?=a+)[bcd]/iI |
| 3705 |
|
|
| 3706 |
|
/(?=a+?)[bcd]/iI |
| 3707 |
|
|
| 3708 |
|
/(?=a++)[bcd]/iI |
| 3709 |
|
|
| 3710 |
|
/(?=a{3})[bcd]/iI |
| 3711 |
|
|
| 3712 |
|
/(abc)\1+/S |
| 3713 |
|
|
| 3714 |
|
/-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/ |
| 3715 |
|
|
| 3716 |
|
/(?1)(?:(b(*ACCEPT))){0}/ |
| 3717 |
|
b |
| 3718 |
|
|
| 3719 |
|
/(?1)(?:(b(*ACCEPT))){0}c/ |
| 3720 |
|
bc |
| 3721 |
|
** Failers |
| 3722 |
|
b |
| 3723 |
|
|
| 3724 |
|
/(?1)(?:((*ACCEPT))){0}c/ |
| 3725 |
|
c |
| 3726 |
|
c\N |
| 3727 |
|
|
| 3728 |
|
/^.*?(?(?=a)a|b(*THEN)c)/ |
| 3729 |
|
ba |
| 3730 |
|
|
| 3731 |
|
/^.*?(?(?=a)a|bc)/ |
| 3732 |
|
ba |
| 3733 |
|
|
| 3734 |
|
/-- --/ |
| 3735 |
|
|
| 3736 |
|
/-- These studied versions are here because they are not Perl-compatible; the |
| 3737 |
|
studying means the mark is not seen. --/ |
| 3738 |
|
|
| 3739 |
|
/(*MARK:A)(*SKIP:B)(C|X)/KS |
| 3740 |
|
C |
| 3741 |
|
D |
| 3742 |
|
|
| 3743 |
|
/(*:A)A+(*SKIP:A)(B|Z)/KS |
| 3744 |
|
AAAC |
| 3745 |
|
|
| 3746 |
|
/-- --/ |
| 3747 |
|
|
| 3748 |
|
/-- End of testinput2 --/ |