version 1.1.1.3, 2012/10/09 09:19:18
|
version 1.1.1.5, 2014/06/15 19:46:05
|
Line 1
|
Line 1
|
/-- This set of tests check the DFA matching functionality of pcre_dfa_exec(). | /-- This set of tests check the DFA matching functionality of pcre_dfa_exec(), |
The -dfa flag must be used with pcretest when running it. --/ | excluding UTF and Unicode property support. The -dfa flag must be used with |
| pcretest when running it. --/ |
| |
| < forbid 8W |
|
|
/abc/ |
/abc/ |
abc |
abc |
Line 16
|
Line 19
|
ac |
ac |
ab |
ab |
|
|
/a*/ | /a*/O |
a |
a |
aaaaaaaaaaaaaaaaa |
aaaaaaaaaaaaaaaaa |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
Line 177
|
Line 180
|
ayzq |
ayzq |
axyzq |
axyzq |
|
|
/[^a]+/ | /[^a]+/O |
bac |
bac |
bcdefax |
bcdefax |
*** Failers |
*** Failers |
aaaaa |
aaaaa |
|
|
/[^a]*/ | /[^a]*/O |
bac |
bac |
bcdefax |
bcdefax |
*** Failers |
*** Failers |
aaaaa |
aaaaa |
|
|
/[^a]{3,5}/ | /[^a]{3,5}/O |
xyz |
xyz |
awxyza |
awxyza |
abcdefa |
abcdefa |
Line 937
|
Line 940
|
*** Failers |
*** Failers |
the abc |
the abc |
|
|
/^[ab]{1,3}(ab*|b)/ | /^[ab]{1,3}(ab*|b)/O |
aabbbbb |
aabbbbb |
|
|
/^[ab]{1,3}?(ab*|b)/ | /^[ab]{1,3}?(ab*|b)/O |
aabbbbb |
aabbbbb |
|
|
/^[ab]{1,3}?(ab*?|b)/ | /^[ab]{1,3}?(ab*?|b)/O |
aabbbbb |
aabbbbb |
|
|
/^[ab]{1,3}(ab*?|b)/ | /^[ab]{1,3}(ab*?|b)/O |
aabbbbb |
aabbbbb |
|
|
/ (?: [\040\t] | \( |
/ (?: [\040\t] | \( |
Line 1923
|
Line 1926
|
abc\100\060 |
abc\100\060 |
abc\100\60 |
abc\100\60 |
|
|
/abc\81/ | /^A\8B\9C$/ |
abc\081 | A8B9C |
abc\0\x38\x31 | *** Failers |
| A\08B\09C |
/abc\91/ | |
abc\091 | /^[A\8B\9C]+$/ |
abc\0\x39\x31 | A8B9C |
| *** Failers |
| A8B9C\x00 |
| |
/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/ |
/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/ |
abcdefghijk\12S |
abcdefghijk\12S |
|
|
Line 2049
|
Line 2054
|
/foo(.*?)bar/ |
/foo(.*?)bar/ |
The food is under the bar in the barn. |
The food is under the bar in the barn. |
|
|
/(.*)(\d*)/ | /(.*)(\d*)/O |
I have 2 numbers: 53147 |
I have 2 numbers: 53147 |
|
|
/(.*)(\d+)/ |
/(.*)(\d+)/ |
I have 2 numbers: 53147 |
I have 2 numbers: 53147 |
|
|
/(.*?)(\d*)/ | /(.*?)(\d*)/O |
I have 2 numbers: 53147 |
I have 2 numbers: 53147 |
|
|
/(.*?)(\d+)/ |
/(.*?)(\d+)/ |
Line 3825
|
Line 3830
|
/a*/g |
/a*/g |
abbab |
abbab |
|
|
/^[a-\d]/ |
|
abcde |
|
-things |
|
0digit |
|
*** Failers |
|
bcdef |
|
|
|
/^[\d-a]/ |
/^[\d-a]/ |
abcde |
abcde |
-things |
-things |
Line 4699
|
Line 4697
|
/(?(R)a*(?1)|((?R))b)/ |
/(?(R)a*(?1)|((?R))b)/ |
aaaabcde |
aaaabcde |
|
|
/(a+)/ | /(a+)/O |
\O6aaaa |
\O6aaaa |
\O8aaaa |
\O8aaaa |
|
|
Line 4797
|
Line 4795
|
/^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/ |
/^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/ |
xxxxxxxxabcd |
xxxxxxxxabcd |
xx\xa0xxxxxabcd |
xx\xa0xxxxxabcd |
|
|
|
/abcd/ |
|
abcd\O0 |
|
|
|
/-- These tests show up auto-possessification --/ |
|
|
|
/[ab]*/ |
|
aaaa |
|
|
|
/[ab]*?/ |
|
aaaa |
|
|
|
/[ab]?/ |
|
aaaa |
|
|
|
/[ab]??/ |
|
aaaa |
|
|
|
/[ab]+/ |
|
aaaa |
|
|
|
/[ab]+?/ |
|
aaaa |
|
|
|
/[ab]{2,3}/ |
|
aaaa |
|
|
|
/[ab]{2,3}?/ |
|
aaaa |
|
|
|
/[ab]{2,}/ |
|
aaaa |
|
|
|
/[ab]{2,}?/ |
|
aaaa |
|
|
/-- End of testinput8 --/ |
/-- End of testinput8 --/ |