2015-08-18 12:34:05 +02:00
|
|
|
# This test is run only when JIT support is available. It checks JIT complete
|
|
|
|
# and partial modes, and things that are different with JIT.
|
|
|
|
|
|
|
|
#pattern jitverify
|
|
|
|
|
|
|
|
# JIT does not support this pattern (callout at start of condition).
|
|
|
|
|
|
|
|
/(?(?C1)(?=a)a)/I
|
|
|
|
Capturing subpattern count = 0
|
|
|
|
May match empty string
|
|
|
|
Subject length lower bound = 0
|
2015-11-14 17:48:32 +01:00
|
|
|
JIT compilation was not successful (no more memory)
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
# The following pattern cannot be compiled by JIT.
|
|
|
|
|
|
|
|
/b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b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*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*
|
|
|
|
Capturing subpattern count = 0
|
|
|
|
May match empty string
|
|
|
|
Subject length lower bound = 0
|
2015-11-14 17:48:32 +01:00
|
|
|
JIT compilation was not successful (no more memory)
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
# Check that an infinite recursion loop is caught.
|
|
|
|
|
|
|
|
/(?(R)a*(?1)|((?R))b)/
|
|
|
|
aaaabcde
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/abcd/I
|
|
|
|
Capturing subpattern count = 0
|
|
|
|
First code unit = 'a'
|
|
|
|
Last code unit = 'd'
|
|
|
|
Subject length lower bound = 4
|
|
|
|
JIT compilation was successful
|
|
|
|
abcd
|
|
|
|
0: abcd (JIT)
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match (JIT)
|
|
|
|
|
|
|
|
/(*NO_JIT)abcd/I
|
|
|
|
Capturing subpattern count = 0
|
|
|
|
First code unit = 'a'
|
|
|
|
Last code unit = 'd'
|
|
|
|
Subject length lower bound = 4
|
|
|
|
JIT compilation was not successful
|
|
|
|
abcd
|
|
|
|
0: abcd
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match
|
|
|
|
|
|
|
|
/abcd/
|
|
|
|
abcd
|
|
|
|
0: abcd (JIT)
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab (JIT)
|
|
|
|
ab\=ph
|
|
|
|
Partial match: ab (JIT)
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match (JIT)
|
|
|
|
|
|
|
|
/abcd/jitfast
|
|
|
|
abcd
|
|
|
|
0: abcd (JIT)
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab (JIT)
|
|
|
|
ab\=ph
|
|
|
|
Partial match: ab (JIT)
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match (JIT)
|
|
|
|
|
|
|
|
/abcd/jit=1
|
|
|
|
abcd
|
|
|
|
0: abcd (JIT)
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab
|
|
|
|
ab\=ph
|
|
|
|
Partial match: ab
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match (JIT)
|
|
|
|
xyz\=ps
|
|
|
|
No match
|
|
|
|
|
|
|
|
/abcd/jit=1,jitfast
|
|
|
|
abcd
|
|
|
|
0: abcd (JIT)
|
|
|
|
ab\=ps
|
|
|
|
Failed: error -45: bad JIT option
|
|
|
|
ab\=ph
|
|
|
|
Failed: error -45: bad JIT option
|
|
|
|
xyz\=ps
|
|
|
|
Failed: error -45: bad JIT option
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
|
|
|
xyz
|
|
|
|
No match (JIT)
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
/abcd/jit=2
|
|
|
|
abcd
|
|
|
|
0: abcd
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab (JIT)
|
|
|
|
ab\=ph
|
|
|
|
Partial match: ab
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match
|
|
|
|
|
|
|
|
/abcd/jit=2,jitfast
|
|
|
|
abcd
|
|
|
|
Failed: error -45: bad JIT option
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab (JIT)
|
|
|
|
ab\=ph
|
|
|
|
Failed: error -45: bad JIT option
|
|
|
|
xyz
|
|
|
|
Failed: error -45: bad JIT option
|
|
|
|
|
|
|
|
/abcd/jit=3
|
|
|
|
abcd
|
|
|
|
0: abcd (JIT)
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab (JIT)
|
|
|
|
ab\=ph
|
|
|
|
Partial match: ab
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match (JIT)
|
|
|
|
|
|
|
|
/abcd/jit=4
|
|
|
|
abcd
|
|
|
|
0: abcd
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab
|
|
|
|
ab\=ph
|
|
|
|
Partial match: ab (JIT)
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match
|
|
|
|
|
|
|
|
/abcd/jit=5
|
|
|
|
abcd
|
|
|
|
0: abcd (JIT)
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab
|
|
|
|
ab\=ph
|
|
|
|
Partial match: ab (JIT)
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match (JIT)
|
|
|
|
|
|
|
|
/abcd/jit=6
|
|
|
|
abcd
|
|
|
|
0: abcd
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab (JIT)
|
|
|
|
ab\=ph
|
|
|
|
Partial match: ab (JIT)
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match
|
|
|
|
|
|
|
|
/abcd/jit=7
|
|
|
|
abcd
|
|
|
|
0: abcd (JIT)
|
|
|
|
ab\=ps
|
|
|
|
Partial match: ab (JIT)
|
|
|
|
ab\=ph
|
|
|
|
Partial match: ab (JIT)
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
xyz
|
|
|
|
No match (JIT)
|
|
|
|
|
|
|
|
/abcd/I,jit=2
|
|
|
|
Capturing subpattern count = 0
|
|
|
|
First code unit = 'a'
|
|
|
|
Last code unit = 'd'
|
|
|
|
Subject length lower bound = 4
|
|
|
|
JIT compilation was successful
|
|
|
|
|
|
|
|
/(*NO_START_OPT)a(*:m)b/mark
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
a
|
|
|
|
No match, mark = m (JIT)
|
|
|
|
|
|
|
|
/^12345678abcd/m
|
|
|
|
12345678abcd
|
|
|
|
0: 12345678abcd (JIT)
|
|
|
|
|
|
|
|
# Limits tests that give different output with JIT.
|
|
|
|
|
|
|
|
/(a+)*zz/I
|
|
|
|
Capturing subpattern count = 1
|
|
|
|
Starting code units: a z
|
|
|
|
Last code unit = 'z'
|
|
|
|
Subject length lower bound = 2
|
|
|
|
JIT compilation was successful
|
|
|
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits
|
|
|
|
Minimum match limit = 2
|
|
|
|
0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz (JIT)
|
|
|
|
1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz\=find_limits
|
|
|
|
Minimum match limit = 16383
|
|
|
|
No match (JIT)
|
|
|
|
|
|
|
|
!((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)!I
|
|
|
|
Capturing subpattern count = 1
|
|
|
|
May match empty string
|
|
|
|
Subject length lower bound = 0
|
|
|
|
JIT compilation was successful
|
|
|
|
/* this is a C style comment */\=find_limits
|
2015-09-02 10:35:50 +02:00
|
|
|
Minimum match limit = 29
|
2015-08-18 12:34:05 +02:00
|
|
|
0: /* this is a C style comment */ (JIT)
|
|
|
|
1: /* this is a C style comment */
|
|
|
|
|
|
|
|
/^(?>a)++/
|
|
|
|
aa\=find_limits
|
|
|
|
Minimum match limit = 1
|
|
|
|
0: aa (JIT)
|
|
|
|
aaaaaaaaa\=find_limits
|
|
|
|
Minimum match limit = 1
|
|
|
|
0: aaaaaaaaa (JIT)
|
|
|
|
|
|
|
|
/(a)(?1)++/
|
|
|
|
aa\=find_limits
|
|
|
|
Minimum match limit = 1
|
|
|
|
0: aa (JIT)
|
|
|
|
1: a
|
|
|
|
aaaaaaaaa\=find_limits
|
|
|
|
Minimum match limit = 1
|
|
|
|
0: aaaaaaaaa (JIT)
|
|
|
|
1: a
|
|
|
|
|
|
|
|
/a(?:.)*?a/ims
|
|
|
|
abbbbbbbbbbbbbbbbbbbbba\=find_limits
|
2015-09-02 10:35:50 +02:00
|
|
|
Minimum match limit = 22
|
2015-08-18 12:34:05 +02:00
|
|
|
0: abbbbbbbbbbbbbbbbbbbbba (JIT)
|
2014-08-08 20:18:18 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/a(?:.(*THEN))*?a/ims
|
|
|
|
abbbbbbbbbbbbbbbbbbbbba\=find_limits
|
2015-09-02 10:35:50 +02:00
|
|
|
Minimum match limit = 22
|
2015-08-18 12:34:05 +02:00
|
|
|
0: abbbbbbbbbbbbbbbbbbbbba (JIT)
|
|
|
|
|
|
|
|
/a(?:.(*THEN:ABC))*?a/ims
|
|
|
|
abbbbbbbbbbbbbbbbbbbbba\=find_limits
|
2015-09-02 10:35:50 +02:00
|
|
|
Minimum match limit = 22
|
2015-08-18 12:34:05 +02:00
|
|
|
0: abbbbbbbbbbbbbbbbbbbbba (JIT)
|
|
|
|
|
|
|
|
/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
|
|
|
|
aabbccddee\=find_limits
|
|
|
|
Minimum match limit = 5
|
|
|
|
0: aabbccddee (JIT)
|
|
|
|
|
|
|
|
/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
|
|
|
|
aabbccddee\=find_limits
|
|
|
|
Minimum match limit = 5
|
|
|
|
0: aabbccddee (JIT)
|
|
|
|
1: aa
|
|
|
|
2: bb
|
|
|
|
3: cc
|
|
|
|
4: dd
|
|
|
|
5: ee
|
2014-08-08 20:18:18 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
|
|
|
|
aabbccddee\=find_limits
|
|
|
|
Minimum match limit = 5
|
|
|
|
0: aabbccddee (JIT)
|
|
|
|
1: aa
|
|
|
|
2: cc
|
|
|
|
3: ee
|
2014-10-31 13:34:34 +01:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/jitfast
|
|
|
|
aabbccddee\=find_limits
|
|
|
|
Minimum match limit = 5
|
|
|
|
0: aabbccddee (JIT)
|
|
|
|
1: aa
|
|
|
|
2: cc
|
|
|
|
3: ee
|
|
|
|
aabbccddee\=jitstack=1
|
|
|
|
0: aabbccddee (JIT)
|
|
|
|
1: aa
|
|
|
|
2: cc
|
|
|
|
3: ee
|
2014-10-31 13:34:34 +01:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(a+)*zz/
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz
|
|
|
|
No match (JIT)
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect limit exceeded
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz\=match_limit=3000
|
|
|
|
Failed: error -47: match limit exceeded
|
2014-10-31 13:34:34 +01:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(*LIMIT_MATCH=3000)(a+)*zz/I
|
|
|
|
Capturing subpattern count = 1
|
|
|
|
Match limit = 3000
|
|
|
|
Starting code units: a z
|
|
|
|
Last code unit = 'z'
|
|
|
|
Subject length lower bound = 2
|
|
|
|
JIT compilation was successful
|
|
|
|
aaaaaaaaaaaaaz
|
|
|
|
Failed: error -47: match limit exceeded
|
|
|
|
aaaaaaaaaaaaaz\=match_limit=60000
|
|
|
|
Failed: error -47: match limit exceeded
|
2014-10-31 13:34:34 +01:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
|
|
|
|
Capturing subpattern count = 1
|
|
|
|
Match limit = 3000
|
|
|
|
Starting code units: a z
|
|
|
|
Last code unit = 'z'
|
|
|
|
Subject length lower bound = 2
|
|
|
|
JIT compilation was successful
|
|
|
|
aaaaaaaaaaaaaz
|
|
|
|
Failed: error -47: match limit exceeded
|
2014-10-31 13:34:34 +01:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(*LIMIT_MATCH=60000)(a+)*zz/I
|
|
|
|
Capturing subpattern count = 1
|
|
|
|
Match limit = 60000
|
|
|
|
Starting code units: a z
|
|
|
|
Last code unit = 'z'
|
|
|
|
Subject length lower bound = 2
|
|
|
|
JIT compilation was successful
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz
|
|
|
|
No match (JIT)
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect limit exceeded
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaaaaaaaaaaaz\=match_limit=3000
|
|
|
|
Failed: error -47: match limit exceeded
|
|
|
|
|
|
|
|
# These three have infinitely nested recursions.
|
|
|
|
|
|
|
|
/((?2))((?1))/
|
2014-10-06 19:28:42 +02:00
|
|
|
abc
|
2015-08-18 12:34:05 +02:00
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
2016-10-02 18:01:01 +02:00
|
|
|
/((?(R2)a+|(?1)b))()/
|
2015-08-18 12:34:05 +02:00
|
|
|
aaaabcde
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/(?(R)a*(?1)|((?R))b)/
|
|
|
|
aaaabcde
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
# Invalid options disable JIT when called via pcre2_match(), causing the
|
|
|
|
# match to happen via the interpreter, but for fast JIT invalid options are
|
|
|
|
# ignored, so an unanchored match happens.
|
|
|
|
|
|
|
|
/abcd/
|
|
|
|
abcd\=anchored
|
|
|
|
0: abcd
|
2015-09-16 18:49:48 +02:00
|
|
|
\= Expect no match
|
2015-08-18 12:34:05 +02:00
|
|
|
fail abcd\=anchored
|
|
|
|
No match
|
|
|
|
|
|
|
|
/abcd/jitfast
|
|
|
|
abcd\=anchored
|
|
|
|
0: abcd (JIT)
|
|
|
|
succeed abcd\=anchored
|
|
|
|
0: abcd (JIT)
|
|
|
|
|
|
|
|
# Push/pop does not lose the JIT information, though jitverify applies only to
|
|
|
|
# compilation, but serializing (save/load) discards JIT data completely.
|
2014-10-06 19:28:42 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/^abc\Kdef/info,push
|
|
|
|
** Applies only to compile when pattern is stacked with 'push': jitverify
|
|
|
|
Capturing subpattern count = 0
|
|
|
|
Compile options: <none>
|
|
|
|
Overall options: anchored
|
|
|
|
Subject length lower bound = 6
|
|
|
|
JIT compilation was successful
|
|
|
|
#pop jitverify
|
2014-10-06 19:28:42 +02:00
|
|
|
abcdef
|
2015-08-18 12:34:05 +02:00
|
|
|
0: def (JIT)
|
2014-08-08 20:18:18 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/^abc\Kdef/info,push
|
|
|
|
** Applies only to compile when pattern is stacked with 'push': jitverify
|
|
|
|
Capturing subpattern count = 0
|
|
|
|
Compile options: <none>
|
|
|
|
Overall options: anchored
|
|
|
|
Subject length lower bound = 6
|
|
|
|
JIT compilation was successful
|
|
|
|
#save testsaved1
|
|
|
|
#load testsaved1
|
|
|
|
#pop jitverify
|
|
|
|
abcdef
|
2014-10-06 19:28:42 +02:00
|
|
|
0: def
|
2015-08-18 12:34:05 +02:00
|
|
|
|
|
|
|
#load testsaved1
|
|
|
|
#pop jit,jitverify
|
|
|
|
abcdef
|
|
|
|
0: def (JIT)
|
|
|
|
|
2016-02-26 19:26:17 +01:00
|
|
|
/abcd/pushcopy,jitverify
|
|
|
|
** Applies only to compile when pattern is stacked with 'push': jitverify
|
|
|
|
abcd
|
|
|
|
0: abcd (JIT)
|
|
|
|
|
|
|
|
#pop jitverify
|
|
|
|
abcd
|
|
|
|
0: abcd
|
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
# Test pattern compilation
|
2014-10-06 19:28:42 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(?:a|b|c|d|e)(?R)/jit=1
|
2014-10-06 19:28:42 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(?:a|b|c|d|e)(?R)(?R)/jit=1
|
2014-10-06 19:28:42 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(a(?:a|b|c|d|e)b){8,16}/jit=1
|
2014-10-06 19:28:42 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
/(?:|a|){100}x/jit=1
|
|
|
|
|
|
|
|
# These tests provoke recursion loops, which give a different error message
|
|
|
|
# when JIT is used.
|
|
|
|
|
|
|
|
/(?R)/I
|
|
|
|
Capturing subpattern count = 0
|
|
|
|
May match empty string
|
|
|
|
Subject length lower bound = 0
|
|
|
|
JIT compilation was successful
|
|
|
|
abcd
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/(a|(?R))/I
|
|
|
|
Capturing subpattern count = 1
|
|
|
|
May match empty string
|
2015-11-11 10:42:26 +01:00
|
|
|
Subject length lower bound = 0
|
2015-08-18 12:34:05 +02:00
|
|
|
JIT compilation was successful
|
|
|
|
abcd
|
|
|
|
0: a (JIT)
|
|
|
|
1: a
|
|
|
|
defg
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/(ab|(bc|(de|(?R))))/I
|
|
|
|
Capturing subpattern count = 3
|
|
|
|
May match empty string
|
2015-11-11 10:42:26 +01:00
|
|
|
Subject length lower bound = 0
|
2015-08-18 12:34:05 +02:00
|
|
|
JIT compilation was successful
|
|
|
|
abcd
|
|
|
|
0: ab (JIT)
|
|
|
|
1: ab
|
|
|
|
fghi
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/(ab|(bc|(de|(?1))))/I
|
|
|
|
Capturing subpattern count = 3
|
|
|
|
May match empty string
|
2015-11-11 10:42:26 +01:00
|
|
|
Subject length lower bound = 0
|
2015-08-18 12:34:05 +02:00
|
|
|
JIT compilation was successful
|
|
|
|
abcd
|
|
|
|
0: ab (JIT)
|
|
|
|
1: ab
|
|
|
|
fghi
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/x(ab|(bc|(de|(?1)x)x)x)/I
|
|
|
|
Capturing subpattern count = 3
|
|
|
|
First code unit = 'x'
|
|
|
|
Subject length lower bound = 3
|
|
|
|
JIT compilation was successful
|
|
|
|
xab123
|
|
|
|
0: xab (JIT)
|
|
|
|
1: ab
|
|
|
|
xfghi
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/(?!\w)(?R)/
|
|
|
|
abcd
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
=abc
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/(?=\w)(?R)/
|
|
|
|
=abc
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
abcd
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/(?<!\w)(?R)/
|
|
|
|
abcd
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/(?<=\w)(?R)/
|
|
|
|
abcd
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/(a+|(?R)b)/
|
|
|
|
aaa
|
|
|
|
0: aaa (JIT)
|
|
|
|
1: aaa
|
|
|
|
bbb
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
|
|
|
/[^\xff]((?1))/BI
|
|
|
|
------------------------------------------------------------------
|
|
|
|
Bra
|
|
|
|
[^\x{ff}]
|
|
|
|
CBra 1
|
|
|
|
Recurse
|
|
|
|
Ket
|
|
|
|
Ket
|
|
|
|
End
|
|
|
|
------------------------------------------------------------------
|
|
|
|
Capturing subpattern count = 1
|
|
|
|
Subject length lower bound = 1
|
|
|
|
JIT compilation was successful
|
|
|
|
abcd
|
|
|
|
Failed: error -46: JIT stack limit reached
|
|
|
|
|
2015-08-24 11:25:04 +02:00
|
|
|
/(x(?1)){4}/
|
|
|
|
|
2015-09-02 10:35:50 +02:00
|
|
|
/[axm]{7}/
|
|
|
|
|
|
|
|
/(.|.)*?bx/
|
|
|
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
|
|
|
|
Failed: error -47: match limit exceeded
|
2016-06-05 18:05:34 +02:00
|
|
|
|
|
|
|
# Test JIT disable
|
|
|
|
|
|
|
|
/abc/
|
|
|
|
abc
|
|
|
|
0: abc (JIT)
|
|
|
|
abc\=no_jit
|
|
|
|
0: abc
|
|
|
|
|
|
|
|
/abc/jitfast
|
|
|
|
abc
|
|
|
|
0: abc (JIT)
|
|
|
|
abc\=no_jit
|
|
|
|
0: abc (JIT)
|
2016-07-02 17:52:30 +02:00
|
|
|
|
|
|
|
# ----
|
|
|
|
|
2016-07-06 19:39:15 +02:00
|
|
|
/[aC]/mg,firstline,newline=lf
|
2016-07-02 17:52:30 +02:00
|
|
|
match\nmatch
|
|
|
|
0: a (JIT)
|
|
|
|
|
2016-07-06 19:39:15 +02:00
|
|
|
/[aCz]/mg,firstline,newline=lf
|
2016-07-02 17:52:30 +02:00
|
|
|
match\nmatch
|
|
|
|
0: a (JIT)
|
2015-09-02 10:35:50 +02:00
|
|
|
|
2015-08-18 12:34:05 +02:00
|
|
|
# End of testinput17
|