2014-07-24 18:32:38 +02:00
|
|
|
|
# This set of tests is not Perl-compatible. It checks on special features
|
|
|
|
|
# of PCRE2's API, error diagnostics, and the compiled code of some patterns.
|
|
|
|
|
# It also checks the non-Perl syntax that PCRE2 supports (Python, .NET,
|
|
|
|
|
# Oniguruma). There are also some tests where PCRE2 and Perl differ,
|
|
|
|
|
# either because PCRE2 can't be compatible, or there is a possible Perl
|
|
|
|
|
# bug.
|
|
|
|
|
|
|
|
|
|
# NOTE: This is a non-UTF set of tests. When UTF support is needed, use
|
|
|
|
|
# test 5.
|
|
|
|
|
|
|
|
|
|
#forbid_utf
|
2015-09-08 19:01:17 +02:00
|
|
|
|
#newline_default lf any anycrlf
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2014-08-06 11:35:11 +02:00
|
|
|
|
# Test binary zeroes in the pattern
|
|
|
|
|
|
|
|
|
|
# /a\0B/ where 0 is a binary zero
|
|
|
|
|
/61 5c 00 62/B,hex
|
|
|
|
|
a\x{0}b
|
|
|
|
|
|
|
|
|
|
# /a0b/ where 0 is a binary zero
|
|
|
|
|
/61 00 62/B,hex
|
|
|
|
|
a\x{0}b
|
|
|
|
|
|
|
|
|
|
# /(?#B0C)DE/ where 0 is a binary zero
|
|
|
|
|
/28 3f 23 42 00 43 29 44 45/B,hex
|
|
|
|
|
DE
|
|
|
|
|
|
2014-07-24 18:32:38 +02:00
|
|
|
|
/(a)b|/I
|
|
|
|
|
|
|
|
|
|
/abc/I
|
|
|
|
|
abc
|
|
|
|
|
defabc
|
|
|
|
|
abc\=anchored
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
defabc\=anchored
|
|
|
|
|
ABC
|
|
|
|
|
|
|
|
|
|
/^abc/I
|
|
|
|
|
abc
|
|
|
|
|
abc\=anchored
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
defabc
|
|
|
|
|
defabc\=anchored
|
|
|
|
|
|
|
|
|
|
/a+bc/I
|
|
|
|
|
|
|
|
|
|
/a*bc/I
|
|
|
|
|
|
|
|
|
|
/a{3}bc/I
|
|
|
|
|
|
|
|
|
|
/(abc|a+z)/I
|
|
|
|
|
|
|
|
|
|
/^abc$/I
|
|
|
|
|
abc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
def\nabc
|
|
|
|
|
|
|
|
|
|
/ab\idef/
|
|
|
|
|
|
|
|
|
|
/(?X)ab\idef/
|
|
|
|
|
|
|
|
|
|
/x{5,4}/
|
|
|
|
|
|
|
|
|
|
/z{65536}/
|
|
|
|
|
|
|
|
|
|
/[abcd/
|
|
|
|
|
|
|
|
|
|
/[\B]/B
|
|
|
|
|
|
|
|
|
|
/[\R]/B
|
|
|
|
|
|
|
|
|
|
/[\X]/B
|
|
|
|
|
|
|
|
|
|
/[z-a]/
|
|
|
|
|
|
|
|
|
|
/^*/
|
|
|
|
|
|
|
|
|
|
/(abc/
|
|
|
|
|
|
|
|
|
|
/(?# abc/
|
|
|
|
|
|
|
|
|
|
/(?z)abc/
|
|
|
|
|
|
|
|
|
|
/.*b/I
|
|
|
|
|
|
|
|
|
|
/.*?b/I
|
|
|
|
|
|
|
|
|
|
/cat|dog|elephant/I
|
|
|
|
|
this sentence eventually mentions a cat
|
|
|
|
|
this sentences rambles on and on for a while and then reaches elephant
|
|
|
|
|
|
|
|
|
|
/cat|dog|elephant/I
|
|
|
|
|
this sentence eventually mentions a cat
|
|
|
|
|
this sentences rambles on and on for a while and then reaches elephant
|
|
|
|
|
|
|
|
|
|
/cat|dog|elephant/Ii
|
|
|
|
|
this sentence eventually mentions a CAT cat
|
|
|
|
|
this sentences rambles on and on for a while to elephant ElePhant
|
|
|
|
|
|
|
|
|
|
/a|[bcd]/I
|
|
|
|
|
|
|
|
|
|
/(a|[^\dZ])/I
|
|
|
|
|
|
|
|
|
|
/(a|b)*[\s]/I
|
|
|
|
|
|
|
|
|
|
/(ab\2)/
|
|
|
|
|
|
|
|
|
|
/{4,5}abc/
|
|
|
|
|
|
|
|
|
|
/(a)(b)(c)\2/I
|
|
|
|
|
abcb
|
|
|
|
|
abcb\=ovector=0
|
|
|
|
|
abcb\=ovector=1
|
|
|
|
|
abcb\=ovector=2
|
|
|
|
|
abcb\=ovector=3
|
|
|
|
|
abcb\=ovector=4
|
|
|
|
|
|
|
|
|
|
/(a)bc|(a)(b)\2/I
|
|
|
|
|
abc
|
|
|
|
|
abc\=ovector=0
|
|
|
|
|
abc\=ovector=1
|
|
|
|
|
abc\=ovector=2
|
|
|
|
|
aba
|
|
|
|
|
aba\=ovector=0
|
|
|
|
|
aba\=ovector=1
|
|
|
|
|
aba\=ovector=2
|
|
|
|
|
aba\=ovector=3
|
|
|
|
|
aba\=ovector=4
|
|
|
|
|
|
|
|
|
|
/abc$/I,dollar_endonly
|
|
|
|
|
abc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abc\n
|
|
|
|
|
abc\ndef
|
|
|
|
|
|
|
|
|
|
/(a)(b)(c)(d)(e)\6/
|
|
|
|
|
|
|
|
|
|
/the quick brown fox/I
|
|
|
|
|
the quick brown fox
|
|
|
|
|
this is a line with the quick brown fox
|
|
|
|
|
|
|
|
|
|
/the quick brown fox/I,anchored
|
|
|
|
|
the quick brown fox
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
this is a line with the quick brown fox
|
|
|
|
|
|
|
|
|
|
/ab(?z)cd/
|
|
|
|
|
|
|
|
|
|
/^abc|def/I
|
|
|
|
|
abcdef
|
|
|
|
|
abcdef\=notbol
|
|
|
|
|
|
|
|
|
|
/.*((abc)$|(def))/I
|
|
|
|
|
defabc
|
|
|
|
|
defabc\=noteol
|
|
|
|
|
|
|
|
|
|
/)/
|
|
|
|
|
|
|
|
|
|
/a[]b/
|
|
|
|
|
|
|
|
|
|
/[^aeiou ]{3,}/I
|
|
|
|
|
co-processors, and for
|
|
|
|
|
|
|
|
|
|
/<.*>/I
|
|
|
|
|
abc<def>ghi<klm>nop
|
|
|
|
|
|
|
|
|
|
/<.*?>/I
|
|
|
|
|
abc<def>ghi<klm>nop
|
|
|
|
|
|
|
|
|
|
/<.*>/I,ungreedy
|
|
|
|
|
abc<def>ghi<klm>nop
|
|
|
|
|
|
|
|
|
|
/(?U)<.*>/I
|
|
|
|
|
abc<def>ghi<klm>nop
|
|
|
|
|
|
|
|
|
|
/<.*?>/I,ungreedy
|
|
|
|
|
abc<def>ghi<klm>nop
|
|
|
|
|
|
|
|
|
|
/={3,}/I,ungreedy
|
|
|
|
|
abc========def
|
|
|
|
|
|
|
|
|
|
/(?U)={3,}?/I
|
|
|
|
|
abc========def
|
|
|
|
|
|
|
|
|
|
/(?<!bar|cattle)foo/I
|
|
|
|
|
foo
|
|
|
|
|
catfoo
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
the barfoo
|
|
|
|
|
and cattlefoo
|
|
|
|
|
|
2016-10-02 18:01:01 +02:00
|
|
|
|
/abc(?<=a+)b/
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2016-10-02 18:01:01 +02:00
|
|
|
|
/12345(?<=aaa|b{0,3})b/
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(?<!(foo)a\1)bar/
|
|
|
|
|
|
|
|
|
|
/(?i)abc/I
|
|
|
|
|
|
|
|
|
|
/(a|(?m)a)/I
|
|
|
|
|
|
|
|
|
|
/(?i)^1234/I
|
|
|
|
|
|
|
|
|
|
/(^b|(?i)^d)/I
|
|
|
|
|
|
|
|
|
|
/(?s).*/I
|
|
|
|
|
|
|
|
|
|
/[abcd]/I
|
|
|
|
|
|
|
|
|
|
/(?i)[abcd]/I
|
|
|
|
|
|
|
|
|
|
/(?m)[xy]|(b|c)/I
|
|
|
|
|
|
|
|
|
|
/(^a|^b)/Im
|
|
|
|
|
|
|
|
|
|
/(?i)(^a|^b)/Im
|
|
|
|
|
|
|
|
|
|
/(a)(?(1)a|b|c)/
|
|
|
|
|
|
|
|
|
|
/(?(?=a)a|b|c)/
|
|
|
|
|
|
|
|
|
|
/(?(1a)/
|
|
|
|
|
|
|
|
|
|
/(?(1a))/
|
|
|
|
|
|
|
|
|
|
/(?(?i))/
|
|
|
|
|
|
|
|
|
|
/(?(abc))/
|
|
|
|
|
|
|
|
|
|
/(?(?<ab))/
|
|
|
|
|
|
|
|
|
|
/((?s)blah)\s+\1/I
|
|
|
|
|
|
|
|
|
|
/((?i)blah)\s+\1/I
|
|
|
|
|
|
|
|
|
|
/((?i)b)/IB
|
|
|
|
|
|
|
|
|
|
/(a*b|(?i:c*(?-i)d))/I
|
|
|
|
|
|
|
|
|
|
/a$/I
|
|
|
|
|
a
|
|
|
|
|
a\n
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\=noteol
|
|
|
|
|
a\n\=noteol
|
|
|
|
|
|
|
|
|
|
/a$/Im
|
|
|
|
|
a
|
|
|
|
|
a\n
|
|
|
|
|
a\n\=noteol
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\=noteol
|
|
|
|
|
|
|
|
|
|
/\Aabc/Im
|
|
|
|
|
|
|
|
|
|
/^abc/Im
|
|
|
|
|
|
|
|
|
|
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
|
|
|
|
|
aaaaabbbbbcccccdef
|
|
|
|
|
|
|
|
|
|
/(?<=foo)[ab]/I
|
|
|
|
|
|
|
|
|
|
/(?<!foo)(alpha|omega)/I
|
|
|
|
|
|
|
|
|
|
/(?!alphabet)[ab]/I
|
|
|
|
|
|
|
|
|
|
/(?<=foo\n)^bar/Im
|
|
|
|
|
foo\nbarbar
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
rhubarb
|
|
|
|
|
barbell
|
|
|
|
|
abc\nbarton
|
|
|
|
|
|
|
|
|
|
/^(?<=foo\n)bar/Im
|
|
|
|
|
foo\nbarbar
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
rhubarb
|
|
|
|
|
barbell
|
|
|
|
|
abc\nbarton
|
|
|
|
|
|
|
|
|
|
/(?>^abc)/Im
|
|
|
|
|
abc
|
|
|
|
|
def\nabc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
defabc
|
|
|
|
|
|
|
|
|
|
/(?<=ab(c+)d)ef/
|
|
|
|
|
|
|
|
|
|
/(?<=ab(?<=c+)d)ef/
|
|
|
|
|
|
|
|
|
|
/(?<=ab(c|de)f)g/
|
|
|
|
|
|
|
|
|
|
/The next three are in testinput2 because they have variable length branches/
|
|
|
|
|
|
|
|
|
|
/(?<=bullock|donkey)-cart/I
|
|
|
|
|
the bullock-cart
|
|
|
|
|
a donkey-cart race
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
cart
|
|
|
|
|
horse-and-cart
|
|
|
|
|
|
|
|
|
|
/(?<=ab(?i)x|y|z)/I
|
|
|
|
|
|
|
|
|
|
/(?>.*)(?<=(abcd)|(xyz))/I
|
|
|
|
|
alphabetabcd
|
|
|
|
|
endingxyz
|
|
|
|
|
|
|
|
|
|
/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
|
|
|
|
|
abxyZZ
|
|
|
|
|
abXyZZ
|
|
|
|
|
ZZZ
|
|
|
|
|
zZZ
|
|
|
|
|
bZZ
|
|
|
|
|
BZZ
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ZZ
|
|
|
|
|
abXYZZ
|
|
|
|
|
zzz
|
|
|
|
|
bzz
|
|
|
|
|
|
|
|
|
|
/(?<!(foo)a)bar/I
|
|
|
|
|
bar
|
|
|
|
|
foobbar
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
fooabar
|
|
|
|
|
|
2015-09-16 18:49:48 +02:00
|
|
|
|
# This one is here because Perl behaves differently; see also the following.
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(a\1?){4}$/I
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaaa
|
|
|
|
|
aaaaaa
|
|
|
|
|
|
2015-09-16 18:49:48 +02:00
|
|
|
|
# Perl does not fail these two for the final subjects. Neither did PCRE until
|
|
|
|
|
# release 8.01. The problem is in backtracking into a subpattern that contains
|
|
|
|
|
# a recursive reference to itself. PCRE has now made these into atomic patterns.
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(xa|=?\1a){2}$/
|
|
|
|
|
xa=xaa
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xa=xaaa
|
|
|
|
|
|
|
|
|
|
/^(xa|=?\1a)+$/
|
|
|
|
|
xa=xaa
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xa=xaaa
|
|
|
|
|
|
2015-09-16 18:49:48 +02:00
|
|
|
|
# These are syntax tests from Perl 5.005
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/a[b-a]/
|
|
|
|
|
|
|
|
|
|
/a[]b/
|
|
|
|
|
|
|
|
|
|
/a[/
|
|
|
|
|
|
|
|
|
|
/*a/
|
|
|
|
|
|
|
|
|
|
/(*)b/
|
|
|
|
|
|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vwxyz\=get=1
|
|
|
|
|
|
|
|
|
|
/(.{15})/I
|
|
|
|
|
abcdefghijklmnopqrstuvwxyz
|
|
|
|
|
abcdefghijklmnopqrstuvwxyz\=copy=1,get=1
|
|
|
|
|
|
|
|
|
|
/(.{16})/I
|
|
|
|
|
abcdefghijklmnopqrstuvwxyz
|
|
|
|
|
abcdefghijklmnopqrstuvwxyz\=copy=1,get=1,getall
|
|
|
|
|
|
|
|
|
|
/^(a|(bc))de(f)/I
|
|
|
|
|
adef\=get=1,get=2,get=3,get=4,getall
|
|
|
|
|
bcdef\=get=1,get=2,get=3,get=4,getall
|
|
|
|
|
adefghijk\=copy=0
|
|
|
|
|
|
|
|
|
|
/^abc\00def/I
|
|
|
|
|
abc\00def\=copy=0,getall
|
|
|
|
|
|
|
|
|
|
/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
|
|
|
|
|
)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
|
|
|
|
|
)?)?)?)?)?)?)?)?)?otherword/I
|
|
|
|
|
|
|
|
|
|
/.*X/IB
|
|
|
|
|
|
|
|
|
|
/.*X/IBs
|
|
|
|
|
|
|
|
|
|
/(.*X|^B)/IB
|
|
|
|
|
|
|
|
|
|
/(.*X|^B)/IBs
|
|
|
|
|
|
|
|
|
|
/(?s)(.*X|^B)/IB
|
|
|
|
|
|
|
|
|
|
/(?s:.*X|^B)/IB
|
|
|
|
|
|
|
|
|
|
/\Biss\B/I,aftertext
|
|
|
|
|
Mississippi
|
|
|
|
|
|
|
|
|
|
/iss/I,aftertext,altglobal
|
|
|
|
|
Mississippi
|
|
|
|
|
|
|
|
|
|
/\Biss\B/I,aftertext,altglobal
|
|
|
|
|
Mississippi
|
|
|
|
|
|
|
|
|
|
/\Biss\B/Ig,aftertext
|
|
|
|
|
Mississippi
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
Mississippi\=anchored
|
|
|
|
|
|
|
|
|
|
/(?<=[Ms])iss/Ig,aftertext
|
|
|
|
|
Mississippi
|
|
|
|
|
|
|
|
|
|
/(?<=[Ms])iss/I,aftertext,altglobal
|
|
|
|
|
Mississippi
|
|
|
|
|
|
|
|
|
|
/^iss/Ig,aftertext
|
|
|
|
|
ississippi
|
|
|
|
|
|
|
|
|
|
/.*iss/Ig,aftertext
|
|
|
|
|
abciss\nxyzisspqr
|
|
|
|
|
|
|
|
|
|
/.i./Ig,aftertext
|
|
|
|
|
Mississippi
|
|
|
|
|
Mississippi\=anchored
|
|
|
|
|
Missouri river
|
|
|
|
|
Missouri river\=anchored
|
|
|
|
|
|
|
|
|
|
/^.is/Ig,aftertext
|
|
|
|
|
Mississippi
|
|
|
|
|
|
|
|
|
|
/^ab\n/Ig,aftertext
|
|
|
|
|
ab\nab\ncd
|
|
|
|
|
|
|
|
|
|
/^ab\n/Igm,aftertext
|
|
|
|
|
ab\nab\ncd
|
|
|
|
|
|
2015-11-13 17:52:26 +01:00
|
|
|
|
/^/gm,newline=any
|
|
|
|
|
a\rb\nc\r\nxyz\=aftertext
|
|
|
|
|
|
2014-07-24 18:32:38 +02:00
|
|
|
|
/abc/I
|
|
|
|
|
|
|
|
|
|
/abc|bac/I
|
|
|
|
|
|
|
|
|
|
/(abc|bac)/I
|
|
|
|
|
|
|
|
|
|
/(abc|(c|dc))/I
|
|
|
|
|
|
|
|
|
|
/(abc|(d|de)c)/I
|
|
|
|
|
|
|
|
|
|
/a*/I
|
|
|
|
|
|
|
|
|
|
/a+/I
|
|
|
|
|
|
|
|
|
|
/(baa|a+)/I
|
|
|
|
|
|
|
|
|
|
/a{0,3}/I
|
|
|
|
|
|
|
|
|
|
/baa{3,}/I
|
|
|
|
|
|
|
|
|
|
/"([^\\"]+|\\.)*"/I
|
|
|
|
|
|
|
|
|
|
/(abc|ab[cd])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no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
\=notempty
|
|
|
|
|
|
|
|
|
|
/|-/I
|
|
|
|
|
abcd
|
|
|
|
|
-abc
|
|
|
|
|
ab-c\=notempty
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abc\=notempty
|
|
|
|
|
|
|
|
|
|
/^.?abcd/I
|
|
|
|
|
|
|
|
|
|
/\( # ( at start
|
|
|
|
|
(?: # Non-capturing bracket
|
|
|
|
|
(?>[^()]+) # Either a sequence of non-brackets (no backtracking)
|
|
|
|
|
| # Or
|
|
|
|
|
(?R) # Recurse - i.e. nested bracketed string
|
|
|
|
|
)* # Zero or more contents
|
|
|
|
|
\) # Closing )
|
|
|
|
|
/Ix
|
|
|
|
|
(abcd)
|
|
|
|
|
(abcd)xyz
|
|
|
|
|
xyz(abcd)
|
|
|
|
|
(ab(xy)cd)pqr
|
|
|
|
|
(ab(xycd)pqr
|
|
|
|
|
() abc ()
|
|
|
|
|
12(abcde(fsh)xyz(foo(bar))lmno)89
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcd
|
|
|
|
|
abcd)
|
|
|
|
|
(abcd
|
|
|
|
|
|
|
|
|
|
/\( ( (?>[^()]+) | (?R) )* \) /Igx
|
|
|
|
|
(ab(xy)cd)pqr
|
|
|
|
|
1(abcd)(x(y)z)pqr
|
|
|
|
|
|
|
|
|
|
/\( (?: (?>[^()]+) | (?R) ) \) /Ix
|
|
|
|
|
(abcd)
|
|
|
|
|
(ab(xy)cd)
|
|
|
|
|
(a(b(c)d)e)
|
|
|
|
|
((ab))
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
()
|
|
|
|
|
|
|
|
|
|
/\( (?: (?>[^()]+) | (?R) )? \) /Ix
|
|
|
|
|
()
|
|
|
|
|
12(abcde(fs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rl:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:digit:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:graph:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:lower:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:print:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:punct:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:space:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:upper:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:xdigit:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:word:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:^cntrl:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[12[:^digit:]]/IB
|
|
|
|
|
|
|
|
|
|
/^[[:^blank:]]/IB
|
|
|
|
|
|
|
|
|
|
/[01[:alpha:]%]/IB
|
|
|
|
|
|
|
|
|
|
/[[.ch.]]/I
|
|
|
|
|
|
|
|
|
|
/[[=ch=]]/I
|
|
|
|
|
|
|
|
|
|
/[[:rhubarb:]]/I
|
|
|
|
|
|
|
|
|
|
/[[:upper:]]/Ii
|
|
|
|
|
A
|
|
|
|
|
a
|
|
|
|
|
|
|
|
|
|
/[[:lower:]]/Ii
|
|
|
|
|
A
|
|
|
|
|
a
|
|
|
|
|
|
|
|
|
|
/((?-i)[[:lower:]])[[:lower:]]/Ii
|
|
|
|
|
ab
|
|
|
|
|
aB
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
Ab
|
|
|
|
|
AB
|
|
|
|
|
|
|
|
|
|
/[\200-\110]/I
|
|
|
|
|
|
|
|
|
|
/^(?(0)f|b)oo/I
|
|
|
|
|
|
|
|
|
|
# This one's here because of the large output vector needed
|
|
|
|
|
|
|
|
|
|
/(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\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d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/I
|
|
|
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC\=ovector=300
|
|
|
|
|
|
|
|
|
|
# This one's here because Perl does this differently and PCRE2 can't at present
|
|
|
|
|
|
|
|
|
|
/(main(O)?)+/I
|
|
|
|
|
mainmain
|
|
|
|
|
mainOmain
|
|
|
|
|
|
|
|
|
|
# These are all cases where Perl does it differently (nested captures)
|
|
|
|
|
|
|
|
|
|
/^(a(b)?)+$/I
|
|
|
|
|
aba
|
|
|
|
|
|
|
|
|
|
/^(aa(bb)?)+$/I
|
|
|
|
|
aabbaa
|
|
|
|
|
|
|
|
|
|
/^(aa|aa(bb))+$/I
|
|
|
|
|
aabbaa
|
|
|
|
|
|
|
|
|
|
/^(aa(bb)??)+$/I
|
|
|
|
|
aabbaa
|
|
|
|
|
|
|
|
|
|
/^(?:aa(bb)?)+$/I
|
|
|
|
|
aabbaa
|
|
|
|
|
|
|
|
|
|
/^(aa(b(b))?)+$/I
|
|
|
|
|
aabbaa
|
|
|
|
|
|
|
|
|
|
/^(?:aa(b(b))?)+$/I
|
|
|
|
|
aabbaa
|
|
|
|
|
|
|
|
|
|
/^(?:aa(b(?:b))?)+$/I
|
|
|
|
|
aabbaa
|
|
|
|
|
|
|
|
|
|
/^(?:aa(bb(?:b))?)+$/I
|
|
|
|
|
aabbbaa
|
|
|
|
|
|
|
|
|
|
/^(?:aa(b(?:bb))?)+$/I
|
|
|
|
|
aabbbaa
|
|
|
|
|
|
|
|
|
|
/^(?:aa(?:b(b))?)+$/I
|
|
|
|
|
aabbaa
|
|
|
|
|
|
|
|
|
|
/^(?:aa(?:b(bb))?)+$/I
|
|
|
|
|
aabbbaa
|
|
|
|
|
|
|
|
|
|
/^(aa(b(bb))?)+$/I
|
|
|
|
|
aabbbaa
|
|
|
|
|
|
|
|
|
|
/^(aa(bb(bb))?)+$/I
|
|
|
|
|
aabbbbaa
|
|
|
|
|
|
|
|
|
|
# ----------------
|
|
|
|
|
|
|
|
|
|
/#/IBx
|
|
|
|
|
|
|
|
|
|
/a#/IBx
|
|
|
|
|
|
|
|
|
|
/[\s]/IB
|
|
|
|
|
|
|
|
|
|
/[\S]/IB
|
|
|
|
|
|
|
|
|
|
/a(?i)b/IB
|
|
|
|
|
ab
|
|
|
|
|
aB
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
AB
|
|
|
|
|
|
|
|
|
|
/(a(?i)b)/IB
|
|
|
|
|
ab
|
|
|
|
|
aB
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
AB
|
|
|
|
|
|
|
|
|
|
/ (?i)abc/IBx
|
|
|
|
|
|
|
|
|
|
/#this is a comment
|
|
|
|
|
(?i)abc/IBx
|
|
|
|
|
|
|
|
|
|
/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/IB
|
|
|
|
|
|
|
|
|
|
/\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/IB
|
|
|
|
|
|
|
|
|
|
/\Q\E/IB
|
|
|
|
|
\
|
|
|
|
|
|
|
|
|
|
/\Q\Ex/IB
|
|
|
|
|
|
|
|
|
|
/ \Q\E/IB
|
|
|
|
|
|
|
|
|
|
/a\Q\E/IB
|
|
|
|
|
abc
|
|
|
|
|
bca
|
|
|
|
|
bac
|
|
|
|
|
|
|
|
|
|
/a\Q\Eb/IB
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/\Q\Eabc/IB
|
|
|
|
|
|
|
|
|
|
/x*+\w/IB
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xxxxx
|
|
|
|
|
|
|
|
|
|
/x?+/IB
|
|
|
|
|
|
|
|
|
|
/x++/IB
|
|
|
|
|
|
|
|
|
|
/x{1,3}+/B,no_auto_possess
|
|
|
|
|
|
|
|
|
|
/x{1,3}+/Bi,no_auto_possess
|
|
|
|
|
|
|
|
|
|
/[^x]{1,3}+/B,no_auto_possess
|
|
|
|
|
|
|
|
|
|
/[^x]{1,3}+/Bi,no_auto_possess
|
|
|
|
|
|
|
|
|
|
/(x)*+/IB
|
|
|
|
|
|
|
|
|
|
/^(\w++|\s++)*$/I
|
|
|
|
|
now is the time for all good men to come to the aid of the party
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
this is not a line with only words and spaces!
|
|
|
|
|
|
|
|
|
|
/(\d++)(\w)/I
|
|
|
|
|
12345a
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
12345+
|
|
|
|
|
|
|
|
|
|
/a++b/I
|
|
|
|
|
aaab
|
|
|
|
|
|
|
|
|
|
/(a++b)/I
|
|
|
|
|
aaab
|
|
|
|
|
|
|
|
|
|
/(a++)b/I
|
|
|
|
|
aaab
|
|
|
|
|
|
|
|
|
|
/([^()]++|\([^()]*\))+/I
|
|
|
|
|
((abc(ade)ufh()()x
|
|
|
|
|
|
|
|
|
|
/\(([^()]++|\([^()]+\))+\)/I
|
|
|
|
|
(abc)
|
|
|
|
|
(abc(def)xyz)
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
|
|
|
|
|
|
|
|
/(abc){1,3}+/IB
|
|
|
|
|
|
|
|
|
|
/a+?+/I
|
|
|
|
|
|
|
|
|
|
/a{2,3}?+b/I
|
|
|
|
|
|
|
|
|
|
/(?U)a+?+/I
|
|
|
|
|
|
|
|
|
|
/a{2,3}?+b/I,ungreedy
|
|
|
|
|
|
|
|
|
|
/x(?U)a++b/IB
|
|
|
|
|
xaaaab
|
|
|
|
|
|
|
|
|
|
/(?U)xa++b/IB
|
|
|
|
|
xaaaab
|
|
|
|
|
|
|
|
|
|
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/IB
|
|
|
|
|
|
|
|
|
|
/^x(?U)a+b/IB
|
|
|
|
|
|
|
|
|
|
/^x(?U)(a+)b/IB
|
|
|
|
|
|
|
|
|
|
/[.x.]/I
|
|
|
|
|
|
|
|
|
|
/[=x=]/I
|
|
|
|
|
|
|
|
|
|
/[:x:]/I
|
|
|
|
|
|
|
|
|
|
/\l/I
|
|
|
|
|
|
|
|
|
|
/\L/I
|
|
|
|
|
|
|
|
|
|
/\N{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)/I
|
|
|
|
|
|
|
|
|
|
/((?=abcda)ab)/I
|
|
|
|
|
|
|
|
|
|
/()a/I
|
|
|
|
|
|
2014-08-30 18:21:17 +02:00
|
|
|
|
/(?:(?=.)|(?<!x))a/I
|
|
|
|
|
|
2014-07-24 18:32:38 +02:00
|
|
|
|
/(?(1)ab|ac)(.)/I
|
|
|
|
|
|
|
|
|
|
/(?(1)abz|acz)(.)/I
|
|
|
|
|
|
|
|
|
|
/(?(1)abz)(.)/I
|
|
|
|
|
|
|
|
|
|
/(?(1)abz)(1)23/I
|
|
|
|
|
|
|
|
|
|
/(a)+/I
|
|
|
|
|
|
|
|
|
|
/(a){2,3}/I
|
|
|
|
|
|
|
|
|
|
/(a)*/I
|
|
|
|
|
|
|
|
|
|
/[a]/I
|
|
|
|
|
|
|
|
|
|
/[ab]/I
|
|
|
|
|
|
|
|
|
|
/[ab]/I
|
|
|
|
|
|
|
|
|
|
/[^a]/I
|
|
|
|
|
|
|
|
|
|
/\d456/I
|
|
|
|
|
|
|
|
|
|
/\d456/I
|
|
|
|
|
|
|
|
|
|
/a^b/I
|
|
|
|
|
|
|
|
|
|
/^a/Im
|
|
|
|
|
abcde
|
|
|
|
|
xy\nabc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xyabc
|
|
|
|
|
|
|
|
|
|
/c|abc/I
|
|
|
|
|
|
|
|
|
|
/(?i)[ab]/I
|
|
|
|
|
|
|
|
|
|
/[ab](?i)cd/I
|
|
|
|
|
|
|
|
|
|
/abc(?C)def/I
|
|
|
|
|
abcdef
|
|
|
|
|
1234abcdef
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcxyz
|
|
|
|
|
abcxyzf
|
|
|
|
|
|
|
|
|
|
/abc(?C)de(?C1)f/I
|
|
|
|
|
123abcdef
|
|
|
|
|
|
|
|
|
|
/(?C1)\dabc(?C2)def/I
|
|
|
|
|
1234abcdef
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdef
|
|
|
|
|
|
|
|
|
|
/(?C1)\dabc(?C2)def/I
|
|
|
|
|
1234abcdef
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdef
|
|
|
|
|
|
|
|
|
|
/(?C255)ab/I
|
|
|
|
|
|
|
|
|
|
/(?C256)ab/I
|
|
|
|
|
|
|
|
|
|
/(?Cab)xx/I
|
|
|
|
|
|
|
|
|
|
/(?C12vr)x/I
|
|
|
|
|
|
|
|
|
|
/abc(?C)def/I
|
|
|
|
|
\x83\x0\x61bcdef
|
|
|
|
|
|
|
|
|
|
/(abc)(?C)de(?C1)f/I
|
|
|
|
|
123abcdef
|
|
|
|
|
123abcdef\=callout_capture
|
|
|
|
|
123abcdefC-\=callout_none
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
123abcdef\=callout_fail=1
|
|
|
|
|
|
|
|
|
|
/(?C0)(abc(?C1))*/I
|
|
|
|
|
abcabcabc
|
2016-12-28 16:05:48 +01:00
|
|
|
|
abcabc\=callout_fail=1:4
|
|
|
|
|
abcabcabc\=callout_fail=1:4
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(\d{3}(?C))*/I
|
|
|
|
|
123\=callout_capture
|
|
|
|
|
123456\=callout_capture
|
|
|
|
|
123456789\=callout_capture
|
|
|
|
|
|
|
|
|
|
/((xyz)(?C)p|(?C1)xyzabc)/I
|
|
|
|
|
xyzabc\=callout_capture
|
|
|
|
|
|
|
|
|
|
/(X)((xyz)(?C)p|(?C1)xyzabc)/I
|
|
|
|
|
Xxyzabc\=callout_capture
|
|
|
|
|
|
|
|
|
|
/(?=(abc))(?C)abcdef/I
|
|
|
|
|
abcdef\=callout_capture
|
|
|
|
|
|
|
|
|
|
/(?!(abc)(?C1)d)(?C2)abcxyz/I
|
|
|
|
|
abcxyz\=callout_capture
|
|
|
|
|
|
|
|
|
|
/(?<=(abc)(?C))xyz/I
|
|
|
|
|
abcxyz\=callout_capture
|
|
|
|
|
|
|
|
|
|
/a(b+)(c*)(?C1)/I
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abbbbbccc\=callout_data=1
|
|
|
|
|
|
|
|
|
|
/a(b+?)(c*?)(?C1)/I
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abbbbbccc\=callout_data=1
|
|
|
|
|
|
|
|
|
|
/(?C)abc/I
|
|
|
|
|
|
|
|
|
|
/(?C)^abc/I
|
|
|
|
|
|
|
|
|
|
/(?C)a|b/I
|
|
|
|
|
|
|
|
|
|
/x(ab|(bc|(de|(?R))))/I
|
|
|
|
|
xab
|
|
|
|
|
xbc
|
|
|
|
|
xde
|
|
|
|
|
xxab
|
|
|
|
|
xxxab
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xyab
|
|
|
|
|
|
|
|
|
|
/^([^()]|\((?1)*\))*$/I
|
|
|
|
|
abc
|
|
|
|
|
a(b)c
|
|
|
|
|
a(b(c))d
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match)
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a(b(c)d
|
|
|
|
|
|
|
|
|
|
/^>abc>([^()]|\((?1)*\))*<xyz<$/I
|
|
|
|
|
>abc>123<xyz<
|
|
|
|
|
>abc>1(2)3<xyz<
|
|
|
|
|
>abc>(1(2)3)<xyz<
|
|
|
|
|
|
|
|
|
|
/(a(?1)b)/IB
|
|
|
|
|
|
|
|
|
|
/(a(?1)+b)/IB
|
|
|
|
|
|
|
|
|
|
/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
|
|
|
|
|
12
|
|
|
|
|
(((2+2)*-3)-7)
|
|
|
|
|
-12
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
((2+2)*-3)-7)
|
|
|
|
|
|
|
|
|
|
/^(x(y|(?1){2})z)/I
|
|
|
|
|
xyz
|
|
|
|
|
xxyzxyzz
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xxyzz
|
|
|
|
|
xxyzxyzxyzz
|
|
|
|
|
|
|
|
|
|
/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix
|
|
|
|
|
<>
|
|
|
|
|
<abcd>
|
|
|
|
|
<abc <123> hij>
|
|
|
|
|
<abc <def> hij>
|
|
|
|
|
<abc<>def>
|
|
|
|
|
<abc<>
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
<abc
|
|
|
|
|
|
|
|
|
|
/(?1)/I
|
|
|
|
|
|
|
|
|
|
/((?2)(abc)/I
|
|
|
|
|
|
|
|
|
|
/^(abc)def(?1)/I
|
|
|
|
|
abcdefabc
|
|
|
|
|
|
|
|
|
|
/^(a|b|c)=(?1)+/I
|
|
|
|
|
a=a
|
|
|
|
|
a=b
|
|
|
|
|
a=bc
|
|
|
|
|
|
|
|
|
|
/^(a|b|c)=((?1))+/I
|
|
|
|
|
a=a
|
|
|
|
|
a=b
|
|
|
|
|
a=bc
|
|
|
|
|
|
|
|
|
|
/a(?P<name1>b|c)d(?P<longername2>e)/IB
|
|
|
|
|
abde
|
|
|
|
|
acde
|
|
|
|
|
|
|
|
|
|
/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/IB
|
|
|
|
|
|
|
|
|
|
/(?P<a>a)...(?P=a)bbb(?P>a)d/IB
|
|
|
|
|
|
|
|
|
|
/^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/Ii
|
|
|
|
|
1221
|
|
|
|
|
Satan, oscillate my metallic sonatas!
|
|
|
|
|
A man, a plan, a canal: Panama!
|
|
|
|
|
Able was I ere I saw Elba.
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
The quick brown fox
|
|
|
|
|
|
|
|
|
|
/((?(R)a|b))\1(?1)?/I
|
|
|
|
|
bb
|
|
|
|
|
bbaa
|
|
|
|
|
|
|
|
|
|
/(.*)a/Is
|
|
|
|
|
|
|
|
|
|
/(.*)a\1/Is
|
|
|
|
|
|
|
|
|
|
/(.*)a(b)\2/Is
|
|
|
|
|
|
|
|
|
|
/((.*)a|(.*)b)z/Is
|
|
|
|
|
|
|
|
|
|
/((.*)a|(.*)b)z\1/Is
|
|
|
|
|
|
|
|
|
|
/((.*)a|(.*)b)z\2/Is
|
|
|
|
|
|
|
|
|
|
/((.*)a|(.*)b)z\3/Is
|
|
|
|
|
|
|
|
|
|
/((.*)a|^(.*)b)z\3/Is
|
|
|
|
|
|
|
|
|
|
/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
|
|
|
|
|
|
|
|
|
|
/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
|
|
|
|
|
|
|
|
|
|
/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
|
|
|
|
|
|
|
|
|
|
/(a)(bc)/IB,no_auto_capture
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(?P<one>a)(bc)/IB,no_auto_capture
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(a)(?P<named>bc)/IB,no_auto_capture
|
|
|
|
|
|
|
|
|
|
/(aaa(?C1)bbb|ab)/I
|
|
|
|
|
aaabbb
|
|
|
|
|
aaabbb\=callout_data=0
|
|
|
|
|
aaabbb\=callout_data=1
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaabbb\=callout_data=-1
|
|
|
|
|
|
|
|
|
|
/ab(?P<one>cd)ef(?P<two>gh)/I
|
|
|
|
|
abcdefgh
|
|
|
|
|
abcdefgh\=copy=1,get=two
|
|
|
|
|
abcdefgh\=copy=one,copy=two
|
|
|
|
|
abcdefgh\=copy=three
|
|
|
|
|
|
|
|
|
|
/(?P<Tes>)(?P<Test>)/IB
|
|
|
|
|
|
|
|
|
|
/(?P<Test>)(?P<Tes>)/IB
|
|
|
|
|
|
|
|
|
|
/(?P<Z>zz)(?P<A>aa)/I
|
|
|
|
|
zzaa\=copy=Z
|
|
|
|
|
zzaa\=copy=A
|
|
|
|
|
|
|
|
|
|
/(?P<x>eks)(?P<x>eccs)/I
|
|
|
|
|
|
|
|
|
|
/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
|
|
|
|
|
|
|
|
|
|
"\[((?P<elem>\d+)(,(?P>elem))*)\]"I
|
|
|
|
|
[10,20,30,5,5,4,4,2,43,23,4234]
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
[]
|
|
|
|
|
|
|
|
|
|
"\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
|
|
|
|
|
[10,20,30,5,5,4,4,2,43,23,4234]
|
|
|
|
|
[]
|
|
|
|
|
|
|
|
|
|
/(a(b(?2)c))?/IB
|
|
|
|
|
|
|
|
|
|
/(a(b(?2)c))*/IB
|
|
|
|
|
|
|
|
|
|
/(a(b(?2)c)){0,2}/IB
|
|
|
|
|
|
2015-07-17 15:41:09 +02:00
|
|
|
|
/[ab]{1}+/B
|
|
|
|
|
|
|
|
|
|
/()(?1){1}/B
|
|
|
|
|
|
|
|
|
|
/()(?1)/B
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
|
|
|
|
|
Baby Bjorn Active Carrier - With free SHIPPING!!
|
|
|
|
|
|
|
|
|
|
/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
|
|
|
|
|
Baby Bjorn Active Carrier - With free SHIPPING!!
|
|
|
|
|
|
|
|
|
|
/a*.*b/IB
|
|
|
|
|
|
|
|
|
|
/(a|b)*.?c/IB
|
|
|
|
|
|
|
|
|
|
/abc(?C255)de(?C)f/IB
|
|
|
|
|
|
|
|
|
|
/abcde/IB,auto_callout
|
|
|
|
|
abcde
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdfe
|
|
|
|
|
|
|
|
|
|
/a*b/IB,auto_callout
|
|
|
|
|
ab
|
|
|
|
|
aaaab
|
|
|
|
|
aaaacb
|
|
|
|
|
|
|
|
|
|
/a*b/IB,auto_callout
|
|
|
|
|
ab
|
|
|
|
|
aaaab
|
|
|
|
|
aaaacb
|
|
|
|
|
|
|
|
|
|
/a+b/IB,auto_callout
|
|
|
|
|
ab
|
|
|
|
|
aaaab
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaaacb
|
|
|
|
|
|
|
|
|
|
/(abc|def)x/IB,auto_callout
|
|
|
|
|
abcx
|
|
|
|
|
defx
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdefzx
|
|
|
|
|
|
|
|
|
|
/(abc|def)x/IB,auto_callout
|
|
|
|
|
abcx
|
|
|
|
|
defx
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdefzx
|
|
|
|
|
|
|
|
|
|
/(ab|cd){3,4}/I,auto_callout
|
|
|
|
|
ababab
|
|
|
|
|
abcdabcd
|
|
|
|
|
abcdcdcdcdcd
|
|
|
|
|
|
|
|
|
|
/([ab]{,4}c|xy)/IB,auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
Note: that { does NOT introduce a quantifier
|
|
|
|
|
|
|
|
|
|
/([ab]{,4}c|xy)/IB,auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
Note: that { does NOT introduce a quantifier
|
|
|
|
|
|
|
|
|
|
/([ab]{1,4}c|xy){4,5}?123/IB,auto_callout
|
|
|
|
|
aacaacaacaacaac123
|
|
|
|
|
|
|
|
|
|
/\b.*/I
|
|
|
|
|
ab cd\=offset=1
|
|
|
|
|
|
|
|
|
|
/\b.*/Is
|
2015-11-21 17:10:24 +01:00
|
|
|
|
ab cd\=startoffset=1
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(?!.bcd).*/I
|
|
|
|
|
Xbcd12345
|
|
|
|
|
|
|
|
|
|
/abcde/I
|
2014-08-03 20:15:32 +02:00
|
|
|
|
ab\=ps
|
|
|
|
|
abc\=ps
|
|
|
|
|
abcd\=ps
|
|
|
|
|
abcde\=ps
|
|
|
|
|
the quick brown abc\=ps
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match\=ps
|
2014-08-03 20:15:32 +02:00
|
|
|
|
the quick brown abxyz fox\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
|
2014-08-03 20:15:32 +02:00
|
|
|
|
13/05/04\=ps
|
|
|
|
|
13/5/2004\=ps
|
|
|
|
|
02/05/09\=ps
|
|
|
|
|
1\=ps
|
|
|
|
|
1/2\=ps
|
|
|
|
|
1/2/0\=ps
|
|
|
|
|
1/2/04\=ps
|
|
|
|
|
0\=ps
|
|
|
|
|
02/\=ps
|
|
|
|
|
02/0\=ps
|
|
|
|
|
02/1\=ps
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match\=ps
|
2014-08-03 20:15:32 +02:00
|
|
|
|
\=ps
|
|
|
|
|
123\=ps
|
|
|
|
|
33/4/04\=ps
|
|
|
|
|
3/13/04\=ps
|
|
|
|
|
0/1/2003\=ps
|
|
|
|
|
0/\=ps
|
|
|
|
|
02/0/\=ps
|
|
|
|
|
02/13\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/0{0,2}ABC/I
|
|
|
|
|
|
|
|
|
|
/\d{3,}ABC/I
|
|
|
|
|
|
|
|
|
|
/\d*ABC/I
|
|
|
|
|
|
|
|
|
|
/[abc]+DE/I
|
|
|
|
|
|
|
|
|
|
/[abc]?123/I
|
2014-08-03 20:15:32 +02:00
|
|
|
|
123\=ps
|
|
|
|
|
a\=ps
|
|
|
|
|
b\=ps
|
|
|
|
|
c\=ps
|
|
|
|
|
c12\=ps
|
|
|
|
|
c123\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(?:\d){3,5}X/I
|
2014-08-03 20:15:32 +02:00
|
|
|
|
1\=ps
|
|
|
|
|
123\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
123X
|
2014-08-03 20:15:32 +02:00
|
|
|
|
1234\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
1234X
|
2014-08-03 20:15:32 +02:00
|
|
|
|
12345\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
12345X
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
1X
|
2014-08-03 20:15:32 +02:00
|
|
|
|
123456\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
"<(\w+)/?>(.)*</(\1)>"Igms
|
|
|
|
|
<!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>\=jitstack=1024
|
|
|
|
|
|
|
|
|
|
/line\nbreak/I
|
|
|
|
|
this is a line\nbreak
|
|
|
|
|
line one\nthis is a line\nbreak in the second line
|
|
|
|
|
|
|
|
|
|
/line\nbreak/I,firstline
|
|
|
|
|
this is a line\nbreak
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
line one\nthis is a line\nbreak in the second line
|
|
|
|
|
|
|
|
|
|
/line\nbreak/Im,firstline
|
|
|
|
|
this is a line\nbreak
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
line one\nthis is a line\nbreak in the second line
|
|
|
|
|
|
|
|
|
|
/(?i)(?-i)AbCd/I
|
|
|
|
|
AbCd
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcd
|
|
|
|
|
|
|
|
|
|
/a{11111111111111111111}/I
|
|
|
|
|
|
|
|
|
|
/(){64294967295}/I
|
|
|
|
|
|
|
|
|
|
/(){2,4294967295}/I
|
|
|
|
|
|
|
|
|
|
"(?i:a)(?i:b)(?i:c)(?i:d)(?i:e)(?i:f)(?i:g)(?i:h)(?i:i)(?i:j)(k)(?i:l)A\1B"I
|
|
|
|
|
abcdefghijklAkB
|
|
|
|
|
|
|
|
|
|
"(?P<n0>a)(?P<n1>b)(?P<n2>c)(?P<n3>d)(?P<n4>e)(?P<n5>f)(?P<n6>g)(?P<n7>h)(?P<n8>i)(?P<n9>j)(?P<n10>k)(?P<n11>l)A\11B"I
|
|
|
|
|
abcdefghijklAkB
|
|
|
|
|
|
|
|
|
|
"(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
|
|
|
|
|
abcdefghijklAkB
|
|
|
|
|
|
|
|
|
|
"(?P<name0>a)(?P<name1>a)(?P<name2>a)(?P<name3>a)(?P<name4>a)(?P<name5>a)(?P<name6>a)(?P<name7>a)(?P<name8>a)(?P<name9>a)(?P<name10>a)(?P<name11>a)(?P<name12>a)(?P<name13>a)(?P<name14>a)(?P<name15>a)(?P<name16>a)(?P<name17>a)(?P<name18>a)(?P<name19>a)(?P<name20>a)(?P<name21>a)(?P<name22>a)(?P<name23>a)(?P<name24>a)(?P<name25>a)(?P<name26>a)(?P<name27>a)(?P<name28>a)(?P<name29>a)(?P<name30>a)(?P<name31>a)(?P<name32>a)(?P<name33>a)(?P<name34>a)(?P<name35>a)(?P<name36>a)(?P<name37>a)(?P<name38>a)(?P<name39>a)(?P<name40>a)(?P<name41>a)(?P<name42>a)(?P<name43>a)(?P<name44>a)(?P<name45>a)(?P<name46>a)(?P<name47>a)(?P<name48>a)(?P<name49>a)(?P<name50>a)(?P<name51>a)(?P<name52>a)(?P<name53>a)(?P<name54>a)(?P<name55>a)(?P<name56>a)(?P<name57>a)(?P<name58>a)(?P<name59>a)(?P<name60>a)(?P<name61>a)(?P<name62>a)(?P<name63>a)(?P<name64>a)(?P<name65>a)(?P<name66>a)(?P<name67>a)(?P<name68>a)(?P<name69>a)(?P<name70>a)(?P<name71>a)(?P<name72>a)(?P<name73>a)(?P<name74>a)(?P<name75>a)(?P<name76>a)(?P<name77>a)(?P<name78>a)(?P<name79>a)(?P<name80>a)(?P<name81>a)(?P<name82>a)(?P<name83>a)(?P<name84>a)(?P<name85>a)(?P<name86>a)(?P<name87>a)(?P<name88>a)(?P<name89>a)(?P<name90>a)(?P<name91>a)(?P<name92>a)(?P<name93>a)(?P<name94>a)(?P<name95>a)(?P<name96>a)(?P<name97>a)(?P<name98>a)(?P<name99>a)(?P<name100>a)"I
|
|
|
|
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
|
|
|
|
|
|
|
|
"(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)"I
|
|
|
|
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
|
|
|
|
|
|
|
|
/[^()]*(?:\((?R)\)[^()]*)*/I
|
|
|
|
|
(this(and)that
|
|
|
|
|
(this(and)that)
|
|
|
|
|
(this(and)that)stuff
|
|
|
|
|
|
|
|
|
|
/[^()]*(?:\((?>(?R))\)[^()]*)*/I
|
|
|
|
|
(this(and)that
|
|
|
|
|
(this(and)that)
|
|
|
|
|
|
|
|
|
|
/[^()]*(?:\((?R)\))*[^()]*/I
|
|
|
|
|
(this(and)that
|
|
|
|
|
(this(and)that)
|
|
|
|
|
|
|
|
|
|
/(?:\((?R)\))*[^()]*/I
|
|
|
|
|
(this(and)that
|
|
|
|
|
(this(and)that)
|
|
|
|
|
((this))
|
|
|
|
|
|
|
|
|
|
/(?:\((?R)\))|[^()]*/I
|
|
|
|
|
(this(and)that
|
|
|
|
|
(this(and)that)
|
|
|
|
|
(this)
|
|
|
|
|
((this))
|
|
|
|
|
|
|
|
|
|
/\x{0000ff}/I
|
|
|
|
|
|
|
|
|
|
/^((?P<A>a1)|(?P<A>a2)b)/I
|
|
|
|
|
|
|
|
|
|
/^((?P<A>a1)|(?P<A>a2)b)/I,dupnames
|
|
|
|
|
a1b\=copy=A
|
|
|
|
|
a2b\=copy=A
|
|
|
|
|
a1b\=copy=Z,copy=A
|
|
|
|
|
|
|
|
|
|
/(?|(?<a>)(?<b>)(?<a>)|(?<a>)(?<b>)(?<a>))/I,dupnames
|
|
|
|
|
|
|
|
|
|
/^(?P<A>a)(?P<A>b)/I,dupnames
|
|
|
|
|
ab\=copy=A
|
|
|
|
|
|
|
|
|
|
/^(?P<A>a)(?P<A>b)|cd/I,dupnames
|
|
|
|
|
ab\=copy=A
|
|
|
|
|
cd\=copy=A
|
|
|
|
|
|
|
|
|
|
/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/I,dupnames
|
|
|
|
|
cdefgh\=copy=A
|
|
|
|
|
|
|
|
|
|
/^((?P<A>a1)|(?P<A>a2)b)/I,dupnames
|
|
|
|
|
a1b\=get=A
|
|
|
|
|
a2b\=get=A
|
|
|
|
|
a1b\=get=Z,get=A
|
|
|
|
|
|
|
|
|
|
/^(?P<A>a)(?P<A>b)/I,dupnames
|
|
|
|
|
ab\=get=A
|
|
|
|
|
|
|
|
|
|
/^(?P<A>a)(?P<A>b)|cd/I,dupnames
|
|
|
|
|
ab\=get=A
|
|
|
|
|
cd\=get=A
|
|
|
|
|
|
|
|
|
|
/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/I,dupnames
|
|
|
|
|
cdefgh\=get=A
|
|
|
|
|
|
|
|
|
|
/(?J)^((?P<A>a1)|(?P<A>a2)b)/I
|
|
|
|
|
a1b\=copy=A
|
|
|
|
|
a2b\=copy=A
|
|
|
|
|
|
|
|
|
|
/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
|
|
|
|
|
|
2015-09-16 18:49:48 +02:00
|
|
|
|
# In this next test, J is not set at the outer level; consequently it isn't set
|
|
|
|
|
# in the pattern's options; consequently pcre2_substring_get_byname() produces
|
|
|
|
|
# a random value.
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
|
|
|
|
|
a bc d\=copy=A,copy=B,copy=C
|
|
|
|
|
|
|
|
|
|
/^(?P<A>a)?(?(A)a|b)/I
|
|
|
|
|
aabc
|
|
|
|
|
bc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
|
|
|
|
|
bXaX
|
|
|
|
|
|
|
|
|
|
/(?:(?(2y)a|b)(X))+/I
|
|
|
|
|
|
|
|
|
|
/(?:(?(ZA)a|b)(?P<ZZ>X))+/I
|
|
|
|
|
|
|
|
|
|
/(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
|
|
|
|
|
bbXaaX
|
|
|
|
|
|
|
|
|
|
/(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
|
|
|
|
|
(b)\\Xa\\X
|
|
|
|
|
|
|
|
|
|
/(?P<ABC/I
|
|
|
|
|
|
|
|
|
|
/(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
|
|
|
|
|
bXXaYYaY
|
|
|
|
|
bXYaXXaX
|
|
|
|
|
|
|
|
|
|
/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
|
|
|
|
|
bXXaYYaY
|
|
|
|
|
|
|
|
|
|
/\s*,\s*/I
|
|
|
|
|
\x0b,\x0b
|
|
|
|
|
\x0c,\x0d
|
|
|
|
|
|
2014-10-01 19:02:33 +02:00
|
|
|
|
/^abc/Im,newline=lf
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xyz\nabc
|
2014-10-01 19:02:33 +02:00
|
|
|
|
xyz\r\nabc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-10-01 19:02:33 +02:00
|
|
|
|
xyz\rabc
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xyzabc\r
|
|
|
|
|
xyzabc\rpqr
|
|
|
|
|
xyzabc\r\n
|
|
|
|
|
xyzabc\r\npqr
|
|
|
|
|
|
|
|
|
|
/^abc/Im,newline=crlf
|
2014-10-01 19:02:33 +02:00
|
|
|
|
xyz\r\nabclf>
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-10-01 19:02:33 +02:00
|
|
|
|
xyz\nabclf
|
|
|
|
|
xyz\rabclf
|
|
|
|
|
|
|
|
|
|
/^abc/Im,newline=cr
|
|
|
|
|
xyz\rabc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-10-01 19:02:33 +02:00
|
|
|
|
xyz\nabc
|
|
|
|
|
xyz\r\nabc
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^abc/Im,newline=bad
|
|
|
|
|
|
|
|
|
|
/.*/I,newline=lf
|
|
|
|
|
abc\ndef
|
|
|
|
|
abc\rdef
|
|
|
|
|
abc\r\ndef
|
2014-10-01 19:02:33 +02:00
|
|
|
|
|
|
|
|
|
/.*/I,newline=cr
|
|
|
|
|
abc\ndef
|
|
|
|
|
abc\rdef
|
|
|
|
|
abc\r\ndef
|
|
|
|
|
|
|
|
|
|
/.*/I,newline=crlf
|
|
|
|
|
abc\ndef
|
|
|
|
|
abc\rdef
|
|
|
|
|
abc\r\ndef
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/\w+(.)(.)?def/Is
|
|
|
|
|
abc\ndef
|
|
|
|
|
abc\rdef
|
|
|
|
|
abc\r\ndef
|
|
|
|
|
|
|
|
|
|
/(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
|
|
|
|
|
|
|
|
|
|
/()()()()()()()()()()()()()()()()()()()()
|
|
|
|
|
()()()()()()()()()()()()()()()()()()()()
|
|
|
|
|
()()()()()()()()()()()()()()()()()()()()
|
|
|
|
|
()()()()()()()()()()()()()()()()()()()()
|
|
|
|
|
()()()()()()()()()()()()()()()()()()()()
|
|
|
|
|
(.(.))/Ix
|
|
|
|
|
XY\=ovector=133
|
|
|
|
|
|
|
|
|
|
/(a*b|(?i:c*(?-i)d))/I
|
|
|
|
|
|
|
|
|
|
/()[ab]xyz/I
|
|
|
|
|
|
|
|
|
|
/(|)[ab]xyz/I
|
|
|
|
|
|
|
|
|
|
/(|c)[ab]xyz/I
|
|
|
|
|
|
|
|
|
|
/(|c?)[ab]xyz/I
|
|
|
|
|
|
|
|
|
|
/(d?|c?)[ab]xyz/I
|
|
|
|
|
|
|
|
|
|
/(d?|c)[ab]xyz/I
|
|
|
|
|
|
|
|
|
|
/^a*b\d/IB
|
|
|
|
|
|
|
|
|
|
/^a*+b\d/IB
|
|
|
|
|
|
|
|
|
|
/^a*?b\d/IB
|
|
|
|
|
|
|
|
|
|
/^a+A\d/IB
|
|
|
|
|
aaaA5
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaaa5
|
|
|
|
|
|
|
|
|
|
/^a*A\d/IBi
|
|
|
|
|
aaaA5
|
|
|
|
|
aaaa5
|
|
|
|
|
|
|
|
|
|
/(a*|b*)[cd]/I
|
|
|
|
|
|
|
|
|
|
/(a+|b*)[cd]/I
|
|
|
|
|
|
|
|
|
|
/(a*|b+)[cd]/I
|
|
|
|
|
|
|
|
|
|
/(a+|b+)[cd]/I
|
|
|
|
|
|
|
|
|
|
/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
|
|
|
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
|
|
|
(((
|
|
|
|
|
a
|
|
|
|
|
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
|
|
|
|
|
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
|
|
|
|
|
)))
|
|
|
|
|
/Ix
|
|
|
|
|
large nest
|
|
|
|
|
|
|
|
|
|
/a*\d/B
|
|
|
|
|
|
|
|
|
|
/a*\D/B
|
|
|
|
|
|
|
|
|
|
/0*\d/B
|
|
|
|
|
|
|
|
|
|
/0*\D/B
|
|
|
|
|
|
|
|
|
|
/a*\s/B
|
|
|
|
|
|
|
|
|
|
/a*\S/B
|
|
|
|
|
|
|
|
|
|
/ *\s/B
|
|
|
|
|
|
|
|
|
|
/ *\S/B
|
|
|
|
|
|
|
|
|
|
/a*\w/B
|
|
|
|
|
|
|
|
|
|
/a*\W/B
|
|
|
|
|
|
|
|
|
|
/=*\w/B
|
|
|
|
|
|
|
|
|
|
/=*\W/B
|
|
|
|
|
|
|
|
|
|
/\d*a/B
|
|
|
|
|
|
|
|
|
|
/\d*2/B
|
|
|
|
|
|
|
|
|
|
/\d*\d/B
|
|
|
|
|
|
|
|
|
|
/\d*\D/B
|
|
|
|
|
|
|
|
|
|
/\d*\s/B
|
|
|
|
|
|
|
|
|
|
/\d*\S/B
|
|
|
|
|
|
|
|
|
|
/\d*\w/B
|
|
|
|
|
|
|
|
|
|
/\d*\W/B
|
|
|
|
|
|
|
|
|
|
/\D*a/B
|
|
|
|
|
|
|
|
|
|
/\D*2/B
|
|
|
|
|
|
|
|
|
|
/\D*\d/B
|
|
|
|
|
|
|
|
|
|
/\D*\D/B
|
|
|
|
|
|
|
|
|
|
/\D*\s/B
|
|
|
|
|
|
|
|
|
|
/\D*\S/B
|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XxXyxx
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
x
|
|
|
|
|
|
|
|
|
|
/^(?1)(abc)/
|
|
|
|
|
abcabc
|
|
|
|
|
|
|
|
|
|
/^(?:(?:\1|X)(a|b))+/
|
|
|
|
|
Xaaa
|
|
|
|
|
Xaba
|
|
|
|
|
|
|
|
|
|
/^[\E\Qa\E-\Qz\E]+/B
|
|
|
|
|
|
|
|
|
|
/^[a\Q]bc\E]/B
|
|
|
|
|
|
|
|
|
|
/^[a-\Q\E]/B
|
|
|
|
|
|
|
|
|
|
/^(?P>abc)[()](?<abc>)/B
|
|
|
|
|
|
|
|
|
|
/^((?(abc)y)[()](?P<abc>x))+/B
|
|
|
|
|
(xy)x
|
|
|
|
|
|
|
|
|
|
/^(?P>abc)\Q()\E(?<abc>)/B
|
|
|
|
|
|
|
|
|
|
/^(?P>abc)[a\Q(]\E(](?<abc>)/B
|
|
|
|
|
|
|
|
|
|
/^(?P>abc) # this is (a comment)
|
|
|
|
|
(?<abc>)/Bx
|
|
|
|
|
|
|
|
|
|
/^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
|
|
|
|
|
1221
|
|
|
|
|
Satan, oscillate my metallic sonatas!
|
|
|
|
|
A man, a plan, a canal: Panama!
|
|
|
|
|
Able was I ere I saw Elba.
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
The quick brown fox
|
|
|
|
|
|
|
|
|
|
/(?=(\w+))\1:/I
|
|
|
|
|
abcd:
|
|
|
|
|
|
|
|
|
|
/(?=(?'abc'\w+))\k<abc>:/I
|
|
|
|
|
abcd:
|
|
|
|
|
|
|
|
|
|
/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/dupnames
|
|
|
|
|
adaa
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
addd
|
|
|
|
|
adbb
|
|
|
|
|
|
|
|
|
|
/(?'abc'a|b)(?<abc>d|e)(?&abc){2}/dupnames
|
|
|
|
|
bdaa
|
|
|
|
|
bdab
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
bddd
|
|
|
|
|
|
|
|
|
|
/(?(<bc))/
|
|
|
|
|
|
|
|
|
|
/(?(''))/
|
|
|
|
|
|
|
|
|
|
/(?('R')stuff)/
|
|
|
|
|
|
|
|
|
|
/((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) /x
|
|
|
|
|
abcabc1Xabc2XabcXabcabc
|
|
|
|
|
|
|
|
|
|
/(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
|
|
|
|
|
abcabc1Xabc2XabcXabcabc
|
|
|
|
|
|
|
|
|
|
/(?<A> (?'B' abc (?(R) (?(R&C)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
|
|
|
|
|
|
|
|
|
|
/^(?(DEFINE) abc | xyz ) /x
|
|
|
|
|
|
|
|
|
|
/(?(DEFINE) abc) xyz/Ix
|
|
|
|
|
|
|
|
|
|
/(a|)*\d/
|
|
|
|
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4\=ovector=0
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
|
|
|
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\=ovector=0
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^a.b/newline=lf
|
|
|
|
|
a\rb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\nb
|
2014-10-01 19:02:33 +02:00
|
|
|
|
|
|
|
|
|
/^a.b/newline=cr
|
|
|
|
|
a\nb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-10-01 19:02:33 +02:00
|
|
|
|
a\rb
|
|
|
|
|
|
|
|
|
|
/^a.b/newline=anycrlf
|
|
|
|
|
a\x85b
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-10-01 19:02:33 +02:00
|
|
|
|
a\rb
|
|
|
|
|
|
|
|
|
|
/^a.b/newline=any
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-10-01 19:02:33 +02:00
|
|
|
|
a\nb
|
|
|
|
|
a\rb
|
|
|
|
|
a\x85b
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^abc./gmx,newline=any
|
|
|
|
|
abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
|
|
|
|
|
|
|
|
|
|
/abc.$/gmx,newline=any
|
|
|
|
|
abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
|
|
|
|
|
|
|
|
|
|
/^a\Rb/bsr=unicode
|
|
|
|
|
a\nb
|
|
|
|
|
a\rb
|
|
|
|
|
a\r\nb
|
|
|
|
|
a\x0bb
|
|
|
|
|
a\x0cb
|
|
|
|
|
a\x85b
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\n\rb
|
|
|
|
|
|
|
|
|
|
/^a\R*b/bsr=unicode
|
|
|
|
|
ab
|
|
|
|
|
a\nb
|
|
|
|
|
a\rb
|
|
|
|
|
a\r\nb
|
|
|
|
|
a\x0bb
|
|
|
|
|
a\x0cb
|
|
|
|
|
a\x85b
|
|
|
|
|
a\n\rb
|
|
|
|
|
a\n\r\x85\x0cb
|
|
|
|
|
|
|
|
|
|
/^a\R+b/bsr=unicode
|
|
|
|
|
a\nb
|
|
|
|
|
a\rb
|
|
|
|
|
a\r\nb
|
|
|
|
|
a\x0bb
|
|
|
|
|
a\x0cb
|
|
|
|
|
a\x85b
|
|
|
|
|
a\n\rb
|
|
|
|
|
a\n\r\x85\x0cb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/^a\R{1,3}b/bsr=unicode
|
|
|
|
|
a\nb
|
|
|
|
|
a\n\rb
|
|
|
|
|
a\n\r\x85b
|
|
|
|
|
a\r\n\r\nb
|
|
|
|
|
a\r\n\r\n\r\nb
|
|
|
|
|
a\n\r\n\rb
|
|
|
|
|
a\n\n\r\nb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\n\n\n\rb
|
|
|
|
|
a\r
|
|
|
|
|
|
|
|
|
|
/(?&abc)X(?<abc>P)/I
|
|
|
|
|
abcPXP123
|
|
|
|
|
|
|
|
|
|
/(?1)X(?<abc>P)/I
|
|
|
|
|
abcPXP123
|
|
|
|
|
|
|
|
|
|
/(?:a(?&abc)b)*(?<abc>x)/
|
|
|
|
|
123axbaxbaxbx456
|
|
|
|
|
123axbaxbaxb456
|
|
|
|
|
|
|
|
|
|
/(?:a(?&abc)b){1,5}(?<abc>x)/
|
|
|
|
|
123axbaxbaxbx456
|
|
|
|
|
|
|
|
|
|
/(?:a(?&abc)b){2,5}(?<abc>x)/
|
|
|
|
|
123axbaxbaxbx456
|
|
|
|
|
|
|
|
|
|
/(?:a(?&abc)b){2,}(?<abc>x)/
|
|
|
|
|
123axbaxbaxbx456
|
|
|
|
|
|
|
|
|
|
/(abc)(?i:(?1))/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
defabcabcxyz
|
|
|
|
|
\= Expect no match
|
|
|
|
|
DEFabcABCXYZ
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(abc)(?:(?i)(?1))/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
defabcabcxyz
|
|
|
|
|
\= Expect no match
|
|
|
|
|
DEFabcABCXYZ
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(a)\g-2/
|
|
|
|
|
|
|
|
|
|
/^(a)\g/
|
|
|
|
|
|
|
|
|
|
/^(a)\g{0}/
|
|
|
|
|
|
|
|
|
|
/^(a)\g{3/
|
|
|
|
|
|
|
|
|
|
/^(a)\g{aa}/
|
|
|
|
|
|
|
|
|
|
/^a.b/newline=lf
|
|
|
|
|
a\rb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\nb
|
|
|
|
|
|
|
|
|
|
/.+foo/
|
|
|
|
|
afoo
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
\r\nfoo
|
|
|
|
|
\nfoo
|
|
|
|
|
|
|
|
|
|
/.+foo/newline=crlf
|
|
|
|
|
afoo
|
|
|
|
|
\nfoo
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
\r\nfoo
|
|
|
|
|
|
|
|
|
|
/.+foo/newline=any
|
|
|
|
|
afoo
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
\nfoo
|
|
|
|
|
\r\nfoo
|
|
|
|
|
|
|
|
|
|
/.+foo/s
|
|
|
|
|
afoo
|
|
|
|
|
\r\nfoo
|
|
|
|
|
\nfoo
|
|
|
|
|
|
|
|
|
|
/^$/gm,newline=any
|
|
|
|
|
abc\r\rxyz
|
|
|
|
|
abc\n\rxyz
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abc\r\nxyz
|
|
|
|
|
|
|
|
|
|
/(?m)^$/g,newline=any,aftertext
|
|
|
|
|
abc\r\n\r\n
|
|
|
|
|
|
|
|
|
|
/(?m)^$|^\r\n/g,newline=any,aftertext
|
|
|
|
|
abc\r\n\r\n
|
|
|
|
|
|
|
|
|
|
/(?m)$/g,newline=any,aftertext
|
|
|
|
|
abc\r\n\r\n
|
|
|
|
|
|
|
|
|
|
/abc.$/gmx,newline=anycrlf
|
|
|
|
|
abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
|
|
|
|
|
|
|
|
|
|
/^X/m
|
|
|
|
|
XABC
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
XABC\=notbol
|
|
|
|
|
|
|
|
|
|
/(ab|c)(?-1)/B
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/xy(?+1)(abc)/B
|
|
|
|
|
xyabcabc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xyabc
|
|
|
|
|
|
|
|
|
|
/x(?-0)y/
|
|
|
|
|
|
|
|
|
|
/x(?-1)y/
|
|
|
|
|
|
|
|
|
|
/x(?+0)y/
|
|
|
|
|
|
|
|
|
|
/x(?+1)y/
|
|
|
|
|
|
|
|
|
|
/^(abc)?(?(-1)X|Y)/B
|
|
|
|
|
abcX
|
|
|
|
|
Y
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcY
|
|
|
|
|
|
|
|
|
|
/^((?(+1)X|Y)(abc))+/B
|
|
|
|
|
YabcXabc
|
|
|
|
|
YabcXabcXabc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
XabcXabc
|
|
|
|
|
|
|
|
|
|
/(?(-1)a)/B
|
|
|
|
|
|
|
|
|
|
/((?(-1)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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)\=jitstack=1024
|
|
|
|
|
|
|
|
|
|
/[\E]AAA/
|
|
|
|
|
|
|
|
|
|
/[\Q\E]AAA/
|
|
|
|
|
|
|
|
|
|
/[^\E]AAA/
|
|
|
|
|
|
|
|
|
|
/[^\Q\E]AAA/
|
|
|
|
|
|
|
|
|
|
/[\E^]AAA/
|
|
|
|
|
|
|
|
|
|
/[\Q\E^]AAA/
|
|
|
|
|
|
|
|
|
|
/A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/B
|
|
|
|
|
|
|
|
|
|
/^a+(*FAIL)/auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaaaaa
|
|
|
|
|
|
|
|
|
|
/a+b?c+(*FAIL)/auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaabccc
|
|
|
|
|
|
|
|
|
|
/a+b?(*PRUNE)c+(*FAIL)/auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaabccc
|
|
|
|
|
|
|
|
|
|
/a+b?(*COMMIT)c+(*FAIL)/auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaabccc
|
|
|
|
|
|
|
|
|
|
/a+b?(*SKIP)c+(*FAIL)/auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaabcccaaabccc
|
|
|
|
|
|
|
|
|
|
/a+b?(*THEN)c+(*FAIL)/auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aaabccc
|
|
|
|
|
|
|
|
|
|
/a(*MARK)b/
|
|
|
|
|
|
|
|
|
|
/(?i:A{1,}\6666666666)/
|
|
|
|
|
|
|
|
|
|
/\g6666666666/
|
|
|
|
|
|
|
|
|
|
/[\g6666666666]/B
|
|
|
|
|
|
|
|
|
|
/(?1)\c[/
|
|
|
|
|
|
|
|
|
|
/.+A/newline=crlf
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
\r\nA
|
|
|
|
|
|
|
|
|
|
/\nA/newline=crlf
|
|
|
|
|
\r\nA
|
|
|
|
|
|
|
|
|
|
/[\r\n]A/newline=crlf
|
|
|
|
|
\r\nA
|
|
|
|
|
|
|
|
|
|
/(\r|\n)A/newline=crlf
|
|
|
|
|
\r\nA
|
|
|
|
|
|
|
|
|
|
/a(*CR)b/
|
|
|
|
|
|
|
|
|
|
/(*CR)a.b/
|
|
|
|
|
a\nb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\rb
|
|
|
|
|
|
|
|
|
|
/(*CR)a.b/newline=lf
|
|
|
|
|
a\nb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\rb
|
|
|
|
|
|
|
|
|
|
/(*LF)a.b/newline=CRLF
|
|
|
|
|
a\rb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\nb
|
|
|
|
|
|
|
|
|
|
/(*CRLF)a.b/
|
|
|
|
|
a\rb
|
|
|
|
|
a\nb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\r\nb
|
|
|
|
|
|
|
|
|
|
/(*ANYCRLF)a.b/newline=CR
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\rb
|
|
|
|
|
a\nb
|
|
|
|
|
a\r\nb
|
|
|
|
|
|
|
|
|
|
/(*ANY)a.b/newline=cr
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\rb
|
|
|
|
|
a\nb
|
|
|
|
|
a\r\nb
|
|
|
|
|
a\x85b
|
|
|
|
|
|
|
|
|
|
/(*ANY).*/g
|
|
|
|
|
abc\r\ndef
|
|
|
|
|
|
|
|
|
|
/(*ANYCRLF).*/g
|
|
|
|
|
abc\r\ndef
|
|
|
|
|
|
|
|
|
|
/(*CRLF).*/g
|
|
|
|
|
abc\r\ndef
|
2017-05-26 19:14:36 +02:00
|
|
|
|
|
|
|
|
|
/(*NUL)^.*/
|
|
|
|
|
a\nb\x00ccc
|
|
|
|
|
|
|
|
|
|
/(*NUL)^.*/s
|
|
|
|
|
a\nb\x00ccc
|
|
|
|
|
|
|
|
|
|
/^x/m,newline=NUL
|
|
|
|
|
ab\x00xy
|
|
|
|
|
|
|
|
|
|
/'#comment' 0d 0a 00 '^x\' 0a 'y'/x,newline=nul,hex
|
|
|
|
|
x\nyz
|
|
|
|
|
|
|
|
|
|
/(*NUL)^X\NY/
|
|
|
|
|
X\nY
|
|
|
|
|
X\rY
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X\x00Y
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/a\Rb/I,bsr=anycrlf
|
|
|
|
|
a\rb
|
|
|
|
|
a\nb
|
|
|
|
|
a\r\nb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\x85b
|
|
|
|
|
a\x0bb
|
|
|
|
|
|
|
|
|
|
/a\Rb/I,bsr=unicode
|
|
|
|
|
a\rb
|
|
|
|
|
a\nb
|
|
|
|
|
a\r\nb
|
|
|
|
|
a\x85b
|
|
|
|
|
a\x0bb
|
|
|
|
|
|
|
|
|
|
/a\R?b/I,bsr=anycrlf
|
|
|
|
|
a\rb
|
|
|
|
|
a\nb
|
|
|
|
|
a\r\nb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\x85b
|
|
|
|
|
a\x0bb
|
|
|
|
|
|
|
|
|
|
/a\R?b/I,bsr=unicode
|
|
|
|
|
a\rb
|
|
|
|
|
a\nb
|
|
|
|
|
a\r\nb
|
|
|
|
|
a\x85b
|
|
|
|
|
a\x0bb
|
|
|
|
|
|
|
|
|
|
/a\R{2,4}b/I,bsr=anycrlf
|
|
|
|
|
a\r\n\nb
|
|
|
|
|
a\n\r\rb
|
|
|
|
|
a\r\n\r\n\r\n\r\nb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\x85\x85b
|
|
|
|
|
a\x0b\x0bb
|
|
|
|
|
|
|
|
|
|
/a\R{2,4}b/I,bsr=unicode
|
|
|
|
|
a\r\rb
|
|
|
|
|
a\n\n\nb
|
|
|
|
|
a\r\n\n\r\rb
|
|
|
|
|
a\x85\x85b
|
|
|
|
|
a\x0b\x0bb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
a\r\r\r\r\rb
|
|
|
|
|
|
|
|
|
|
/(*BSR_ANYCRLF)a\Rb/I
|
|
|
|
|
a\nb
|
|
|
|
|
a\rb
|
|
|
|
|
|
|
|
|
|
/(*BSR_UNICODE)a\Rb/I
|
|
|
|
|
a\x85b
|
|
|
|
|
|
|
|
|
|
/(*BSR_ANYCRLF)(*CRLF)a\Rb/I
|
|
|
|
|
a\nb
|
|
|
|
|
a\rb
|
|
|
|
|
|
|
|
|
|
/(*CRLF)(*BSR_UNICODE)a\Rb/I
|
|
|
|
|
a\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00
|
|
|
|
xxz
|
|
|
|
|
|
|
|
|
|
/(\3)(\1)(a)/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
cat
|
|
|
|
|
|
|
|
|
|
/(\3)(\1)(a)/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
cat
|
|
|
|
|
|
|
|
|
|
/TA]/
|
|
|
|
|
The ACTA] comes
|
|
|
|
|
|
|
|
|
|
/TA]/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
The ACTA] comes
|
|
|
|
|
|
|
|
|
|
/(?2)[]a()b](abc)/
|
|
|
|
|
abcbabc
|
|
|
|
|
|
|
|
|
|
/(?2)[^]a()b](abc)/
|
|
|
|
|
abcbabc
|
|
|
|
|
|
|
|
|
|
/(?1)[]a()b](abc)/
|
|
|
|
|
abcbabc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcXabc
|
|
|
|
|
|
|
|
|
|
/(?1)[^]a()b](abc)/
|
|
|
|
|
abcXabc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcbabc
|
|
|
|
|
|
|
|
|
|
/(?2)[]a()b](abc)(xyz)/
|
|
|
|
|
xyzbabcxyz
|
|
|
|
|
|
|
|
|
|
/(?&N)[]a(?<N>)](?<M>abc)/
|
|
|
|
|
abc<abc
|
|
|
|
|
|
|
|
|
|
/(?&N)[]a(?<N>)](abc)/
|
|
|
|
|
abc<abc
|
|
|
|
|
|
|
|
|
|
/a[]b/
|
|
|
|
|
|
|
|
|
|
/a[^]b/
|
|
|
|
|
|
|
|
|
|
/a[]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/a[]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/a[]*+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/a[^]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
aXb
|
|
|
|
|
a\nb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/a[^]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
aXb
|
|
|
|
|
a\nX\nXb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/a(?!)b/B
|
|
|
|
|
|
|
|
|
|
/(?!)?a/B
|
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/a(*FAIL)+b/
|
|
|
|
|
|
|
|
|
|
/(abc|pqr|123){0}[xyz]/I
|
|
|
|
|
|
|
|
|
|
/(?(?=.*b)b|^)/I,auto_callout
|
|
|
|
|
adc
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(?(?=b).*b|^d)/I
|
|
|
|
|
|
|
|
|
|
/(?(?=.*b).*b|^d)/I
|
|
|
|
|
|
|
|
|
|
/xyz/auto_callout
|
|
|
|
|
xyz
|
|
|
|
|
abcxyz
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abc
|
|
|
|
|
abcxypqr
|
2014-10-01 18:16:27 +02:00
|
|
|
|
|
|
|
|
|
/xyz/auto_callout,no_start_optimize
|
|
|
|
|
abcxyz
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-10-01 18:16:27 +02:00
|
|
|
|
abc
|
|
|
|
|
abcxypqr
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(*NO_START_OPT)xyz/auto_callout
|
|
|
|
|
abcxyz
|
|
|
|
|
|
|
|
|
|
/(*NO_AUTO_POSSESS)a+b/B
|
|
|
|
|
|
|
|
|
|
/xyz/auto_callout,no_start_optimize
|
|
|
|
|
abcxyz
|
|
|
|
|
|
|
|
|
|
/^"((?(?=[a])[^"])|b)*"$/auto_callout
|
|
|
|
|
"ab"
|
|
|
|
|
|
|
|
|
|
/^"((?(?=[a])[^"])|b)*"$/
|
|
|
|
|
"ab"
|
|
|
|
|
|
|
|
|
|
/^X(?5)(a)(?|(b)|(q))(c)(d)Y/
|
|
|
|
|
XYabcdY
|
|
|
|
|
|
|
|
|
|
/^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
|
|
|
|
|
XYabcdY
|
|
|
|
|
|
|
|
|
|
/Xa{2,4}b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=ps
|
|
|
|
|
Xa\=ps
|
|
|
|
|
Xaa\=ps
|
|
|
|
|
Xaaa\=ps
|
|
|
|
|
Xaaaa\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/Xa{2,4}?b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=ps
|
|
|
|
|
Xa\=ps
|
|
|
|
|
Xaa\=ps
|
|
|
|
|
Xaaa\=ps
|
|
|
|
|
Xaaaa\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/Xa{2,4}+b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=ps
|
|
|
|
|
Xa\=ps
|
|
|
|
|
Xaa\=ps
|
|
|
|
|
Xaaa\=ps
|
|
|
|
|
Xaaaa\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/X\d{2,4}b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=ps
|
|
|
|
|
X3\=ps
|
|
|
|
|
X33\=ps
|
|
|
|
|
X333\=ps
|
|
|
|
|
X3333\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/X\d{2,4}?b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=ps
|
|
|
|
|
X3\=ps
|
|
|
|
|
X33\=ps
|
|
|
|
|
X333\=ps
|
|
|
|
|
X3333\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/X\d{2,4}+b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=ps
|
|
|
|
|
X3\=ps
|
|
|
|
|
X33\=ps
|
|
|
|
|
X333\=ps
|
|
|
|
|
X3333\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/X\D{2,4}b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=ps
|
|
|
|
|
Xa\=ps
|
|
|
|
|
Xaa\=ps
|
|
|
|
|
Xaaa\=ps
|
|
|
|
|
Xaaaa\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/X\D{2,4}?b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=ps
|
|
|
|
|
Xa\=ps
|
|
|
|
|
Xaa\=ps
|
|
|
|
|
Xaaa\=ps
|
|
|
|
|
Xaaaa\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/X\D{2,4}+b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=ps
|
|
|
|
|
Xa\=ps
|
|
|
|
|
Xaa\=ps
|
|
|
|
|
Xaaa\=ps
|
|
|
|
|
Xaaaa\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/X[abc]{2,4}b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
X\=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Y\=ps
|
|
|
|
|
YXYYY\=ps
|
|
|
|
|
YXYYYY\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(Y)X\1{2,4}?b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
YX\=ps
|
|
|
|
|
YXY\=ps
|
|
|
|
|
YXYY\=ps
|
|
|
|
|
YXYYY\=ps
|
|
|
|
|
YXYYYY\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(Y)X\1{2,4}+b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
YX\=ps
|
|
|
|
|
YXY\=ps
|
|
|
|
|
YXYY\=ps
|
|
|
|
|
YXYYY\=ps
|
|
|
|
|
YXYYYY\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2014-10-31 13:34:34 +01:00
|
|
|
|
/\++\KZ|\d+X|9+Y/startchar
|
2014-08-03 20:15:32 +02:00
|
|
|
|
++++123999\=ps
|
|
|
|
|
++++123999Y\=ps
|
|
|
|
|
++++Z1234\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/Z(*F)/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-08-03 20:15:32 +02:00
|
|
|
|
Z\=ps
|
|
|
|
|
ZA\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/Z(?!)/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-08-03 20:15:32 +02:00
|
|
|
|
Z\=ps
|
|
|
|
|
ZA\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/dog(sbody)?/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
dogs\=ps
|
|
|
|
|
dogs\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/dog(sbody)??/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
dogs\=ps
|
|
|
|
|
dogs\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/dog|dogsbody/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
dogs\=ps
|
|
|
|
|
dogs\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/dogsbody|dog/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
dogs\=ps
|
|
|
|
|
dogs\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/\bthe cat\b/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
the cat\=ps
|
|
|
|
|
the cat\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ps
|
|
|
|
|
abc\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2014-10-31 13:34:34 +01:00
|
|
|
|
/abc\K123/startchar
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xyzabc123pqr
|
2014-08-03 20:15:32 +02:00
|
|
|
|
xyzabc12\=ps
|
|
|
|
|
xyzabc12\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(?<=abc)123/
|
|
|
|
|
xyzabc123pqr
|
2014-08-03 20:15:32 +02:00
|
|
|
|
xyzabc12\=ps
|
|
|
|
|
xyzabc12\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/\babc\b/
|
|
|
|
|
+++abc+++
|
2014-08-03 20:15:32 +02:00
|
|
|
|
+++ab\=ps
|
|
|
|
|
+++ab\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/B
|
|
|
|
|
|
|
|
|
|
/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/B
|
|
|
|
|
|
|
|
|
|
/(ab)(x(y)z(cd(*ACCEPT)))pq/B
|
|
|
|
|
|
2014-10-31 13:34:34 +01:00
|
|
|
|
/abc\K/aftertext,startchar
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdef
|
|
|
|
|
abcdef\=notempty_atstart
|
|
|
|
|
xyzabcdef\=notempty_atstart
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdef\=notempty
|
|
|
|
|
xyzabcdef\=notempty
|
|
|
|
|
|
2014-10-31 13:34:34 +01:00
|
|
|
|
/^(?:(?=abc)|abc\K)/aftertext,startchar
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdef
|
|
|
|
|
abcdef\=notempty_atstart
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdef\=notempty
|
|
|
|
|
|
|
|
|
|
/a?b?/aftertext
|
|
|
|
|
xyz
|
|
|
|
|
xyzabc
|
|
|
|
|
xyzabc\=notempty
|
|
|
|
|
xyzabc\=notempty_atstart
|
|
|
|
|
xyz\=notempty_atstart
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xyz\=notempty
|
|
|
|
|
|
|
|
|
|
/^a?b?/aftertext
|
|
|
|
|
xyz
|
|
|
|
|
xyzabc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xyzabc\=notempty
|
|
|
|
|
xyzabc\=notempty_atstart
|
|
|
|
|
xyz\=notempty_atstart
|
|
|
|
|
xyz\=notempty
|
|
|
|
|
|
|
|
|
|
/^(?<name>a|b\g<name>c)/
|
|
|
|
|
aaaa
|
|
|
|
|
bacxxx
|
|
|
|
|
bbaccxxx
|
|
|
|
|
bbbacccxx
|
|
|
|
|
|
|
|
|
|
/^(?<name>a|b\g'name'c)/
|
|
|
|
|
aaaa
|
|
|
|
|
bacxxx
|
|
|
|
|
bbaccxxx
|
|
|
|
|
bbbacccxx
|
|
|
|
|
|
|
|
|
|
/^(a|b\g<1>c)/
|
|
|
|
|
aaaa
|
|
|
|
|
bacxxx
|
|
|
|
|
bbaccxxx
|
|
|
|
|
bbbacccxx
|
|
|
|
|
|
|
|
|
|
/^(a|b\g'1'c)/
|
|
|
|
|
aaaa
|
|
|
|
|
bacxxx
|
|
|
|
|
bbaccxxx
|
|
|
|
|
bbbacccxx
|
|
|
|
|
|
|
|
|
|
/^(a|b\g'-1'c)/
|
|
|
|
|
aaaa
|
|
|
|
|
bacxxx
|
|
|
|
|
bbaccxxx
|
|
|
|
|
bbbacccxx
|
|
|
|
|
|
|
|
|
|
/(^(a|b\g<-1>c))/
|
|
|
|
|
aaaa
|
|
|
|
|
bacxxx
|
|
|
|
|
bbaccxxx
|
|
|
|
|
bbbacccxx
|
|
|
|
|
|
|
|
|
|
/(?-i:\g<name>)(?i:(?<name>a))/
|
|
|
|
|
XaaX
|
|
|
|
|
XAAX
|
|
|
|
|
|
|
|
|
|
/(?i:\g<name>)(?-i:(?<name>a))/
|
|
|
|
|
XaaX
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
XAAX
|
|
|
|
|
|
|
|
|
|
/(?-i:\g<+1>)(?i:(a))/
|
|
|
|
|
XaaX
|
|
|
|
|
XAAX
|
|
|
|
|
|
|
|
|
|
/(?=(?<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>*|\(.*?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\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/Iis
|
|
|
|
|
|
|
|
|
|
"(?>.*/)foo"I
|
|
|
|
|
|
|
|
|
|
/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /Ix
|
|
|
|
|
|
|
|
|
|
/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/Ii
|
|
|
|
|
|
|
|
|
|
/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/I
|
|
|
|
|
|
|
|
|
|
/<a[\s]+href[\s]*=[\s]* # find <a href=
|
|
|
|
|
([\"\'])? # find single or double quote
|
|
|
|
|
(?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
|
|
|
|
|
# quote, otherwise match up to next space
|
|
|
|
|
/Iisx
|
|
|
|
|
|
|
|
|
|
/^(?!:) # colon disallowed at start
|
|
|
|
|
(?: # start of item
|
|
|
|
|
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
|
|
|
|
|
(?(1)0 | () ) ) # if null previously matched, fail; else null
|
|
|
|
|
: # followed by colon
|
|
|
|
|
){1,7} # end item; 1-7 of them required
|
|
|
|
|
[0-9a-f]{1,4} $ # final hex number at end of string
|
|
|
|
|
(?(1)|.) # check that there was an empty component
|
|
|
|
|
/Iix
|
|
|
|
|
|
|
|
|
|
/(?|(?<a>A)|(?<a>B))/I
|
|
|
|
|
AB\=copy=a
|
|
|
|
|
BA\=copy=a
|
|
|
|
|
|
|
|
|
|
/(?|(?<a>A)|(?<b>B))/
|
|
|
|
|
|
|
|
|
|
/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
|
|
|
|
|
b(?<quote> (?<apostrophe>')|(?<realquote>")) )
|
|
|
|
|
(?('quote')[a-z]+|[0-9]+)/Ix,dupnames
|
|
|
|
|
a"aaaaa
|
|
|
|
|
b"aaaaa
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
b"11111
|
|
|
|
|
a"11111
|
|
|
|
|
|
|
|
|
|
/^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/IBx,dupnames
|
|
|
|
|
abcdX
|
|
|
|
|
eX
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdY
|
|
|
|
|
ey
|
|
|
|
|
|
|
|
|
|
/(?<A>a) (b)(c) (?<A>d (?(R&A)$ | (?4)) )/IBx,dupnames
|
|
|
|
|
abcdd
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcdde
|
|
|
|
|
|
|
|
|
|
/abcd*/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
xxxxabcd\=ps
|
|
|
|
|
xxxxabcd\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abcd*/i
|
2014-08-03 20:15:32 +02:00
|
|
|
|
xxxxabcd\=ps
|
|
|
|
|
xxxxabcd\=ph
|
|
|
|
|
XXXXABCD\=ps
|
|
|
|
|
XXXXABCD\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc\d*/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
xxxxabc1\=ps
|
|
|
|
|
xxxxabc1\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(a)bc\1*/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
xxxxabca\=ps
|
|
|
|
|
xxxxabca\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc[de]*/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
xxxxabcde\=ps
|
|
|
|
|
xxxxabcde\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(\3)(\1)(a)/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
cat
|
|
|
|
|
|
|
|
|
|
/(\3)(\1)(a)/I,alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
cat
|
|
|
|
|
|
|
|
|
|
/(\3)(\1)(a)/I
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
cat
|
|
|
|
|
|
|
|
|
|
/i(?(DEFINE)(?<s>a))/I
|
|
|
|
|
i
|
|
|
|
|
|
|
|
|
|
/()i(?(1)a)/I
|
|
|
|
|
ia
|
|
|
|
|
|
|
|
|
|
/(?i)a(?-i)b|c/B
|
|
|
|
|
XabX
|
|
|
|
|
XAbX
|
|
|
|
|
CcC
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
XABX
|
|
|
|
|
|
|
|
|
|
/(?i)a(?s)b|c/B
|
|
|
|
|
|
|
|
|
|
/(?i)a(?s-i)b|c/B
|
|
|
|
|
|
|
|
|
|
/^(ab(c\1)d|x){2}$/B
|
|
|
|
|
xabcxd
|
|
|
|
|
|
|
|
|
|
/^(?&t)*+(?(DEFINE)(?<t>.))$/B
|
|
|
|
|
|
|
|
|
|
/^(?&t)*(?(DEFINE)(?<t>.))$/B
|
|
|
|
|
|
2015-09-16 18:49:48 +02:00
|
|
|
|
# This one is here because Perl gives the match as "b" rather than "ab". I
|
|
|
|
|
# believe this to be a Perl bug.
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(?>a\Kb)z|(ab)/
|
2014-10-31 13:34:34 +01:00
|
|
|
|
ab\=startchar
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
|
2015-08-09 18:29:35 +02:00
|
|
|
|
abcd
|
|
|
|
|
0abc
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc(*MARK:)pqr/
|
|
|
|
|
|
|
|
|
|
/abc(*:)pqr/
|
|
|
|
|
|
|
|
|
|
/abc(*FAIL:123)xyz/
|
|
|
|
|
|
|
|
|
|
# This should, and does, fail. In Perl, it does not, which I think is a
|
|
|
|
|
# bug because replacing the B in the pattern by (B|D) does make it fail.
|
|
|
|
|
|
|
|
|
|
/A(*COMMIT)B/aftertext,mark
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ACABX
|
|
|
|
|
|
|
|
|
|
# These should be different, but in Perl they are not, which I think
|
|
|
|
|
# is a bug in Perl.
|
|
|
|
|
|
|
|
|
|
/A(*THEN)B|A(*THEN)C/mark
|
|
|
|
|
AC
|
|
|
|
|
|
|
|
|
|
/A(*PRUNE)B|A(*PRUNE)C/mark
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
AC
|
|
|
|
|
|
|
|
|
|
# Mark names can be duplicated. Perl doesn't give a mark for this one,
|
|
|
|
|
# though PCRE2 does.
|
|
|
|
|
|
|
|
|
|
/^A(*:A)B|^X(*:A)Y/mark
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
XAQQ
|
|
|
|
|
|
|
|
|
|
# COMMIT at the start of a pattern should be the same as an anchor. Perl
|
|
|
|
|
# optimizations defeat this. So does the PCRE2 optimization unless we disable
|
|
|
|
|
# it.
|
|
|
|
|
|
|
|
|
|
/(*COMMIT)ABC/
|
|
|
|
|
ABCDEFG
|
2014-10-01 18:16:27 +02:00
|
|
|
|
|
|
|
|
|
/(*COMMIT)ABC/no_start_optimize
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-10-01 18:16:27 +02:00
|
|
|
|
DEFGABC
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(ab (c+(*THEN)cd) | xyz)/x
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcccd
|
|
|
|
|
|
|
|
|
|
/^(ab (c+(*PRUNE)cd) | xyz)/x
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcccd
|
|
|
|
|
|
|
|
|
|
/^(ab (c+(*FAIL)cd) | xyz)/x
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abcccd
|
|
|
|
|
|
|
|
|
|
# Perl gets some of these wrong
|
|
|
|
|
|
|
|
|
|
/(?>.(*ACCEPT))*?5/
|
|
|
|
|
abcde
|
|
|
|
|
|
|
|
|
|
/(.(*ACCEPT))*?5/
|
|
|
|
|
abcde
|
|
|
|
|
|
|
|
|
|
/(.(*ACCEPT))5/
|
|
|
|
|
abcde
|
|
|
|
|
|
|
|
|
|
/(.(*ACCEPT))*5/
|
|
|
|
|
abcde
|
|
|
|
|
|
|
|
|
|
/A\NB./B
|
|
|
|
|
ACBD
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
A\nB
|
|
|
|
|
ACB\n
|
|
|
|
|
|
|
|
|
|
/A\NB./Bs
|
|
|
|
|
ACBD
|
|
|
|
|
ACB\n
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
A\nB
|
|
|
|
|
|
|
|
|
|
/A\NB/newline=crlf
|
|
|
|
|
A\nB
|
|
|
|
|
A\rB
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
A\r\nB
|
|
|
|
|
|
|
|
|
|
/\R+b/B
|
|
|
|
|
|
|
|
|
|
/\R+\n/B
|
|
|
|
|
|
|
|
|
|
/\R+\d/B
|
|
|
|
|
|
|
|
|
|
/\d*\R/B
|
|
|
|
|
|
|
|
|
|
/\s*\R/B
|
|
|
|
|
\x20\x0a
|
|
|
|
|
\x20\x0d
|
|
|
|
|
\x20\x0d\x0a
|
|
|
|
|
|
|
|
|
|
/\S*\R/B
|
|
|
|
|
a\x0a
|
|
|
|
|
|
|
|
|
|
/X\h*\R/B
|
|
|
|
|
X\x20\x0a
|
|
|
|
|
|
|
|
|
|
/X\H*\R/B
|
|
|
|
|
X\x0d\x0a
|
|
|
|
|
|
|
|
|
|
/X\H+\R/B
|
|
|
|
|
X\x0d\x0a
|
|
|
|
|
|
|
|
|
|
/X\H++\R/B
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
X\x0d\x0a
|
|
|
|
|
|
|
|
|
|
/(?<=abc)def/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc$/
|
|
|
|
|
abc
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ps
|
|
|
|
|
abc\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc$/m
|
|
|
|
|
abc
|
|
|
|
|
abc\n
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ph
|
|
|
|
|
abc\n\=ph
|
|
|
|
|
abc\=ps
|
|
|
|
|
abc\n\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc\z/
|
|
|
|
|
abc
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ps
|
|
|
|
|
abc\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc\Z/
|
|
|
|
|
abc
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ps
|
|
|
|
|
abc\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc\b/
|
|
|
|
|
abc
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ps
|
|
|
|
|
abc\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abc\B/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ps
|
|
|
|
|
abc\=ph
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
|
|
|
|
abc
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/.+/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Bad offsets
|
|
|
|
|
abc\=offset=4
|
|
|
|
|
abc\=offset=-4
|
|
|
|
|
\= Valid data
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abc\=offset=0
|
|
|
|
|
abc\=offset=1
|
|
|
|
|
abc\=offset=2
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abc\=offset=3
|
|
|
|
|
|
|
|
|
|
/^\cģ/
|
|
|
|
|
|
|
|
|
|
/(?P<abn>(?P=abn)xxx)/B
|
|
|
|
|
|
|
|
|
|
/(a\1z)/B
|
|
|
|
|
|
|
|
|
|
/(?P<abn>(?P=abn)(?<badstufxxx)/B
|
|
|
|
|
|
|
|
|
|
/(?P<abn>(?P=axn)xxx)/B
|
|
|
|
|
|
|
|
|
|
/(?P<abn>(?P=axn)xxx)(?<axn>yy)/B
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
/((?>\r\n|\n|\x0b|\f|\r|\x85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
/(?=a)[bcd]/I
|
|
|
|
|
|
|
|
|
|
/((?=a))[bcd]/I
|
|
|
|
|
|
|
|
|
|
/((?=a))+[bcd]/I
|
|
|
|
|
|
|
|
|
|
/((?=a))++[bcd]/I
|
|
|
|
|
|
|
|
|
|
/(?=a+)[bcd]/Ii
|
|
|
|
|
|
|
|
|
|
/(?=a+?)[bcd]/Ii
|
|
|
|
|
|
|
|
|
|
/(?=a++)[bcd]/Ii
|
|
|
|
|
|
|
|
|
|
/(?=a{3})[bcd]/Ii
|
|
|
|
|
|
|
|
|
|
/(abc)\1+/
|
|
|
|
|
|
|
|
|
|
# Perl doesn't get these right IMO (the 3rd is PCRE2-specific)
|
|
|
|
|
|
|
|
|
|
/(?1)(?:(b(*ACCEPT))){0}/
|
|
|
|
|
b
|
|
|
|
|
|
|
|
|
|
/(?1)(?:(b(*ACCEPT))){0}c/
|
|
|
|
|
bc
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
b
|
|
|
|
|
|
|
|
|
|
/(?1)(?:((*ACCEPT))){0}c/
|
|
|
|
|
c
|
|
|
|
|
c\=notempty
|
|
|
|
|
|
|
|
|
|
/^.*?(?(?=a)a|b(*THEN)c)/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ba
|
|
|
|
|
|
|
|
|
|
/^.*?(?(?=a)a|bc)/
|
|
|
|
|
ba
|
|
|
|
|
|
|
|
|
|
/^.*?(?(?=a)a(*THEN)b|c)/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ac
|
|
|
|
|
|
|
|
|
|
/^.*?(?(?=a)a(*THEN)b)c/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ac
|
|
|
|
|
|
|
|
|
|
/^.*?(a(*THEN)b)c/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aabc
|
|
|
|
|
|
|
|
|
|
/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
|
|
|
|
|
aabc
|
|
|
|
|
|
|
|
|
|
/^.*?(a(*THEN)b|z)c/
|
|
|
|
|
aabc
|
|
|
|
|
|
|
|
|
|
/^.*?(z|a(*THEN)b)c/
|
|
|
|
|
aabc
|
|
|
|
|
|
|
|
|
|
# These are here because they are not Perl-compatible; the studying means the
|
|
|
|
|
# mark is not seen.
|
|
|
|
|
|
|
|
|
|
/(*MARK:A)(*SKIP:B)(C|X)/mark
|
|
|
|
|
C
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
D
|
|
|
|
|
|
|
|
|
|
/(*:A)A+(*SKIP:A)(B|Z)/mark
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
AAAC
|
|
|
|
|
|
|
|
|
|
# ----------------------------
|
|
|
|
|
|
|
|
|
|
"(?=a*(*ACCEPT)b)c"
|
|
|
|
|
c
|
|
|
|
|
c\=notempty
|
|
|
|
|
|
|
|
|
|
/(?1)c(?(DEFINE)((*ACCEPT)b))/
|
|
|
|
|
c
|
|
|
|
|
c\=notempty
|
|
|
|
|
|
|
|
|
|
/(?>(*ACCEPT)b)c/
|
|
|
|
|
c
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
c\=notempty
|
|
|
|
|
|
|
|
|
|
/(?:(?>(a)))+a%/allaftertext
|
|
|
|
|
%aa%
|
|
|
|
|
|
|
|
|
|
/(a)b|ac/allaftertext
|
|
|
|
|
ac\=ovector=1
|
|
|
|
|
|
|
|
|
|
/(a)(b)x|abc/allaftertext
|
|
|
|
|
abc\=ovector=2
|
|
|
|
|
|
|
|
|
|
/(a)bc|(a)(b)\2/
|
|
|
|
|
abc\=ovector=1
|
|
|
|
|
abc\=ovector=2
|
|
|
|
|
aba\=ovector=1
|
|
|
|
|
aba\=ovector=2
|
|
|
|
|
aba\=ovector=3
|
|
|
|
|
aba\=ovector=4
|
|
|
|
|
|
|
|
|
|
/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/I
|
|
|
|
|
|
|
|
|
|
/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/I
|
|
|
|
|
|
|
|
|
|
/(a(?2)|b)(b(?1)|a)(?1)(?2)/I
|
|
|
|
|
|
|
|
|
|
/(abc)(?1)/I
|
|
|
|
|
|
|
|
|
|
/(?:(foo)|(bar)|(baz))X/allcaptures
|
|
|
|
|
bazfooX
|
|
|
|
|
foobazbarX
|
|
|
|
|
barfooX
|
|
|
|
|
bazX
|
|
|
|
|
foobarbazX
|
|
|
|
|
bazfooX\=ovector=0
|
|
|
|
|
bazfooX\=ovector=1
|
|
|
|
|
bazfooX\=ovector=2
|
|
|
|
|
bazfooX\=ovector=3
|
|
|
|
|
|
|
|
|
|
/(?=abc){3}abc/B
|
|
|
|
|
|
|
|
|
|
/(?=abc)+abc/B
|
|
|
|
|
|
|
|
|
|
/(?=abc)++abc/B
|
|
|
|
|
|
|
|
|
|
/(?=abc){0}xyz/B
|
|
|
|
|
|
|
|
|
|
/(?=(a))?./B
|
|
|
|
|
|
|
|
|
|
/(?=(a))??./B
|
|
|
|
|
|
|
|
|
|
/^(?=(a)){0}b(?1)/B
|
|
|
|
|
|
|
|
|
|
/(?(DEFINE)(a))?b(?1)/B
|
|
|
|
|
|
|
|
|
|
/^(?=(?1))?[az]([abc])d/B
|
|
|
|
|
|
|
|
|
|
/^(?!a){0}\w+/B
|
|
|
|
|
|
|
|
|
|
/(?<=(abc))?xyz/B
|
|
|
|
|
|
|
|
|
|
/[:a[:abc]b:]/B
|
|
|
|
|
|
|
|
|
|
/^(a(*:A)(d|e(*:B))z|aeq)/auto_callout
|
|
|
|
|
adz
|
|
|
|
|
aez
|
|
|
|
|
aeqwerty
|
|
|
|
|
|
|
|
|
|
/.(*F)/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/\btype\b\W*?\btext\b\W*?\bjavascript\b/I
|
|
|
|
|
|
|
|
|
|
/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/I
|
|
|
|
|
|
|
|
|
|
/a(*SKIP)c|b(*ACCEPT)|/I,aftertext
|
|
|
|
|
a
|
|
|
|
|
|
|
|
|
|
/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/I
|
|
|
|
|
ax
|
|
|
|
|
|
|
|
|
|
'a*(*ACCEPT)b'aftertext
|
|
|
|
|
abc\=notempty_atstart
|
|
|
|
|
bbb\=notempty_atstart
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
|
|
|
|
\=notempty_atstart
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(*ACCEPT)a/I,aftertext
|
|
|
|
|
bax
|
|
|
|
|
|
|
|
|
|
/z(*ACCEPT)a/I,aftertext
|
|
|
|
|
baxzbx
|
|
|
|
|
|
|
|
|
|
/^(?>a+)(?>(z+))\w/B
|
|
|
|
|
aaaazzzzb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aazz
|
|
|
|
|
|
|
|
|
|
/(.)(\1|a(?2))/
|
|
|
|
|
bab
|
|
|
|
|
|
|
|
|
|
/\1|(.)(?R)\1/
|
|
|
|
|
cbbbc
|
|
|
|
|
|
|
|
|
|
/(.)((?(1)c|a)|a(?2))/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
baa
|
|
|
|
|
|
|
|
|
|
/(?P<abn>(?P=abn)xxx)/B
|
|
|
|
|
|
|
|
|
|
/(a\1z)/B
|
|
|
|
|
|
|
|
|
|
/^a\x41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
aAz
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
ax41z
|
|
|
|
|
|
|
|
|
|
/^a[m\x41]z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
aAz
|
|
|
|
|
|
|
|
|
|
/^a\x1z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
ax1z
|
|
|
|
|
|
|
|
|
|
/^a\u0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
aAz
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
au0041z
|
|
|
|
|
|
|
|
|
|
/^a[m\u0041]z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
aAz
|
|
|
|
|
|
|
|
|
|
/^a\u041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
au041z
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aAz
|
|
|
|
|
|
|
|
|
|
/^a\U0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames
|
|
|
|
|
aU0041z
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
aAz
|
|
|
|
|
|
|
|
|
|
/(?(?=c)c|d)++Y/B
|
|
|
|
|
|
|
|
|
|
/(?(?=c)c|d)*+Y/B
|
|
|
|
|
|
|
|
|
|
/a[\NB]c/
|
|
|
|
|
aNc
|
|
|
|
|
|
|
|
|
|
/a[B-\Nc]/
|
|
|
|
|
|
|
|
|
|
/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 PCRE2 there is a tag.
|
|
|
|
|
|
|
|
|
|
/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/x,mark
|
|
|
|
|
AABC
|
|
|
|
|
XXYZ
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
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/mark
|
|
|
|
|
aw
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(q|b)(*:m)f|a(*:n)w/mark
|
|
|
|
|
aw
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
# After a partial match, the behaviour is as for a failure.
|
|
|
|
|
|
|
|
|
|
/^a(*:X)bcde/mark
|
2014-08-03 20:15:32 +02:00
|
|
|
|
abc\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
# These are here because Perl doesn't return a mark, except for the first.
|
|
|
|
|
|
|
|
|
|
/(?=(*:x))(q|)/aftertext,mark
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(?=(*:x))((*:y)q|)/aftertext,mark
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(?=(*:x))(?:(*:y)q|)/aftertext,mark
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(?=(*:x))(?>(*:y)q|)/aftertext,mark
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(?=a(*:x))(?!a(*:y)c)/aftertext,mark
|
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/(?=a(*:x))(?=a(*:y)c|)/aftertext,mark
|
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/(..)\1/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
ab\=ps
|
|
|
|
|
aba\=ps
|
|
|
|
|
abab\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(..)\1/i
|
2014-08-03 20:15:32 +02:00
|
|
|
|
ab\=ps
|
|
|
|
|
abA\=ps
|
|
|
|
|
aBAb\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(..)\1{2,}/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
ab\=ps
|
|
|
|
|
aba\=ps
|
|
|
|
|
abab\=ps
|
|
|
|
|
ababa\=ps
|
|
|
|
|
ababab\=ps
|
|
|
|
|
ababab\=ph
|
|
|
|
|
abababa\=ps
|
|
|
|
|
abababa\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(..)\1{2,}/i
|
2014-08-03 20:15:32 +02:00
|
|
|
|
ab\=ps
|
|
|
|
|
aBa\=ps
|
|
|
|
|
aBAb\=ps
|
|
|
|
|
AbaBA\=ps
|
|
|
|
|
abABAb\=ps
|
|
|
|
|
aBAbaB\=ph
|
|
|
|
|
abABabA\=ps
|
|
|
|
|
abaBABa\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(..)\1{2,}?x/i
|
2014-08-03 20:15:32 +02:00
|
|
|
|
ab\=ps
|
|
|
|
|
abA\=ps
|
|
|
|
|
aBAb\=ps
|
|
|
|
|
abaBA\=ps
|
|
|
|
|
abAbaB\=ps
|
|
|
|
|
abaBabA\=ps
|
|
|
|
|
abAbABaBx\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(..)\1/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
aba\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(..)\1{2,3}x/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
aba\=ps
|
|
|
|
|
ababa\=ps
|
|
|
|
|
ababa\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abababx
|
|
|
|
|
ababababx
|
|
|
|
|
|
|
|
|
|
/^(..)\1{2,3}?x/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
aba\=ps
|
|
|
|
|
ababa\=ps
|
|
|
|
|
ababa\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
abababx
|
|
|
|
|
ababababx
|
|
|
|
|
|
|
|
|
|
/^(..)(\1{2,3})ab/
|
|
|
|
|
abababab
|
|
|
|
|
|
|
|
|
|
/^\R/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
\r\=ps
|
|
|
|
|
\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^\R{2,3}x/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
\r\=ps
|
|
|
|
|
\r\=ph
|
|
|
|
|
\r\r\=ps
|
|
|
|
|
\r\r\=ph
|
|
|
|
|
\r\r\r\=ps
|
|
|
|
|
\r\r\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
\r\rx
|
|
|
|
|
\r\r\rx
|
|
|
|
|
|
|
|
|
|
/^\R{2,3}?x/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
\r\=ps
|
|
|
|
|
\r\=ph
|
|
|
|
|
\r\r\=ps
|
|
|
|
|
\r\r\=ph
|
|
|
|
|
\r\r\r\=ps
|
|
|
|
|
\r\r\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
\r\rx
|
|
|
|
|
\r\r\rx
|
|
|
|
|
|
|
|
|
|
/^\R?x/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
\r\=ps
|
|
|
|
|
\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
x
|
|
|
|
|
\rx
|
|
|
|
|
|
|
|
|
|
/^\R+x/
|
2014-08-03 20:15:32 +02:00
|
|
|
|
\r\=ps
|
|
|
|
|
\r\=ph
|
|
|
|
|
\r\n\=ps
|
|
|
|
|
\r\n\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
\rx
|
|
|
|
|
|
|
|
|
|
/^a$/newline=crlf
|
2014-08-03 20:15:32 +02:00
|
|
|
|
a\r\=ps
|
|
|
|
|
a\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^a$/m,newline=crlf
|
2014-08-03 20:15:32 +02:00
|
|
|
|
a\r\=ps
|
|
|
|
|
a\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(a$|a\r)/newline=crlf
|
2014-08-03 20:15:32 +02:00
|
|
|
|
a\r\=ps
|
|
|
|
|
a\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(a$|a\r)/m,newline=crlf
|
2014-08-03 20:15:32 +02:00
|
|
|
|
a\r\=ps
|
|
|
|
|
a\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/./newline=crlf
|
2014-08-03 20:15:32 +02:00
|
|
|
|
\r\=ps
|
|
|
|
|
\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/.{2,3}/newline=crlf
|
2014-08-03 20:15:32 +02:00
|
|
|
|
\r\=ps
|
|
|
|
|
\r\=ph
|
|
|
|
|
\r\r\=ps
|
|
|
|
|
\r\r\=ph
|
|
|
|
|
\r\r\r\=ps
|
|
|
|
|
\r\r\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/.{2,3}?/newline=crlf
|
2014-08-03 20:15:32 +02:00
|
|
|
|
\r\=ps
|
|
|
|
|
\r\=ph
|
|
|
|
|
\r\r\=ps
|
|
|
|
|
\r\r\=ph
|
|
|
|
|
\r\r\r\=ps
|
|
|
|
|
\r\r\r\=ph
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
"AB(C(D))(E(F))?(?(?=\2)(?=\4))"
|
|
|
|
|
ABCDGHI\=ovector=01
|
|
|
|
|
|
|
|
|
|
# These are all run as real matches in test 1; here we are just checking the
|
|
|
|
|
# settings of the anchored and startline bits.
|
|
|
|
|
|
|
|
|
|
/(?>.*?a)(?<=ba)/I
|
|
|
|
|
|
|
|
|
|
/(?:.*?a)(?<=ba)/I
|
|
|
|
|
|
|
|
|
|
/.*?a(*PRUNE)b/I
|
|
|
|
|
|
|
|
|
|
/.*?a(*PRUNE)b/Is
|
|
|
|
|
|
|
|
|
|
/^a(*PRUNE)b/Is
|
|
|
|
|
|
|
|
|
|
/.*?a(*SKIP)b/I
|
|
|
|
|
|
|
|
|
|
/(?>.*?a)b/Is
|
|
|
|
|
|
|
|
|
|
/(?>.*?a)b/I
|
|
|
|
|
|
|
|
|
|
/(?>^a)b/Is
|
|
|
|
|
|
|
|
|
|
/(?>.*?)(?<=(abcd)|(wxyz))/I
|
|
|
|
|
|
|
|
|
|
/(?>.*)(?<=(abcd)|(wxyz))/I
|
|
|
|
|
|
|
|
|
|
"(?>.*)foo"I
|
|
|
|
|
|
|
|
|
|
"(?>.*?)foo"I
|
|
|
|
|
|
|
|
|
|
/(?>^abc)/Im
|
|
|
|
|
|
|
|
|
|
/(?>.*abc)/Im
|
|
|
|
|
|
|
|
|
|
/(?:.*abc)/Im
|
|
|
|
|
|
|
|
|
|
/(?:(a)+(?C1)bb|aa(?C2)b)/
|
|
|
|
|
aab\=callout_capture
|
|
|
|
|
|
|
|
|
|
/(?:(a)++(?C1)bb|aa(?C2)b)/
|
|
|
|
|
aab\=callout_capture
|
|
|
|
|
|
|
|
|
|
/(?:(?>(a))(?C1)bb|aa(?C2)b)/
|
|
|
|
|
aab\=callout_capture
|
|
|
|
|
|
|
|
|
|
/(?:(?1)(?C1)x|ab(?C2))((a)){0}/
|
|
|
|
|
aab\=callout_capture
|
|
|
|
|
|
|
|
|
|
/(?1)(?C1)((a)(?C2)){0}/
|
|
|
|
|
aab\=callout_capture
|
|
|
|
|
|
|
|
|
|
/(?:(a)+(?C1)bb|aa(?C2)b)++/
|
|
|
|
|
aab\=callout_capture
|
2017-03-25 07:33:41 +01:00
|
|
|
|
aab\=callout_capture,ovector=1
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(ab)x|ab/
|
|
|
|
|
ab\=ovector=0
|
|
|
|
|
ab\=ovector=1
|
|
|
|
|
|
|
|
|
|
/(?<=123)(*MARK:xx)abc/mark
|
2014-08-03 20:15:32 +02:00
|
|
|
|
xxxx123a\=ph
|
|
|
|
|
xxxx123a\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2014-10-31 13:34:34 +01:00
|
|
|
|
/123\Kabc/startchar
|
2014-08-03 20:15:32 +02:00
|
|
|
|
xxxx123a\=ph
|
|
|
|
|
xxxx123a\=ps
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(?(?=a)aa|bb)/auto_callout
|
|
|
|
|
bb
|
|
|
|
|
|
|
|
|
|
/(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/
|
|
|
|
|
bb
|
|
|
|
|
|
|
|
|
|
# Perl seems to have a bug with this one.
|
|
|
|
|
|
|
|
|
|
/aaaaa(*COMMIT)(*PRUNE)b|a+c/
|
|
|
|
|
aaaaaac
|
|
|
|
|
|
|
|
|
|
# Here are some that Perl treats differently because of the way it handles
|
|
|
|
|
# backtracking verbs.
|
|
|
|
|
|
|
|
|
|
/(?!a(*COMMIT)b)ac|ad/
|
|
|
|
|
ac
|
|
|
|
|
ad
|
|
|
|
|
|
|
|
|
|
/^(?!a(*THEN)b|ac)../
|
|
|
|
|
ad
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
|
|
|
|
ac
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/^(?=a(*THEN)b|ac)/
|
|
|
|
|
ac
|
|
|
|
|
|
|
|
|
|
/\A.*?(?:a|b(*THEN)c)/
|
|
|
|
|
ba
|
|
|
|
|
|
|
|
|
|
/\A.*?(?:a|b(*THEN)c)++/
|
|
|
|
|
ba
|
|
|
|
|
|
|
|
|
|
/\A.*?(?:a|b(*THEN)c|d)/
|
|
|
|
|
ba
|
|
|
|
|
|
|
|
|
|
/(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/
|
|
|
|
|
aac
|
|
|
|
|
|
|
|
|
|
/\A.*?(a|b(*THEN)c)/
|
|
|
|
|
ba
|
|
|
|
|
|
|
|
|
|
/^(A(*THEN)B|A(*THEN)D)/
|
|
|
|
|
AD
|
|
|
|
|
|
|
|
|
|
/(?!b(*THEN)a)bn|bnn/
|
|
|
|
|
bnn
|
|
|
|
|
|
|
|
|
|
/(?(?=b(*SKIP)a)bn|bnn)/
|
2017-03-20 11:41:13 +01:00
|
|
|
|
bnn
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/(?=b(*THEN)a|)bn|bnn/
|
|
|
|
|
bnn
|
|
|
|
|
|
|
|
|
|
# This test causes a segfault with Perl 5.18.0
|
|
|
|
|
|
|
|
|
|
/^(?=(a)){0}b(?1)/
|
|
|
|
|
backgammon
|
|
|
|
|
|
|
|
|
|
/(?|(?<n>f)|(?<n>b))/I,dupnames
|
|
|
|
|
|
|
|
|
|
/(?<a>abc)(?<a>z)\k<a>()/IB,dupnames
|
|
|
|
|
|
|
|
|
|
/a*[bcd]/B
|
|
|
|
|
|
|
|
|
|
/[bcd]*a/B
|
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
# A complete set of tests for auto-possessification of character types, but
|
|
|
|
|
# omitting \C because it might be disabled (it has its own tests).
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\D+\D \D+\d \D+\S \D+\s \D+\W \D+\w \D+. \D+\R \D+\H \D+\h \D+\V \D+\v \D+\Z \D+\z \D+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\d+\D \d+\d \d+\S \d+\s \d+\W \d+\w \d+. \d+\R \d+\H \d+\h \d+\V \d+\v \d+\Z \d+\z \d+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\S+\D \S+\d \S+\S \S+\s \S+\W \S+\w \S+. \S+\R \S+\H \S+\h \S+\V \S+\v \S+\Z \S+\z \S+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\s+\D \s+\d \s+\S \s+\s \s+\W \s+\w \s+. \s+\R \s+\H \s+\h \s+\V \s+\v \s+\Z \s+\z \s+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\W+\D \W+\d \W+\S \W+\s \W+\W \W+\w \W+. \W+\R \W+\H \W+\h \W+\V \W+\v \W+\Z \W+\z \W+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\w+\D \w+\d \w+\S \w+\s \w+\W \w+\w \w+. \w+\R \w+\H \w+\h \w+\V \w+\v \w+\Z \w+\z \w+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\R+\D \R+\d \R+\S \R+\s \R+\W \R+\w \R+. \R+\R \R+\H \R+\h \R+\V \R+\v \R+\Z \R+\z \R+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\H+\D \H+\d \H+\S \H+\s \H+\W \H+\w \H+. \H+\R \H+\H \H+\h \H+\V \H+\v \H+\Z \H+\z \H+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\h+\D \h+\d \h+\S \h+\s \h+\W \h+\w \h+. \h+\R \h+\H \h+\h \h+\V \h+\v \h+\Z \h+\z \h+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\V+\D \V+\d \V+\S \V+\s \V+\W \V+\w \V+. \V+\R \V+\H \V+\h \V+\V \V+\v \V+\Z \V+\z \V+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\v+\D \v+\d \v+\S \v+\s \v+\W \v+\w \v+. \v+\R \v+\H \v+\h \v+\V \v+\v \v+\Z \v+\z \v+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/ a+\D a+\d a+\S a+\s a+\W a+\w a+. a+\R a+\H a+\h a+\V a+\v a+\Z a+\z a+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/\n+\D \n+\d \n+\S \n+\s \n+\W \n+\w \n+. \n+\R \n+\H \n+\h \n+\V \n+\v \n+\Z \n+\z \n+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 15:50:56 +02:00
|
|
|
|
/ .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/Bx
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2015-10-17 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
|
|
|
|
|
|
|
|
|
/[a-[.xxx.]]+/
|
|
|
|
|
|
|
|
|
|
/[a-[=xxx=]]+/
|
|
|
|
|
|
|
|
|
|
/[a-[!xxx!]]+/
|
|
|
|
|
|
|
|
|
|
/[A-[!xxx!]]+/
|
|
|
|
|
A]]]
|
|
|
|
|
|
|
|
|
|
/[a-\d]+/
|
|
|
|
|
|
|
|
|
|
/(?<0abc>xx)/
|
|
|
|
|
|
|
|
|
|
/(?&1abc)xx(?<1abc>y)/
|
|
|
|
|
|
|
|
|
|
/(?<ab-cd>xx)/
|
|
|
|
|
|
|
|
|
|
/(?'0abc'xx)/
|
|
|
|
|
|
|
|
|
|
/(?P<0abc>xx)/
|
|
|
|
|
|
|
|
|
|
/\k<5ghj>/
|
|
|
|
|
|
|
|
|
|
/\k'5ghj'/
|
|
|
|
|
|
|
|
|
|
/\k{2fgh}/
|
|
|
|
|
|
|
|
|
|
/(?P=8yuki)/
|
|
|
|
|
|
|
|
|
|
/\g{4df}/
|
|
|
|
|
|
|
|
|
|
/(?&1abc)xx(?<1abc>y)/
|
|
|
|
|
|
|
|
|
|
/(?P>1abc)xx(?<1abc>y)/
|
|
|
|
|
|
|
|
|
|
/\g'3gh'/
|
|
|
|
|
|
|
|
|
|
/\g<5fg>/
|
|
|
|
|
|
|
|
|
|
/(?(<4gh>)abc)/
|
|
|
|
|
|
|
|
|
|
/(?('4gh')abc)/
|
|
|
|
|
|
|
|
|
|
/(?(4gh)abc)/
|
|
|
|
|
|
|
|
|
|
/(?(R&6yh)abc)/
|
|
|
|
|
|
|
|
|
|
/(((a\2)|(a*)\g<-1>))*a?/B
|
|
|
|
|
|
|
|
|
|
# Test the ugly "start or end of word" compatibility syntax.
|
|
|
|
|
|
|
|
|
|
/[[:<:]]red[[:>:]]/B
|
|
|
|
|
little red riding hood
|
|
|
|
|
a /red/ thing
|
|
|
|
|
red is a colour
|
|
|
|
|
put it all on red
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
no reduction
|
|
|
|
|
Alfred Winifred
|
|
|
|
|
|
|
|
|
|
/[a[:<:]] should give error/
|
|
|
|
|
|
|
|
|
|
/(?=ab\K)/aftertext
|
2014-10-31 13:34:34 +01:00
|
|
|
|
abcd\=startchar
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
|
|
|
|
/abcd/newline=lf,firstline
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
xx\nxabcd
|
|
|
|
|
|
|
|
|
|
# Test stack guard external calls.
|
|
|
|
|
|
|
|
|
|
/(((a)))/stackguard=1
|
|
|
|
|
|
|
|
|
|
/(((a)))/stackguard=2
|
|
|
|
|
|
|
|
|
|
/(((a)))/stackguard=3
|
|
|
|
|
|
|
|
|
|
/(((((a)))))/
|
|
|
|
|
|
|
|
|
|
# End stack guard tests
|
|
|
|
|
|
|
|
|
|
/^\w+(?>\s*)(?<=\w)/B
|
|
|
|
|
|
|
|
|
|
/\othing/
|
|
|
|
|
|
|
|
|
|
/\o{}/
|
|
|
|
|
|
|
|
|
|
/\o{whatever}/
|
|
|
|
|
|
|
|
|
|
/\xthing/
|
|
|
|
|
|
|
|
|
|
/\x{}/
|
|
|
|
|
|
|
|
|
|
/\x{whatever}/
|
|
|
|
|
|
|
|
|
|
/A\8B/
|
|
|
|
|
|
|
|
|
|
/A\9B/
|
|
|
|
|
|
|
|
|
|
# This one is here because Perl fails to match "12" for this pattern when the $
|
|
|
|
|
# is present.
|
|
|
|
|
|
|
|
|
|
/^(?(?=abc)\w{3}:|\d\d)$/
|
|
|
|
|
abc:
|
|
|
|
|
12
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-07-24 18:32:38 +02:00
|
|
|
|
123
|
|
|
|
|
xyz
|
|
|
|
|
|
|
|
|
|
# Perl gets this one wrong, giving "a" as the after text for ca and failing to
|
|
|
|
|
# match for cd.
|
|
|
|
|
|
|
|
|
|
/(?(?=ab)ab)/aftertext
|
|
|
|
|
abxxx
|
|
|
|
|
ca
|
|
|
|
|
cd
|
2014-08-16 11:46:58 +02:00
|
|
|
|
|
|
|
|
|
# This should test both paths for processing OP_RECURSE.
|
|
|
|
|
|
|
|
|
|
/(?(R)a+|(?R)b)/
|
|
|
|
|
aaaabcde
|
|
|
|
|
aaaabcde\=ovector=100
|
2014-07-24 18:32:38 +02:00
|
|
|
|
|
2014-08-26 13:46:21 +02:00
|
|
|
|
/a*?b*?/
|
|
|
|
|
ab
|
|
|
|
|
|
|
|
|
|
/(*NOTEMPTY)a*?b*?/
|
|
|
|
|
ab
|
|
|
|
|
ba
|
|
|
|
|
cb
|
|
|
|
|
|
|
|
|
|
/(*NOTEMPTY_ATSTART)a*?b*?/aftertext
|
|
|
|
|
ab
|
|
|
|
|
cdab
|
|
|
|
|
|
|
|
|
|
/(?(VERSION>=10.0)yes|no)/I
|
|
|
|
|
yesno
|
|
|
|
|
|
|
|
|
|
/(?(VERSION=8)yes){3}/BI,aftertext
|
|
|
|
|
yesno
|
|
|
|
|
|
|
|
|
|
/(?(VERSION=8)yes|no){3}/I
|
|
|
|
|
yesnononoyes
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-08-26 13:46:21 +02:00
|
|
|
|
yesno
|
|
|
|
|
|
|
|
|
|
/(?:(?<VERSION>abc)|xyz)(?(VERSION)yes|no)/I
|
|
|
|
|
abcyes
|
|
|
|
|
xyzno
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-08-26 13:46:21 +02:00
|
|
|
|
abcno
|
|
|
|
|
xyzyes
|
|
|
|
|
|
|
|
|
|
/(?(VERSION<10)yes|no)/
|
|
|
|
|
|
|
|
|
|
/(?(VERSION>10)yes|no)/
|
|
|
|
|
|
|
|
|
|
/(?(VERSION>=10.0.0)yes|no)/
|
|
|
|
|
|
2015-11-01 17:28:13 +01:00
|
|
|
|
/(?(VERSION=10.101)yes|no)/
|
|
|
|
|
|
2014-10-03 11:47:59 +02:00
|
|
|
|
/abcd/I
|
|
|
|
|
|
|
|
|
|
/abcd/I,no_start_optimize
|
|
|
|
|
|
2014-10-10 18:16:44 +02:00
|
|
|
|
/(|ab)*?d/I
|
|
|
|
|
abd
|
|
|
|
|
xyd
|
|
|
|
|
|
|
|
|
|
/(|ab)*?d/I,no_start_optimize
|
|
|
|
|
abd
|
|
|
|
|
xyd
|
|
|
|
|
|
2014-10-10 18:42:03 +02:00
|
|
|
|
/\k<A>*(?<A>aa)(?<A>bb)/match_unset_backref,dupnames
|
|
|
|
|
aabb
|
|
|
|
|
|
2014-10-31 13:34:34 +01:00
|
|
|
|
/(((((a)))))/parens_nest_limit=2
|
|
|
|
|
|
2014-11-11 11:19:23 +01:00
|
|
|
|
/abc/replace=XYZ
|
|
|
|
|
123123
|
|
|
|
|
123abc123
|
|
|
|
|
123abc123abc123
|
|
|
|
|
123123\=zero_terminate
|
|
|
|
|
123abc123\=zero_terminate
|
|
|
|
|
123abc123abc123\=zero_terminate
|
|
|
|
|
|
|
|
|
|
/abc/g,replace=XYZ
|
|
|
|
|
123abc123
|
|
|
|
|
123abc123abc123
|
|
|
|
|
|
|
|
|
|
/abc/replace=X$$Z
|
|
|
|
|
123abc123
|
|
|
|
|
|
|
|
|
|
/abc/g,replace=X$$Z
|
|
|
|
|
123abc123abc123
|
|
|
|
|
|
|
|
|
|
/a(b)c(d)e/replace=X$1Y${2}Z
|
|
|
|
|
"abcde"
|
|
|
|
|
|
|
|
|
|
/a(b)c(d)e/replace=X$1Y${2}Z,global
|
|
|
|
|
"abcde-abcde"
|
|
|
|
|
|
|
|
|
|
/a(?<ONE>b)c(?<TWO>d)e/replace=X$ONE+${TWO}Z
|
|
|
|
|
"abcde"
|
|
|
|
|
|
|
|
|
|
/a(?<ONE>b)c(?<TWO>d)e/g,replace=X$ONE+${TWO}Z
|
|
|
|
|
"abcde-abcde-"
|
|
|
|
|
|
|
|
|
|
/abc/replace=a$++
|
|
|
|
|
123abc
|
|
|
|
|
|
|
|
|
|
/abc/replace=a$bad
|
|
|
|
|
123abc
|
|
|
|
|
|
|
|
|
|
/abc/replace=a${A234567890123456789_123456789012}z
|
|
|
|
|
123abc
|
|
|
|
|
|
|
|
|
|
/abc/replace=a${A23456789012345678901234567890123}z
|
|
|
|
|
123abc
|
|
|
|
|
|
|
|
|
|
/abc/replace=a${bcd
|
|
|
|
|
123abc
|
|
|
|
|
|
|
|
|
|
/abc/replace=a${b+d}z
|
|
|
|
|
123abc
|
|
|
|
|
|
|
|
|
|
/abc/replace=[10]XYZ
|
|
|
|
|
123abc123
|
|
|
|
|
|
|
|
|
|
/abc/replace=[9]XYZ
|
|
|
|
|
123abc123
|
|
|
|
|
|
|
|
|
|
/abc/replace=xyz
|
|
|
|
|
1abc2\=partial_hard
|
|
|
|
|
|
2014-11-12 17:57:56 +01:00
|
|
|
|
/abc/replace=xyz
|
|
|
|
|
123abc456
|
|
|
|
|
123abc456\=replace=pqr
|
|
|
|
|
123abc456abc789
|
|
|
|
|
123abc456abc789\=g
|
|
|
|
|
|
2014-11-14 19:41:20 +01:00
|
|
|
|
/(?<=abc)(|def)/g,replace=<$0>
|
|
|
|
|
123abcxyzabcdef789abcpqr
|
2015-02-10 13:48:45 +01:00
|
|
|
|
|
|
|
|
|
/./replace=$0
|
|
|
|
|
a
|
|
|
|
|
|
|
|
|
|
/(.)(.)/replace=$2+$1
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(?<A>.)(?<B>.)/replace=$B+$A
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(.)(.)/g,replace=$2$1
|
|
|
|
|
abcdefgh
|
2015-08-29 19:13:09 +02:00
|
|
|
|
|
|
|
|
|
/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=${*MARK}
|
|
|
|
|
apple lemon blackberry
|
|
|
|
|
apple strudel
|
|
|
|
|
fruitless
|
|
|
|
|
|
2015-08-30 16:11:15 +02:00
|
|
|
|
/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/replace=${*MARK} sauce,
|
2015-08-29 19:13:09 +02:00
|
|
|
|
apple lemon blackberry
|
|
|
|
|
|
|
|
|
|
/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=<$*MARK>
|
|
|
|
|
apple lemon blackberry
|
|
|
|
|
apple strudel
|
|
|
|
|
fruitless
|
|
|
|
|
|
|
|
|
|
/(*:pear)apple/g,replace=${*MARKING}
|
|
|
|
|
apple lemon blackberry
|
|
|
|
|
|
|
|
|
|
/(*:pear)apple/g,replace=${*MARK-time
|
|
|
|
|
apple lemon blackberry
|
|
|
|
|
|
|
|
|
|
/(*:pear)apple/g,replace=${*mark}
|
|
|
|
|
apple lemon blackberry
|
|
|
|
|
|
|
|
|
|
/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=<$*MARKET>
|
|
|
|
|
apple lemon blackberry
|
|
|
|
|
|
|
|
|
|
/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=[22]${*MARK}
|
|
|
|
|
apple lemon blackberry
|
2015-12-12 19:45:40 +01:00
|
|
|
|
apple lemon blackberry\=substitute_overflow_length
|
2015-08-29 19:13:09 +02:00
|
|
|
|
|
|
|
|
|
/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=[23]${*MARK}
|
|
|
|
|
apple lemon blackberry
|
2014-11-14 19:41:20 +01:00
|
|
|
|
|
2015-12-12 19:45:40 +01:00
|
|
|
|
/abc/
|
|
|
|
|
123abc123\=replace=[9]XYZ
|
|
|
|
|
123abc123\=substitute_overflow_length,replace=[9]XYZ
|
|
|
|
|
123abc123\=substitute_overflow_length,replace=[6]XYZ
|
|
|
|
|
123abc123\=substitute_overflow_length,replace=[1]XYZ
|
|
|
|
|
123abc123\=substitute_overflow_length,replace=[0]XYZ
|
|
|
|
|
|
|
|
|
|
/a(b)c/
|
|
|
|
|
123abc123\=replace=[9]x$1z
|
|
|
|
|
123abc123\=substitute_overflow_length,replace=[9]x$1z
|
|
|
|
|
123abc123\=substitute_overflow_length,replace=[6]x$1z
|
|
|
|
|
123abc123\=substitute_overflow_length,replace=[1]x$1z
|
|
|
|
|
123abc123\=substitute_overflow_length,replace=[0]x$1z
|
2014-11-11 11:19:23 +01:00
|
|
|
|
|
2015-01-28 18:31:11 +01:00
|
|
|
|
"((?=(?(?=(?(?=(?(?=()))))))))"
|
2014-11-19 12:17:20 +01:00
|
|
|
|
a
|
|
|
|
|
|
2015-01-28 18:31:11 +01:00
|
|
|
|
"(?(?=)==)(((((((((?=)))))))))"
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2014-11-19 12:17:20 +01:00
|
|
|
|
a
|
|
|
|
|
|
2014-12-13 18:43:26 +01:00
|
|
|
|
/(a)(b)|(c)/
|
|
|
|
|
XcX\=ovector=2,get=1,get=2,get=3,get=4,getall
|
|
|
|
|
|
|
|
|
|
/x(?=ab\K)/
|
|
|
|
|
xab\=get=0
|
|
|
|
|
xab\=copy=0
|
2014-12-14 18:17:06 +01:00
|
|
|
|
xab\=getall
|
|
|
|
|
|
|
|
|
|
/(?<A>a)|(?<A>b)/dupnames
|
|
|
|
|
a\=ovector=1,copy=A,get=A,get=2
|
|
|
|
|
a\=ovector=2,copy=A,get=A,get=2
|
|
|
|
|
b\=ovector=2,copy=A,get=A,get=2
|
2014-12-13 18:43:26 +01:00
|
|
|
|
|
2014-12-22 18:33:10 +01:00
|
|
|
|
/a(b)c(d)/
|
|
|
|
|
abc\=ph,copy=0,copy=1,getall
|
|
|
|
|
|
2015-01-02 18:09:16 +01:00
|
|
|
|
/^abc/info
|
|
|
|
|
|
|
|
|
|
/^abc/info,no_dotstar_anchor
|
|
|
|
|
|
|
|
|
|
/.*\d/info,auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2015-01-02 18:09:16 +01:00
|
|
|
|
aaa
|
|
|
|
|
|
|
|
|
|
/.*\d/info,no_dotstar_anchor,auto_callout
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2015-01-02 18:09:16 +01:00
|
|
|
|
aaa
|
|
|
|
|
|
|
|
|
|
/.*\d/dotall,info
|
|
|
|
|
|
|
|
|
|
/.*\d/dotall,no_dotstar_anchor,info
|
|
|
|
|
|
|
|
|
|
/(*NO_DOTSTAR_ANCHOR)(?s).*\d/info
|
|
|
|
|
|
2015-01-13 17:01:24 +01:00
|
|
|
|
'^(?:(a)|b)(?(1)A|B)'
|
|
|
|
|
aA123\=ovector=1
|
|
|
|
|
aA123\=ovector=2
|
|
|
|
|
|
|
|
|
|
'^(?:(?<AA>a)|b)(?(<AA>)A|B)'
|
|
|
|
|
aA123\=ovector=1
|
|
|
|
|
aA123\=ovector=2
|
|
|
|
|
|
|
|
|
|
'^(?<AA>)(?:(?<AA>a)|b)(?(<AA>)A|B)'dupnames
|
|
|
|
|
aA123\=ovector=1
|
|
|
|
|
aA123\=ovector=2
|
|
|
|
|
aA123\=ovector=3
|
|
|
|
|
|
|
|
|
|
'^(?:(?<AA>X)|)(?:(?<AA>a)|b)\k{AA}'dupnames
|
|
|
|
|
aa123\=ovector=1
|
|
|
|
|
aa123\=ovector=2
|
|
|
|
|
aa123\=ovector=3
|
|
|
|
|
|
2015-01-27 18:21:32 +01:00
|
|
|
|
/(?<N111>(?J)(?<N111>1(111111)11|)1|1|)(?(<N111>)1)/
|
|
|
|
|
|
|
|
|
|
/(?<N>(?J)(?<N>))(?-J)\k<N>/
|
|
|
|
|
|
2015-01-28 18:31:11 +01:00
|
|
|
|
# Quantifiers are not allowed on condition assertions, but are otherwise
|
|
|
|
|
# OK in conditions.
|
|
|
|
|
|
|
|
|
|
/(?(?=0)?)+/
|
|
|
|
|
|
|
|
|
|
/(?(?=0)(?=00)?00765)/
|
|
|
|
|
00765
|
|
|
|
|
|
|
|
|
|
/(?(?=0)(?=00)?00765|(?!3).56)/
|
|
|
|
|
00765
|
|
|
|
|
456
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2015-01-28 18:31:11 +01:00
|
|
|
|
356
|
|
|
|
|
|
2015-02-11 11:06:09 +01:00
|
|
|
|
'^(a)*+(\w)'
|
|
|
|
|
g
|
|
|
|
|
g\=ovector=1
|
|
|
|
|
|
|
|
|
|
'^(?:a)*+(\w)'
|
|
|
|
|
g
|
|
|
|
|
g\=ovector=1
|
2015-02-28 12:31:51 +01:00
|
|
|
|
|
2015-03-01 19:34:05 +01:00
|
|
|
|
# These two pattern showeds up compile-time bugs
|
2015-02-28 12:31:51 +01:00
|
|
|
|
|
|
|
|
|
"((?2){0,1999}())?"
|
2015-02-11 11:06:09 +01:00
|
|
|
|
|
2015-03-01 19:34:05 +01:00
|
|
|
|
/((?+1)(\1))/B
|
|
|
|
|
|
2015-03-11 18:44:16 +01:00
|
|
|
|
# Callouts with string arguments
|
|
|
|
|
|
|
|
|
|
/a(?C"/
|
|
|
|
|
|
|
|
|
|
/a(?C"a/
|
|
|
|
|
|
|
|
|
|
/a(?C"a"/
|
|
|
|
|
|
|
|
|
|
/a(?C"a"bcde(?C"b")xyz/
|
|
|
|
|
|
|
|
|
|
/a(?C"a)b""c")/B
|
|
|
|
|
|
|
|
|
|
/ab(?C" any text with spaces ")cde/B
|
|
|
|
|
abcde
|
|
|
|
|
12abcde
|
|
|
|
|
|
|
|
|
|
/^a(b)c(?C1)def/
|
|
|
|
|
abcdef
|
|
|
|
|
|
|
|
|
|
/^a(b)c(?C"AB")def/
|
|
|
|
|
abcdef
|
|
|
|
|
|
|
|
|
|
/^a(b)c(?C1)def/
|
|
|
|
|
abcdef\=callout_capture
|
|
|
|
|
|
|
|
|
|
/^a(b)c(?C{AB})def/B
|
|
|
|
|
abcdef\=callout_capture
|
|
|
|
|
|
2015-03-23 16:52:08 +01:00
|
|
|
|
/(?C`a``b`)(?C'a''b')(?C"a""b")(?C^a^^b^)(?C%a%%b%)(?C#a##b#)(?C$a$$b$)(?C{a}}b})/B,callout_info
|
2015-03-12 12:49:29 +01:00
|
|
|
|
|
|
|
|
|
/(?:a(?C`code`)){3}/B
|
|
|
|
|
|
2015-03-23 16:52:08 +01:00
|
|
|
|
/^(?(?C25)(?=abc)abcd|xyz)/B,callout_info
|
2015-03-12 18:00:18 +01:00
|
|
|
|
abcdefg
|
|
|
|
|
xyz123
|
|
|
|
|
|
|
|
|
|
/^(?(?C$abc$)(?=abc)abcd|xyz)/B
|
|
|
|
|
abcdefg
|
|
|
|
|
xyz123
|
|
|
|
|
|
2015-03-14 11:47:43 +01:00
|
|
|
|
/^ab(?C'first')cd(?C"second")ef/
|
|
|
|
|
abcdefg
|
|
|
|
|
|
|
|
|
|
/(?:a(?C`code`)){3}X/
|
|
|
|
|
aaaXY
|
|
|
|
|
|
2015-03-16 16:38:26 +01:00
|
|
|
|
# Binary zero in callout string
|
|
|
|
|
# a ( ? C ' x z ' ) b
|
2015-03-23 16:52:08 +01:00
|
|
|
|
/ 61 28 3f 43 27 78 00 7a 27 29 62/hex,callout_info
|
2015-03-16 16:38:26 +01:00
|
|
|
|
abcdefgh
|
|
|
|
|
|
2015-03-24 11:21:34 +01:00
|
|
|
|
/(?(?!)^)/
|
|
|
|
|
|
|
|
|
|
/(?(?!)a|b)/
|
|
|
|
|
bbb
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2015-03-24 11:21:34 +01:00
|
|
|
|
aaa
|
|
|
|
|
|
2015-03-27 18:45:02 +01:00
|
|
|
|
# JIT gives a different error message for the infinite recursion
|
|
|
|
|
|
|
|
|
|
"(*NO_JIT)((?2)+)((?1)){"
|
|
|
|
|
abcd{
|
|
|
|
|
|
2015-03-29 17:40:45 +02:00
|
|
|
|
# Perl fails to diagnose the absence of an assertion
|
|
|
|
|
|
|
|
|
|
"(?(?<E>.*!.*)?)"
|
|
|
|
|
|
2015-03-29 19:34:04 +02:00
|
|
|
|
"X((?2)()*+){2}+"B
|
|
|
|
|
|
|
|
|
|
"X((?2)()*+){2}"B
|
|
|
|
|
|
2015-03-31 17:01:25 +02:00
|
|
|
|
/(?<=\bABQ(3(?-7)))/
|
|
|
|
|
|
|
|
|
|
/(?<=\bABQ(3(?+7)))/
|
|
|
|
|
|
2015-04-01 17:37:54 +02:00
|
|
|
|
";(?<=()((?3))((?2)))"
|
|
|
|
|
|
2015-04-06 14:16:36 +02:00
|
|
|
|
# Perl loops on this (PCRE2 used to!)
|
|
|
|
|
|
|
|
|
|
/(?<=\Ka)/g,aftertext
|
|
|
|
|
aaaaa
|
|
|
|
|
|
|
|
|
|
/(?<=\Ka)/altglobal,aftertext
|
|
|
|
|
aaaaa
|
|
|
|
|
|
2015-04-13 11:13:39 +02:00
|
|
|
|
/((?2){73}(?2))((?1))/info
|
|
|
|
|
|
2015-04-21 10:34:10 +02:00
|
|
|
|
/abc/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2015-04-21 10:34:10 +02:00
|
|
|
|
\[9x!xxx(]{9999}
|
|
|
|
|
|
|
|
|
|
/(abc)*/
|
|
|
|
|
\[abc]{5}
|
|
|
|
|
|
2015-04-22 19:39:25 +02:00
|
|
|
|
/^/gm
|
|
|
|
|
\n\n\n
|
|
|
|
|
|
|
|
|
|
/^/gm,alt_circumflex
|
|
|
|
|
\n\n\n
|
|
|
|
|
|
2015-04-23 19:28:39 +02:00
|
|
|
|
/((((((((x))))))))\81/
|
|
|
|
|
xx1
|
|
|
|
|
|
|
|
|
|
/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\80/
|
|
|
|
|
xx
|
|
|
|
|
|
|
|
|
|
/\80/
|
|
|
|
|
|
|
|
|
|
/A\8B\9C/
|
|
|
|
|
A8B9C
|
2015-06-03 18:27:47 +02:00
|
|
|
|
|
|
|
|
|
/(?x:((?'a')) # comment (with parentheses) and | vertical
|
|
|
|
|
(?-x:#not a comment (?'b')) # this is a comment ()
|
|
|
|
|
(?'c')) # not a comment (?'d')/info
|
|
|
|
|
|
|
|
|
|
/(?|(?'a')(2)(?'b')|(?'a')(?'a')(3))/I,dupnames
|
|
|
|
|
A23B
|
|
|
|
|
B32A
|
|
|
|
|
|
|
|
|
|
# These are some patterns that used to cause buffer overflows or other errors
|
|
|
|
|
# while compiling.
|
2015-04-23 19:28:39 +02:00
|
|
|
|
|
2015-05-03 18:46:56 +02:00
|
|
|
|
/.((?2)(?R)|\1|$)()/B
|
|
|
|
|
|
|
|
|
|
/.((?3)(?R)()(?2)|\1|$)()/B
|
|
|
|
|
|
2015-05-06 18:51:25 +02:00
|
|
|
|
/(\9*+(?2);\3++()2|)++{/
|
|
|
|
|
|
|
|
|
|
/\V\x85\9*+((?2)\3++()2)*:2/
|
2015-05-05 20:46:51 +02:00
|
|
|
|
|
2015-05-19 18:48:57 +02:00
|
|
|
|
/(((?(R)){0,2}) (?'x'((?'R')((?'R')))))/dupnames
|
2015-05-08 18:32:28 +02:00
|
|
|
|
|
2015-05-19 18:48:57 +02:00
|
|
|
|
/(((?(X)){0,2}) (?'x'((?'X')((?'X')))))/dupnames
|
2015-05-08 18:32:28 +02:00
|
|
|
|
|
2015-05-19 18:48:57 +02:00
|
|
|
|
/(((?(R)){0,2}) (?'x'((?'X')((?'R')))))/
|
2015-05-08 18:32:28 +02:00
|
|
|
|
|
2015-05-15 19:09:01 +02:00
|
|
|
|
"(?J)(?'d'(?'d'\g{d}))"
|
|
|
|
|
|
2015-05-18 19:31:29 +02:00
|
|
|
|
"(?=!((?2)(?))({8(?<=(?1){29}8bbbb\x16\xd\xc6^($(\xa9H4){4}h}?1)B))\x15')"
|
|
|
|
|
|
2015-05-19 18:48:57 +02:00
|
|
|
|
/A(?'')Z/
|
|
|
|
|
|
2015-06-03 18:27:47 +02:00
|
|
|
|
"(?J:(?|(?'R')(\k'R')|((?'R'))))"
|
|
|
|
|
|
2015-06-08 19:51:54 +02:00
|
|
|
|
/(?<=|(\,\$(?73591620449005828816)\xa8.{7}){6}\x09)/
|
|
|
|
|
|
2015-06-09 19:41:45 +02:00
|
|
|
|
/^(?:(?(1)x|)+)+$()/B
|
|
|
|
|
|
2015-07-15 11:08:12 +02:00
|
|
|
|
/[[:>:]](?<)/
|
|
|
|
|
|
2015-07-15 11:34:04 +02:00
|
|
|
|
/((?x)(*:0))#(?'/
|
|
|
|
|
|
2015-07-16 19:47:20 +02:00
|
|
|
|
/(?C$[$)(?<]/
|
|
|
|
|
|
|
|
|
|
/(?C$)$)(?<]/
|
|
|
|
|
|
2015-07-17 17:11:45 +02:00
|
|
|
|
/(?(R))*+/B
|
2015-07-17 17:18:17 +02:00
|
|
|
|
abcd
|
2015-07-17 17:11:45 +02:00
|
|
|
|
|
2015-07-17 18:25:21 +02:00
|
|
|
|
/((?x)(?#))#(?'/
|
|
|
|
|
|
|
|
|
|
/((?x)(?#))#(?'abc')/I
|
|
|
|
|
|
2015-07-20 12:17:23 +02:00
|
|
|
|
/[[:\\](?<[::]/
|
|
|
|
|
|
|
|
|
|
/[[:\\](?'abc')[a:]/I
|
|
|
|
|
|
2015-07-21 15:42:14 +02:00
|
|
|
|
"[[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[:::::::::::::::::[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[[[:::E[[[:[:[[:[:::[[:::E[[[:[:[[:'[:::::E[[[:[::::::[[[:[[[[[[[::E[[[:[::::::[[[:[[[[[[[[:[[::[::::[[:::::::[[:[[[[[[[:[[::[:[[:[~"
|
|
|
|
|
|
2015-07-22 11:01:50 +02:00
|
|
|
|
/()(?(R)0)*+/B
|
|
|
|
|
|
2015-07-22 11:29:09 +02:00
|
|
|
|
/(?R-:(?</
|
|
|
|
|
|
2016-02-13 16:30:29 +01:00
|
|
|
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
|
|
|
aab
|
|
|
|
|
|
2015-08-04 11:13:11 +02:00
|
|
|
|
/(?(8000000000/
|
|
|
|
|
|
|
|
|
|
/((?(R8000000000)))/
|
|
|
|
|
|
2015-08-08 07:45:17 +02:00
|
|
|
|
/0(?0)|(1)(*THEN)(*SKIP:0)(*FAIL)/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2015-08-08 07:45:17 +02:00
|
|
|
|
01
|
|
|
|
|
|
2015-08-09 19:46:35 +02:00
|
|
|
|
/(?(1)()\983040\2)/
|
|
|
|
|
|
2015-08-10 18:34:17 +02:00
|
|
|
|
/(*LIMIT_MATCH=)abc/
|
|
|
|
|
|
|
|
|
|
/(*CRLF)(*LIMIT_MATCH=)abc/
|
|
|
|
|
|
2015-08-11 07:30:10 +02:00
|
|
|
|
/(?:ab)?(?:ab)(?:ab)/
|
2015-08-11 15:20:37 +02:00
|
|
|
|
abab
|
|
|
|
|
ababab
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2015-08-11 15:20:37 +02:00
|
|
|
|
aba
|
|
|
|
|
|
|
|
|
|
/((*MARK:A))++a(*SKIP:B)b/
|
2015-09-16 18:49:48 +02:00
|
|
|
|
\= Expect no match
|
2015-08-11 15:20:37 +02:00
|
|
|
|
aacb
|
2015-08-11 07:30:10 +02:00
|
|
|
|
|
2015-08-30 19:47:36 +02:00
|
|
|
|
/(*MARK:a\zb)z/alt_verbnames
|
|
|
|
|
|
|
|
|
|
/(*:ab\t(d\)c)xxx/
|
|
|
|
|
|
|
|
|
|
/(*:ab\t(d\)c)xxx/alt_verbnames,mark
|
|
|
|
|
cxxxz
|
|
|
|
|
|
2015-09-01 19:32:42 +02:00
|
|
|
|
/(*:A\Qxx)x\EB)x/alt_verbnames,mark
|
|
|
|
|
x
|
|
|
|
|
|
|
|
|
|
/(*:A\ExxxB)x/alt_verbnames,mark
|
|
|
|
|
x
|
|
|
|
|
|
|
|
|
|
/(*: A \ and #comment
|
|
|
|
|
\ B)x/x,alt_verbnames,mark
|
|
|
|
|
x
|
|
|
|
|
|
2016-10-02 18:01:01 +02:00
|
|
|
|
/(*: A \ and #comment
|
|
|
|
|
\ B)x/alt_verbnames,mark
|
|
|
|
|
x
|
|
|
|
|
|
|
|
|
|
/(*: A \ and #comment
|
|
|
|
|
\ B)x/x,mark
|
|
|
|
|
x
|
|
|
|
|
|
|
|
|
|
/(*: A \ and #comment
|
|
|
|
|
\ B)x/mark
|
|
|
|
|
x
|
|
|
|
|
|
2015-09-01 19:32:42 +02:00
|
|
|
|
/(*:A
|
|
|
|
|
B)x/alt_verbnames,mark
|
|
|
|
|
x
|
|
|
|
|
|
|
|
|
|
/(*:abc\Qpqr)/alt_verbnames
|
|
|
|
|
|
2015-09-22 13:24:28 +02:00
|
|
|
|
/abc/use_offset_limit
|
|
|
|
|
1234abcde\=offset_limit=100
|
|
|
|
|
1234abcde\=offset_limit=9
|
|
|
|
|
1234abcde\=offset_limit=4
|
|
|
|
|
1234abcde\=offset_limit=4,offset=4
|
|
|
|
|
\= Expect no match
|
|
|
|
|
1234abcde\=offset_limit=4,offset=5
|
|
|
|
|
1234abcde\=offset_limit=3
|
|
|
|
|
|
|
|
|
|
/(?<=abc)/use_offset_limit
|
|
|
|
|
1234abc\=offset_limit=7
|
|
|
|
|
\= Expect no match
|
|
|
|
|
1234abc\=offset_limit=6
|
2015-11-13 18:16:28 +01:00
|
|
|
|
|
|
|
|
|
/A/g,replace=-,use_offset_limit
|
|
|
|
|
XAXAXAXAXA\=offset_limit=4
|
2015-09-22 13:24:28 +02:00
|
|
|
|
|
|
|
|
|
/abc/
|
|
|
|
|
\= Expect error
|
|
|
|
|
1234abcde\=offset_limit=4
|
|
|
|
|
|
2015-11-16 09:30:48 +01:00
|
|
|
|
/^\w/m,use_offset_limit
|
|
|
|
|
\n..\naa\=offset_limit=3
|
|
|
|
|
\n..\naa\=offset_limit=4
|
|
|
|
|
|
2015-09-23 13:49:03 +02:00
|
|
|
|
/abcd/null_context
|
|
|
|
|
abcd\=null_context
|
|
|
|
|
\= Expect error
|
|
|
|
|
abcd\=null_context,find_limits
|
|
|
|
|
abcd\=allusedtext,startchar
|
|
|
|
|
|
2015-10-07 19:32:48 +02:00
|
|
|
|
/abcd/replace=w\rx\x82y\o{333}z(\Q12\$34$$\x34\E5$$),substitute_extended
|
|
|
|
|
abcd
|
|
|
|
|
|
|
|
|
|
/a(bc)(DE)/replace=a\u$1\U$1\E$1\l$2\L$2\Eab\Uab\LYZ\EDone,substitute_extended
|
|
|
|
|
abcDE
|
|
|
|
|
|
|
|
|
|
/abcd/replace=xy\kz,substitute_extended
|
|
|
|
|
abcd
|
|
|
|
|
|
|
|
|
|
/a(?:(b)|(c))/substitute_extended,replace=X${1:+1:-1}X${2:+2:-2}
|
|
|
|
|
ab
|
|
|
|
|
ac
|
|
|
|
|
ab\=replace=${1:+$1\:$1:$2}
|
|
|
|
|
ac\=replace=${1:+$1\:$1:$2}
|
|
|
|
|
|
|
|
|
|
/a(?:(b)|(c))/substitute_extended,replace=X${1:-1:-1}X${2:-2:-2}
|
|
|
|
|
ab
|
|
|
|
|
ac
|
|
|
|
|
|
|
|
|
|
/(a)/substitute_extended,replace=>${1:+\Q$1:{}$$\E+\U$1}<
|
|
|
|
|
a
|
|
|
|
|
|
|
|
|
|
/X(b)Y/substitute_extended
|
|
|
|
|
XbY\=replace=x${1:+$1\U$1}y
|
|
|
|
|
XbY\=replace=\Ux${1:+$1$1}y
|
|
|
|
|
|
|
|
|
|
/a/substitute_extended,replace=${*MARK:+a:b}
|
|
|
|
|
a
|
|
|
|
|
|
|
|
|
|
/(abcd)/replace=${1:+xy\kz},substitute_extended
|
|
|
|
|
abcd
|
|
|
|
|
|
2015-12-04 19:39:08 +01:00
|
|
|
|
/(abcd)/
|
|
|
|
|
abcd\=replace=${1:+xy\kz},substitute_extended
|
|
|
|
|
|
2015-10-07 19:32:48 +02:00
|
|
|
|
/abcd/substitute_extended,replace=>$1<
|
|
|
|
|
abcd
|
|
|
|
|
|
|
|
|
|
/abcd/substitute_extended,replace=>xxx${xyz}<<<
|
|
|
|
|
abcd
|
|
|
|
|
|
|
|
|
|
/(?J)(?:(?<A>a)|(?<A>b))/replace=<$A>
|
|
|
|
|
[a]
|
|
|
|
|
[b]
|
|
|
|
|
\= Expect error
|
|
|
|
|
(a)\=ovector=1
|
|
|
|
|
|
|
|
|
|
/(a)|(b)/replace=<$1>
|
|
|
|
|
\= Expect error
|
|
|
|
|
b
|
|
|
|
|
|
|
|
|
|
/(aa)(BB)/substitute_extended,replace=\U$1\L$2\E$1..\U$1\l$2$1
|
|
|
|
|
aaBB
|
|
|
|
|
|
2015-10-09 18:54:29 +02:00
|
|
|
|
/^(o(\1{72}{\"{\\{00000059079}\d*){74}}){19}/I
|
|
|
|
|
|
2015-10-25 18:35:34 +01:00
|
|
|
|
/((p(?'K/
|
|
|
|
|
|
|
|
|
|
/((p(?'K/no_auto_capture
|
|
|
|
|
|
2015-10-30 19:25:19 +01:00
|
|
|
|
/abc/replace=A$3123456789Z
|
|
|
|
|
abc
|
|
|
|
|
|
2015-11-03 11:39:27 +01:00
|
|
|
|
/(?<!a{65535}a{5})x/I
|
|
|
|
|
|
|
|
|
|
/(?<!a{65535})x/I
|
|
|
|
|
|
2015-11-03 18:38:00 +01:00
|
|
|
|
/(?=a\K)/replace=z
|
|
|
|
|
BaCaD
|
2015-11-03 21:04:23 +01:00
|
|
|
|
|
|
|
|
|
/(?'abcdefghijklmnopqrstuvwxyzABCDEFG'toolong)/
|
|
|
|
|
|
|
|
|
|
/(?'abcdefghijklmnopqrstuvwxyzABCDEF'justright)/
|
2015-11-03 18:38:00 +01:00
|
|
|
|
|
2015-11-05 18:33:39 +01:00
|
|
|
|
# These two use zero-termination
|
|
|
|
|
/abcd/max_pattern_length=3
|
|
|
|
|
|
|
|
|
|
/abc/max_pattern_length=3
|
|
|
|
|
|
|
|
|
|
# These two, being hex, pass the length
|
|
|
|
|
/abcdefab/hex,max_pattern_length=3
|
|
|
|
|
|
|
|
|
|
/abcdef/hex,max_pattern_length=3
|
|
|
|
|
|
2016-12-23 18:09:37 +01:00
|
|
|
|
# These patterns used to take a long time to compile
|
2015-11-08 15:20:09 +01:00
|
|
|
|
|
|
|
|
|
"(.*)
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))"xI
|
|
|
|
|
|
|
|
|
|
"(?<=a()
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
a)"xI
|
|
|
|
|
|
2015-11-10 15:33:28 +01:00
|
|
|
|
"(?|()|())(.*)
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))"xI
|
|
|
|
|
|
|
|
|
|
"(?|()|())(?<=a()
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))
|
|
|
|
|
a)"xI
|
|
|
|
|
|
2015-11-08 15:20:09 +01:00
|
|
|
|
# Test the use of malloc for caching group information when there are more
|
|
|
|
|
# groups than fit into the on-stack workspace.
|
|
|
|
|
|
|
|
|
|
/\[()]{1024}/I,expand
|
|
|
|
|
|
2015-11-09 19:45:15 +01:00
|
|
|
|
# Test minlength capped at 65535
|
|
|
|
|
|
|
|
|
|
/(A{65000})\1{65000}/I
|
|
|
|
|
|
2015-11-10 15:33:28 +01:00
|
|
|
|
# Test group scans when numbers are not unique
|
|
|
|
|
|
|
|
|
|
/(?|()+|(a)+)/BI
|
|
|
|
|
|
|
|
|
|
/(?|(a)+|()+)/BI
|
|
|
|
|
|
|
|
|
|
/(?|()|(a))/BI
|
|
|
|
|
|
|
|
|
|
/(?|(a)|())/BI
|
|
|
|
|
|
2015-11-13 17:52:26 +01:00
|
|
|
|
# Test CRLF handling in empty string substitutions
|
|
|
|
|
|
|
|
|
|
/^$/gm,newline=anycrlf,replace=-
|
|
|
|
|
X\r\n\r\nY
|
|
|
|
|
|
|
|
|
|
/^$/gm,newline=crlf,replace=-
|
|
|
|
|
X\r\n\r\nY
|
|
|
|
|
|
|
|
|
|
/^$/gm,newline=any,replace=-
|
|
|
|
|
X\r\n\r\nY
|
|
|
|
|
|
|
|
|
|
"(*ANYCRLF)(?m)^(.*[^0-9\r\n].*|)$"g,replace=NaN
|
|
|
|
|
15\r\nfoo\r\n20\r\nbar\r\nbaz\r\n\r\n20
|
|
|
|
|
|
2015-11-17 18:13:43 +01:00
|
|
|
|
/a[[:punct:]b]/bincode
|
|
|
|
|
|
|
|
|
|
/a[b[:punct:]]/bincode
|
|
|
|
|
|
2015-11-25 19:46:35 +01:00
|
|
|
|
/L(?#(|++<!(2)?/B
|
|
|
|
|
|
|
|
|
|
/L(?#(|++<!(2)?/B,no_auto_possess
|
|
|
|
|
|
|
|
|
|
/L(?#(|++<!(2)?/B,auto_callout
|
|
|
|
|
|
|
|
|
|
/L(?#(|++<!(2)?/B,no_auto_possess,auto_callout
|
|
|
|
|
|
2015-11-27 18:34:36 +01:00
|
|
|
|
/(A*)\E+/B,auto_callout
|
|
|
|
|
|
2015-11-30 18:31:16 +01:00
|
|
|
|
/()\Q\E*]/B,auto_callout
|
|
|
|
|
a[bc]d
|
|
|
|
|
|
2015-12-01 18:41:24 +01:00
|
|
|
|
/\x8a+f|;T?(*:;.'?`(\xeap ){![^()!y*''C*(?';]{1;(\x08)/B,alt_verbnames,dupnames,extended
|
|
|
|
|
|
2015-12-02 18:39:26 +01:00
|
|
|
|
# Tests for NULL characters in comments and verb "names" and callouts
|
|
|
|
|
|
|
|
|
|
# /A#B\x00C\x0aZ/
|
|
|
|
|
/41 23 42 00 43 0a 5a/Bx,hex
|
|
|
|
|
|
|
|
|
|
# /A+#B\x00C\x0a+/
|
|
|
|
|
/41 2b 23 42 00 43 0a 2b/Bx,hex
|
|
|
|
|
|
|
|
|
|
# /A(*:B\x00W#X\00Y\x0aC)Z/
|
|
|
|
|
/41 28 2a 3a 42 00 57 23 58 00 59 0a 43 29 5a/Bx,hex,alt_verbnames
|
|
|
|
|
|
|
|
|
|
# /A(*:B\x00W#X\00Y\x0aC)Z/
|
|
|
|
|
/41 28 2a 3a 42 00 57 23 58 00 59 0a 43 29 5a/Bx,hex
|
|
|
|
|
|
|
|
|
|
# /A(?C{X\x00Y})B/
|
|
|
|
|
/41 28 3f 43 7b 58 00 59 7d 29 42/B,hex
|
|
|
|
|
|
|
|
|
|
# /A(?#X\x00Y)B/
|
|
|
|
|
/41 28 3f 23 7b 00 7d 29 42/B,hex
|
|
|
|
|
|
2015-12-03 17:58:31 +01:00
|
|
|
|
# Tests for leading comment in extended patterns
|
|
|
|
|
|
|
|
|
|
/ (?-x):?/extended
|
|
|
|
|
|
|
|
|
|
/(?-x):?/extended
|
|
|
|
|
|
|
|
|
|
/0b 28 3f 2d 78 29 3a/hex,extended
|
|
|
|
|
|
|
|
|
|
/#comment
|
|
|
|
|
(?-x):?/extended
|
|
|
|
|
|
2015-12-03 19:36:36 +01:00
|
|
|
|
/(8(*:6^\x09x\xa6l\)6!|\xd0:[^:|)\x09d\Z\d{85*m(?'(?<1!)*\W[*\xff]!!h\w]*\xbe;/alt_bsux,alt_verbnames,allow_empty_class,dollar_endonly,extended,multiline,never_utf,no_dotstar_anchor,no_start_optimize
|
|
|
|
|
|
2015-12-04 19:39:08 +01:00
|
|
|
|
/a|(b)c/replace=>$1<,substitute_unset_empty
|
|
|
|
|
cat
|
|
|
|
|
xbcom
|
|
|
|
|
|
|
|
|
|
/a|(b)c/
|
|
|
|
|
cat\=replace=>$1<
|
|
|
|
|
cat\=replace=>$1<,substitute_unset_empty
|
|
|
|
|
xbcom\=replace=>$1<,substitute_unset_empty
|
|
|
|
|
|
2015-12-12 19:45:40 +01:00
|
|
|
|
/a|(b)c/substitute_extended
|
|
|
|
|
cat\=replace=>${2:-xx}<
|
|
|
|
|
cat\=replace=>${2:-xx}<,substitute_unknown_unset
|
|
|
|
|
cat\=replace=>${X:-xx}<,substitute_unknown_unset
|
|
|
|
|
|
2015-12-04 19:39:08 +01:00
|
|
|
|
/a|(?'X'b)c/replace=>$X<,substitute_unset_empty
|
|
|
|
|
cat
|
|
|
|
|
xbcom
|
|
|
|
|
|
2015-12-12 19:45:40 +01:00
|
|
|
|
/a|(?'X'b)c/replace=>$Y<,substitute_unset_empty
|
|
|
|
|
cat
|
|
|
|
|
cat\=substitute_unknown_unset
|
|
|
|
|
cat\=substitute_unknown_unset,-substitute_unset_empty
|
|
|
|
|
|
2015-12-04 19:39:08 +01:00
|
|
|
|
/a|(b)c/replace=>$2<,substitute_unset_empty
|
|
|
|
|
cat
|
2015-12-12 19:45:40 +01:00
|
|
|
|
cat\=substitute_unknown_unset
|
|
|
|
|
cat\=substitute_unknown_unset,-substitute_unset_empty
|
2015-12-04 19:39:08 +01:00
|
|
|
|
|
2015-12-05 19:17:41 +01:00
|
|
|
|
/()()()/use_offset_limit
|
|
|
|
|
\=ovector=11000000000
|
|
|
|
|
\=callout_fail=11000000000
|
|
|
|
|
\=callout_fail=1:11000000000
|
|
|
|
|
\=callout_data=11000000000
|
|
|
|
|
\=callout_data=-11000000000
|
|
|
|
|
\=offset_limit=1100000000000000000000
|
|
|
|
|
\=copy=11000000000
|
|
|
|
|
|
2015-12-16 19:44:24 +01:00
|
|
|
|
/(*MARK:A\x00b)/mark
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/(*MARK:A\x00b)/mark,alt_verbnames
|
|
|
|
|
abc
|
|
|
|
|
|
2016-01-29 19:16:59 +01:00
|
|
|
|
/"(*MARK:A" 00 "b)"/mark,hex
|
2015-12-16 19:44:24 +01:00
|
|
|
|
abc
|
|
|
|
|
|
2016-01-29 19:16:59 +01:00
|
|
|
|
/"(*MARK:A" 00 "b)"/mark,hex,alt_verbnames
|
2015-12-16 19:44:24 +01:00
|
|
|
|
abc
|
|
|
|
|
|
2016-01-29 19:16:59 +01:00
|
|
|
|
/efg/hex
|
|
|
|
|
|
|
|
|
|
/eff/hex
|
|
|
|
|
|
|
|
|
|
/effg/hex
|
|
|
|
|
|
2016-02-02 18:22:55 +01:00
|
|
|
|
/(?J)(?'a'))(?'a')/
|
|
|
|
|
|
2016-02-06 17:40:59 +01:00
|
|
|
|
/(?<=((?C)0))/
|
|
|
|
|
9010
|
|
|
|
|
\= Expect no match
|
|
|
|
|
abc
|
|
|
|
|
|
2016-07-06 10:42:50 +02:00
|
|
|
|
/aaa/
|
|
|
|
|
\[abc]{10000000000000000000000000000}
|
|
|
|
|
\[a]{3}
|
|
|
|
|
|
|
|
|
|
/\[AB]{6000000000000000000000}/expand
|
|
|
|
|
|
2016-10-02 18:01:01 +02:00
|
|
|
|
# Hex uses pattern length, not zero-terminated. This tests for overrunning
|
|
|
|
|
# the given length of a pattern.
|
|
|
|
|
|
|
|
|
|
/'(*U'/hex
|
|
|
|
|
|
|
|
|
|
/'(*'/hex
|
|
|
|
|
|
|
|
|
|
/'('/hex
|
|
|
|
|
|
|
|
|
|
//hex
|
|
|
|
|
|
|
|
|
|
# These tests are here because Perl never allows a back reference in a
|
|
|
|
|
# lookbehind. PCRE2 supports some limited cases.
|
|
|
|
|
|
|
|
|
|
/([ab])...(?<=\1)z/
|
|
|
|
|
a11az
|
|
|
|
|
b11bz
|
|
|
|
|
\= Expect no match
|
|
|
|
|
b11az
|
|
|
|
|
|
|
|
|
|
/(?|([ab]))...(?<=\1)z/
|
|
|
|
|
|
|
|
|
|
/([ab])(\1)...(?<=\2)z/
|
|
|
|
|
aa11az
|
|
|
|
|
|
|
|
|
|
/(a\2)(b\1)(?<=\2)/
|
|
|
|
|
|
|
|
|
|
/(?<A>[ab])...(?<=\k'A')z/
|
|
|
|
|
a11az
|
|
|
|
|
b11bz
|
|
|
|
|
\= Expect no match
|
|
|
|
|
b11az
|
|
|
|
|
|
|
|
|
|
/(?<A>[ab])...(?<=\k'A')(?<A>)z/dupnames
|
|
|
|
|
|
|
|
|
|
# Perl does not support \g+n
|
|
|
|
|
|
|
|
|
|
/((\g+1X)?([ab]))+/
|
|
|
|
|
aaXbbXa
|
|
|
|
|
|
|
|
|
|
/ab(?C1)c/auto_callout
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
/'ab(?C1)c'/hex,auto_callout
|
|
|
|
|
abc
|
|
|
|
|
|
|
|
|
|
# Perl accepts these, but gives a warning. We can't warn, so give an error.
|
|
|
|
|
|
|
|
|
|
/[a-[:digit:]]+/
|
|
|
|
|
a-a9-a
|
|
|
|
|
|
|
|
|
|
/[A-[:digit:]]+/
|
|
|
|
|
A-A9-A
|
|
|
|
|
|
|
|
|
|
/[a-\d]+/
|
|
|
|
|
a-a9-a
|
|
|
|
|
|
2016-10-13 18:08:08 +02:00
|
|
|
|
/(?<RA>abc)(?(R)xyz)/B
|
|
|
|
|
|
|
|
|
|
/(?<R>abc)(?(R)xyz)/B
|
|
|
|
|
|
2016-10-18 13:22:40 +02:00
|
|
|
|
/(?=.*[A-Z])/I
|
|
|
|
|
|
2016-10-23 19:05:09 +02:00
|
|
|
|
/()(?<=(?0))/
|
|
|
|
|
|
2016-10-28 18:09:08 +02:00
|
|
|
|
/(?<!|!(?<!))/
|
|
|
|
|
|
|
|
|
|
/(?<!|!|!||||||(?<!)||(?<!)!|!||(?<!)!|!(?<!)!|!|!|!||||!!|<!)!|!||||!|/
|
|
|
|
|
|
2016-11-04 12:05:21 +01:00
|
|
|
|
/{2,2{2,2/use_length
|
2016-11-01 13:12:45 +01:00
|
|
|
|
|
2016-11-04 12:05:21 +01:00
|
|
|
|
/.>*?\g'0/use_length
|
|
|
|
|
|
|
|
|
|
/.>*?\g'0/
|
2016-11-01 13:12:45 +01:00
|
|
|
|
|
2016-11-04 17:40:08 +01:00
|
|
|
|
/{<7B>̈́<EFBFBD>̈́<EFBFBD>{'{22{2{{2{'{22{{22{2{'{22{2{{2{{222{{2{'{22{2{22{2{'{22{2{{2{'{22{2{22{2{'{'{22{2{22{2{'{22{2{{2{'{22{2{22{2{'{222{2Ą̈́<C484>̈́<EFBFBD>{'{22{2{{2{'{22{{11{2{'{22{2{{2{{'{22{2{{2{'{22{{22{1{'{22{2{{2{{222{{2{'{22{2{22{2{'{/auto_callout
|
|
|
|
|
|
2016-11-10 18:08:27 +01:00
|
|
|
|
//
|
|
|
|
|
\=get=i00000000000000000000000000000000
|
|
|
|
|
\=get=i2345678901234567890123456789012,get=i1245678901234567890123456789012
|
|
|
|
|
|
2016-11-18 19:59:37 +01:00
|
|
|
|
"(?(?C))"
|
|
|
|
|
|
|
|
|
|
/(?(?(?(?(?(?))))))/
|
|
|
|
|
|
2016-11-23 18:17:57 +01:00
|
|
|
|
/(?<=(?1))((?s))/anchored
|
|
|
|
|
|
2016-11-25 11:37:23 +01:00
|
|
|
|
/(*:ab)*/
|
|
|
|
|
|
2016-11-27 17:14:33 +01:00
|
|
|
|
%(*:(:(svvvvvvvvvv:]*[ Z!*;[]*[^[]*!^[+.+{{2,7}' _\\\\\\\\\\\\\)?.:.. *w////\\\Q\\\\\\\\\\\\\\\T\\\\\+/?/////'+\\\EEE?/////'+/*+/[^K]?]//(w)%never_backslash_c,alt_verbnames,auto_callout
|
|
|
|
|
|
2016-12-08 18:55:26 +01:00
|
|
|
|
/./newline=crlf
|
2016-12-11 17:42:29 +01:00
|
|
|
|
\=ph
|
2016-12-08 18:55:26 +01:00
|
|
|
|
|
2016-12-09 17:57:51 +01:00
|
|
|
|
/(\x0e00\000000\xc)/replace=\P,substitute_extended
|
2016-12-11 17:42:29 +01:00
|
|
|
|
\x0e00\000000\xc
|
2016-12-09 17:57:51 +01:00
|
|
|
|
|
2016-12-09 19:19:38 +01:00
|
|
|
|
//replace=0
|
2016-12-11 17:42:29 +01:00
|
|
|
|
\=offset=7
|
|
|
|
|
|
|
|
|
|
".+\QX\E+"B,no_auto_possess
|
|
|
|
|
|
|
|
|
|
".+\QX\E+"B,auto_callout,no_auto_possess
|
2016-12-09 19:19:38 +01:00
|
|
|
|
|
2016-12-20 17:47:41 +01:00
|
|
|
|
# This one is here because Perl gives an 'unmatched )' error which goes away
|
|
|
|
|
# if one of the \) sequences is removed - which is weird. PCRE finds it too
|
|
|
|
|
# complicated to find a minimum matching length.
|
|
|
|
|
|
|
|
|
|
"()X|((((((((()))))))((((())))))\2())((((((\2\2)))\2)(\22((((\2\2)2))\2)))(2\ZZZ)+:)Z^|91ZiZZnter(ZZ |91Z(ZZ ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z+:)Z|91Z(ZZ ZZ(\r2Z( or#(\Z2(Z\Z((Z*(\2(Z\':))\0)i|||||||||||||||loZ\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z)))int \)\0nte!rnal errpr\2\\21r(2\ZZZ)+:)Z!|91Z(ZZ ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z)))int \)\0(2\ZZZ)+:)Z^|91ZiZZnter(ZZ |91Z(ZZ ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z)))int \)\0(2\ZZZ)+:)Z^)))int \)\0(2\ZZZ)+:)Z^|91ZiZZnter(ZZernZal ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z)))int \))\ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)))\2))))((((((\2\2))))))"I
|
|
|
|
|
|
2016-12-23 18:09:37 +01:00
|
|
|
|
# This checks that new code for handling groups that may match an empty string
|
|
|
|
|
# works on a very large number of alternatives. This pattern used to provoke a
|
|
|
|
|
# complaint that it was too complicated.
|
|
|
|
|
|
|
|
|
|
/(?:\[A|B|C|D|E|F|G|H|I|J|]{200}Z)/expand
|
|
|
|
|
|
2016-12-23 19:34:10 +01:00
|
|
|
|
# This one used to compile rubbish instead of a compile error, and then
|
|
|
|
|
# behave unpredictably at match time.
|
|
|
|
|
|
|
|
|
|
/.+(?(?C'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'))?!XXXX.=X/
|
|
|
|
|
.+(?(?C'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'))?!XXXX.=X
|
|
|
|
|
|
2016-12-27 12:50:28 +01:00
|
|
|
|
/[:[:alnum:]-[[a:lnum:]+/
|
|
|
|
|
|
2016-12-28 13:26:12 +01:00
|
|
|
|
/((?(?C'')\QX\E(?!((?(?C'')(?!X=X));=)r*X=X));=)/
|
|
|
|
|
|
|
|
|
|
/((?(?C'')\Q\E(?!((?(?C'')(?!X=X));=)r*X=X));=)/
|
|
|
|
|
|
2016-12-28 16:05:48 +01:00
|
|
|
|
/abcd/auto_callout
|
|
|
|
|
abcd\=callout_error=255:2
|
|
|
|
|
|
2017-01-31 18:15:30 +01:00
|
|
|
|
/()(\g+65534)/
|
|
|
|
|
|
|
|
|
|
/()(\g+65533)/
|
|
|
|
|
|
2017-02-10 17:33:15 +01:00
|
|
|
|
/<2F>\x00\x00\x00<17>(\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\x00k\d+\x00\x00\x00\x00\x00\x00\2*\x00\x00\1*.){36}int^\x00\x00<08><>\x00<30>(\1{50779}?)J\w2/I
|
|
|
|
|
|
|
|
|
|
/(a)(b)\2\1\1\1\1/I
|
|
|
|
|
|
|
|
|
|
/(?<a>a)(?<b>b)\g{b}\g{a}\g{a}\g{a}\g{a}(?<a>xx)(?<b>zz)/I,dupnames
|
|
|
|
|
|
2017-02-23 18:05:43 +01:00
|
|
|
|
//
|
|
|
|
|
\=ovector=7777777777
|
2017-03-23 18:54:58 +01:00
|
|
|
|
|
|
|
|
|
# This is here because Perl matches, even though a COMMIT is encountered
|
|
|
|
|
# outside of the recursion.
|
2017-02-23 18:05:43 +01:00
|
|
|
|
|
2017-03-09 17:23:28 +01:00
|
|
|
|
/(?1)(A(*COMMIT)|B)D/
|
2017-03-23 18:54:58 +01:00
|
|
|
|
BAXBAD
|
2017-03-09 17:23:28 +01:00
|
|
|
|
|
|
|
|
|
"(?1){2}(a)"B
|
|
|
|
|
|
|
|
|
|
"(?1){2,4}(a)"B
|
|
|
|
|
|
|
|
|
|
# This test differs from Perl for the first subject. Perl ends up with
|
|
|
|
|
# $1 set to 'B'; PCRE2 has it unset (which I think is right).
|
|
|
|
|
|
|
|
|
|
/^(?:
|
|
|
|
|
(?:A| (?:B|B(*ACCEPT)) (?<=(.)) D)
|
|
|
|
|
(Z)
|
|
|
|
|
)+$/x
|
|
|
|
|
AZB
|
|
|
|
|
AZBDZ
|
|
|
|
|
|
2017-03-23 18:54:58 +01:00
|
|
|
|
# The first of these, when run by Perl, gives the mark 'aa', which is wrong.
|
2017-03-09 17:23:28 +01:00
|
|
|
|
|
|
|
|
|
'(?>a(*:aa))b|ac' mark
|
|
|
|
|
ac
|
|
|
|
|
|
|
|
|
|
'(?:a(*:aa))b|ac' mark
|
|
|
|
|
ac
|
|
|
|
|
|
2017-03-10 17:34:54 +01:00
|
|
|
|
/(R?){65}/
|
|
|
|
|
(R?){65}
|
|
|
|
|
|
|
|
|
|
/\[(a)]{60}/expand
|
|
|
|
|
aaaa
|
|
|
|
|
|
2017-03-16 18:17:47 +01:00
|
|
|
|
/(?<!\1((?U)1((?U))))(*F)/never_backslash_c,alt_bsux,anchored,extended
|
|
|
|
|
|
2017-03-21 18:46:21 +01:00
|
|
|
|
/\g{3/
|
|
|
|
|
|
2017-03-25 07:33:41 +01:00
|
|
|
|
/(a(?C1)(b)(c)d)+/
|
|
|
|
|
abcdabcd\=callout_capture
|
|
|
|
|
|
2017-03-23 18:54:58 +01:00
|
|
|
|
# Perl matches this one, but PCRE does not because (*ACCEPT) clears out any
|
|
|
|
|
# pending backtracks in the recursion.
|
|
|
|
|
|
|
|
|
|
/^ (?(DEFINE) (..(*ACCEPT)|...) ) (?1)$/x
|
|
|
|
|
\= Expect no match
|
|
|
|
|
abc
|
2017-04-04 13:37:21 +02:00
|
|
|
|
|
|
|
|
|
# Perl gives no match for this one
|
|
|
|
|
|
|
|
|
|
/(a(*MARK:m)(*ACCEPT)){0}(?1)/mark
|
|
|
|
|
abc
|
2017-03-23 18:54:58 +01:00
|
|
|
|
|
2017-04-04 19:09:33 +02:00
|
|
|
|
/abc/endanchored
|
|
|
|
|
xyzabc
|
|
|
|
|
\= Expect no match
|
|
|
|
|
xyzabcdef
|
|
|
|
|
\= Expect error
|
|
|
|
|
xyzabc\=ph
|
|
|
|
|
|
|
|
|
|
/abc/
|
|
|
|
|
xyzabc\=endanchored
|
|
|
|
|
\= Expect no match
|
|
|
|
|
xyzabcdef\=endanchored
|
|
|
|
|
\= Expect error
|
|
|
|
|
xyzabc\=ps,endanchored
|
|
|
|
|
|
|
|
|
|
/abc(*ACCEPT)d/endanchored
|
|
|
|
|
xyzabc
|
|
|
|
|
\= Expect no match
|
|
|
|
|
xyzabcdef
|
|
|
|
|
|
|
|
|
|
/abc|bcd/endanchored
|
|
|
|
|
xyzabcd
|
|
|
|
|
\= Expect no match
|
|
|
|
|
xyzabcdef
|
|
|
|
|
|
2017-04-11 16:53:26 +02:00
|
|
|
|
/a(*ACCEPT)x|aa/endanchored
|
|
|
|
|
aaa
|
|
|
|
|
|
2017-04-07 10:46:29 +02:00
|
|
|
|
# Check auto-anchoring when there is a group that is never obeyed at
|
|
|
|
|
# the start of a branch.
|
|
|
|
|
|
|
|
|
|
/(?(DEFINE)(a))^bc/I
|
|
|
|
|
|
|
|
|
|
/(a){0}.*bc/sI
|
|
|
|
|
|
|
|
|
|
# This should be anchored, as the condition is always false and there is
|
|
|
|
|
# no alternative branch.
|
|
|
|
|
|
|
|
|
|
/(?(VERSION>=999)yes)^bc/I
|
|
|
|
|
|
|
|
|
|
# This should not be anchored.
|
|
|
|
|
|
|
|
|
|
/(?(VERSION>=999)yes|no)^bc/I
|
|
|
|
|
|
2017-04-16 15:03:30 +02:00
|
|
|
|
/(*LIMIT_HEAP=0)xxx/I
|
|
|
|
|
|
|
|
|
|
/\d{0,3}(*:abc)(?C1)xxx/callout_info
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# These are a whole pile of tests that touch lines of code that are not
|
|
|
|
|
# used by any other tests (at least when these were created).
|
|
|
|
|
|
|
|
|
|
/^a+?x/i,no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
aaa
|
|
|
|
|
|
|
|
|
|
/^[^a]{3,}?x/i,no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
bbb
|
|
|
|
|
cc
|
|
|
|
|
|
|
|
|
|
/^X\S/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
|
|
|
|
|
/^X\W/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
|
|
|
|
|
/^X\H/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
|
|
|
|
|
/^X\h/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
|
|
|
|
|
/^X\V/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
|
|
|
|
|
/^X\v/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
|
|
|
|
|
/^X\h/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XY
|
|
|
|
|
|
|
|
|
|
/^X\V/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X\n
|
|
|
|
|
|
|
|
|
|
/^X\v/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XX
|
|
|
|
|
|
|
|
|
|
/^X.+?/s,no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
|
|
|
|
|
/^X\R+?/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XX
|
|
|
|
|
|
|
|
|
|
/^X\H+?/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
|
|
|
|
|
/^X\h+?/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
|
|
|
|
|
/^X\V+?/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
X\n
|
|
|
|
|
|
|
|
|
|
/^X\D+?/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
X9
|
|
|
|
|
|
|
|
|
|
/^X\S+?/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
X\n
|
|
|
|
|
|
|
|
|
|
/^X\W+?/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X
|
|
|
|
|
XX
|
|
|
|
|
|
|
|
|
|
/^X.+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XY\n
|
|
|
|
|
|
|
|
|
|
/(*CRLF)^X.+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XY\r\=ps
|
|
|
|
|
|
|
|
|
|
/^X\R+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X\nX
|
|
|
|
|
X\n\r\n
|
|
|
|
|
X\n\rY
|
|
|
|
|
X\n\nY
|
|
|
|
|
X\n\x{0c}Y
|
|
|
|
|
|
|
|
|
|
/(*BSR_ANYCRLF)^X\R+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X\nX
|
|
|
|
|
X\n\r\n
|
|
|
|
|
X\n\rY
|
|
|
|
|
X\n\nY
|
|
|
|
|
X\n\x{0c}Y
|
|
|
|
|
|
|
|
|
|
/^X\H+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XY\t
|
|
|
|
|
XYY
|
|
|
|
|
|
|
|
|
|
/^X\h+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X\t\t
|
|
|
|
|
X\tY
|
|
|
|
|
|
|
|
|
|
/^X\V+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XY\n
|
|
|
|
|
XYY
|
|
|
|
|
|
|
|
|
|
/^X\v+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X\n\n
|
|
|
|
|
X\nY
|
|
|
|
|
|
|
|
|
|
/^X\D+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XY9
|
|
|
|
|
XYY
|
|
|
|
|
|
|
|
|
|
/^X\d+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X99
|
|
|
|
|
X9Y
|
|
|
|
|
|
|
|
|
|
/^X\S+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XY\n
|
|
|
|
|
XYY
|
|
|
|
|
|
|
|
|
|
/^X\s+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X\n\n
|
|
|
|
|
X\nY
|
|
|
|
|
|
|
|
|
|
/^X\W+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X.A
|
|
|
|
|
X++
|
|
|
|
|
|
|
|
|
|
/^X\w+?Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
Xa.
|
|
|
|
|
Xaa
|
|
|
|
|
|
|
|
|
|
/^X.{1,3}Z/s,no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
Xa.bd
|
|
|
|
|
|
|
|
|
|
/^X\h+Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X\t\t
|
|
|
|
|
X\tY
|
|
|
|
|
|
|
|
|
|
/^X\V+Z/no_start_optimize,no_auto_possess
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XY\n
|
|
|
|
|
XYY
|
|
|
|
|
|
|
|
|
|
/^(X(*THEN)Y|AB){0}(?1)/
|
|
|
|
|
ABX
|
|
|
|
|
\= Expect no match
|
|
|
|
|
XAB
|
|
|
|
|
|
|
|
|
|
/^(?!A(?C1)B)C/
|
2017-06-30 18:00:33 +02:00
|
|
|
|
ABC\=callout_error=1,no_jit
|
|
|
|
|
|
|
|
|
|
/^(?!A(?C1)B)C/no_start_optimize
|
2017-04-16 15:03:30 +02:00
|
|
|
|
ABC\=callout_error=1
|
|
|
|
|
|
|
|
|
|
/^(?(?!A(?C1)B)C)/
|
|
|
|
|
ABC\=callout_error=1
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
2017-04-18 14:32:52 +02:00
|
|
|
|
/[a b c]/BxxI
|
|
|
|
|
|
|
|
|
|
/[a b c]/BxxxI
|
|
|
|
|
|
|
|
|
|
/[a b c]/B,extended_more
|
|
|
|
|
|
|
|
|
|
/[ a b c ]/B,extended_more
|
|
|
|
|
|
|
|
|
|
/[a b](?xx: [ 12 ] (?-xx:[ 34 ]) )y z/B
|
|
|
|
|
|
|
|
|
|
# Unsetting /x also unsets /xx
|
|
|
|
|
|
|
|
|
|
/[a b](?xx: [ 12 ] (?-x:[ 34 ]) )y z/B
|
|
|
|
|
|
2017-04-18 18:21:50 +02:00
|
|
|
|
/(a)(?-n:(b))(c)/nB
|
|
|
|
|
|
2017-06-01 20:10:15 +02:00
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
# These test the dangerous PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL option.
|
|
|
|
|
|
|
|
|
|
/\j\x{z}\o{82}\L\uabcd\u\U\g{\g/B,\bad_escape_is_literal
|
|
|
|
|
|
|
|
|
|
/\N{\c/B,bad_escape_is_literal
|
|
|
|
|
|
|
|
|
|
/[\j\x{z}\o\gA-\Nb-\g]/B,bad_escape_is_literal
|
|
|
|
|
|
|
|
|
|
/[Q-\N]/B,bad_escape_is_literal
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
2017-06-15 18:41:44 +02:00
|
|
|
|
/a\b(c/literal
|
|
|
|
|
a\\b(c
|
|
|
|
|
|
|
|
|
|
/a\b(c/literal,caseless
|
|
|
|
|
a\\b(c
|
|
|
|
|
a\\B(c
|
|
|
|
|
|
|
|
|
|
/a\b(c/literal,firstline
|
|
|
|
|
XYYa\\b(c
|
|
|
|
|
\= Expect no match
|
|
|
|
|
X\na\\b(c
|
|
|
|
|
|
|
|
|
|
/a\b?c/literal,use_offset_limit
|
2017-06-16 19:51:13 +02:00
|
|
|
|
XXXXa\\b?c\=offset_limit=4
|
2017-06-15 18:41:44 +02:00
|
|
|
|
\= Expect no match
|
|
|
|
|
XXXXa\\b?c\=offset_limit=3
|
|
|
|
|
|
|
|
|
|
/a\b(c/literal,anchored,endanchored
|
|
|
|
|
a\\b(c
|
|
|
|
|
\= Expect no match
|
|
|
|
|
Xa\\b(c
|
|
|
|
|
a\\b(cX
|
|
|
|
|
Xa\\b(cX
|
|
|
|
|
|
|
|
|
|
//literal,extended
|
|
|
|
|
|
|
|
|
|
/a\b(c/literal,auto_callout,no_start_optimize
|
|
|
|
|
XXXXa\\b(c
|
|
|
|
|
|
|
|
|
|
/a\b(c/literal,auto_callout
|
|
|
|
|
XXXXa\\b(c
|
|
|
|
|
|
|
|
|
|
/(*CR)abc/literal
|
|
|
|
|
(*CR)abc
|
|
|
|
|
|
2017-06-16 19:51:13 +02:00
|
|
|
|
/cat|dog/match_word
|
|
|
|
|
the cat sat
|
|
|
|
|
\= Expect no match
|
|
|
|
|
caterpillar
|
|
|
|
|
snowcat
|
|
|
|
|
syndicate
|
|
|
|
|
|
|
|
|
|
/(cat)|dog/match_line,literal
|
|
|
|
|
(cat)|dog
|
|
|
|
|
\= Expect no match
|
|
|
|
|
the cat sat
|
|
|
|
|
caterpillar
|
|
|
|
|
snowcat
|
|
|
|
|
syndicate
|
|
|
|
|
|
|
|
|
|
/a whole line/match_line,multiline
|
|
|
|
|
Rhubarb \na whole line\n custard
|
|
|
|
|
\= Expect no match
|
|
|
|
|
Not a whole line
|
|
|
|
|
|
2014-07-24 18:32:38 +02:00
|
|
|
|
# End of testinput2
|