1 |
Testing Perl-Compatible Regular Expressions |
PCRE version 2.00 24-Sep-1998 |
|
PCRE version 1.09 28-Apr-1998 |
|
2 |
|
|
3 |
/(a)b|/ |
/(a)b|/ |
4 |
Identifying subpattern count = 1 |
Identifying subpattern count = 1 |
5 |
No options |
No options |
6 |
No first char |
No first char |
7 |
|
|
|
/(a*)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 4 |
|
|
|
|
|
/(abc|)+/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 6 |
|
|
|
|
8 |
/abc/ |
/abc/ |
9 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
10 |
No options |
No options |
15 |
0: abc |
0: abc |
16 |
\Aabc |
\Aabc |
17 |
0: abc |
0: abc |
|
\IABC |
|
|
0: ABC |
|
18 |
*** Failers |
*** Failers |
19 |
No match |
No match |
20 |
\Adefabc |
\Adefabc |
63 |
No first char |
No first char |
64 |
abc |
abc |
65 |
0: abc |
0: abc |
|
\Mdef\nabc |
|
|
0: abc |
|
66 |
*** Failers |
*** Failers |
67 |
No match |
No match |
68 |
def\nabc |
def\nabc |
146 |
this sentences rambles on and on for a while to elephant ElePhant |
this sentences rambles on and on for a while to elephant ElePhant |
147 |
0: elephant |
0: elephant |
148 |
|
|
|
/cat|dog|elephant/IS |
|
|
Identifying subpattern count = 0 |
|
|
No options |
|
|
No first char |
|
|
Starting character set: C D E c d e |
|
|
this sentence eventually mentions a CAT cat |
|
|
0: cat |
|
|
this sentences rambles on and on for a while to elephant ElePhant |
|
|
0: elephant |
|
|
|
|
|
/cat|dog|elephant/IS |
|
|
Identifying subpattern count = 0 |
|
|
No options |
|
|
No first char |
|
|
Starting character set: C D E c d e |
|
|
\Ithis sentence eventually mentions a CAT cat |
|
|
0: CAT |
|
|
\Ithis sentences rambles on and on for a while to elephant ElePhant |
|
|
0: elephant |
|
|
|
|
149 |
/a|[bcd]/S |
/a|[bcd]/S |
150 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
151 |
No options |
No options |
178 |
Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b |
Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b |
179 |
|
|
180 |
/(ab\2)/ |
/(ab\2)/ |
181 |
Failed: back reference to non-existent subpattern at offset 4 |
Failed: back reference to non-existent subpattern at offset 6 |
182 |
|
|
183 |
/{4,5}abc/ |
/{4,5}abc/ |
184 |
Failed: nothing to repeat at offset 4 |
Failed: nothing to repeat at offset 4 |
194 |
3: c |
3: c |
195 |
\O0abcb |
\O0abcb |
196 |
Matched, but too many substrings |
Matched, but too many substrings |
197 |
\O2abcb |
\O3abcb |
198 |
Matched, but too many substrings |
Matched, but too many substrings |
199 |
0: abcb |
0: abcb |
200 |
\O4abcb |
\O6abcb |
201 |
Matched, but too many substrings |
Matched, but too many substrings |
202 |
0: abcb |
0: abcb |
203 |
1: a |
1: a |
204 |
\O6abcb |
\O9abcb |
205 |
Matched, but too many substrings |
Matched, but too many substrings |
206 |
0: abcb |
0: abcb |
207 |
1: a |
1: a |
208 |
2: b |
2: b |
209 |
\O8abcb |
\O12abcb |
210 |
0: abcb |
0: abcb |
211 |
1: a |
1: a |
212 |
2: b |
2: b |
221 |
1: a |
1: a |
222 |
\O0abc |
\O0abc |
223 |
Matched, but too many substrings |
Matched, but too many substrings |
224 |
\O2abc |
\O3abc |
225 |
Matched, but too many substrings |
Matched, but too many substrings |
226 |
0: abc |
0: abc |
227 |
\O4abc |
\O6abc |
228 |
0: abc |
0: abc |
229 |
1: a |
1: a |
230 |
aba |
aba |
234 |
3: b |
3: b |
235 |
\O0aba |
\O0aba |
236 |
Matched, but too many substrings |
Matched, but too many substrings |
237 |
\O2aba |
\O3aba |
238 |
Matched, but too many substrings |
Matched, but too many substrings |
239 |
0: aba |
0: aba |
240 |
\O4aba |
\O6aba |
241 |
Matched, but too many substrings |
Matched, but too many substrings |
242 |
0: aba |
0: aba |
243 |
1: <unset> |
1: <unset> |
244 |
\O6aba |
\O9aba |
245 |
Matched, but too many substrings |
Matched, but too many substrings |
246 |
0: aba |
0: aba |
247 |
1: <unset> |
1: <unset> |
248 |
2: a |
2: a |
249 |
\O8aba |
\O12aba |
250 |
0: aba |
0: aba |
251 |
1: <unset> |
1: <unset> |
252 |
2: a |
2: a |
253 |
3: b |
3: b |
254 |
|
|
|
/^a.b/ |
|
|
Identifying subpattern count = 0 |
|
|
Options: anchored |
|
|
No first char |
|
|
\Sa\nb |
|
|
0: a\x0ab |
|
|
|
|
255 |
/abc$/E |
/abc$/E |
256 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
257 |
Options: dollar_endonly |
Options: dollar_endonly |
265 |
abc\ndef |
abc\ndef |
266 |
No match |
No match |
267 |
|
|
|
/abc$/ |
|
|
Identifying subpattern count = 0 |
|
|
No options |
|
|
First char = 'a' |
|
|
*** Failers |
|
|
No match |
|
|
\Eabc\n |
|
|
No match |
|
|
\Eabc\ndef |
|
|
No match |
|
|
|
|
|
/abc$/m |
|
|
Identifying subpattern count = 0 |
|
|
Options: multiline |
|
|
First char = 'a' |
|
|
\Eabc\n |
|
|
0: abc |
|
|
\Eabc\ndef |
|
|
0: abc |
|
|
|
|
268 |
/(a)(b)(c)(d)(e)\6/ |
/(a)(b)(c)(d)(e)\6/ |
269 |
Failed: back reference to non-existent subpattern at offset 16 |
Failed: back reference to non-existent subpattern at offset 17 |
270 |
|
|
271 |
/the quick brown fox/ |
/the quick brown fox/ |
272 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
291 |
/ab(?z)cd/ |
/ab(?z)cd/ |
292 |
Failed: unrecognized character after (? at offset 4 |
Failed: unrecognized character after (? at offset 4 |
293 |
|
|
|
".*/\Xfoo"X |
|
|
Identifying subpattern count = 0 |
|
|
Options: anchored extra |
|
|
No first char |
|
|
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ |
|
|
No match |
|
|
|
|
|
"(?X).*/\Xfoo" |
|
|
Identifying subpattern count = 0 |
|
|
Options: anchored extra |
|
|
No first char |
|
|
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ |
|
|
No match |
|
|
|
|
|
".*/\Xfoo"X |
|
|
Identifying subpattern count = 0 |
|
|
Options: anchored extra |
|
|
No first char |
|
|
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
|
|
0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
|
|
|
|
|
"(?X).*/\Xfoo" |
|
|
Identifying subpattern count = 0 |
|
|
Options: anchored extra |
|
|
No first char |
|
|
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
|
|
0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
|
|
|
|
|
/(\.\d\d[1-9]?)\d+/ |
|
|
Identifying subpattern count = 1 |
|
|
No options |
|
|
First char = '.' |
|
|
1.230003938 |
|
|
0: .230003938 |
|
|
1: .23 |
|
|
1.875000282 |
|
|
0: .875000282 |
|
|
1: .875 |
|
|
1.235 |
|
|
0: .235 |
|
|
1: .23 |
|
|
|
|
|
/(\.\d\d[1-9]?)\X\d+/X |
|
|
Identifying subpattern count = 1 |
|
|
Options: extra |
|
|
First char = '.' |
|
|
1.230003938 |
|
|
0: .230003938 |
|
|
1: .23 |
|
|
1.875000282 |
|
|
0: .875000282 |
|
|
1: .875 |
|
|
*** Failers |
|
|
No match |
|
|
1.235 |
|
|
No match |
|
|
|
|
|
/(\.\d\d((?=0)|\d(?=\d)))/ |
|
|
Identifying subpattern count = 2 |
|
|
No options |
|
|
First char = '.' |
|
|
1.230003938 |
|
|
0: .23 |
|
|
1: .23 |
|
|
2: |
|
|
1.875000282 |
|
|
0: .875 |
|
|
1: .875 |
|
|
2: 5 |
|
|
*** Failers |
|
|
No match |
|
|
1.235 |
|
|
No match |
|
|
|
|
|
/^(\w+\X|\s+\X)*$/X |
|
|
Identifying subpattern count = 1 |
|
|
Options: anchored extra |
|
|
No first char |
|
|
now is the time for all good men to come to the aid of the party |
|
|
0: now is the time for all good men to come to the aid of the party |
|
|
1: party |
|
|
*** Failers |
|
|
No match |
|
|
this is not a line with only words and spaces! |
|
|
No match |
|
|
|
|
294 |
/^abc|def/ |
/^abc|def/ |
295 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
296 |
No options |
No options |
366 |
Failed: POSIX code 9: bad escape sequence at offset 4 |
Failed: POSIX code 9: bad escape sequence at offset 4 |
367 |
|
|
368 |
/(abc)\2/P |
/(abc)\2/P |
369 |
Failed: POSIX code 15: bad back reference at offset 6 |
Failed: POSIX code 15: bad back reference at offset 7 |
370 |
|
|
371 |
/(abc\1)/P |
/(abc\1)/P |
372 |
abc |
abc |
373 |
No match: POSIX code 15: bad back reference |
No match: POSIX code 17: match failed |
|
|
|
|
"(?>.*/)foo"X |
|
|
Identifying subpattern count = 0 |
|
|
Options: anchored extra |
|
|
No first char |
|
|
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ |
|
|
No match |
|
|
|
|
|
"(?>.*/)foo"X |
|
|
Identifying subpattern count = 0 |
|
|
Options: anchored extra |
|
|
No first char |
|
|
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
|
|
0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
|
|
|
|
|
/(?>(\.\d\d[1-9]?))\d+/X |
|
|
Identifying subpattern count = 1 |
|
|
Options: extra |
|
|
No first char |
|
|
1.230003938 |
|
|
0: .230003938 |
|
|
1: .23 |
|
|
1.875000282 |
|
|
0: .875000282 |
|
|
1: .875 |
|
|
*** Failers |
|
|
No match |
|
|
1.235 |
|
|
No match |
|
|
|
|
|
/^((?>\w+)|(?>\s+))*$/X |
|
|
Identifying subpattern count = 1 |
|
|
Options: anchored extra |
|
|
No first char |
|
|
now is the time for all good men to come to the aid of the party |
|
|
0: now is the time for all good men to come to the aid of the party |
|
|
1: party |
|
|
*** Failers |
|
|
No match |
|
|
this is not a line with only words and spaces! |
|
|
No match |
|
|
|
|
|
/(\d+)(\w)/X |
|
|
Identifying subpattern count = 2 |
|
|
Options: extra |
|
|
No first char |
|
|
12345a |
|
|
0: 12345a |
|
|
1: 12345 |
|
|
2: a |
|
|
12345+ |
|
|
0: 12345 |
|
|
1: 1234 |
|
|
2: 5 |
|
|
|
|
|
/((?>\d+))(\w)/X |
|
|
Identifying subpattern count = 2 |
|
|
Options: extra |
|
|
No first char |
|
|
12345a |
|
|
0: 12345a |
|
|
1: 12345 |
|
|
2: a |
|
|
*** Failers |
|
|
No match |
|
|
12345+ |
|
|
No match |
|
|
|
|
|
/([a]*)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 6 |
|
|
|
|
|
/([ab]*)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 7 |
|
|
|
|
|
/([^a]*)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 7 |
|
|
|
|
|
/([^ab]*)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 8 |
|
|
|
|
|
/([a]*?)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 7 |
|
|
|
|
|
/([ab]*?)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 8 |
|
|
|
|
|
/([^a]*?)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 8 |
|
|
|
|
|
/([^ab]*?)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 9 |
|
|
|
|
|
/(?>a*)*/X |
|
|
Failed: nothing to repeat at offset 6 |
|
|
|
|
|
/((?>a*))*/X |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 8 |
|
|
|
|
|
/((?>a*?))*/X |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 9 |
|
374 |
|
|
375 |
/)/ |
/)/ |
376 |
Failed: unmatched brackets at offset 0 |
Failed: unmatched parentheses at offset 0 |
377 |
|
|
378 |
/a[]b/ |
/a[]b/ |
379 |
Failed: missing terminating ] for character class at offset 4 |
Failed: missing terminating ] for character class at offset 4 |
380 |
|
|
|
/[^a]/ |
|
|
Identifying subpattern count = 0 |
|
|
No options |
|
|
No first char |
|
|
\Iaaaabcd |
|
|
0: b |
|
|
\IaaAabcd |
|
|
0: b |
|
|
|
|
|
/[^az]/ |
|
|
Identifying subpattern count = 0 |
|
|
No options |
|
|
No first char |
|
|
\Iaaaabcd |
|
|
0: b |
|
|
\IaaAabcd |
|
|
0: b |
|
|
|
|
|
/[^az]/ |
|
|
Identifying subpattern count = 0 |
|
|
No options |
|
|
No first char |
|
|
\Izazabcd |
|
|
0: b |
|
|
\IAaZabcd |
|
|
0: b |
|
|
|
|
381 |
/[^aeiou ]{3,}/ |
/[^aeiou ]{3,}/ |
382 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
383 |
No options |
No options |
384 |
No first char |
No first char |
385 |
co-processors, and for |
co-processors, and for |
386 |
0: -pr |
0: -pr |
|
\Ico-processors, and for |
|
|
0: -pr |
|
387 |
|
|
|
/((a)*)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 6 |
|
|
|
|
|
/((a|b|c)*)*/ |
|
|
Failed: operand of unlimited repeat could match the empty string at offset 10 |
|
|
|
|
388 |
/<.*>/ |
/<.*>/ |
389 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
390 |
No options |
No options |
433 |
First char = '=' |
First char = '=' |
434 |
abc========def |
abc========def |
435 |
0: ======== |
0: ======== |
436 |
|
|
437 |
|
/(?<!bar|cattle)foo/ |
438 |
|
Identifying subpattern count = 0 |
439 |
|
No options |
440 |
|
First char = 'f' |
441 |
|
foo |
442 |
|
0: foo |
443 |
|
catfoo |
444 |
|
0: foo |
445 |
|
*** Failers |
446 |
|
No match |
447 |
|
the barfoo |
448 |
|
No match |
449 |
|
and cattlefoo |
450 |
|
No match |
451 |
|
|
452 |
|
/(?<=a+)b/ |
453 |
|
Failed: lookbehind assertion is not fixed length at offset 6 |
454 |
|
|
455 |
|
/(?<=aaa|b{0,3})b/ |
456 |
|
Failed: lookbehind assertion is not fixed length at offset 14 |
457 |
|
|
458 |
|
/(?<!(foo)a\1)bar/ |
459 |
|
Failed: lookbehind assertion is not fixed length at offset 12 |
460 |
|
|
461 |
|
/(?i)abc/ |
462 |
|
Identifying subpattern count = 0 |
463 |
|
Options: caseless |
464 |
|
First char = 'a' |
465 |
|
|
466 |
|
/(a|(?m)a)/ |
467 |
|
Identifying subpattern count = 1 |
468 |
|
No options |
469 |
|
First char = 'a' |
470 |
|
|
471 |
|
/(?i)^1234/ |
472 |
|
Identifying subpattern count = 0 |
473 |
|
Options: anchored caseless |
474 |
|
No first char |
475 |
|
|
476 |
|
/(^b|(?i)^d)/ |
477 |
|
Identifying subpattern count = 1 |
478 |
|
Options: anchored |
479 |
|
No first char |
480 |
|
|
481 |
|
/(?s).*/ |
482 |
|
Identifying subpattern count = 0 |
483 |
|
Options: anchored dotall |
484 |
|
No first char |
485 |
|
|
486 |
|
/[abcd]/S |
487 |
|
Identifying subpattern count = 0 |
488 |
|
No options |
489 |
|
No first char |
490 |
|
Starting character set: a b c d |
491 |
|
|
492 |
|
/(?i)[abcd]/S |
493 |
|
Identifying subpattern count = 0 |
494 |
|
Options: caseless |
495 |
|
No first char |
496 |
|
Starting character set: A B C D a b c d |
497 |
|
|
498 |
|
/(?m)[xy]|(b|c)/S |
499 |
|
Identifying subpattern count = 1 |
500 |
|
Options: multiline |
501 |
|
No first char |
502 |
|
Starting character set: b c x y |
503 |
|
|
504 |
|
/(^a|^b)/m |
505 |
|
Identifying subpattern count = 1 |
506 |
|
Options: multiline |
507 |
|
First char at start or follows \n |
508 |
|
|
509 |
|
/(?i)(^a|^b)/m |
510 |
|
Identifying subpattern count = 1 |
511 |
|
Options: caseless multiline |
512 |
|
First char at start or follows \n |
513 |
|
|
514 |
|
/(a)(?(1)a|b|c)/ |
515 |
|
Failed: conditional group contains more than two branches at offset 13 |
516 |
|
|
517 |
|
/(?(?=a)a|b|c)/ |
518 |
|
Failed: conditional group contains more than two branches at offset 12 |
519 |
|
|
520 |
|
/(?(1a)/ |
521 |
|
Failed: malformed number after (?( at offset 4 |
522 |
|
|
523 |
|
/(?(?i))/ |
524 |
|
Failed: assertion expected after (?( at offset 3 |
525 |
|
|
526 |
|
/(?(abc))/ |
527 |
|
Failed: assertion expected after (?( at offset 3 |
528 |
|
|
529 |
|
/(?(?<ab))/ |
530 |
|
Failed: unrecognized character after (?< at offset 2 |
531 |
|
|
532 |
|
/((?s)blah)\s+\1/ |
533 |
|
Identifying subpattern count = 1 |
534 |
|
No options |
535 |
|
First char = 'b' |
536 |
|
|
537 |
|
/((?i)blah)\s+\1/ |
538 |
|
Identifying subpattern count = 1 |
539 |
|
No options |
540 |
|
No first char |
541 |
|
|
542 |
|
/((?i)b)/DS |
543 |
|
------------------------------------------------------------------ |
544 |
|
0 16 Bra 0 |
545 |
|
3 8 Bra 1 |
546 |
|
6 01 Opt |
547 |
|
8 1 b |
548 |
|
11 8 Ket |
549 |
|
14 00 Opt |
550 |
|
16 16 Ket |
551 |
|
19 End |
552 |
|
------------------------------------------------------------------ |
553 |
|
Identifying subpattern count = 1 |
554 |
|
No options |
555 |
|
No first char |
556 |
|
Starting character set: B b |
557 |
|
|
558 |
|
/(a*b|(?i:c*(?-i)d))/S |
559 |
|
Identifying subpattern count = 1 |
560 |
|
No options |
561 |
|
No first char |
562 |
|
Starting character set: C a b c d |
563 |
|
|
564 |
|
/a$/ |
565 |
|
Identifying subpattern count = 0 |
566 |
|
No options |
567 |
|
First char = 'a' |
568 |
|
a |
569 |
|
0: a |
570 |
|
a\n |
571 |
|
0: a |
572 |
|
*** Failers |
573 |
|
No match |
574 |
|
\Za |
575 |
|
No match |
576 |
|
\Za\n |
577 |
|
No match |
578 |
|
|
579 |
|
/a$/m |
580 |
|
Identifying subpattern count = 0 |
581 |
|
Options: multiline |
582 |
|
First char = 'a' |
583 |
|
a |
584 |
|
0: a |
585 |
|
a\n |
586 |
|
0: a |
587 |
|
\Za\n |
588 |
|
0: a |
589 |
|
*** Failers |
590 |
|
No match |
591 |
|
\Za |
592 |
|
No match |
593 |
|
|
594 |
|
/\Aabc/m |
595 |
|
Identifying subpattern count = 0 |
596 |
|
Options: anchored multiline |
597 |
|
No first char |
598 |
|
|
599 |
|
/^abc/m |
600 |
|
Identifying subpattern count = 0 |
601 |
|
Options: multiline |
602 |
|
First char at start or follows \n |
603 |
|
|
604 |
|
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ |
605 |
|
Identifying subpattern count = 5 |
606 |
|
Options: anchored |
607 |
|
No first char |
608 |
|
aaaaabbbbbcccccdef |
609 |
|
0: aaaaabbbbbcccccdef |
610 |
|
1: aaaaabbbbbcccccdef |
611 |
|
2: aaaaa |
612 |
|
3: b |
613 |
|
4: bbbbccccc |
614 |
|
5: def |
615 |
|
|
616 |
|
/(?<=foo)[ab]/S |
617 |
|
Identifying subpattern count = 0 |
618 |
|
No options |
619 |
|
No first char |
620 |
|
Starting character set: a b |
621 |
|
|
622 |
|
/(?<!foo)(alpha|omega)/S |
623 |
|
Identifying subpattern count = 1 |
624 |
|
No options |
625 |
|
No first char |
626 |
|
Starting character set: a o |
627 |
|
|
628 |
|
/(?!alphabet)[ab]/S |
629 |
|
Identifying subpattern count = 0 |
630 |
|
No options |
631 |
|
No first char |
632 |
|
Starting character set: a b |
633 |
|
|
634 |
|
/(?<=foo\n)^bar/m |
635 |
|
Identifying subpattern count = 0 |
636 |
|
Options: multiline |
637 |
|
First char at start or follows \n |
638 |
|
|
639 |
|
/(?>^abc)/m |
640 |
|
Identifying subpattern count = 0 |
641 |
|
Options: multiline |
642 |
|
First char at start or follows \n |
643 |
|
abc |
644 |
|
0: abc |
645 |
|
def\nabc |
646 |
|
0: abc |
647 |
|
*** Failers |
648 |
|
No match |
649 |
|
defabc |
650 |
|
No match |
651 |
|
|
652 |
|
/(?<=ab(c+)d)ef/ |
653 |
|
Failed: lookbehind assertion is not fixed length at offset 11 |
654 |
|
|
655 |
|
/(?<=ab(?<=c+)d)ef/ |
656 |
|
Failed: lookbehind assertion is not fixed length at offset 12 |
657 |
|
|
658 |
|
/(?<=ab(c|de)f)g/ |
659 |
|
Failed: lookbehind assertion is not fixed length at offset 13 |
660 |
|
|
661 |
|
/The next two are in testinput2 because they have variable length branches/ |
662 |
|
Identifying subpattern count = 0 |
663 |
|
No options |
664 |
|
First char = 'T' |
665 |
|
|
666 |
|
/(?<=bullock|donkey)-cart/ |
667 |
|
Identifying subpattern count = 0 |
668 |
|
No options |
669 |
|
First char = '-' |
670 |
|
the bullock-cart |
671 |
|
0: -cart |
672 |
|
a donkey-cart race |
673 |
|
0: -cart |
674 |
|
*** Failers |
675 |
|
No match |
676 |
|
cart |
677 |
|
No match |
678 |
|
horse-and-cart |
679 |
|
No match |
680 |
|
|
681 |
|
/(?<=ab(?i)x|y|z)/ |
682 |
|
Identifying subpattern count = 0 |
683 |
|
No options |
684 |
|
No first char |
685 |
|
|
686 |
|
/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/ |
687 |
|
Identifying subpattern count = 0 |
688 |
|
No options |
689 |
|
First char = 'Z' |
690 |
|
abxyZZ |
691 |
|
0: ZZ |
692 |
|
abXyZZ |
693 |
|
0: ZZ |
694 |
|
ZZZ |
695 |
|
0: ZZ |
696 |
|
zZZ |
697 |
|
0: ZZ |
698 |
|
bZZ |
699 |
|
0: ZZ |
700 |
|
BZZ |
701 |
|
0: ZZ |
702 |
|
*** Failers |
703 |
|
No match |
704 |
|
ZZ |
705 |
|
No match |
706 |
|
abXYZZ |
707 |
|
No match |
708 |
|
zzz |
709 |
|
No match |
710 |
|
bzz |
711 |
|
No match |
712 |
|
|
713 |
|
/(?<!(foo)a)bar/ |
714 |
|
Identifying subpattern count = 1 |
715 |
|
No options |
716 |
|
First char = 'b' |
717 |
|
bar |
718 |
|
0: bar |
719 |
|
foobbar |
720 |
|
0: bar |
721 |
|
*** Failers |
722 |
|
No match |
723 |
|
fooabar |
724 |
|
No match |
725 |
|
|
726 |
|
/This one is here because Perl 5.005_02 doesn't fail it/ |
727 |
|
Identifying subpattern count = 0 |
728 |
|
No options |
729 |
|
First char = 'T' |
730 |
|
|
731 |
|
/^(a)?(?(1)a|b)+$/ |
732 |
|
Identifying subpattern count = 1 |
733 |
|
Options: anchored |
734 |
|
No first char |
735 |
|
*** Failers |
736 |
|
No match |
737 |
|
a |
738 |
|
No match |
739 |
|
|
740 |
|
/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/ |
741 |
|
Identifying subpattern count = 0 |
742 |
|
No options |
743 |
|
First char = 'T' |
744 |
|
|
745 |
|
/^(a\1?){4}$/ |
746 |
|
Identifying subpattern count = 1 |
747 |
|
Options: anchored |
748 |
|
No first char |
749 |
|
aaaaaa |
750 |
|
0: aaaaaa |
751 |
|
1: aa |
752 |
|
|
753 |
|
/These are syntax tests from Perl 5.005/ |
754 |
|
Identifying subpattern count = 0 |
755 |
|
No options |
756 |
|
First char = 'T' |
757 |
|
|
758 |
|
/a[b-a]/ |
759 |
|
Failed: range out of order in character class at offset 4 |
760 |
|
|
761 |
|
/a[]b/ |
762 |
|
Failed: missing terminating ] for character class at offset 4 |
763 |
|
|
764 |
|
/a[/ |
765 |
|
Failed: missing terminating ] for character class at offset 2 |
766 |
|
|
767 |
|
/*a/ |
768 |
|
Failed: nothing to repeat at offset 0 |
769 |
|
|
770 |
|
/(*)b/ |
771 |
|
Failed: nothing to repeat at offset 1 |
772 |
|
|
773 |
|
/a\/ |
774 |
|
Failed: \ at end of pattern at offset 2 |
775 |
|
|
776 |
|
/abc)/ |
777 |
|
Failed: unmatched parentheses at offset 3 |
778 |
|
|
779 |
|
/(abc/ |
780 |
|
Failed: missing ) at offset 4 |
781 |
|
|
782 |
|
/a**/ |
783 |
|
Failed: nothing to repeat at offset 2 |
784 |
|
|
785 |
|
/)(/ |
786 |
|
Failed: unmatched parentheses at offset 0 |
787 |
|
|
788 |
|
/\1/ |
789 |
|
Failed: back reference to non-existent subpattern at offset 2 |
790 |
|
|
791 |
|
/\2/ |
792 |
|
Failed: back reference to non-existent subpattern at offset 2 |
793 |
|
|
794 |
|
/(a)|\2/ |
795 |
|
Failed: back reference to non-existent subpattern at offset 6 |
796 |
|
|
797 |
|
/a[b-a]/i |
798 |
|
Failed: range out of order in character class at offset 4 |
799 |
|
|
800 |
|
/a[]b/i |
801 |
|
Failed: missing terminating ] for character class at offset 4 |
802 |
|
|
803 |
|
/a[/i |
804 |
|
Failed: missing terminating ] for character class at offset 2 |
805 |
|
|
806 |
|
/*a/i |
807 |
|
Failed: nothing to repeat at offset 0 |
808 |
|
|
809 |
|
/(*)b/i |
810 |
|
Failed: nothing to repeat at offset 1 |
811 |
|
|
812 |
|
/a\/i |
813 |
|
Failed: \ at end of pattern at offset 2 |
814 |
|
|
815 |
|
/abc)/i |
816 |
|
Failed: unmatched parentheses at offset 3 |
817 |
|
|
818 |
|
/(abc/i |
819 |
|
Failed: missing ) at offset 4 |
820 |
|
|
821 |
|
/a**/i |
822 |
|
Failed: nothing to repeat at offset 2 |
823 |
|
|
824 |
|
/)(/i |
825 |
|
Failed: unmatched parentheses at offset 0 |
826 |
|
|
827 |
|
/:(?:/ |
828 |
|
Failed: missing ) at offset 4 |
829 |
|
|
830 |
|
/(?<%)b/ |
831 |
|
Failed: unrecognized character after (?< at offset 0 |
832 |
|
|
833 |
|
/a(?{)b/ |
834 |
|
Failed: unrecognized character after (? at offset 3 |
835 |
|
|
836 |
|
/a(?{{})b/ |
837 |
|
Failed: unrecognized character after (? at offset 3 |
838 |
|
|
839 |
|
/a(?{}})b/ |
840 |
|
Failed: unrecognized character after (? at offset 3 |
841 |
|
|
842 |
|
/a(?{"{"})b/ |
843 |
|
Failed: unrecognized character after (? at offset 3 |
844 |
|
|
845 |
|
/a(?{"{"}})b/ |
846 |
|
Failed: unrecognized character after (? at offset 3 |
847 |
|
|
848 |
|
/(?(1?)a|b)/ |
849 |
|
Failed: malformed number after (?( at offset 4 |
850 |
|
|
851 |
|
/(?(1)a|b|c)/ |
852 |
|
Failed: conditional group contains more than two branches at offset 10 |
853 |
|
|
854 |
|
/[a[:xyz:/ |
855 |
|
Failed: missing terminating ] for character class at offset 8 |
856 |
|
|
857 |
|
/(?<=x+)y/ |
858 |
|
Failed: lookbehind assertion is not fixed length at offset 6 |
859 |
|
|
860 |
|
/a{37,17}/ |
861 |
|
Failed: numbers out of order in {} quantifier at offset 7 |
862 |
|
|
863 |
/ End of test input / |
/ End of test input / |
864 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |