1 |
Testing Perl-Compatible Regular Expressions |
PCRE version 2.04 19-Feb-1999 |
|
PCRE version 1.05 23-Dec-1997 |
|
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 |
69 |
No match |
No match |
70 |
|
|
|
/abc\/ |
|
|
Failed: \ at end of pattern at offset 4 |
|
|
|
|
71 |
/ab\gdef/X |
/ab\gdef/X |
72 |
Failed: unrecognized character follows \ at offset 3 |
Failed: unrecognized character follows \ at offset 3 |
73 |
|
|
74 |
|
/(?X)ab\gdef/X |
75 |
|
Failed: unrecognized character follows \ at offset 7 |
76 |
|
|
77 |
/x{5,4}/ |
/x{5,4}/ |
78 |
Failed: numbers out of order in {} quantifier at offset 5 |
Failed: numbers out of order in {} quantifier at offset 5 |
79 |
|
|
143 |
this sentences rambles on and on for a while to elephant ElePhant |
this sentences rambles on and on for a while to elephant ElePhant |
144 |
0: elephant |
0: elephant |
145 |
|
|
|
/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 |
|
|
|
|
146 |
/a|[bcd]/S |
/a|[bcd]/S |
147 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
148 |
No options |
No options |
175 |
Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b |
Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b |
176 |
|
|
177 |
/(ab\2)/ |
/(ab\2)/ |
178 |
Failed: back reference to non-existent subpattern at offset 4 |
Failed: back reference to non-existent subpattern at offset 6 |
179 |
|
|
180 |
/{4,5}abc/ |
/{4,5}abc/ |
181 |
Failed: nothing to repeat at offset 4 |
Failed: nothing to repeat at offset 4 |
191 |
3: c |
3: c |
192 |
\O0abcb |
\O0abcb |
193 |
Matched, but too many substrings |
Matched, but too many substrings |
194 |
\O2abcb |
\O3abcb |
195 |
Matched, but too many substrings |
Matched, but too many substrings |
196 |
0: abcb |
0: abcb |
197 |
\O4abcb |
\O6abcb |
198 |
Matched, but too many substrings |
Matched, but too many substrings |
199 |
0: abcb |
0: abcb |
200 |
1: a |
1: a |
201 |
\O6abcb |
\O9abcb |
202 |
Matched, but too many substrings |
Matched, but too many substrings |
203 |
0: abcb |
0: abcb |
204 |
1: a |
1: a |
205 |
2: b |
2: b |
206 |
\O8abcb |
\O12abcb |
207 |
0: abcb |
0: abcb |
208 |
1: a |
1: a |
209 |
2: b |
2: b |
218 |
1: a |
1: a |
219 |
\O0abc |
\O0abc |
220 |
Matched, but too many substrings |
Matched, but too many substrings |
221 |
\O2abc |
\O3abc |
222 |
Matched, but too many substrings |
Matched, but too many substrings |
223 |
0: abc |
0: abc |
224 |
\O4abc |
\O6abc |
225 |
0: abc |
0: abc |
226 |
1: a |
1: a |
227 |
aba |
aba |
231 |
3: b |
3: b |
232 |
\O0aba |
\O0aba |
233 |
Matched, but too many substrings |
Matched, but too many substrings |
234 |
\O2aba |
\O3aba |
235 |
Matched, but too many substrings |
Matched, but too many substrings |
236 |
0: aba |
0: aba |
237 |
\O4aba |
\O6aba |
238 |
Matched, but too many substrings |
Matched, but too many substrings |
239 |
0: aba |
0: aba |
240 |
1: <unset> |
1: <unset> |
241 |
\O6aba |
\O9aba |
242 |
Matched, but too many substrings |
Matched, but too many substrings |
243 |
0: aba |
0: aba |
244 |
1: <unset> |
1: <unset> |
245 |
2: a |
2: a |
246 |
\O8aba |
\O12aba |
247 |
0: aba |
0: aba |
248 |
1: <unset> |
1: <unset> |
249 |
2: a |
2: a |
250 |
3: b |
3: b |
251 |
|
|
|
/^a.b/ |
|
|
Identifying subpattern count = 0 |
|
|
Options: anchored |
|
|
No first char |
|
|
\Sa\nb |
|
|
0: a\x0ab |
|
|
|
|
252 |
/abc$/E |
/abc$/E |
253 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
254 |
Options: dollar_endonly |
Options: dollar_endonly |
262 |
abc\ndef |
abc\ndef |
263 |
No match |
No match |
264 |
|
|
|
/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 |
|
|
|
|
265 |
/(a)(b)(c)(d)(e)\6/ |
/(a)(b)(c)(d)(e)\6/ |
266 |
Failed: back reference to non-existent subpattern at offset 16 |
Failed: back reference to non-existent subpattern at offset 17 |
267 |
|
|
268 |
/the quick brown fox/ |
/the quick brown fox/ |
269 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
288 |
/ab(?z)cd/ |
/ab(?z)cd/ |
289 |
Failed: unrecognized character after (? at offset 4 |
Failed: unrecognized character after (? at offset 4 |
290 |
|
|
|
".*/\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 |
|
|
|
|
|
".*/\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 |
|
|
|
|
|
/(\.\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 |
|
|
|
|
291 |
/^abc|def/ |
/^abc|def/ |
292 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
293 |
No options |
No options |
359 |
abc\n |
abc\n |
360 |
0: abc |
0: abc |
361 |
|
|
|
/abc\/P |
|
|
Failed: POSIX code 9: bad escape sequence at offset 4 |
|
|
|
|
362 |
/(abc)\2/P |
/(abc)\2/P |
363 |
Failed: POSIX code 15: bad back reference at offset 6 |
Failed: POSIX code 15: bad back reference at offset 7 |
364 |
|
|
365 |
/(abc\1)/P |
/(abc\1)/P |
366 |
abc |
abc |
367 |
No match: POSIX code 15: bad back reference |
No match: POSIX code 17: match failed |
368 |
|
|
369 |
|
/)/ |
370 |
|
Failed: unmatched parentheses at offset 0 |
371 |
|
|
372 |
|
/a[]b/ |
373 |
|
Failed: missing terminating ] for character class at offset 4 |
374 |
|
|
375 |
"(?>.*/)foo"X |
/[^aeiou ]{3,}/ |
376 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
377 |
Options: anchored extra |
No options |
378 |
No first char |
No first char |
379 |
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ |
co-processors, and for |
380 |
|
0: -pr |
381 |
|
|
382 |
|
/<.*>/ |
383 |
|
Identifying subpattern count = 0 |
384 |
|
No options |
385 |
|
First char = '<' |
386 |
|
abc<def>ghi<klm>nop |
387 |
|
0: <def>ghi<klm> |
388 |
|
|
389 |
|
/<.*?>/ |
390 |
|
Identifying subpattern count = 0 |
391 |
|
No options |
392 |
|
First char = '<' |
393 |
|
abc<def>ghi<klm>nop |
394 |
|
0: <def> |
395 |
|
|
396 |
|
/<.*>/U |
397 |
|
Identifying subpattern count = 0 |
398 |
|
Options: ungreedy |
399 |
|
First char = '<' |
400 |
|
abc<def>ghi<klm>nop |
401 |
|
0: <def> |
402 |
|
|
403 |
|
/<.*>(?U)/ |
404 |
|
Identifying subpattern count = 0 |
405 |
|
Options: ungreedy |
406 |
|
First char = '<' |
407 |
|
abc<def>ghi<klm>nop |
408 |
|
0: <def> |
409 |
|
|
410 |
|
/<.*?>/U |
411 |
|
Identifying subpattern count = 0 |
412 |
|
Options: ungreedy |
413 |
|
First char = '<' |
414 |
|
abc<def>ghi<klm>nop |
415 |
|
0: <def>ghi<klm> |
416 |
|
|
417 |
|
/={3,}/U |
418 |
|
Identifying subpattern count = 0 |
419 |
|
Options: ungreedy |
420 |
|
First char = '=' |
421 |
|
abc========def |
422 |
|
0: === |
423 |
|
|
424 |
|
/(?U)={3,}?/ |
425 |
|
Identifying subpattern count = 0 |
426 |
|
Options: ungreedy |
427 |
|
First char = '=' |
428 |
|
abc========def |
429 |
|
0: ======== |
430 |
|
|
431 |
|
/(?<!bar|cattle)foo/ |
432 |
|
Identifying subpattern count = 0 |
433 |
|
No options |
434 |
|
First char = 'f' |
435 |
|
foo |
436 |
|
0: foo |
437 |
|
catfoo |
438 |
|
0: foo |
439 |
|
*** Failers |
440 |
|
No match |
441 |
|
the barfoo |
442 |
No match |
No match |
443 |
|
and cattlefoo |
444 |
|
No match |
445 |
|
|
446 |
|
/(?<=a+)b/ |
447 |
|
Failed: lookbehind assertion is not fixed length at offset 6 |
448 |
|
|
449 |
|
/(?<=aaa|b{0,3})b/ |
450 |
|
Failed: lookbehind assertion is not fixed length at offset 14 |
451 |
|
|
452 |
|
/(?<!(foo)a\1)bar/ |
453 |
|
Failed: lookbehind assertion is not fixed length at offset 12 |
454 |
|
|
455 |
|
/(?i)abc/ |
456 |
|
Identifying subpattern count = 0 |
457 |
|
Options: caseless |
458 |
|
First char = 'a' |
459 |
|
|
460 |
|
/(a|(?m)a)/ |
461 |
|
Identifying subpattern count = 1 |
462 |
|
No options |
463 |
|
First char = 'a' |
464 |
|
|
465 |
"(?>.*/)foo"X |
/(?i)^1234/ |
466 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
467 |
Options: anchored extra |
Options: anchored caseless |
468 |
No first char |
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 |
|
469 |
|
|
470 |
/(?>(\.\d\d[1-9]?))\d+/X |
/(^b|(?i)^d)/ |
471 |
Identifying subpattern count = 1 |
Identifying subpattern count = 1 |
472 |
Options: extra |
Options: anchored |
473 |
No first char |
No first char |
474 |
1.230003938 |
|
475 |
0: .230003938 |
/(?s).*/ |
476 |
1: .23 |
Identifying subpattern count = 0 |
477 |
1.875000282 |
Options: anchored dotall |
478 |
0: .875000282 |
No first char |
479 |
1: .875 |
|
480 |
|
/[abcd]/S |
481 |
|
Identifying subpattern count = 0 |
482 |
|
No options |
483 |
|
No first char |
484 |
|
Starting character set: a b c d |
485 |
|
|
486 |
|
/(?i)[abcd]/S |
487 |
|
Identifying subpattern count = 0 |
488 |
|
Options: caseless |
489 |
|
No first char |
490 |
|
Starting character set: A B C D a b c d |
491 |
|
|
492 |
|
/(?m)[xy]|(b|c)/S |
493 |
|
Identifying subpattern count = 1 |
494 |
|
Options: multiline |
495 |
|
No first char |
496 |
|
Starting character set: b c x y |
497 |
|
|
498 |
|
/(^a|^b)/m |
499 |
|
Identifying subpattern count = 1 |
500 |
|
Options: multiline |
501 |
|
First char at start or follows \n |
502 |
|
|
503 |
|
/(?i)(^a|^b)/m |
504 |
|
Identifying subpattern count = 1 |
505 |
|
Options: caseless multiline |
506 |
|
First char at start or follows \n |
507 |
|
|
508 |
|
/(a)(?(1)a|b|c)/ |
509 |
|
Failed: conditional group contains more than two branches at offset 13 |
510 |
|
|
511 |
|
/(?(?=a)a|b|c)/ |
512 |
|
Failed: conditional group contains more than two branches at offset 12 |
513 |
|
|
514 |
|
/(?(1a)/ |
515 |
|
Failed: malformed number after (?( at offset 4 |
516 |
|
|
517 |
|
/(?(?i))/ |
518 |
|
Failed: assertion expected after (?( at offset 3 |
519 |
|
|
520 |
|
/(?(abc))/ |
521 |
|
Failed: assertion expected after (?( at offset 3 |
522 |
|
|
523 |
|
/(?(?<ab))/ |
524 |
|
Failed: unrecognized character after (?< at offset 2 |
525 |
|
|
526 |
|
/((?s)blah)\s+\1/ |
527 |
|
Identifying subpattern count = 1 |
528 |
|
No options |
529 |
|
First char = 'b' |
530 |
|
|
531 |
|
/((?i)blah)\s+\1/ |
532 |
|
Identifying subpattern count = 1 |
533 |
|
No options |
534 |
|
No first char |
535 |
|
|
536 |
|
/((?i)b)/DS |
537 |
|
------------------------------------------------------------------ |
538 |
|
0 16 Bra 0 |
539 |
|
3 8 Bra 1 |
540 |
|
6 01 Opt |
541 |
|
8 1 b |
542 |
|
11 8 Ket |
543 |
|
14 00 Opt |
544 |
|
16 16 Ket |
545 |
|
19 End |
546 |
|
------------------------------------------------------------------ |
547 |
|
Identifying subpattern count = 1 |
548 |
|
No options |
549 |
|
No first char |
550 |
|
Starting character set: B b |
551 |
|
|
552 |
|
/(a*b|(?i:c*(?-i)d))/S |
553 |
|
Identifying subpattern count = 1 |
554 |
|
No options |
555 |
|
No first char |
556 |
|
Starting character set: C a b c d |
557 |
|
|
558 |
|
/a$/ |
559 |
|
Identifying subpattern count = 0 |
560 |
|
No options |
561 |
|
First char = 'a' |
562 |
|
a |
563 |
|
0: a |
564 |
|
a\n |
565 |
|
0: a |
566 |
|
*** Failers |
567 |
|
No match |
568 |
|
\Za |
569 |
|
No match |
570 |
|
\Za\n |
571 |
|
No match |
572 |
|
|
573 |
|
/a$/m |
574 |
|
Identifying subpattern count = 0 |
575 |
|
Options: multiline |
576 |
|
First char = 'a' |
577 |
|
a |
578 |
|
0: a |
579 |
|
a\n |
580 |
|
0: a |
581 |
|
\Za\n |
582 |
|
0: a |
583 |
*** Failers |
*** Failers |
584 |
No match |
No match |
585 |
1.235 |
\Za |
586 |
No match |
No match |
587 |
|
|
588 |
|
/\Aabc/m |
589 |
|
Identifying subpattern count = 0 |
590 |
|
Options: anchored multiline |
591 |
|
No first char |
592 |
|
|
593 |
|
/^abc/m |
594 |
|
Identifying subpattern count = 0 |
595 |
|
Options: multiline |
596 |
|
First char at start or follows \n |
597 |
|
|
598 |
|
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ |
599 |
|
Identifying subpattern count = 5 |
600 |
|
Options: anchored |
601 |
|
No first char |
602 |
|
aaaaabbbbbcccccdef |
603 |
|
0: aaaaabbbbbcccccdef |
604 |
|
1: aaaaabbbbbcccccdef |
605 |
|
2: aaaaa |
606 |
|
3: b |
607 |
|
4: bbbbccccc |
608 |
|
5: def |
609 |
|
|
610 |
|
/(?<=foo)[ab]/S |
611 |
|
Identifying subpattern count = 0 |
612 |
|
No options |
613 |
|
No first char |
614 |
|
Starting character set: a b |
615 |
|
|
616 |
/^((?>\w+)|(?>\s+))*$/X |
/(?<!foo)(alpha|omega)/S |
617 |
Identifying subpattern count = 1 |
Identifying subpattern count = 1 |
618 |
Options: anchored extra |
No options |
619 |
|
No first char |
620 |
|
Starting character set: a o |
621 |
|
|
622 |
|
/(?!alphabet)[ab]/S |
623 |
|
Identifying subpattern count = 0 |
624 |
|
No options |
625 |
No first char |
No first char |
626 |
now is the time for all good men to come to the aid of the party |
Starting character set: a b |
627 |
0: now is the time for all good men to come to the aid of the party |
|
628 |
1: party |
/(?<=foo\n)^bar/m |
629 |
|
Identifying subpattern count = 0 |
630 |
|
Options: multiline |
631 |
|
First char at start or follows \n |
632 |
|
|
633 |
|
/(?>^abc)/m |
634 |
|
Identifying subpattern count = 0 |
635 |
|
Options: multiline |
636 |
|
First char at start or follows \n |
637 |
|
abc |
638 |
|
0: abc |
639 |
|
def\nabc |
640 |
|
0: abc |
641 |
*** Failers |
*** Failers |
642 |
No match |
No match |
643 |
this is not a line with only words and spaces! |
defabc |
644 |
No match |
No match |
645 |
|
|
646 |
/(\d+)(\w)/X |
/(?<=ab(c+)d)ef/ |
647 |
Identifying subpattern count = 2 |
Failed: lookbehind assertion is not fixed length at offset 11 |
648 |
Options: extra |
|
649 |
|
/(?<=ab(?<=c+)d)ef/ |
650 |
|
Failed: lookbehind assertion is not fixed length at offset 12 |
651 |
|
|
652 |
|
/(?<=ab(c|de)f)g/ |
653 |
|
Failed: lookbehind assertion is not fixed length at offset 13 |
654 |
|
|
655 |
|
/The next three are in testinput2 because they have variable length branches/ |
656 |
|
Identifying subpattern count = 0 |
657 |
|
No options |
658 |
|
First char = 'T' |
659 |
|
|
660 |
|
/(?<=bullock|donkey)-cart/ |
661 |
|
Identifying subpattern count = 0 |
662 |
|
No options |
663 |
|
First char = '-' |
664 |
|
the bullock-cart |
665 |
|
0: -cart |
666 |
|
a donkey-cart race |
667 |
|
0: -cart |
668 |
|
*** Failers |
669 |
|
No match |
670 |
|
cart |
671 |
|
No match |
672 |
|
horse-and-cart |
673 |
|
No match |
674 |
|
|
675 |
|
/(?<=ab(?i)x|y|z)/ |
676 |
|
Identifying subpattern count = 0 |
677 |
|
No options |
678 |
No first char |
No first char |
|
12345a |
|
|
0: 12345a |
|
|
1: 12345 |
|
|
2: a |
|
|
12345+ |
|
|
0: 12345 |
|
|
1: 1234 |
|
|
2: 5 |
|
679 |
|
|
680 |
/((?>\d+))(\w)/X |
/(?>.*)(?<=(abcd)|(xyz))/ |
681 |
Identifying subpattern count = 2 |
Identifying subpattern count = 2 |
682 |
Options: extra |
Options: anchored |
683 |
|
No first char |
684 |
|
alphabetabcd |
685 |
|
0: alphabetabcd |
686 |
|
1: abcd |
687 |
|
endingxyz |
688 |
|
0: endingxyz |
689 |
|
1: <unset> |
690 |
|
2: xyz |
691 |
|
|
692 |
|
/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/ |
693 |
|
Identifying subpattern count = 0 |
694 |
|
No options |
695 |
|
First char = 'Z' |
696 |
|
abxyZZ |
697 |
|
0: ZZ |
698 |
|
abXyZZ |
699 |
|
0: ZZ |
700 |
|
ZZZ |
701 |
|
0: ZZ |
702 |
|
zZZ |
703 |
|
0: ZZ |
704 |
|
bZZ |
705 |
|
0: ZZ |
706 |
|
BZZ |
707 |
|
0: ZZ |
708 |
|
*** Failers |
709 |
|
No match |
710 |
|
ZZ |
711 |
|
No match |
712 |
|
abXYZZ |
713 |
|
No match |
714 |
|
zzz |
715 |
|
No match |
716 |
|
bzz |
717 |
|
No match |
718 |
|
|
719 |
|
/(?<!(foo)a)bar/ |
720 |
|
Identifying subpattern count = 1 |
721 |
|
No options |
722 |
|
First char = 'b' |
723 |
|
bar |
724 |
|
0: bar |
725 |
|
foobbar |
726 |
|
0: bar |
727 |
|
*** Failers |
728 |
|
No match |
729 |
|
fooabar |
730 |
|
No match |
731 |
|
|
732 |
|
/This one is here because Perl 5.005_02 doesn't fail it/ |
733 |
|
Identifying subpattern count = 0 |
734 |
|
No options |
735 |
|
First char = 'T' |
736 |
|
|
737 |
|
/^(a)?(?(1)a|b)+$/ |
738 |
|
Identifying subpattern count = 1 |
739 |
|
Options: anchored |
740 |
No first char |
No first char |
|
12345a |
|
|
0: 12345a |
|
|
1: 12345 |
|
|
2: a |
|
741 |
*** Failers |
*** Failers |
742 |
No match |
No match |
743 |
12345+ |
a |
744 |
No match |
No match |
745 |
|
|
746 |
/([a]*)*/ |
/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/ |
747 |
Failed: operand of unlimited repeat could match the empty string at offset 6 |
Identifying subpattern count = 0 |
748 |
|
No options |
749 |
|
First char = 'T' |
750 |
|
|
751 |
|
/^(a\1?){4}$/ |
752 |
|
Identifying subpattern count = 1 |
753 |
|
Options: anchored |
754 |
|
No first char |
755 |
|
aaaaaa |
756 |
|
0: aaaaaa |
757 |
|
1: aa |
758 |
|
|
759 |
|
/These are syntax tests from Perl 5.005/ |
760 |
|
Identifying subpattern count = 0 |
761 |
|
No options |
762 |
|
First char = 'T' |
763 |
|
|
764 |
/([ab]*)*/ |
/a[b-a]/ |
765 |
Failed: operand of unlimited repeat could match the empty string at offset 7 |
Failed: range out of order in character class at offset 4 |
766 |
|
|
767 |
/([^a]*)*/ |
/a[]b/ |
768 |
Failed: operand of unlimited repeat could match the empty string at offset 7 |
Failed: missing terminating ] for character class at offset 4 |
769 |
|
|
770 |
/([^ab]*)*/ |
/a[/ |
771 |
Failed: operand of unlimited repeat could match the empty string at offset 8 |
Failed: missing terminating ] for character class at offset 2 |
772 |
|
|
773 |
/([a]*?)*/ |
/*a/ |
774 |
Failed: operand of unlimited repeat could match the empty string at offset 7 |
Failed: nothing to repeat at offset 0 |
775 |
|
|
776 |
/([ab]*?)*/ |
/(*)b/ |
777 |
Failed: operand of unlimited repeat could match the empty string at offset 8 |
Failed: nothing to repeat at offset 1 |
778 |
|
|
779 |
/([^a]*?)*/ |
/abc)/ |
780 |
Failed: operand of unlimited repeat could match the empty string at offset 8 |
Failed: unmatched parentheses at offset 3 |
781 |
|
|
782 |
/([^ab]*?)*/ |
/(abc/ |
783 |
Failed: operand of unlimited repeat could match the empty string at offset 9 |
Failed: missing ) at offset 4 |
784 |
|
|
785 |
/(?>a*)*/X |
/a**/ |
786 |
Failed: nothing to repeat at offset 6 |
Failed: nothing to repeat at offset 2 |
787 |
|
|
788 |
/((?>a*))*/X |
/)(/ |
789 |
Failed: operand of unlimited repeat could match the empty string at offset 8 |
Failed: unmatched parentheses at offset 0 |
790 |
|
|
791 |
/((?>a*?))*/X |
/\1/ |
792 |
Failed: operand of unlimited repeat could match the empty string at offset 9 |
Failed: back reference to non-existent subpattern at offset 2 |
793 |
|
|
794 |
/)/ |
/\2/ |
795 |
Failed: unmatched brackets at offset 0 |
Failed: back reference to non-existent subpattern at offset 2 |
796 |
|
|
797 |
/a[]b/ |
/(a)|\2/ |
798 |
|
Failed: back reference to non-existent subpattern at offset 6 |
799 |
|
|
800 |
|
/a[b-a]/i |
801 |
|
Failed: range out of order in character class at offset 4 |
802 |
|
|
803 |
|
/a[]b/i |
804 |
Failed: missing terminating ] for character class at offset 4 |
Failed: missing terminating ] for character class at offset 4 |
805 |
|
|
806 |
/[^a]/ |
/a[/i |
807 |
Identifying subpattern count = 0 |
Failed: missing terminating ] for character class at offset 2 |
808 |
|
|
809 |
|
/*a/i |
810 |
|
Failed: nothing to repeat at offset 0 |
811 |
|
|
812 |
|
/(*)b/i |
813 |
|
Failed: nothing to repeat at offset 1 |
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 |
|
/abc/\ |
864 |
|
Failed: \ at end of pattern at offset 4 |
865 |
|
|
866 |
|
/abc/\P |
867 |
|
Failed: POSIX code 9: bad escape sequence at offset 4 |
868 |
|
|
869 |
|
/abc/\i |
870 |
|
Failed: \ at end of pattern at offset 4 |
871 |
|
|
872 |
|
/(a)bc(d)/ |
873 |
|
Identifying subpattern count = 2 |
874 |
|
No options |
875 |
|
First char = 'a' |
876 |
|
abcd |
877 |
|
0: abcd |
878 |
|
1: a |
879 |
|
2: d |
880 |
|
abcd\C2 |
881 |
|
0: abcd |
882 |
|
1: a |
883 |
|
2: d |
884 |
|
2C d (1) |
885 |
|
abcd\C5 |
886 |
|
0: abcd |
887 |
|
1: a |
888 |
|
2: d |
889 |
|
copy substring 5 failed -7 |
890 |
|
|
891 |
|
/(.{20})/ |
892 |
|
Identifying subpattern count = 1 |
893 |
No options |
No options |
894 |
No first char |
No first char |
895 |
\Iaaaabcd |
abcdefghijklmnopqrstuvwxyz |
896 |
0: b |
0: abcdefghijklmnopqrst |
897 |
\IaaAabcd |
1: abcdefghijklmnopqrst |
898 |
0: b |
abcdefghijklmnopqrstuvwxyz\C1 |
899 |
|
0: abcdefghijklmnopqrst |
900 |
/[^az]/ |
1: abcdefghijklmnopqrst |
901 |
Identifying subpattern count = 0 |
copy substring 1 failed -6 |
902 |
|
abcdefghijklmnopqrstuvwxyz\G1 |
903 |
|
0: abcdefghijklmnopqrst |
904 |
|
1: abcdefghijklmnopqrst |
905 |
|
1G abcdefghijklmnopqrst (20) |
906 |
|
|
907 |
|
/(.{15})/ |
908 |
|
Identifying subpattern count = 1 |
909 |
No options |
No options |
910 |
No first char |
No first char |
911 |
\Iaaaabcd |
abcdefghijklmnopqrstuvwxyz |
912 |
0: b |
0: abcdefghijklmno |
913 |
\IaaAabcd |
1: abcdefghijklmno |
914 |
0: b |
abcdefghijklmnopqrstuvwxyz\C1\G1 |
915 |
|
0: abcdefghijklmno |
916 |
|
1: abcdefghijklmno |
917 |
|
1C abcdefghijklmno (15) |
918 |
|
1G abcdefghijklmno (15) |
919 |
|
|
920 |
/[^az]/ |
/(.{16})/ |
921 |
Identifying subpattern count = 0 |
Identifying subpattern count = 1 |
922 |
No options |
No options |
923 |
No first char |
No first char |
924 |
\Izazabcd |
abcdefghijklmnopqrstuvwxyz |
925 |
0: b |
0: abcdefghijklmnop |
926 |
\IAaZabcd |
1: abcdefghijklmnop |
927 |
0: b |
abcdefghijklmnopqrstuvwxyz\C1\G1\L |
928 |
|
0: abcdefghijklmnop |
929 |
|
1: abcdefghijklmnop |
930 |
|
copy substring 1 failed -6 |
931 |
|
1G abcdefghijklmnop (16) |
932 |
|
0L abcdefghijklmnop |
933 |
|
1L abcdefghijklmnop |
934 |
|
|
935 |
/[^aeiou ]{3,}/ |
/^(a|(bc))de(f)/ |
936 |
|
Identifying subpattern count = 3 |
937 |
|
Options: anchored |
938 |
|
No first char |
939 |
|
adef\G1\G2\G3\G4\L |
940 |
|
0: adef |
941 |
|
1: a |
942 |
|
2: <unset> |
943 |
|
3: f |
944 |
|
1G a (1) |
945 |
|
2G (0) |
946 |
|
3G f (1) |
947 |
|
get substring 4 failed -7 |
948 |
|
0L adef |
949 |
|
1L a |
950 |
|
2L |
951 |
|
3L f |
952 |
|
bcdef\G1\G2\G3\G4\L |
953 |
|
0: bcdef |
954 |
|
1: bc |
955 |
|
2: bc |
956 |
|
3: f |
957 |
|
1G bc (2) |
958 |
|
2G bc (2) |
959 |
|
3G f (1) |
960 |
|
get substring 4 failed -7 |
961 |
|
0L bcdef |
962 |
|
1L bc |
963 |
|
2L bc |
964 |
|
3L f |
965 |
|
adefghijk\C0 |
966 |
|
0: adef |
967 |
|
1: a |
968 |
|
2: <unset> |
969 |
|
3: f |
970 |
|
0C adef (4) |
971 |
|
|
972 |
|
/^abc\00def/ |
973 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |
974 |
No options |
Options: anchored |
975 |
No first char |
No first char |
976 |
co-processors, and for |
abc\00def\L\C0 |
977 |
0: -pr |
0: abc\x00def |
978 |
\Ico-processors, and for |
0C abc (7) |
979 |
0: -pr |
0L abc |
980 |
|
|
981 |
|
/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ |
982 |
|
)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ |
983 |
|
)?)?)?)?)?)?)?)?)?otherword/M |
984 |
|
Memory allocation request: 441 (code space 428) |
985 |
|
Identifying subpattern count = 8 |
986 |
|
No options |
987 |
|
First char = 'w' |
988 |
|
|
989 |
/ End of test input / |
/ End of test input / |
990 |
Identifying subpattern count = 0 |
Identifying subpattern count = 0 |