version 1.1.1.2, 2012/02/21 23:50:25
|
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 4708
|
Line 4706
|
|
|
/(?<=ab\Cde)X/ |
/(?<=ab\Cde)X/ |
abZdeX |
abZdeX |
|
|
|
/^\R/ |
|
\r\P |
|
\r\P\P |
|
|
|
/^\R{2,3}x/ |
|
\r\P |
|
\r\P\P |
|
\r\r\P |
|
\r\r\P\P |
|
\r\r\r\P |
|
\r\r\r\P\P |
|
\r\rx |
|
\r\r\rx |
|
|
|
/^\R{2,3}?x/ |
|
\r\P |
|
\r\P\P |
|
\r\r\P |
|
\r\r\P\P |
|
\r\r\r\P |
|
\r\r\r\P\P |
|
\r\rx |
|
\r\r\rx |
|
|
|
/^\R?x/ |
|
\r\P |
|
\r\P\P |
|
x |
|
\rx |
|
|
|
/^\R+x/ |
|
\r\P |
|
\r\P\P |
|
\r\n\P |
|
\r\n\P\P |
|
\rx |
|
|
|
/^a$/<CRLF> |
|
a\r\P |
|
a\r\P\P |
|
|
|
/^a$/m<CRLF> |
|
a\r\P |
|
a\r\P\P |
|
|
|
/^(a$|a\r)/<CRLF> |
|
a\r\P |
|
a\r\P\P |
|
|
|
/^(a$|a\r)/m<CRLF> |
|
a\r\P |
|
a\r\P\P |
|
|
|
/./<CRLF> |
|
\r\P |
|
\r\P\P |
|
|
|
/.{2,3}/<CRLF> |
|
\r\P |
|
\r\P\P |
|
\r\r\P |
|
\r\r\P\P |
|
\r\r\r\P |
|
\r\r\r\P\P |
|
|
|
/.{2,3}?/<CRLF> |
|
\r\P |
|
\r\P\P |
|
\r\r\P |
|
\r\r\P\P |
|
\r\r\r\P |
|
\r\r\r\P\P |
|
|
|
/-- Test simple validity check for restarts --/ |
|
|
|
/abcdef/ |
|
abc\R |
|
|
|
/<H((?(?!<H|F>)(.)|(?R))++)*F>/ |
|
text <H more text <H texting more hexA0-"\xA0" hex above 7F-"\xBC" F> text xxxxx <H text F> text F> text2 <H text sample F> more text. |
|
|
|
/^(?>.{4})abc|^\w\w.xabcd/ |
|
xxxxabcd |
|
xx\xa0xabcd |
|
|
|
/^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/ |
|
xxxxxxxxabcd |
|
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 --/ |