1 |
Testing Perl-Compatible Regular Expressions |
Testing Perl-Compatible Regular Expressions |
2 |
PCRE version 1.03 18-Dec-1997 |
PCRE version 1.09 28-Apr-1998 |
3 |
|
|
4 |
/(a)b|/ |
/(a)b|/ |
5 |
Identifying subpattern count = 1 |
Identifying subpattern count = 1 |
85 |
/ab\gdef/X |
/ab\gdef/X |
86 |
Failed: unrecognized character follows \ at offset 3 |
Failed: unrecognized character follows \ at offset 3 |
87 |
|
|
88 |
|
/(?X)ab\gdef/X |
89 |
|
Failed: unrecognized character follows \ at offset 7 |
90 |
|
|
91 |
/x{5,4}/ |
/x{5,4}/ |
92 |
Failed: numbers out of order in {} quantifier at offset 5 |
Failed: numbers out of order in {} quantifier at offset 5 |
93 |
|
|
356 |
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ |
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ |
357 |
No match |
No match |
358 |
|
|
359 |
|
"(?X).*/\Xfoo" |
360 |
|
Identifying subpattern count = 0 |
361 |
|
Options: anchored extra |
362 |
|
No first char |
363 |
|
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ |
364 |
|
No match |
365 |
|
|
366 |
".*/\Xfoo"X |
".*/\Xfoo"X |
367 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
368 |
Options: anchored extra |
Options: anchored extra |
370 |
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
371 |
0: /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 |
372 |
|
|
373 |
|
"(?X).*/\Xfoo" |
374 |
|
Identifying subpattern count = 0 |
375 |
|
Options: anchored extra |
376 |
|
No first char |
377 |
|
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
378 |
|
0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo |
379 |
|
|
380 |
/(\.\d\d[1-9]?)\d+/ |
/(\.\d\d[1-9]?)\d+/ |
381 |
Identifying subpattern count = 1 |
Identifying subpattern count = 1 |
382 |
No options |
No options |
622 |
/a[]b/ |
/a[]b/ |
623 |
Failed: missing terminating ] for character class at offset 4 |
Failed: missing terminating ] for character class at offset 4 |
624 |
|
|
625 |
|
/[^a]/ |
626 |
|
Identifying subpattern count = 0 |
627 |
|
No options |
628 |
|
No first char |
629 |
|
\Iaaaabcd |
630 |
|
0: b |
631 |
|
\IaaAabcd |
632 |
|
0: b |
633 |
|
|
634 |
|
/[^az]/ |
635 |
|
Identifying subpattern count = 0 |
636 |
|
No options |
637 |
|
No first char |
638 |
|
\Iaaaabcd |
639 |
|
0: b |
640 |
|
\IaaAabcd |
641 |
|
0: b |
642 |
|
|
643 |
|
/[^az]/ |
644 |
|
Identifying subpattern count = 0 |
645 |
|
No options |
646 |
|
No first char |
647 |
|
\Izazabcd |
648 |
|
0: b |
649 |
|
\IAaZabcd |
650 |
|
0: b |
651 |
|
|
652 |
|
/[^aeiou ]{3,}/ |
653 |
|
Identifying subpattern count = 0 |
654 |
|
No options |
655 |
|
No first char |
656 |
|
co-processors, and for |
657 |
|
0: -pr |
658 |
|
\Ico-processors, and for |
659 |
|
0: -pr |
660 |
|
|
661 |
|
/((a)*)*/ |
662 |
|
Failed: operand of unlimited repeat could match the empty string at offset 6 |
663 |
|
|
664 |
|
/((a|b|c)*)*/ |
665 |
|
Failed: operand of unlimited repeat could match the empty string at offset 10 |
666 |
|
|
667 |
|
/<.*>/ |
668 |
|
Identifying subpattern count = 0 |
669 |
|
No options |
670 |
|
First char = '<' |
671 |
|
abc<def>ghi<klm>nop |
672 |
|
0: <def>ghi<klm> |
673 |
|
|
674 |
|
/<.*?>/ |
675 |
|
Identifying subpattern count = 0 |
676 |
|
No options |
677 |
|
First char = '<' |
678 |
|
abc<def>ghi<klm>nop |
679 |
|
0: <def> |
680 |
|
|
681 |
|
/<.*>/U |
682 |
|
Identifying subpattern count = 0 |
683 |
|
Options: ungreedy |
684 |
|
First char = '<' |
685 |
|
abc<def>ghi<klm>nop |
686 |
|
0: <def> |
687 |
|
|
688 |
|
/<.*>(?U)/ |
689 |
|
Identifying subpattern count = 0 |
690 |
|
Options: ungreedy |
691 |
|
First char = '<' |
692 |
|
abc<def>ghi<klm>nop |
693 |
|
0: <def> |
694 |
|
|
695 |
|
/<.*?>/U |
696 |
|
Identifying subpattern count = 0 |
697 |
|
Options: ungreedy |
698 |
|
First char = '<' |
699 |
|
abc<def>ghi<klm>nop |
700 |
|
0: <def>ghi<klm> |
701 |
|
|
702 |
|
/={3,}/U |
703 |
|
Identifying subpattern count = 0 |
704 |
|
Options: ungreedy |
705 |
|
First char = '=' |
706 |
|
abc========def |
707 |
|
0: === |
708 |
|
|
709 |
|
/(?U)={3,}?/ |
710 |
|
Identifying subpattern count = 0 |
711 |
|
Options: ungreedy |
712 |
|
First char = '=' |
713 |
|
abc========def |
714 |
|
0: ======== |
715 |
|
|
716 |
/ End of test input / |
/ End of test input / |
717 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
718 |
No options |
No options |