version 1.1.1.1, 2012/02/21 23:05:52
|
version 1.1.1.4, 2013/07/22 08:25:57
|
Line 1
|
Line 1
|
/-- This set of tests check the DFA matching functionality of pcre_dfa_exec(). | /-- These tests for Unicode property support test PCRE's API and show some of |
The -dfa flag must be used with pcretest when running it. --/ | the compiled code. They are not Perl-compatible. --/ |
| |
/abc/ | |
abc | |
0: abc | |
| |
/ab*c/ | |
abc | |
0: abc | |
abbbbc | |
0: abbbbc | |
ac | |
0: ac | |
| |
/ab+c/ | |
abc | |
0: abc | |
abbbbbbc | |
0: abbbbbbc | |
*** Failers | |
No match | |
ac | |
No match | |
ab | |
No match | |
| |
/a*/ | |
a | |
0: a | |
1: | |
aaaaaaaaaaaaaaaaa | |
0: aaaaaaaaaaaaaaaaa | |
1: aaaaaaaaaaaaaaaa | |
2: aaaaaaaaaaaaaaa | |
3: aaaaaaaaaaaaaa | |
4: aaaaaaaaaaaaa | |
5: aaaaaaaaaaaa | |
6: aaaaaaaaaaa | |
7: aaaaaaaaaa | |
8: aaaaaaaaa | |
9: aaaaaaaa | |
10: aaaaaaa | |
11: aaaaaa | |
12: aaaaa | |
13: aaaa | |
14: aaa | |
15: aa | |
16: a | |
17: | |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
Matched, but too many subsidiary matches | |
0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
3: aaaaaaaaaaaaaaaaaaaaaaaaaaa | |
4: aaaaaaaaaaaaaaaaaaaaaaaaaa | |
5: aaaaaaaaaaaaaaaaaaaaaaaaa | |
6: aaaaaaaaaaaaaaaaaaaaaaaa | |
7: aaaaaaaaaaaaaaaaaaaaaaa | |
8: aaaaaaaaaaaaaaaaaaaaaa | |
9: aaaaaaaaaaaaaaaaaaaaa | |
10: aaaaaaaaaaaaaaaaaaaa | |
11: aaaaaaaaaaaaaaaaaaa | |
12: aaaaaaaaaaaaaaaaaa | |
13: aaaaaaaaaaaaaaaaa | |
14: aaaaaaaaaaaaaaaa | |
15: aaaaaaaaaaaaaaa | |
16: aaaaaaaaaaaaaa | |
17: aaaaaaaaaaaaa | |
18: aaaaaaaaaaaa | |
19: aaaaaaaaaaa | |
20: aaaaaaaaaa | |
21: aaaaaaaaa | |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F | |
0: | |
| |
/(a|abcd|african)/ | |
a | |
0: a | |
abcd | |
0: abcd | |
1: a | |
african | |
0: african | |
1: a | |
| |
/^abc/ | |
abcdef | |
0: abc | |
*** Failers | |
No match | |
xyzabc | |
No match | |
xyz\nabc | |
No match | |
| |
/^abc/m | |
abcdef | |
0: abc | |
xyz\nabc | |
0: abc | |
*** Failers | |
No match | |
xyzabc | |
No match | |
| |
/\Aabc/ | |
abcdef | |
0: abc | |
*** Failers | |
No match | |
xyzabc | |
No match | |
xyz\nabc | |
No match | |
| |
/\Aabc/m | |
abcdef | |
0: abc | |
*** Failers | |
No match | |
xyzabc | |
No match | |
xyz\nabc | |
No match | |
| |
/\Gabc/ | |
abcdef | |
0: abc | |
xyzabc\>3 | |
0: abc | |
*** Failers | |
No match | |
xyzabc | |
No match | |
xyzabc\>2 | |
No match | |
| |
/x\dy\Dz/ | |
x9yzz | |
0: x9yzz | |
x0y+z | |
0: x0y+z | |
*** Failers | |
No match | |
xyz | |
No match | |
xxy0z | |
No match | |
| |
/x\sy\Sz/ | |
x yzz | |
0: x yzz | |
x y+z | |
0: x y+z | |
*** Failers | |
No match | |
xyz | |
No match | |
xxyyz | |
No match | |
| |
/x\wy\Wz/ | |
xxy+z | |
0: xxy+z | |
*** Failers | |
No match | |
xxy0z | |
No match | |
x+y+z | |
No match | |
| |
/x.y/ | |
x+y | |
0: x+y | |
x-y | |
0: x-y | |
*** Failers | |
No match | |
x\ny | |
No match | |
| |
/x.y/s | |
x+y | |
0: x+y | |
x-y | |
0: x-y | |
x\ny | |
0: x\x0ay | |
|
|
/(a.b(?s)c.d|x.y)p.q/ | /[\p{L}]/DZ |
a+bc+dp+q | ------------------------------------------------------------------ |
0: a+bc+dp+q | Bra |
a+bc\ndp+q | [\p{L}] |
0: a+bc\x0adp+q | Ket |
x\nyp+q | End |
0: x\x0ayp+q | ------------------------------------------------------------------ |
*** Failers | Capturing subpattern count = 0 |
No match | No options |
a\nbc\ndp+q | No first char |
No match | No need char |
a+bc\ndp\nq | |
No match | |
x\nyp\nq | |
No match | |
|
|
/a\d\z/ | /[\p{^L}]/DZ |
ba0 | ------------------------------------------------------------------ |
0: a0 | Bra |
*** Failers | [\P{L}] |
No match | Ket |
ba0\n | End |
No match | ------------------------------------------------------------------ |
ba0\ncd | Capturing subpattern count = 0 |
No match | No options |
| No first char |
| No need char |
|
|
/a\d\z/m | /[\P{L}]/DZ |
ba0 | ------------------------------------------------------------------ |
0: a0 | Bra |
*** Failers | [\P{L}] |
No match | Ket |
ba0\n | End |
No match | ------------------------------------------------------------------ |
ba0\ncd | Capturing subpattern count = 0 |
No match | No options |
| No first char |
| No need char |
|
|
/a\d\Z/ | /[\P{^L}]/DZ |
ba0 | ------------------------------------------------------------------ |
0: a0 | Bra |
ba0\n | [\p{L}] |
0: a0 | Ket |
*** Failers | End |
No match | ------------------------------------------------------------------ |
ba0\ncd | Capturing subpattern count = 0 |
No match | No options |
| No first char |
| No need char |
|
|
/a\d\Z/m | /[abc\p{L}\x{0660}]/8DZ |
ba0 | ------------------------------------------------------------------ |
0: a0 | Bra |
ba0\n | [a-c\p{L}\x{660}] |
0: a0 | Ket |
*** Failers | End |
No match | ------------------------------------------------------------------ |
ba0\ncd | Capturing subpattern count = 0 |
No match | Options: utf |
| No first char |
| No need char |
|
|
/a\d$/ | /[\p{Nd}]/8DZ |
ba0 | ------------------------------------------------------------------ |
0: a0 | Bra |
ba0\n | [\p{Nd}] |
0: a0 | Ket |
*** Failers | End |
No match | ------------------------------------------------------------------ |
ba0\ncd | Capturing subpattern count = 0 |
No match | Options: utf |
| No first char |
| No need char |
| 1234 |
| 0: 1 |
|
|
/a\d$/m | /[\p{Nd}+-]+/8DZ |
ba0 | ------------------------------------------------------------------ |
0: a0 | Bra |
ba0\n | [+\-\p{Nd}]+ |
0: a0 | Ket |
ba0\ncd | End |
0: a0 | ------------------------------------------------------------------ |
*** Failers | Capturing subpattern count = 0 |
| Options: utf |
| No first char |
| No need char |
| 1234 |
| 0: 1234 |
| 12-34 |
| 0: 12-34 |
| 12+\x{661}-34 |
| 0: 12+\x{661}-34 |
| ** Failers |
No match |
No match |
| abcd |
/abc/i | |
abc | |
0: abc | |
aBc | |
0: aBc | |
ABC | |
0: ABC | |
| |
/[^a]/ | |
abcd | |
0: b | |
| |
/ab?\w/ | |
abz | |
0: abz | |
1: ab | |
abbz | |
0: abb | |
1: ab | |
azz | |
0: az | |
| |
/x{0,3}yz/ | |
ayzq | |
0: yz | |
axyzq | |
0: xyz | |
axxyz | |
0: xxyz | |
axxxyzq | |
0: xxxyz | |
axxxxyzq | |
0: xxxyz | |
*** Failers | |
No match |
No match |
ax |
|
No match |
|
axx |
|
No match |
|
|
|
/x{3}yz/ |
|
axxxyzq |
|
0: xxxyz |
|
axxxxyzq |
|
0: xxxyz |
|
*** Failers |
|
No match |
|
ax |
|
No match |
|
axx |
|
No match |
|
ayzq |
|
No match |
|
axyzq |
|
No match |
|
axxyz |
|
No match |
|
|
|
/x{2,3}yz/ |
|
axxyz |
|
0: xxyz |
|
axxxyzq |
|
0: xxxyz |
|
axxxxyzq |
|
0: xxxyz |
|
*** Failers |
|
No match |
|
ax |
|
No match |
|
axx |
|
No match |
|
ayzq |
|
No match |
|
axyzq |
|
No match |
|
|
|
/[^a]+/ |
|
bac |
|
0: b |
|
bcdefax |
|
0: bcdef |
|
1: bcde |
|
2: bcd |
|
3: bc |
|
4: b |
|
*** Failers |
|
0: *** F |
|
1: *** |
|
2: *** |
|
3: ** |
|
4: * |
|
aaaaa |
|
No match |
|
|
|
/[^a]*/ | /[\x{105}-\x{109}]/8iDZ |
bac | ------------------------------------------------------------------ |
0: b | Bra |
1: | [\x{104}-\x{109}] |
bcdefax | Ket |
0: bcdef | End |
1: bcde | ------------------------------------------------------------------ |
2: bcd | Capturing subpattern count = 0 |
3: bc | Options: caseless utf |
4: b | No first char |
5: | No need char |
*** Failers | \x{104} |
0: *** F | 0: \x{104} |
1: *** | \x{105} |
2: *** | 0: \x{105} |
3: ** | \x{109} |
4: * | 0: \x{109} |
5: | ** Failers |
aaaaa | |
0: | |
| |
/[^a]{3,5}/ | |
xyz | |
0: xyz | |
awxyza | |
0: wxyz | |
1: wxy | |
abcdefa | |
0: bcdef | |
1: bcde | |
2: bcd | |
abcdefghijk | |
0: bcdef | |
1: bcde | |
2: bcd | |
*** Failers | |
0: *** F | |
1: *** | |
2: *** | |
axya | |
No match |
No match |
axa | \x{100} |
No match |
No match |
aaaaa | \x{10a} |
No match |
No match |
|
|
/\d*/ |
|
1234b567 |
|
0: 1234 |
|
1: 123 |
|
2: 12 |
|
3: 1 |
|
4: |
|
xyz |
|
0: |
|
|
|
/\D*/ | /[z-\x{100}]/8iDZ |
a1234b567 | ------------------------------------------------------------------ |
0: a | Bra |
1: | [Z\x{39c}\x{3bc}\x{1e9e}\x{178}z-\x{101}] |
xyz | Ket |
0: xyz | End |
1: xy | ------------------------------------------------------------------ |
2: x | Capturing subpattern count = 0 |
3: | Options: caseless utf |
| No first char |
/\d+/ | No need char |
ab1234c56 | Z |
0: 1234 | 0: Z |
1: 123 | z |
2: 12 | 0: z |
3: 1 | \x{39c} |
*** Failers | 0: \x{39c} |
| \x{178} |
| 0: \x{178} |
| | |
| 0: | |
| \x{80} |
| 0: \x{80} |
| \x{ff} |
| 0: \x{ff} |
| \x{100} |
| 0: \x{100} |
| \x{101} |
| 0: \x{101} |
| ** Failers |
No match |
No match |
xyz | \x{102} |
No match |
No match |
| Y |
/\D+/ | |
ab123c56 | |
0: ab | |
1: a | |
*** Failers | |
0: *** Failers | |
1: *** Failer | |
2: *** Faile | |
3: *** Fail | |
4: *** Fai | |
5: *** Fa | |
6: *** F | |
7: *** | |
8: *** | |
9: ** | |
10: * | |
789 | |
No match |
No match |
| y |
/\d?A/ | |
045ABC | |
0: 5A | |
ABC | |
0: A | |
*** Failers | |
No match |
No match |
XYZ |
|
No match |
|
|
|
/\D?A/ |
|
ABC |
|
0: A |
|
BAC |
|
0: BA |
|
9ABC |
|
0: A |
|
*** Failers |
|
No match |
|
|
|
/a+/ | /[z-\x{100}]/8DZi |
aaaa | ------------------------------------------------------------------ |
0: aaaa | Bra |
1: aaa | [Z\x{39c}\x{3bc}\x{1e9e}\x{178}z-\x{101}] |
2: aa | Ket |
3: a | End |
| ------------------------------------------------------------------ |
| Capturing subpattern count = 0 |
| Options: caseless utf |
| No first char |
| No need char |
|
|
/^.*xyz/ | /(?:[\PPa*]*){8,}/ |
xyz | |
0: xyz | |
ggggggggxyz | |
0: ggggggggxyz | |
| |
/^.+xyz/ | |
abcdxyz | |
0: abcdxyz | |
axyz | |
0: axyz | |
*** Failers | |
No match | |
xyz | |
No match | |
| |
/^.?xyz/ | |
xyz | |
0: xyz | |
cxyz | |
0: cxyz | |
|
|
/^\d{2,3}X/ | /[\P{Any}]/BZ |
12X | ------------------------------------------------------------------ |
0: 12X | Bra |
123X | [\P{Any}] |
0: 123X | Ket |
*** Failers | End |
No match | ------------------------------------------------------------------ |
X | |
No match | |
1X | |
No match | |
1234X | |
No match | |
|
|
/^[abcd]\d/ | /[\P{Any}\E]/BZ |
a45 | ------------------------------------------------------------------ |
0: a4 | Bra |
b93 | [\P{Any}] |
0: b9 | Ket |
c99z | End |
0: c9 | ------------------------------------------------------------------ |
d04 | |
0: d0 | |
*** Failers | |
No match | |
e45 | |
No match | |
abcd | |
No match | |
abcd1234 | |
No match | |
1234 | |
No match | |
|
|
/^[abcd]*\d/ | /(\P{Yi}+\277)/ |
a45 | |
0: a4 | |
b93 | |
0: b9 | |
c99z | |
0: c9 | |
d04 | |
0: d0 | |
abcd1234 | |
0: abcd1 | |
1234 | |
0: 1 | |
*** Failers | |
No match | |
e45 | |
No match | |
abcd | |
No match | |
|
|
/^[abcd]+\d/ | /(\P{Yi}+\277)?/ |
a45 | |
0: a4 | |
b93 | |
0: b9 | |
c99z | |
0: c9 | |
d04 | |
0: d0 | |
abcd1234 | |
0: abcd1 | |
*** Failers | |
No match | |
1234 | |
No match | |
e45 | |
No match | |
abcd | |
No match | |
|
|
/^a+X/ | /(?<=\P{Yi}{3}A)X/ |
aX | |
0: aX | |
aaX | |
0: aaX | |
|
|
/^[abcd]?\d/ | /\p{Yi}+(\P{Yi}+)(?1)/ |
a45 | |
0: a4 | |
b93 | |
0: b9 | |
c99z | |
0: c9 | |
d04 | |
0: d0 | |
1234 | |
0: 1 | |
*** Failers | |
No match | |
abcd1234 | |
No match | |
e45 | |
No match | |
|
|
/^[abcd]{2,3}\d/ | /(\P{Yi}{2}\277)?/ |
ab45 | |
0: ab4 | |
bcd93 | |
0: bcd9 | |
*** Failers | |
No match | |
1234 | |
No match | |
a36 | |
No match | |
abcd1234 | |
No match | |
ee45 | |
No match | |
|
|
/^(abc)*\d/ | /[\P{Yi}A]/ |
abc45 | |
0: abc4 | |
abcabcabc45 | |
0: abcabcabc4 | |
42xyz | |
0: 4 | |
*** Failers | |
No match | |
|
|
/^(abc)+\d/ | /[\P{Yi}\P{Yi}\P{Yi}A]/ |
abc45 | |
0: abc4 | |
abcabcabc45 | |
0: abcabcabc4 | |
*** Failers | |
No match | |
42xyz | |
No match | |
|
|
/^(abc)?\d/ | /[^\P{Yi}A]/ |
abc45 | |
0: abc4 | |
42xyz | |
0: 4 | |
*** Failers | |
No match | |
abcabcabc45 | |
No match | |
|
|
/^(abc){2,3}\d/ | /[^\P{Yi}\P{Yi}\P{Yi}A]/ |
abcabc45 | |
0: abcabc4 | |
abcabcabc45 | |
0: abcabcabc4 | |
*** Failers | |
No match | |
abcabcabcabc45 | |
No match | |
abc45 | |
No match | |
42xyz | |
No match | |
|
|
/1(abc|xyz)2(?1)3/ | /(\P{Yi}*\277)*/ |
1abc2abc3456 | |
0: 1abc2abc3 | |
1abc2xyz3456 | |
0: 1abc2xyz3 | |
|
|
/^(a*\w|ab)=(a*\w|ab)/ | /(\P{Yi}*?\277)*/ |
ab=ab | |
0: ab=ab | |
1: ab=a | |
|
|
/^(a*\w|ab)=(?1)/ | /(\p{Yi}*+\277)*/ |
ab=ab | |
0: ab=ab | |
1: ab=a | |
|
|
/^([^()]|\((?1)*\))*$/ | /(\P{Yi}?\277)*/ |
abc | |
0: abc | |
a(b)c | |
0: a(b)c | |
a(b(c))d | |
0: a(b(c))d | |
*** Failers) | |
No match | |
a(b(c)d | |
No match | |
|
|
/^>abc>([^()]|\((?1)*\))*<xyz<$/ | /(\P{Yi}??\277)*/ |
>abc>123<xyz< | |
0: >abc>123<xyz< | |
>abc>1(2)3<xyz< | |
0: >abc>1(2)3<xyz< | |
>abc>(1(2)3)<xyz< | |
0: >abc>(1(2)3)<xyz< | |
|
|
/^(?>a*)\d/ | /(\p{Yi}?+\277)*/ |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876 | |
0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9 | |
*** Failers | |
No match | |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
No match | |
|
|
/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x | /(\P{Yi}{0,3}\277)*/ |
<> | |
0: <> | |
<abcd> | |
0: <abcd> | |
<abc <123> hij> | |
0: <abc <123> hij> | |
<abc <def> hij> | |
0: <def> | |
<abc<>def> | |
0: <abc<>def> | |
<abc<> | |
0: <> | |
*** Failers | |
No match | |
<abc | |
No match | |
|
|
/^(?(?=abc)\w{3}:|\d\d)$/ | /(\P{Yi}{0,3}?\277)*/ |
abc: | |
0: abc: | |
12 | |
0: 12 | |
*** Failers | |
No match | |
123 | |
No match | |
xyz | |
No match | |
| |
/^(?(?!abc)\d\d|\w{3}:)$/ | |
abc: | |
0: abc: | |
12 | |
0: 12 | |
*** Failers | |
No match | |
123 | |
No match | |
xyz | |
No match | |
|
|
/^(?=abc)\w{5}:$/ | /(\p{Yi}{0,3}+\277)*/ |
abcde: | |
0: abcde: | |
*** Failers | |
No match | |
abc.. | |
No match | |
123 | |
No match | |
vwxyz | |
No match | |
| |
/^(?!abc)\d\d$/ | |
12 | |
0: 12 | |
*** Failers | |
No match | |
abcde: | |
No match | |
abc.. | |
No match | |
123 | |
No match | |
vwxyz | |
No match | |
|
|
/(?<=abc|xy)123/ | /\p{Zl}{2,3}+/8BZ |
abc12345 | ------------------------------------------------------------------ |
0: 123 | Bra |
wxy123z | prop Zl {2} |
0: 123 | prop Zl ?+ |
*** Failers | Ket |
No match | End |
123abc | ------------------------------------------------------------------ |
No match |
|
| 0: \x{2028}\x{2028} |
/(?<!abc|xy)123/ | \x{2028}\x{2028}\x{2028} |
123abc | 0: \x{2028}\x{2028}\x{2028} |
0: 123 | |
mno123456 | |
0: 123 | |
*** Failers | |
No match | |
abc12345 | |
No match | |
wxy123z | |
No match | |
| |
/abc(?C1)xyz/ | |
abcxyz | |
--->abcxyz | |
1 ^ ^ x | |
0: abcxyz | |
123abcxyz999 | |
--->123abcxyz999 | |
1 ^ ^ x | |
0: abcxyz | |
| |
/(ab|cd){3,4}/C | |
ababab | |
--->ababab | |
+0 ^ (ab|cd){3,4} | |
+1 ^ a | |
+4 ^ c | |
+2 ^^ b | |
+3 ^ ^ | | |
+1 ^ ^ a | |
+4 ^ ^ c | |
+2 ^ ^ b | |
+3 ^ ^ | | |
+1 ^ ^ a | |
+4 ^ ^ c | |
+2 ^ ^ b | |
+3 ^ ^ | | |
+12 ^ ^ | |
+1 ^ ^ a | |
+4 ^ ^ c | |
0: ababab | |
abcdabcd | |
--->abcdabcd | |
+0 ^ (ab|cd){3,4} | |
+1 ^ a | |
+4 ^ c | |
+2 ^^ b | |
+3 ^ ^ | | |
+1 ^ ^ a | |
+4 ^ ^ c | |
+5 ^ ^ d | |
+6 ^ ^ ) | |
+1 ^ ^ a | |
+4 ^ ^ c | |
+2 ^ ^ b | |
+3 ^ ^ | | |
+12 ^ ^ | |
+1 ^ ^ a | |
+4 ^ ^ c | |
+5 ^ ^ d | |
+6 ^ ^ ) | |
+12 ^ ^ | |
0: abcdabcd | |
1: abcdab | |
abcdcdcdcdcd | |
--->abcdcdcdcdcd | |
+0 ^ (ab|cd){3,4} | |
+1 ^ a | |
+4 ^ c | |
+2 ^^ b | |
+3 ^ ^ | | |
+1 ^ ^ a | |
+4 ^ ^ c | |
+5 ^ ^ d | |
+6 ^ ^ ) | |
+1 ^ ^ a | |
+4 ^ ^ c | |
+5 ^ ^ d | |
+6 ^ ^ ) | |
+12 ^ ^ | |
+1 ^ ^ a | |
+4 ^ ^ c | |
+5 ^ ^ d | |
+6 ^ ^ ) | |
+12 ^ ^ | |
0: abcdcdcd | |
1: abcdcd | |
| |
/^abc/ | |
abcdef | |
0: abc | |
*** Failers | |
No match | |
abcdef\B | |
No match | |
| |
/^(a*|xyz)/ | |
bcd | |
0: | |
aaabcd | |
0: aaa | |
1: aa | |
2: a | |
3: | |
xyz | |
0: xyz | |
1: | |
xyz\N | |
0: xyz | |
*** Failers | |
0: | |
bcd\N | |
No match | |
|
|
/xyz$/ | /\p{Zl}/8BZ |
xyz | ------------------------------------------------------------------ |
0: xyz | Bra |
xyz\n | prop Zl |
0: xyz | Ket |
*** Failers | End |
No match | ------------------------------------------------------------------ |
xyz\Z | |
No match | |
xyz\n\Z | |
No match | |
| |
/xyz$/m | |
xyz | |
0: xyz | |
xyz\n | |
0: xyz | |
abcxyz\npqr | |
0: xyz | |
abcxyz\npqr\Z | |
0: xyz | |
xyz\n\Z | |
0: xyz | |
*** Failers | |
No match | |
xyz\Z | |
No match | |
|
|
/\Gabc/ | /\p{Lu}{3}+/8BZ |
abcdef | ------------------------------------------------------------------ |
0: abc | Bra |
defabcxyz\>3 | prop Lu {3} |
0: abc | Ket |
*** Failers | End |
No match | ------------------------------------------------------------------ |
defabcxyz | |
No match | |
|
|
/^abcdef/ | /\pL{2}+/8BZ |
ab\P | ------------------------------------------------------------------ |
Partial match: ab | Bra |
abcde\P | prop L {2} |
Partial match: abcde | Ket |
abcdef\P | End |
0: abcdef | ------------------------------------------------------------------ |
*** Failers | |
No match | |
abx\P | |
No match | |
|
|
/^a{2,4}\d+z/ | /\p{Cc}{2}+/8BZ |
a\P | ------------------------------------------------------------------ |
Partial match: a | Bra |
aa\P | prop Cc {2} |
Partial match: aa | Ket |
aa2\P | End |
Partial match: aa2 | ------------------------------------------------------------------ |
aaa\P | |
Partial match: aaa | |
aaa23\P | |
Partial match: aaa23 | |
aaaa12345\P | |
Partial match: aaaa12345 | |
aa0z\P | |
0: aa0z | |
aaaa4444444444444z\P | |
0: aaaa4444444444444z | |
*** Failers | |
No match | |
az\P | |
No match | |
aaaaa\P | |
No match | |
a56\P | |
No match | |
|
|
/^abcdef/ | /^\p{Cs}/8 |
abc\P | \?\x{dfff} |
Partial match: abc | 0: \x{dfff} |
def\R | ** Failers |
0: def | |
| |
/(?<=foo)bar/ | |
xyzfo\P | |
No match |
No match |
foob\P\>2 | \x{09f} |
Partial match: foob | |
foobar...\R\P\>4 | |
0: ar | |
xyzfo\P | |
No match |
No match |
foobar\>2 | |
0: bar | /^\p{Sc}+/8 |
*** Failers | $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6} |
| 0: $\x{a2}\x{a3}\x{a4}\x{a5} |
| \x{9f2} |
| 0: \x{9f2} |
| ** Failers |
No match |
No match |
xyzfo\P | X |
No match |
No match |
obar\R | \x{2c2} |
No match |
No match |
| |
/(ab*(cd|ef))+X/ | /^\p{Zs}/8 |
adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z | \ \ |
No match | 0: |
lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z | \x{a0} |
Partial match: abbbbbbcdaefabbbbbbbefa | 0: \x{a0} |
cdabbbbbbbb\P\R\B\Z | \x{1680} |
Partial match: cdabbbbbbbb | 0: \x{1680} |
efabbbbbbbbbbbbbbbb\P\R\B\Z | \x{180e} |
Partial match: efabbbbbbbbbbbbbbbb | 0: \x{180e} |
bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z | \x{2000} |
0: bbbbbbbbbbbbcdX | 0: \x{2000} |
| \x{2001} |
/(a|b)/SF>testsavedregex | 0: \x{2001} |
Compiled pattern written to testsavedregex | |
Study data written to testsavedregex | |
<testsavedregex | |
Compiled pattern (byte-inverted) loaded from testsavedregex | |
Study data loaded from testsavedregex | |
abc | |
0: a | |
** Failers |
** Failers |
0: a |
|
def |
|
No match |
No match |
| \x{2028} |
/the quick brown fox/ | |
the quick brown fox | |
0: the quick brown fox | |
The quick brown FOX | |
No match |
No match |
What do you know about the quick brown fox? | \x{200d} |
0: the quick brown fox | |
What do you know about THE QUICK BROWN FOX? | |
No match |
No match |
| |
/The quick brown fox/i | /-- These four are here rather than in test 6 because Perl has problems with |
the quick brown fox | the negative versions of the properties. --/ |
0: the quick brown fox | |
The quick brown FOX | /\p{^Lu}/8i |
0: The quick brown FOX | 1234 |
What do you know about the quick brown fox? | 0: 1 |
0: the quick brown fox | ** Failers |
What do you know about THE QUICK BROWN FOX? | |
0: THE QUICK BROWN FOX | |
| |
/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/ | |
abcd\t\n\r\f\a\e9;\$\\?caxyz | |
0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz | |
| |
/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/ | |
abxyzpqrrrabbxyyyypqAzz | |
0: abxyzpqrrrabbxyyyypqAzz | |
abxyzpqrrrabbxyyyypqAzz | |
0: abxyzpqrrrabbxyyyypqAzz | |
aabxyzpqrrrabbxyyyypqAzz | |
0: aabxyzpqrrrabbxyyyypqAzz | |
aaabxyzpqrrrabbxyyyypqAzz | |
0: aaabxyzpqrrrabbxyyyypqAzz | |
aaaabxyzpqrrrabbxyyyypqAzz | |
0: aaaabxyzpqrrrabbxyyyypqAzz | |
abcxyzpqrrrabbxyyyypqAzz | |
0: abcxyzpqrrrabbxyyyypqAzz | |
aabcxyzpqrrrabbxyyyypqAzz | |
0: aabcxyzpqrrrabbxyyyypqAzz | |
aaabcxyzpqrrrabbxyyyypAzz | |
0: aaabcxyzpqrrrabbxyyyypAzz | |
aaabcxyzpqrrrabbxyyyypqAzz | |
0: aaabcxyzpqrrrabbxyyyypqAzz | |
aaabcxyzpqrrrabbxyyyypqqAzz | |
0: aaabcxyzpqrrrabbxyyyypqqAzz | |
aaabcxyzpqrrrabbxyyyypqqqAzz | |
0: aaabcxyzpqrrrabbxyyyypqqqAzz | |
aaabcxyzpqrrrabbxyyyypqqqqAzz | |
0: aaabcxyzpqrrrabbxyyyypqqqqAzz | |
aaabcxyzpqrrrabbxyyyypqqqqqAzz | |
0: aaabcxyzpqrrrabbxyyyypqqqqqAzz | |
aaabcxyzpqrrrabbxyyyypqqqqqqAzz | |
0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz | |
aaaabcxyzpqrrrabbxyyyypqAzz | |
0: aaaabcxyzpqrrrabbxyyyypqAzz | |
abxyzzpqrrrabbxyyyypqAzz | |
0: abxyzzpqrrrabbxyyyypqAzz | |
aabxyzzzpqrrrabbxyyyypqAzz | |
0: aabxyzzzpqrrrabbxyyyypqAzz | |
aaabxyzzzzpqrrrabbxyyyypqAzz | |
0: aaabxyzzzzpqrrrabbxyyyypqAzz | |
aaaabxyzzzzpqrrrabbxyyyypqAzz | |
0: aaaabxyzzzzpqrrrabbxyyyypqAzz | |
abcxyzzpqrrrabbxyyyypqAzz | |
0: abcxyzzpqrrrabbxyyyypqAzz | |
aabcxyzzzpqrrrabbxyyyypqAzz | |
0: aabcxyzzzpqrrrabbxyyyypqAzz | |
aaabcxyzzzzpqrrrabbxyyyypqAzz | |
0: aaabcxyzzzzpqrrrabbxyyyypqAzz | |
aaaabcxyzzzzpqrrrabbxyyyypqAzz | |
0: aaaabcxyzzzzpqrrrabbxyyyypqAzz | |
aaaabcxyzzzzpqrrrabbbxyyyypqAzz | |
0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz | |
aaaabcxyzzzzpqrrrabbbxyyyyypqAzz | |
0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz | |
aaabcxyzpqrrrabbxyyyypABzz | |
0: aaabcxyzpqrrrabbxyyyypABzz | |
aaabcxyzpqrrrabbxyyyypABBzz | |
0: aaabcxyzpqrrrabbxyyyypABBzz | |
>>>aaabxyzpqrrrabbxyyyypqAzz | |
0: aaabxyzpqrrrabbxyyyypqAzz | |
>aaaabxyzpqrrrabbxyyyypqAzz | |
0: aaaabxyzpqrrrabbxyyyypqAzz | |
>>>>abcxyzpqrrrabbxyyyypqAzz | |
0: abcxyzpqrrrabbxyyyypqAzz | |
*** Failers | |
No match | |
abxyzpqrrabbxyyyypqAzz | |
No match | |
abxyzpqrrrrabbxyyyypqAzz | |
No match | |
abxyzpqrrrabxyyyypqAzz | |
No match | |
aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz | |
No match | |
aaaabcxyzzzzpqrrrabbbxyyypqAzz | |
No match | |
aaabcxyzpqrrrabbxyyyypqqqqqqqAzz | |
No match | |
| |
/^(abc){1,2}zz/ | |
abczz | |
0: abczz | |
abcabczz | |
0: abcabczz | |
*** Failers | |
No match | |
zz | |
No match | |
abcabcabczz | |
No match | |
>>abczz | |
No match | |
| |
/^(b+?|a){1,2}?c/ | |
bc | |
0: bc | |
bbc | |
0: bbc | |
bbbc | |
0: bbbc | |
bac | |
0: bac | |
bbac | |
0: bbac | |
aac | |
0: aac | |
abbbbbbbbbbbc | |
0: abbbbbbbbbbbc | |
bbbbbbbbbbbac | |
0: bbbbbbbbbbbac | |
*** Failers | |
No match | |
aaac | |
No match | |
abbbbbbbbbbbac | |
No match | |
| |
/^(b+|a){1,2}c/ | |
bc | |
0: bc | |
bbc | |
0: bbc | |
bbbc | |
0: bbbc | |
bac | |
0: bac | |
bbac | |
0: bbac | |
aac | |
0: aac | |
abbbbbbbbbbbc | |
0: abbbbbbbbbbbc | |
bbbbbbbbbbbac | |
0: bbbbbbbbbbbac | |
*** Failers | |
No match | |
aaac | |
No match | |
abbbbbbbbbbbac | |
No match | |
| |
/^(b+|a){1,2}?bc/ | |
bbc | |
0: bbc | |
| |
/^(b*|ba){1,2}?bc/ | |
babc | |
0: babc | |
bbabc | |
0: bbabc | |
bababc | |
0: bababc | |
*** Failers | |
No match | |
bababbc | |
No match | |
babababc | |
No match | |
| |
/^(ba|b*){1,2}?bc/ | |
babc | |
0: babc | |
bbabc | |
0: bbabc | |
bababc | |
0: bababc | |
*** Failers | |
No match | |
bababbc | |
No match | |
babababc | |
No match | |
| |
/^\ca\cA\c[\c{\c:/ | |
\x01\x01\e;z | |
0: \x01\x01\x1b;z | |
| |
/^[ab\]cde]/ | |
athing | |
0: a | |
bthing | |
0: b | |
]thing | |
0: ] | |
cthing | |
0: c | |
dthing | |
0: d | |
ething | |
0: e | |
*** Failers | |
No match | |
fthing | |
No match | |
[thing | |
No match | |
\\thing | |
No match | |
| |
/^[]cde]/ | |
]thing | |
0: ] | |
cthing | |
0: c | |
dthing | |
0: d | |
ething | |
0: e | |
*** Failers | |
No match | |
athing | |
No match | |
fthing | |
No match | |
| |
/^[^ab\]cde]/ | |
fthing | |
0: f | |
[thing | |
0: [ | |
\\thing | |
0: \ | |
*** Failers | |
0: * |
0: * |
athing | ABC |
No match |
No match |
bthing |
|
No match |
|
]thing |
|
No match |
|
cthing |
|
No match |
|
dthing |
|
No match |
|
ething |
|
No match |
|
|
|
/^[^]cde]/ | /\P{Lu}/8i |
athing | 1234 |
0: a | 0: 1 |
fthing | ** Failers |
0: f | |
*** Failers | |
0: * |
0: * |
]thing | ABC |
No match |
No match |
cthing |
|
No match |
|
dthing |
|
No match |
|
ething |
|
No m |