summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/pcrelib/testdata')
-rw-r--r--ext/pcre/pcrelib/testdata/grepinput22
-rw-r--r--ext/pcre/pcrelib/testdata/greplist5
-rw-r--r--ext/pcre/pcrelib/testdata/grepoutput128
-rw-r--r--ext/pcre/pcrelib/testdata/testinput240
-rw-r--r--ext/pcre/pcrelib/testdata/testinput326
-rw-r--r--ext/pcre/pcrelib/testdata/testinput43
-rw-r--r--ext/pcre/pcrelib/testdata/testinput55
-rw-r--r--ext/pcre/pcrelib/testdata/testinput6224
-rw-r--r--ext/pcre/pcrelib/testdata/testinput712
-rw-r--r--ext/pcre/pcrelib/testdata/testinput9217
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput12
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput2236
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput356
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput46
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput5207
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput6434
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput719
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput82
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput9397
19 files changed, 1809 insertions, 232 deletions
diff --git a/ext/pcre/pcrelib/testdata/grepinput b/ext/pcre/pcrelib/testdata/grepinput
index 2a89c2e09d..0ded82475c 100644
--- a/ext/pcre/pcrelib/testdata/grepinput
+++ b/ext/pcre/pcrelib/testdata/grepinput
@@ -583,6 +583,26 @@ jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-------------------------------------------------------------------------------
-Check up on PATTERN near the end.
+aaaaa0
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+bbbbbb
+cccccccccccccccccccccccccccccccccccccccccc
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+eeeee
+aaaaa2
+ffffffffff
+
+This is a line before the binary zero.
+This line contains a binary zero here >This is a line after the binary zero.
+
+ABOVE the elephant
+ABOVE
+ABOVE theatre
+AB.VE
+AB.VE the turtle
+
+PUT NEW DATA ABOVE THIS LINE.
+=============================
+Check up on PATTERN near the end.
This is the last line of this file.
diff --git a/ext/pcre/pcrelib/testdata/greplist b/ext/pcre/pcrelib/testdata/greplist
index bb2705e390..1434ae96f6 100644
--- a/ext/pcre/pcrelib/testdata/greplist
+++ b/ext/pcre/pcrelib/testdata/greplist
@@ -1,4 +1,7 @@
This is a file of patterns for testing the -f option. Don't include any blank
-lines because they will match everything!
+lines because they will match everything! This is no longer true, so have one.
+
pattern
line by itself
+
+End of the list of patterns.
diff --git a/ext/pcre/pcrelib/testdata/grepoutput b/ext/pcre/pcrelib/testdata/grepoutput
index 27ab7e4a5f..1dd375b65a 100644
--- a/ext/pcre/pcrelib/testdata/grepoutput
+++ b/ext/pcre/pcrelib/testdata/grepoutput
@@ -1,4 +1,3 @@
-pcregrep version 4.0 07-Jun-2005 using PCRE version 6.2 01-Aug-2005
---------------------------- Test 1 ------------------------------
PATTERN at the start of a line.
In the middle of a line, PATTERN appears.
@@ -9,23 +8,21 @@ PATTERN at the start of a line.
7:PATTERN at the start of a line.
8:In the middle of a line, PATTERN appears.
10:This pattern is in lower case.
-586:Check up on PATTERN near the end.
+608:Check up on PATTERN near the end.
---------------------------- Test 4 ------------------------------
4
---------------------------- Test 5 ------------------------------
./testdata/grepinput:7:PATTERN at the start of a line.
./testdata/grepinput:8:In the middle of a line, PATTERN appears.
./testdata/grepinput:10:This pattern is in lower case.
-./testdata/grepinput:586:Check up on PATTERN near the end.
---
+./testdata/grepinput:608:Check up on PATTERN near the end.
./testdata/grepinputx:3:Here is the pattern again.
./testdata/grepinputx:5:Pattern
---------------------------- Test 6 ------------------------------
7:PATTERN at the start of a line.
8:In the middle of a line, PATTERN appears.
10:This pattern is in lower case.
-586:Check up on PATTERN near the end.
---
+608:Check up on PATTERN near the end.
3:Here is the pattern again.
5:Pattern
---------------------------- Test 7 ------------------------------
@@ -87,7 +84,7 @@ That time it was on a line by itself.
---------------------------- Test 14 -----------------------------
./testdata/grepinputx:To pat or not to pat, that is the question.
---------------------------- Test 15 -----------------------------
-pcregrep: Error in regex at offset 4: nothing to repeat
+pcregrep: Error in command-line regex at offset 4: nothing to repeat
---------------------------- Test 16 -----------------------------
pcregrep: Failed to open ./testdata/nonexistfile: No such file or directory
---------------------------- Test 17 -----------------------------
@@ -116,14 +113,14 @@ of lines
36-sixteen
37-seventeen
---------------------------- Test 22 -----------------------------
-20-one
-21-two
-22-three
+21-one
+22-two
+23-three
24:four
--
-30-eleven
-31-twelve
-32-thirteen
+31-eleven
+32-twelve
+33-thirteen
34:fourteen
---------------------------- Test 23 -----------------------------
one
@@ -162,15 +159,15 @@ twenty
This is the last line of this file.
---------------------------- Test 25 -----------------------------
-14-
-15-complete pair
-16-of lines
-17-
-18-And there they were again, to check line numbers.
-19-
-20-one
-21-two
-22-three
+15-
+16-complete pair
+17-of lines
+18-
+19-And there they were again, to check line numbers.
+20-
+21-one
+22-two
+23-three
24:four
25-five
26-six
@@ -232,16 +229,16 @@ twenty
This is the last line of this file.
---------------------------- Test 28 -----------------------------
-13-of lines all by themselves.
-14-
-15-complete pair
-16-of lines
-17-
-18-And there they were again, to check line numbers.
-19-
-20-one
-21-two
-22-three
+14-of lines all by themselves.
+15-
+16-complete pair
+17-of lines
+18-
+19-And there they were again, to check line numbers.
+20-
+21-one
+22-two
+23-three
24:four
25-five
26-six
@@ -284,18 +281,18 @@ twenty
This is the last line of this file.
---------------------------- Test 30 -----------------------------
-./testdata/grepinput-3-features should be added at the end, because some of the tests involve the
-./testdata/grepinput-4-output of line numbers, and we don't want these to change.
-./testdata/grepinput-5-
+./testdata/grepinput-4-features should be added at the end, because some of the tests involve the
+./testdata/grepinput-5-output of line numbers, and we don't want these to change.
+./testdata/grepinput-6-
./testdata/grepinput:7:PATTERN at the start of a line.
./testdata/grepinput:8:In the middle of a line, PATTERN appears.
./testdata/grepinput-9-
./testdata/grepinput:10:This pattern is in lower case.
--
-./testdata/grepinput-582-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-./testdata/grepinput-583--------------------------------------------------------------------------------
-./testdata/grepinput-584-
-./testdata/grepinput:586:Check up on PATTERN near the end.
+./testdata/grepinput-605-PUT NEW DATA ABOVE THIS LINE.
+./testdata/grepinput-606-=============================
+./testdata/grepinput-607-
+./testdata/grepinput:608:Check up on PATTERN near the end.
--
./testdata/grepinputx-1-This is a second file of input for the pcregrep tests.
./testdata/grepinputx-2-
@@ -311,9 +308,8 @@ This is the last line of this file.
./testdata/grepinput-12-Here follows a whole lot of stuff that makes the file over 24K long.
./testdata/grepinput-13-
--
-./testdata/grepinput:586:Check up on PATTERN near the end.
-./testdata/grepinput-587-
-./testdata/grepinput-588-This is the last line of this file.
+./testdata/grepinput:608:Check up on PATTERN near the end.
+./testdata/grepinput-609-This is the last line of this file.
--
./testdata/grepinputx:3:Here is the pattern again.
./testdata/grepinputx-4-
@@ -334,3 +330,51 @@ RC=0
---------------------------- Test 36 -----------------------------
./testdata/grepinputx
RC=0
+---------------------------- Test 37 -----------------------------
+aaaaa0
+aaaaa2
+RC=0
+======== STDERR ========
+pcregrep: pcre_exec() error -8 while matching this line:
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+pcregrep: error -8 means that a resource limit was exceeded
+pcregrep: check your regex for nested unlimited loops
+pcregrep: pcre_exec() error -8 while matching this line:
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+---------------------------- Test 38 ------------------------------
+This line contains a binary zero here >---------------------------- Test 39 ------------------------------
+This is a line before the binary zero.
+This line contains a binary zero here >---------------------------- Test 40 ------------------------------
+This line contains a binary zero here >This is a line after the binary zero.
+---------------------------- Test 41 ------------------------------
+before the binary zero
+after the binary zero
+---------------------------- Test 41 ------------------------------
+./testdata/grepinput:595:before the binary zero
+./testdata/grepinput:597:after the binary zero
+---------------------------- Test 42 ------------------------------
+595:before
+596:zero
+597:after
+---------------------------- Test 43 ------------------------------
+595:before
+596:zero
+597:zero
+---------------------------- Test 44 ------------------------------
+10:pattern
+595:binary
+596:binary
+597:binary
+---------------------------- Test 45 ------------------------------
+pcregrep: Error in 2nd command-line regex at offset 9: missing )
+---------------------------- Test 46 ------------------------------
+AB.VE
+---------------------------- Test 47 ------------------------------
+ABOVE the elephant
+AB.VE
+AB.VE the turtle
+---------------------------- Test 48 ------------------------------
+ABOVE the elephant
+AB.VE
+AB.VE the turtle
+PUT NEW DATA ABOVE THIS LINE.
diff --git a/ext/pcre/pcrelib/testdata/testinput2 b/ext/pcre/pcrelib/testdata/testinput2
index befb65a441..60d2db00f1 100644
--- a/ext/pcre/pcrelib/testdata/testinput2
+++ b/ext/pcre/pcrelib/testdata/testinput2
@@ -672,12 +672,18 @@
/^[[:^alpha:]]/D
+/[_[:alpha:]]/IS
+
/^[[:ascii:]]/D
/^[[:^ascii:]]/D
/^[[:blank:]]/D
+/^[[:^blank:]]/D
+
+/[\n\x0b\x0c\x0d[:blank:]]/IS
+
/^[[:cntrl:]]/D
/^[[:digit:]]/D
@@ -1450,4 +1456,38 @@
"(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)"
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+/[^()]*(?:\((?R)\)[^()]*)*/
+ (this(and)that
+ (this(and)that)
+ (this(and)that)stuff
+
+/[^()]*(?:\((?>(?R))\)[^()]*)*/
+ (this(and)that
+ (this(and)that)
+
+/[^()]*(?:\((?R)\))*[^()]*/
+ (this(and)that
+ (this(and)that)
+
+/(?:\((?R)\))*[^()]*/
+ (this(and)that
+ (this(and)that)
+ ((this))
+
+/(?:\((?R)\))|[^()]*/
+ (this(and)that
+ (this(and)that)
+ (this)
+ ((this))
+
+/a(b)c/PN
+ abc
+
+/a(?P<name>b)c/PN
+ abc
+
+/\x{100}/
+
+/\x{0000ff}/
+
/ End of testinput2 /
diff --git a/ext/pcre/pcrelib/testdata/testinput3 b/ext/pcre/pcrelib/testdata/testinput3
index c2abdbfdb5..e6ac826f77 100644
--- a/ext/pcre/pcrelib/testdata/testinput3
+++ b/ext/pcre/pcrelib/testdata/testinput3
@@ -62,4 +62,30 @@
*** Failers
école
+/\W+/Lfr_FR
+ >>>\xaa<<<
+ >>>\xba<<<
+
+/[\W]+/Lfr_FR
+ >>>\xaa<<<
+ >>>\xba<<<
+
+/[^[:alpha:]]+/Lfr_FR
+ >>>\xaa<<<
+ >>>\xba<<<
+
+/\w+/Lfr_FR
+ >>>\xaa<<<
+ >>>\xba<<<
+
+/[\w]+/Lfr_FR
+ >>>\xaa<<<
+ >>>\xba<<<
+
+/[[:alpha:]]+/Lfr_FR
+ >>>\xaa<<<
+ >>>\xba<<<
+
+/[[:alpha:]][[:lower:]][[:upper:]]/DLfr_FR
+
/ End of testinput3 /
diff --git a/ext/pcre/pcrelib/testdata/testinput4 b/ext/pcre/pcrelib/testdata/testinput4
index c16e9d9983..6e0099c649 100644
--- a/ext/pcre/pcrelib/testdata/testinput4
+++ b/ext/pcre/pcrelib/testdata/testinput4
@@ -510,4 +510,7 @@
/^\x{85}$/8i
\x{85}
+/^\ሴ/8
+ ሴ
+
/ End of testinput4 /
diff --git a/ext/pcre/pcrelib/testdata/testinput5 b/ext/pcre/pcrelib/testdata/testinput5
index fe6ee3e656..dc45445f68 100644
--- a/ext/pcre/pcrelib/testdata/testinput5
+++ b/ext/pcre/pcrelib/testdata/testinput5
@@ -260,4 +260,9 @@
/\w/8
\x{100}X
+/a\x{1234}b/P8
+ a\x{1234}b
+
+/^\ሴ/8D
+
/ End of testinput5 /
diff --git a/ext/pcre/pcrelib/testdata/testinput6 b/ext/pcre/pcrelib/testdata/testinput6
index 01a39477ac..a45920a17e 100644
--- a/ext/pcre/pcrelib/testdata/testinput6
+++ b/ext/pcre/pcrelib/testdata/testinput6
@@ -51,6 +51,7 @@
\x{09f}
/^\p{Cn}/8
+ \x{e0000}
** Failers
\x{09f}
@@ -77,9 +78,15 @@
/^\p{Lo}/8
\x{1bb}
+ \x{3400}
+ \x{3401}
+ \x{4d00}
+ \x{4db4}
+ \x{4db5}
** Failers
a
\x{2b0}
+ \x{4db6}
/^\p{Lt}/8
\x{1c5}
@@ -514,4 +521,221 @@
A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
+/^\p{Han}+/8
+ \x{2e81}\x{3007}\x{2f804}\x{31a0}
+ ** Failers
+ \x{2e7f}
+
+/^\P{Katakana}+/8
+ \x{3105}
+ ** Failers
+ \x{30ff}
+
+/^[\p{Arabic}]/8
+ \x{06e9}
+ \x{060b}
+ ** Failers
+ X\x{06e9}
+
+/^[\P{Yi}]/8
+ \x{2f800}
+ ** Failers
+ \x{a014}
+ \x{a4c6}
+
+/^\p{Any}X/8
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ X
+
+/^\P{Any}X/8
+ ** Failers
+ AX
+
+/^\p{Any}?X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ ABXYZ
+
+/^\P{Any}?X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ ABXYZ
+
+/^\p{Any}+X/8
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+ XYZ
+
+/^\P{Any}+X/8
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ XYZ
+
+/^\p{Any}*X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+
+/^\P{Any}*X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+
+/^[\p{Any}]X/8
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ X
+
+/^[\P{Any}]X/8
+ ** Failers
+ AX
+
+/^[\p{Any}]?X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ ABXYZ
+
+/^[\P{Any}]?X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ ABXYZ
+
+/^[\p{Any}]+X/8
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+ XYZ
+
+/^[\P{Any}]+X/8
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ XYZ
+
+/^[\p{Any}]*X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+
+/^[\P{Any}]*X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+
+/^\p{Any}{3,5}?/8
+ abcdefgh
+ \x{1234}\n\r\x{3456}xyz
+
+/^\p{Any}{3,5}/8
+ abcdefgh
+ \x{1234}\n\r\x{3456}xyz
+
+/^\P{Any}{3,5}?/8
+ ** Failers
+ abcdefgh
+ \x{1234}\n\r\x{3456}xyz
+
+/^\p{L&}X/8
+ AXY
+ aXY
+ \x{1c5}XY
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^[\p{L&}]X/8
+ AXY
+ aXY
+ \x{1c5}XY
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^\p{L&}+X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^[\p{L&}]+X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^\p{L&}+?X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^[\p{L&}]+?X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^\P{L&}X/8
+ !XY
+ \x{1bb}XY
+ \x{2b0}XY
+ ** Failers
+ \x{1c5}XY
+ AXY
+
+/^[\P{L&}]X/8
+ !XY
+ \x{1bb}XY
+ \x{2b0}XY
+ ** Failers
+ \x{1c5}XY
+ AXY
+
/ End of testinput6 /
diff --git a/ext/pcre/pcrelib/testdata/testinput7 b/ext/pcre/pcrelib/testdata/testinput7
index cecbc0065f..309ed3f008 100644
--- a/ext/pcre/pcrelib/testdata/testinput7
+++ b/ext/pcre/pcrelib/testdata/testinput7
@@ -483,10 +483,10 @@
/(?<=foo)bar/
xyzfo\P
- foob\R\P\>2
+ foob\P\>2
foobar...\R\P\>4
xyzfo\P
- foobar\R\>2
+ foobar\>2
*** Failers
xyzfo\P
obar\R
@@ -4011,4 +4011,12 @@
** Failers
line one\nthis is a line\nbreak in the second line
+/1234/
+ 123\P
+ a4\P\R
+
+/1234/
+ 123\P
+ 4\P\R
+
/ End of testinput7 /
diff --git a/ext/pcre/pcrelib/testdata/testinput9 b/ext/pcre/pcrelib/testdata/testinput9
index f18dd12c4a..23d3d3e434 100644
--- a/ext/pcre/pcrelib/testdata/testinput9
+++ b/ext/pcre/pcrelib/testdata/testinput9
@@ -596,4 +596,221 @@
\x{100}
\x{101}
+/^\p{Han}+/8
+ \x{2e81}\x{3007}\x{2f804}\x{31a0}
+ ** Failers
+ \x{2e7f}
+
+/^\P{Katakana}+/8
+ \x{3105}
+ ** Failers
+ \x{30ff}
+
+/^[\p{Arabic}]/8
+ \x{06e9}
+ \x{060b}
+ ** Failers
+ X\x{06e9}
+
+/^[\P{Yi}]/8
+ \x{2f800}
+ ** Failers
+ \x{a014}
+ \x{a4c6}
+
+/^\p{Any}X/8
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ X
+
+/^\P{Any}X/8
+ ** Failers
+ AX
+
+/^\p{Any}?X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ ABXYZ
+
+/^\P{Any}?X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ ABXYZ
+
+/^\p{Any}+X/8
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+ XYZ
+
+/^\P{Any}+X/8
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ XYZ
+
+/^\p{Any}*X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+
+/^\P{Any}*X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+
+/^[\p{Any}]X/8
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ X
+
+/^[\P{Any}]X/8
+ ** Failers
+ AX
+
+/^[\p{Any}]?X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ ABXYZ
+
+/^[\P{Any}]?X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ ABXYZ
+
+/^[\p{Any}]+X/8
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+ XYZ
+
+/^[\P{Any}]+X/8
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ XYZ
+
+/^[\p{Any}]*X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+
+/^[\P{Any}]*X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+
+/^\p{Any}{3,5}?/8
+ abcdefgh
+ \x{1234}\n\r\x{3456}xyz
+
+/^\p{Any}{3,5}/8
+ abcdefgh
+ \x{1234}\n\r\x{3456}xyz
+
+/^\P{Any}{3,5}?/8
+ ** Failers
+ abcdefgh
+ \x{1234}\n\r\x{3456}xyz
+
+/^\p{L&}X/8
+ AXY
+ aXY
+ \x{1c5}XY
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^[\p{L&}]X/8
+ AXY
+ aXY
+ \x{1c5}XY
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^\p{L&}+X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^[\p{L&}]+X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^\p{L&}+?X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^[\p{L&}]+?X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^\P{L&}X/8
+ !XY
+ \x{1bb}XY
+ \x{2b0}XY
+ ** Failers
+ \x{1c5}XY
+ AXY
+
+/^[\P{L&}]X/8
+ !XY
+ \x{1bb}XY
+ \x{2b0}XY
+ ** Failers
+ \x{1c5}XY
+ AXY
+
/ End /
diff --git a/ext/pcre/pcrelib/testdata/testoutput1 b/ext/pcre/pcrelib/testdata/testoutput1
index 1f835b7886..f3e5da3d56 100644
--- a/ext/pcre/pcrelib/testdata/testoutput1
+++ b/ext/pcre/pcrelib/testdata/testoutput1
@@ -1,5 +1,3 @@
-PCRE version 6.2 01-Aug-2005
-
/the quick brown fox/
the quick brown fox
0: the quick brown fox
diff --git a/ext/pcre/pcrelib/testdata/testoutput2 b/ext/pcre/pcrelib/testdata/testoutput2
index 8f078b8464..55adba0b9d 100644
--- a/ext/pcre/pcrelib/testdata/testoutput2
+++ b/ext/pcre/pcrelib/testdata/testoutput2
@@ -1,5 +1,3 @@
-PCRE version 6.2 01-Aug-2005
-
/(a)b|/
Capturing subpattern count = 1
No options
@@ -1945,6 +1943,14 @@ Options: anchored
No first char
No need char
+/[_[:alpha:]]/IS
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Starting byte set: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
+ _ a b c d e f g h i j k l m n o p q r s t u v w x y z
+
/^[[:ascii:]]/D
------------------------------------------------------------------
0 37 Bra 0
@@ -1984,6 +1990,26 @@ Options: anchored
No first char
No need char
+/^[[:^blank:]]/D
+------------------------------------------------------------------
+ 0 37 Bra 0
+ 3 ^
+ 4 [\x00-\x08\x0a-\x1f!-\xff]
+ 37 37 Ket
+ 40 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/[\n\x0b\x0c\x0d[:blank:]]/IS
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
+
/^[[:cntrl:]]/D
------------------------------------------------------------------
0 37 Bra 0
@@ -3995,14 +4021,16 @@ Need char = '<'
/(a(?1)b)/D
------------------------------------------------------------------
- 0 16 Bra 0
- 3 10 Bra 1
+ 0 22 Bra 0
+ 3 16 Bra 1
6 a
- 8 3 Recurse
- 11 b
- 13 10 Ket
- 16 16 Ket
- 19 End
+ 8 6 Once
+ 11 3 Recurse
+ 14 6 Ket
+ 17 b
+ 19 16 Ket
+ 22 22 Ket
+ 25 End
------------------------------------------------------------------
Capturing subpattern count = 1
No options
@@ -4014,7 +4042,7 @@ Need char = 'b'
0 22 Bra 0
3 16 Bra 1
6 a
- 8 6 Bra 0
+ 8 6 Once
11 3 Recurse
14 6 KetRmax
17 b
@@ -4246,7 +4274,7 @@ Need char = 'a'
/(?P<a>a)...(?P=a)bbb(?P>a)d/D
------------------------------------------------------------------
- 0 28 Bra 0
+ 0 34 Bra 0
3 5 Bra 1
6 a
8 5 Ket
@@ -4255,10 +4283,12 @@ Need char = 'a'
13 Any
14 \1
17 bbb
- 23 3 Recurse
- 26 d
- 28 28 Ket
- 31 End
+ 23 6 Once
+ 26 3 Recurse
+ 29 6 Ket
+ 32 d
+ 34 34 Ket
+ 37 End
------------------------------------------------------------------
Capturing subpattern count = 1
Max back reference = 1
@@ -4418,7 +4448,7 @@ No need char
24 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options:
+Options: no_auto_capture
First char = 'a'
Need char = 'c'
abc
@@ -4439,7 +4469,7 @@ Need char = 'c'
Capturing subpattern count = 1
Named capturing subpatterns:
one 1
-Options:
+Options: no_auto_capture
First char = 'a'
Need char = 'c'
abc
@@ -4461,7 +4491,7 @@ Need char = 'c'
Capturing subpattern count = 1
Named capturing subpatterns:
named 1
-Options:
+Options: no_auto_capture
First char = 'a'
Need char = 'c'
@@ -4472,11 +4502,13 @@ No options
No first char
Need char = 'z'
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
-Minimum match limit = 8
+Minimum match() limit = 8
+Minimum match() recursion limit = 7
0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaz\M
-Minimum match limit = 32768
+Minimum match() limit = 32768
+Minimum match() recursion limit = 43
No match
/(aaa(?C1)bbb|ab)/
@@ -4633,18 +4665,20 @@ Need char = ']'
/(a(b(?2)c))?/D
------------------------------------------------------------------
- 0 25 Bra 0
+ 0 31 Bra 0
3 Brazero
- 4 18 Bra 1
+ 4 24 Bra 1
7 a
- 9 10 Bra 2
+ 9 16 Bra 2
12 b
- 14 9 Recurse
- 17 c
- 19 10 Ket
- 22 18 Ket
- 25 25 Ket
- 28 End
+ 14 6 Once
+ 17 9 Recurse
+ 20 6 Ket
+ 23 c
+ 25 16 Ket
+ 28 24 Ket
+ 31 31 Ket
+ 34 End
------------------------------------------------------------------
Capturing subpattern count = 2
No options
@@ -4653,18 +4687,20 @@ No need char
/(a(b(?2)c))*/D
------------------------------------------------------------------
- 0 25 Bra 0
+ 0 31 Bra 0
3 Brazero
- 4 18 Bra 1
+ 4 24 Bra 1
7 a
- 9 10 Bra 2
+ 9 16 Bra 2
12 b
- 14 9 Recurse
- 17 c
- 19 10 Ket
- 22 18 KetRmax
- 25 25 Ket
- 28 End
+ 14 6 Once
+ 17 9 Recurse
+ 20 6 Ket
+ 23 c
+ 25 16 Ket
+ 28 24 KetRmax
+ 31 31 Ket
+ 34 End
------------------------------------------------------------------
Capturing subpattern count = 2
No options
@@ -4673,29 +4709,33 @@ No need char
/(a(b(?2)c)){0,2}/D
------------------------------------------------------------------
- 0 53 Bra 0
+ 0 65 Bra 0
3 Brazero
- 4 46 Bra 0
- 7 18 Bra 1
+ 4 58 Bra 0
+ 7 24 Bra 1
10 a
- 12 10 Bra 2
+ 12 16 Bra 2
15 b
- 17 12 Recurse
- 20 c
- 22 10 Ket
- 25 18 Ket
- 28 Brazero
- 29 18 Bra 1
- 32 a
- 34 10 Bra 2
- 37 b
- 39 12 Recurse
- 42 c
- 44 10 Ket
- 47 18 Ket
- 50 46 Ket
- 53 53 Ket
- 56 End
+ 17 6 Once
+ 20 12 Recurse
+ 23 6 Ket
+ 26 c
+ 28 16 Ket
+ 31 24 Ket
+ 34 Brazero
+ 35 24 Bra 1
+ 38 a
+ 40 16 Bra 2
+ 43 b
+ 45 6 Once
+ 48 12 Recurse
+ 51 6 Ket
+ 54 c
+ 56 16 Ket
+ 59 24 Ket
+ 62 58 Ket
+ 65 65 Ket
+ 68 End
------------------------------------------------------------------
Capturing subpattern count = 2
No options
@@ -5939,6 +5979,86 @@ Matched, but too many substrings
13: a
14: a
+/[^()]*(?:\((?R)\)[^()]*)*/
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+No need char
+ (this(and)that
+ 0:
+ (this(and)that)
+ 0: (this(and)that)
+ (this(and)that)stuff
+ 0: (this(and)that)stuff
+
+/[^()]*(?:\((?>(?R))\)[^()]*)*/
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+No need char
+ (this(and)that
+ 0:
+ (this(and)that)
+ 0: (this(and)that)
+
+/[^()]*(?:\((?R)\))*[^()]*/
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+No need char
+ (this(and)that
+ 0:
+ (this(and)that)
+ 0: (this(and)that)
+
+/(?:\((?R)\))*[^()]*/
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+No need char
+ (this(and)that
+ 0:
+ (this(and)that)
+ 0:
+ ((this))
+ 0: ((this))
+
+/(?:\((?R)\))|[^()]*/
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+No need char
+ (this(and)that
+ 0:
+ (this(and)that)
+ 0:
+ (this)
+ 0: (this)
+ ((this))
+ 0: ((this))
+
+/a(b)c/PN
+ abc
+Matched with REG_NOSUB
+
+/a(?P<name>b)c/PN
+ abc
+Matched with REG_NOSUB
+
+/\x{100}/
+Failed: character value in \x{...} sequence is too large at offset 6
+
+/\x{0000ff}/
+Capturing subpattern count = 0
+No options
+First char = 255
+No need char
+
/ End of testinput2 /
Capturing subpattern count = 0
No options
diff --git a/ext/pcre/pcrelib/testdata/testoutput3 b/ext/pcre/pcrelib/testdata/testoutput3
index 16ebc7125a..06e2888d91 100644
--- a/ext/pcre/pcrelib/testdata/testoutput3
+++ b/ext/pcre/pcrelib/testdata/testoutput3
@@ -1,5 +1,3 @@
-PCRE version 6.2 01-Aug-2005
-
/^[\w]+/
*** Failers
No match
@@ -95,8 +93,8 @@ No first char
No need char
Starting byte set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
- µ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â ã ä
- å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ
+ ª µ º À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â
+ ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ
/^[\xc8-\xc9]/iLfr_FR
École
@@ -112,4 +110,54 @@ No match
école
No match
+/\W+/Lfr_FR
+ >>>\xaa<<<
+ 0: >>>
+ >>>\xba<<<
+ 0: >>>
+
+/[\W]+/Lfr_FR
+ >>>\xaa<<<
+ 0: >>>
+ >>>\xba<<<
+ 0: >>>
+
+/[^[:alpha:]]+/Lfr_FR
+ >>>\xaa<<<
+ 0: >>>
+ >>>\xba<<<
+ 0: >>>
+
+/\w+/Lfr_FR
+ >>>\xaa<<<
+ 0: ª
+ >>>\xba<<<
+ 0: º
+
+/[\w]+/Lfr_FR
+ >>>\xaa<<<
+ 0: ª
+ >>>\xba<<<
+ 0: º
+
+/[[:alpha:]]+/Lfr_FR
+ >>>\xaa<<<
+ 0: ª
+ >>>\xba<<<
+ 0: º
+
+/[[:alpha:]][[:lower:]][[:upper:]]/DLfr_FR
+------------------------------------------------------------------
+ 0 102 Bra 0
+ 3 [A-Za-zªµºÀ-ÖØ-öø-ÿ]
+ 36 [a-zµß-öø-ÿ]
+ 69 [A-ZÀ-ÖØ-Þ]
+102 102 Ket
+105 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
/ End of testinput3 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput4 b/ext/pcre/pcrelib/testdata/testoutput4
index 234fd1ae14..1b98f86a30 100644
--- a/ext/pcre/pcrelib/testdata/testoutput4
+++ b/ext/pcre/pcrelib/testdata/testoutput4
@@ -1,5 +1,3 @@
-PCRE version 6.2 01-Aug-2005
-
/-- Do not use the \x{} construct except with patterns that have the --/
/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/
No match
@@ -900,4 +898,8 @@ No match
\x{85}
0: \x{85}
+/^\ሴ/8
+ ሴ
+ 0: \x{1234}
+
/ End of testinput4 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput5 b/ext/pcre/pcrelib/testdata/testoutput5
index 6e0d418020..533fd84b65 100644
--- a/ext/pcre/pcrelib/testdata/testoutput5
+++ b/ext/pcre/pcrelib/testdata/testoutput5
@@ -1,5 +1,3 @@
-PCRE version 6.2 01-Aug-2005
-
/\x{100}/8DM
Memory allocation (code space): 10
------------------------------------------------------------------
@@ -645,12 +643,14 @@ Need char = 'A'
/\x{100}*\d(?R)/8D
------------------------------------------------------------------
- 0 10 Bra 0
+ 0 16 Bra 0
3 \x{100}*
6 \d
- 7 0 Recurse
- 10 10 Ket
- 13 End
+ 7 6 Once
+ 10 0 Recurse
+ 13 6 Ket
+ 16 16 Ket
+ 19 End
------------------------------------------------------------------
Capturing subpattern count = 0
Partial matching not supported
@@ -660,10 +660,10 @@ No need char
/[^\x{c4}]/D
------------------------------------------------------------------
- 0 36 Bra 0
- 3 [\x01-35-bd-z|~-\xff] (neg)
- 36 36 Ket
- 39 End
+ 0 5 Bra 0
+ 3 [^\xc4]
+ 5 5 Ket
+ 8 End
------------------------------------------------------------------
Capturing subpattern count = 0
No options
@@ -912,14 +912,16 @@ No match
/\x{100}abc(xyz(?1))/8D
------------------------------------------------------------------
- 0 27 Bra 0
+ 0 33 Bra 0
3 \x{100}abc
- 12 12 Bra 1
+ 12 18 Bra 1
15 xyz
- 21 12 Recurse
- 24 12 Ket
- 27 27 Ket
- 30 End
+ 21 6 Once
+ 24 12 Recurse
+ 27 6 Ket
+ 30 18 Ket
+ 33 33 Ket
+ 36 End
------------------------------------------------------------------
Capturing subpattern count = 1
Options: utf8
@@ -928,15 +930,17 @@ Need char = 'z'
/[^\x{100}]abc(xyz(?1))/8D
------------------------------------------------------------------
- 0 32 Bra 0
+ 0 38 Bra 0
3 [^\x{100}]
11 abc
- 17 12 Bra 1
+ 17 18 Bra 1
20 xyz
- 26 17 Recurse
- 29 12 Ket
- 32 32 Ket
- 35 End
+ 26 6 Once
+ 29 17 Recurse
+ 32 6 Ket
+ 35 18 Ket
+ 38 38 Ket
+ 41 End
------------------------------------------------------------------
Capturing subpattern count = 1
Options: utf8
@@ -945,15 +949,17 @@ Need char = 'z'
/[ab\x{100}]abc(xyz(?1))/8D
------------------------------------------------------------------
- 0 64 Bra 0
+ 0 70 Bra 0
3 [ab\x{100}]
43 abc
- 49 12 Bra 1
+ 49 18 Bra 1
52 xyz
- 58 49 Recurse
- 61 12 Ket
- 64 64 Ket
- 67 End
+ 58 6 Once
+ 61 49 Recurse
+ 64 6 Ket
+ 67 18 Ket
+ 70 70 Ket
+ 73 End
------------------------------------------------------------------
Capturing subpattern count = 1
Options: utf8
@@ -962,18 +968,20 @@ Need char = 'z'
/(\x{100}(b(?2)c))?/D8
------------------------------------------------------------------
- 0 26 Bra 0
+ 0 32 Bra 0
3 Brazero
- 4 19 Bra 1
+ 4 25 Bra 1
7 \x{100}
- 10 10 Bra 2
+ 10 16 Bra 2
13 b
- 15 10 Recurse
- 18 c
- 20 10 Ket
- 23 19 Ket
- 26 26 Ket
- 29 End
+ 15 6 Once
+ 18 10 Recurse
+ 21 6 Ket
+ 24 c
+ 26 16 Ket
+ 29 25 Ket
+ 32 32 Ket
+ 35 End
------------------------------------------------------------------
Capturing subpattern count = 2
Options: utf8
@@ -982,29 +990,33 @@ No need char
/(\x{100}(b(?2)c)){0,2}/D8
------------------------------------------------------------------
- 0 55 Bra 0
+ 0 67 Bra 0
3 Brazero
- 4 48 Bra 0
- 7 19 Bra 1
+ 4 60 Bra 0
+ 7 25 Bra 1
10 \x{100}
- 13 10 Bra 2
+ 13 16 Bra 2
16 b
- 18 13 Recurse
- 21 c
- 23 10 Ket
- 26 19 Ket
- 29 Brazero
- 30 19 Bra 1
- 33 \x{100}
- 36 10 Bra 2
- 39 b
- 41 13 Recurse
- 44 c
- 46 10 Ket
- 49 19 Ket
- 52 48 Ket
- 55 55 Ket
- 58 End
+ 18 6 Once
+ 21 13 Recurse
+ 24 6 Ket
+ 27 c
+ 29 16 Ket
+ 32 25 Ket
+ 35 Brazero
+ 36 25 Bra 1
+ 39 \x{100}
+ 42 16 Bra 2
+ 45 b
+ 47 6 Once
+ 50 13 Recurse
+ 53 6 Ket
+ 56 c
+ 58 16 Ket
+ 61 25 Ket
+ 64 60 Ket
+ 67 67 Ket
+ 70 End
------------------------------------------------------------------
Capturing subpattern count = 2
Options: utf8
@@ -1013,18 +1025,20 @@ No need char
/(\x{100}(b(?1)c))?/D8
------------------------------------------------------------------
- 0 26 Bra 0
+ 0 32 Bra 0
3 Brazero
- 4 19 Bra 1
+ 4 25 Bra 1
7 \x{100}
- 10 10 Bra 2
+ 10 16 Bra 2
13 b
- 15 4 Recurse
- 18 c
- 20 10 Ket
- 23 19 Ket
- 26 26 Ket
- 29 End
+ 15 6 Once
+ 18 4 Recurse
+ 21 6 Ket
+ 24 c
+ 26 16 Ket
+ 29 25 Ket
+ 32 32 Ket
+ 35 End
------------------------------------------------------------------
Capturing subpattern count = 2
Options: utf8
@@ -1033,29 +1047,33 @@ No need char
/(\x{100}(b(?1)c)){0,2}/D8
------------------------------------------------------------------
- 0 55 Bra 0
+ 0 67 Bra 0
3 Brazero
- 4 48 Bra 0
- 7 19 Bra 1
+ 4 60 Bra 0
+ 7 25 Bra 1
10 \x{100}
- 13 10 Bra 2
+ 13 16 Bra 2
16 b
- 18 7 Recurse
- 21 c
- 23 10 Ket
- 26 19 Ket
- 29 Brazero
- 30 19 Bra 1
- 33 \x{100}
- 36 10 Bra 2
- 39 b
- 41 7 Recurse
- 44 c
- 46 10 Ket
- 49 19 Ket
- 52 48 Ket
- 55 55 Ket
- 58 End
+ 18 6 Once
+ 21 7 Recurse
+ 24 6 Ket
+ 27 c
+ 29 16 Ket
+ 32 25 Ket
+ 35 Brazero
+ 36 25 Bra 1
+ 39 \x{100}
+ 42 16 Bra 2
+ 45 b
+ 47 6 Once
+ 50 7 Recurse
+ 53 6 Ket
+ 56 c
+ 58 16 Ket
+ 61 25 Ket
+ 64 60 Ket
+ 67 67 Ket
+ 70 End
------------------------------------------------------------------
Capturing subpattern count = 2
Options: utf8
@@ -1072,4 +1090,21 @@ No need char
\x{100}X
0: X
+/a\x{1234}b/P8
+ a\x{1234}b
+ 0: a\x{1234}b
+
+/^\ሴ/8D
+------------------------------------------------------------------
+ 0 8 Bra 0
+ 3 ^
+ 4 \x{1234}
+ 8 8 Ket
+ 11 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: anchored utf8
+No first char
+No need char
+
/ End of testinput5 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput6 b/ext/pcre/pcrelib/testdata/testoutput6
index 9f9421e519..87833bd263 100644
--- a/ext/pcre/pcrelib/testdata/testoutput6
+++ b/ext/pcre/pcrelib/testdata/testoutput6
@@ -1,5 +1,3 @@
-PCRE version 6.2 01-Aug-2005
-
/^\pC\pL\pM\pN\pP\pS\pZ</8
\x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
@@ -85,6 +83,8 @@ No match
No match
/^\p{Cn}/8
+ \x{e0000}
+ 0: \x{e0000}
** Failers
No match
\x{09f}
@@ -127,12 +127,24 @@ No match
/^\p{Lo}/8
\x{1bb}
0: \x{1bb}
+ \x{3400}
+ 0: \x{3400}
+ \x{3401}
+ 0: \x{3401}
+ \x{4d00}
+ 0: \x{4d00}
+ \x{4db4}
+ 0: \x{4db4}
+ \x{4db5}
+ 0: \x{4db5}
** Failers
No match
a
No match
\x{2b0}
No match
+ \x{4db6}
+No match
/^\p{Lt}/8
\x{1c5}
@@ -538,10 +550,10 @@ No match
/[\p{L}]/D
------------------------------------------------------------------
- 0 10 Bra 0
+ 0 11 Bra 0
3 [\p{L}]
- 10 10 Ket
- 13 End
+ 11 11 Ket
+ 14 End
------------------------------------------------------------------
Capturing subpattern count = 0
No options
@@ -550,10 +562,10 @@ No need char
/[\p{^L}]/D
------------------------------------------------------------------
- 0 10 Bra 0
+ 0 11 Bra 0
3 [\P{L}]
- 10 10 Ket
- 13 End
+ 11 11 Ket
+ 14 End
------------------------------------------------------------------
Capturing subpattern count = 0
No options
@@ -562,10 +574,10 @@ No need char
/[\P{L}]/D
------------------------------------------------------------------
- 0 10 Bra 0
+ 0 11 Bra 0
3 [\P{L}]
- 10 10 Ket
- 13 End
+ 11 11 Ket
+ 14 End
------------------------------------------------------------------
Capturing subpattern count = 0
No options
@@ -574,10 +586,10 @@ No need char
/[\P{^L}]/D
------------------------------------------------------------------
- 0 10 Bra 0
+ 0 11 Bra 0
3 [\p{L}]
- 10 10 Ket
- 13 End
+ 11 11 Ket
+ 14 End
------------------------------------------------------------------
Capturing subpattern count = 0
No options
@@ -586,10 +598,10 @@ No need char
/[abc\p{L}\x{0660}]/8D
------------------------------------------------------------------
- 0 45 Bra 0
+ 0 46 Bra 0
3 [a-c\p{L}\x{660}]
- 45 45 Ket
- 48 End
+ 46 46 Ket
+ 49 End
------------------------------------------------------------------
Capturing subpattern count = 0
Options: utf8
@@ -597,12 +609,12 @@ No first char
No need char
/[\p{Nd}]/8DM
-Memory allocation (code space): 46
+Memory allocation (code space): 47
------------------------------------------------------------------
- 0 10 Bra 0
+ 0 11 Bra 0
3 [\p{Nd}]
- 10 10 Ket
- 13 End
+ 11 11 Ket
+ 14 End
------------------------------------------------------------------
Capturing subpattern count = 0
Options: utf8
@@ -612,12 +624,12 @@ No need char
0: 1
/[\p{Nd}+-]+/8DM
-Memory allocation (code space): 47
+Memory allocation (code space): 48
------------------------------------------------------------------
- 0 43 Bra 0
+ 0 44 Bra 0
3 [+\-\p{Nd}]+
- 43 43 Ket
- 46 End
+ 44 44 Ket
+ 47 End
------------------------------------------------------------------
Capturing subpattern count = 0
Partial matching not supported
@@ -1010,4 +1022,376 @@ No match
0: A\x{300}\x{301}B\x{300}C
1: C
+/^\p{Han}+/8
+ \x{2e81}\x{3007}\x{2f804}\x{31a0}
+ 0: \x{2e81}\x{3007}\x{2f804}
+ ** Failers
+No match
+ \x{2e7f}
+No match
+
+/^\P{Katakana}+/8
+ \x{3105}
+ 0: \x{3105}
+ ** Failers
+ 0: ** Failers
+ \x{30ff}
+No match
+
+/^[\p{Arabic}]/8
+ \x{06e9}
+ 0: \x{6e9}
+ \x{060b}
+ 0: \x{60b}
+ ** Failers
+No match
+ X\x{06e9}
+No match
+
+/^[\P{Yi}]/8
+ \x{2f800}
+ 0: \x{2f800}
+ ** Failers
+ 0: *
+ \x{a014}
+No match
+ \x{a4c6}
+No match
+
+/^\p{Any}X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ X
+No match
+
+/^\P{Any}X/8
+ ** Failers
+No match
+ AX
+No match
+
+/^\p{Any}?X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ ABXYZ
+No match
+
+/^\P{Any}?X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ ABXYZ
+No match
+
+/^\p{Any}+X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+ XYZ
+No match
+
+/^\P{Any}+X/8
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+ XYZ
+No match
+
+/^\p{Any}*X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+
+/^\P{Any}*X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+
+/^[\p{Any}]X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ X
+No match
+
+/^[\P{Any}]X/8
+ ** Failers
+No match
+ AX
+No match
+
+/^[\p{Any}]?X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ ABXYZ
+No match
+
+/^[\P{Any}]?X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ ABXYZ
+No match
+
+/^[\p{Any}]+X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+ XYZ
+No match
+
+/^[\P{Any}]+X/8
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+ XYZ
+No match
+
+/^[\p{Any}]*X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+
+/^[\P{Any}]*X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+
+/^\p{Any}{3,5}?/8
+ abcdefgh
+ 0: abc
+ \x{1234}\n\r\x{3456}xyz
+ 0: \x{1234}\x{0a}\x{0d}
+
+/^\p{Any}{3,5}/8
+ abcdefgh
+ 0: abcde
+ \x{1234}\n\r\x{3456}xyz
+ 0: \x{1234}\x{0a}\x{0d}\x{3456}x
+
+/^\P{Any}{3,5}?/8
+ ** Failers
+No match
+ abcdefgh
+No match
+ \x{1234}\n\r\x{3456}xyz
+No match
+
+/^\p{L&}X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ \x{1c5}XY
+ 0: \x{1c5}X
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^[\p{L&}]X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ \x{1c5}XY
+ 0: \x{1c5}X
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^\p{L&}+X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^[\p{L&}]+X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^\p{L&}+?X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^[\p{L&}]+?X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^\P{L&}X/8
+ !XY
+ 0: !X
+ \x{1bb}XY
+ 0: \x{1bb}X
+ \x{2b0}XY
+ 0: \x{2b0}X
+ ** Failers
+No match
+ \x{1c5}XY
+No match
+ AXY
+No match
+
+/^[\P{L&}]X/8
+ !XY
+ 0: !X
+ \x{1bb}XY
+ 0: \x{1bb}X
+ \x{2b0}XY
+ 0: \x{2b0}X
+ ** Failers
+No match
+ \x{1c5}XY
+No match
+ AXY
+No match
+
/ End of testinput6 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput7 b/ext/pcre/pcrelib/testdata/testoutput7
index 85dd0a6344..13e18bace6 100644
--- a/ext/pcre/pcrelib/testdata/testoutput7
+++ b/ext/pcre/pcrelib/testdata/testoutput7
@@ -1,5 +1,3 @@
-PCRE version 6.2 01-Aug-2005
-
/abc/
abc
0: abc
@@ -675,7 +673,6 @@ No match
/^(a*\w|ab)=(?1)/
ab=ab
0: ab=ab
- 1: ab=a
/^([^()]|\((?1)*\))*$/
abc
@@ -983,13 +980,13 @@ Partial match: abc
/(?<=foo)bar/
xyzfo\P
No match
- foob\R\P\>2
+ foob\P\>2
Partial match: b
foobar...\R\P\>4
0: ar
xyzfo\P
No match
- foobar\R\>2
+ foobar\>2
0: bar
*** Failers
No match
@@ -6514,4 +6511,16 @@ No match
line one\nthis is a line\nbreak in the second line
No match
+/1234/
+ 123\P
+Partial match: 123
+ a4\P\R
+No match
+
+/1234/
+ 123\P
+Partial match: 123
+ 4\P\R
+ 0: 4
+
/ End of testinput7 /
diff --git a/ext/pcre/pcrelib/testdata/testoutput8 b/ext/pcre/pcrelib/testdata/testoutput8
index eb585ad1ae..72e7673f56 100644
--- a/ext/pcre/pcrelib/testdata/testoutput8
+++ b/ext/pcre/pcrelib/testdata/testoutput8
@@ -1,5 +1,3 @@
-PCRE version 6.2 01-Aug-2005
-
/-- Do not use the \x{} construct except with patterns that have the --/
/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/
No match
diff --git a/ext/pcre/pcrelib/testdata/testoutput9 b/ext/pcre/pcrelib/testdata/testoutput9
index f7b46611d0..000e2b9882 100644
--- a/ext/pcre/pcrelib/testdata/testoutput9
+++ b/ext/pcre/pcrelib/testdata/testoutput9
@@ -1,5 +1,3 @@
-PCRE version 6.2 01-Aug-2005
-
/\pL\P{Nd}/8
AB
0: AB
@@ -1231,4 +1229,399 @@ No match
\x{101}
0: \x{101}
+/^\p{Han}+/8
+ \x{2e81}\x{3007}\x{2f804}\x{31a0}
+ 0: \x{2e81}\x{3007}\x{2f804}
+ 1: \x{2e81}\x{3007}
+ 2: \x{2e81}
+ ** Failers
+No match
+ \x{2e7f}
+No match
+
+/^\P{Katakana}+/8
+ \x{3105}
+ 0: \x{3105}
+ ** Failers
+ 0: ** Failers
+ 1: ** Failer
+ 2: ** Faile
+ 3: ** Fail
+ 4: ** Fai
+ 5: ** Fa
+ 6: ** F
+ 7: **
+ 8: **
+ 9: *
+ \x{30ff}
+No match
+
+/^[\p{Arabic}]/8
+ \x{06e9}
+ 0: \x{6e9}
+ \x{060b}
+ 0: \x{60b}
+ ** Failers
+No match
+ X\x{06e9}
+No match
+
+/^[\P{Yi}]/8
+ \x{2f800}
+ 0: \x{2f800}
+ ** Failers
+ 0: *
+ \x{a014}
+No match
+ \x{a4c6}
+No match
+
+/^\p{Any}X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ X
+No match
+
+/^\P{Any}X/8
+ ** Failers
+No match
+ AX
+No match
+
+/^\p{Any}?X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ ABXYZ
+No match
+
+/^\P{Any}?X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ ABXYZ
+No match
+
+/^\p{Any}+X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+ XYZ
+No match
+
+/^\P{Any}+X/8
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+ XYZ
+No match
+
+/^\p{Any}*X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+
+/^\P{Any}*X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+
+/^[\p{Any}]X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ X
+No match
+
+/^[\P{Any}]X/8
+ ** Failers
+No match
+ AX
+No match
+
+/^[\p{Any}]?X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ ABXYZ
+No match
+
+/^[\P{Any}]?X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ ABXYZ
+No match
+
+/^[\p{Any}]+X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+ XYZ
+No match
+
+/^[\P{Any}]+X/8
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+ XYZ
+No match
+
+/^[\p{Any}]*X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+
+/^[\P{Any}]*X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+
+/^\p{Any}{3,5}?/8
+ abcdefgh
+ 0: abcde
+ 1: abcd
+ 2: abc
+ \x{1234}\n\r\x{3456}xyz
+ 0: \x{1234}\x{0a}\x{0d}\x{3456}x
+ 1: \x{1234}\x{0a}\x{0d}\x{3456}
+ 2: \x{1234}\x{0a}\x{0d}
+
+/^\p{Any}{3,5}/8
+ abcdefgh
+ 0: abcde
+ 1: abcd
+ 2: abc
+ \x{1234}\n\r\x{3456}xyz
+ 0: \x{1234}\x{0a}\x{0d}\x{3456}x
+ 1: \x{1234}\x{0a}\x{0d}\x{3456}
+ 2: \x{1234}\x{0a}\x{0d}
+
+/^\P{Any}{3,5}?/8
+ ** Failers
+No match
+ abcdefgh
+No match
+ \x{1234}\n\r\x{3456}xyz
+No match
+
+/^\p{L&}X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ \x{1c5}XY
+ 0: \x{1c5}X
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^[\p{L&}]X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ \x{1c5}XY
+ 0: \x{1c5}X
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^\p{L&}+X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ 1: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^[\p{L&}]+X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ 1: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^\p{L&}+?X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ 1: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^[\p{L&}]+?X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ 1: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^\P{L&}X/8
+ !XY
+ 0: !X
+ \x{1bb}XY
+ 0: \x{1bb}X
+ \x{2b0}XY
+ 0: \x{2b0}X
+ ** Failers
+No match
+ \x{1c5}XY
+No match
+ AXY
+No match
+
+/^[\P{L&}]X/8
+ !XY
+ 0: !X
+ \x{1bb}XY
+ 0: \x{1bb}X
+ \x{2b0}XY
+ 0: \x{2b0}X
+ ** Failers
+No match
+ \x{1c5}XY
+No match
+ AXY
+No match
+
/ End /