1 /-- This set of tests is for features that are compatible with all versions of
2 Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and
3 16-bit PCRE libraries. --/
8 What do you know about the quick brown fox?
9 What do you know about THE QUICK BROWN FOX?
11 /The quick brown fox/i
14 What do you know about the quick brown fox?
15 What do you know about THE QUICK BROWN FOX?
17 /abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
18 abcd\t\n\r\f\a\e9;\$\\?caxyz
20 /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
21 abxyzpqrrrabbxyyyypqAzz
22 abxyzpqrrrabbxyyyypqAzz
23 aabxyzpqrrrabbxyyyypqAzz
24 aaabxyzpqrrrabbxyyyypqAzz
25 aaaabxyzpqrrrabbxyyyypqAzz
26 abcxyzpqrrrabbxyyyypqAzz
27 aabcxyzpqrrrabbxyyyypqAzz
28 aaabcxyzpqrrrabbxyyyypAzz
29 aaabcxyzpqrrrabbxyyyypqAzz
30 aaabcxyzpqrrrabbxyyyypqqAzz
31 aaabcxyzpqrrrabbxyyyypqqqAzz
32 aaabcxyzpqrrrabbxyyyypqqqqAzz
33 aaabcxyzpqrrrabbxyyyypqqqqqAzz
34 aaabcxyzpqrrrabbxyyyypqqqqqqAzz
35 aaaabcxyzpqrrrabbxyyyypqAzz
36 abxyzzpqrrrabbxyyyypqAzz
37 aabxyzzzpqrrrabbxyyyypqAzz
38 aaabxyzzzzpqrrrabbxyyyypqAzz
39 aaaabxyzzzzpqrrrabbxyyyypqAzz
40 abcxyzzpqrrrabbxyyyypqAzz
41 aabcxyzzzpqrrrabbxyyyypqAzz
42 aaabcxyzzzzpqrrrabbxyyyypqAzz
43 aaaabcxyzzzzpqrrrabbxyyyypqAzz
44 aaaabcxyzzzzpqrrrabbbxyyyypqAzz
45 aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
46 aaabcxyzpqrrrabbxyyyypABzz
47 aaabcxyzpqrrrabbxyyyypABBzz
48 >>>aaabxyzpqrrrabbxyyyypqAzz
49 >aaaabxyzpqrrrabbxyyyypqAzz
50 >>>>abcxyzpqrrrabbxyyyypqAzz
52 abxyzpqrrabbxyyyypqAzz
53 abxyzpqrrrrabbxyyyypqAzz
54 abxyzpqrrrabxyyyypqAzz
55 aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
56 aaaabcxyzzzzpqrrrabbbxyyypqAzz
57 aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
190 /^.+[0-9][0-9][0-9]$/
198 /^.+?[0-9][0-9][0-9]$/
206 /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
207 abc!pqr=apquxz.ixr.zzz.ac.uk
209 !pqr=apquxz.ixr.zzz.ac.uk
210 abc!=apquxz.ixr.zzz.ac.uk
211 abc!pqr=apquxz:ixr.zzz.ac.uk
212 abc!pqr=apquxz.ixr.zzz.ac.ukk
215 Well, we need a colon: somewhere
233 /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
241 /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
242 1 IN SOA non-sp1 non-sp2(
243 1 IN SOA non-sp1 non-sp2 (
245 1IN SOA non-sp1 non-sp2(
247 /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
257 /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
268 /^(?=ab(de))(abd)(e)/
271 /^(?!(ab)de|x)(abd)(f)/
277 /^[\da-f](\.[\da-f])*$/i
293 / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
299 /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
312 /^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
315 /^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
318 /^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
380 /\A(abc|def)=(\1){2,3}\Z/
386 /^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/
390 /(cat(a(ract|tonic)|erpillar)) \1()2(3)/
392 catatonic catatonic23
393 caterpillar caterpillar23
396 /^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
397 From abcd Mon Sep 01 12:33:02 1997
399 /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
400 From abcd Mon Sep 01 12:33:02 1997
401 From abcd Mon Sep 1 12:33:02 1997
403 From abcd Sep 01 12:33:02 1997
410 the quick brown\t fox
413 foobar is foolish see?
415 /(?:(?!foo)...|^.{0,2})bar(.*)/
421 /^(\D*)(?=\d)(?!123)/
426 /^1234(?# test newlines
430 /^1234 #comment in extended re
463 /^[ab]{1,3}?(ab*?|b)/
470 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
471 \) )* # optional leading comment
473 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
474 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
476 " (?: # opening quote...
477 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
479 \\ [^\x80-\xff] # Escaped something (something != CR)
482 (?: (?: [\040\t] | \(
483 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
484 \) )* \. (?: [\040\t] | \(
485 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
487 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
488 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
490 " (?: # opening quote...
491 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
493 \\ [^\x80-\xff] # Escaped something (something != CR)
495 ) )* # further okay, if led by a period
497 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
498 \) )* @ (?: [\040\t] | \(
499 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
501 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
502 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
504 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
506 ) # initial subdomain
509 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
510 \) )* \. # if led by a period...
512 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
514 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
515 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
517 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
524 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
525 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
527 " (?: # opening quote...
528 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
530 \\ [^\x80-\xff] # Escaped something (something != CR)
532 ) # one word, optionally followed by....
534 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
536 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
537 \) | # comments, or...
539 " (?: # opening quote...
540 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
542 \\ [^\x80-\xff] # Escaped something (something != CR)
547 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
549 (?: @ (?: [\040\t] | \(
550 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
552 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
553 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
555 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
557 ) # initial subdomain
560 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
561 \) )* \. # if led by a period...
563 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
565 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
566 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
568 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
573 (?: (?: [\040\t] | \(
574 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
575 \) )* , (?: [\040\t] | \(
576 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
577 \) )* @ (?: [\040\t] | \(
578 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
580 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
581 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
583 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
585 ) # initial subdomain
588 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
589 \) )* \. # if led by a period...
591 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
593 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
594 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
596 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
600 )* # further okay, if led by comma
603 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
604 \) )* )? # optional route
606 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
607 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
609 " (?: # opening quote...
610 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
612 \\ [^\x80-\xff] # Escaped something (something != CR)
615 (?: (?: [\040\t] | \(
616 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
617 \) )* \. (?: [\040\t] | \(
618 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
620 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
621 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
623 " (?: # opening quote...
624 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
626 \\ [^\x80-\xff] # Escaped something (something != CR)
628 ) )* # further okay, if led by a period
630 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
631 \) )* @ (?: [\040\t] | \(
632 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
634 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
635 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
637 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
639 ) # initial subdomain
642 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
643 \) )* \. # if led by a period...
645 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
647 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
648 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
650 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
656 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
660 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
661 \) )* # optional trailing comment
663 Alan Other <user\@dom.ain>
666 \"A. Other\" <user.1234\@dom.ain> (a comment)
667 A. Other <user.1234\@dom.ain> (a comment)
668 \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
669 A missing angle <user\@some.where
673 /[\040\t]* # Nab whitespace.
676 [^\\\x80-\xff\n\015()] * # normal*
678 (?: \\ [^\x80-\xff] |
680 [^\\\x80-\xff\n\015()] * # normal*
681 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
684 [^\\\x80-\xff\n\015()] * # normal*
687 [\040\t]* )* # If comment found, allow more spaces.
688 # optional leading comment
691 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
692 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
696 [^\\\x80-\xff\n\015"] * # normal
697 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
701 [\040\t]* # Nab whitespace.
704 [^\\\x80-\xff\n\015()] * # normal*
706 (?: \\ [^\x80-\xff] |
708 [^\\\x80-\xff\n\015()] * # normal*
709 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
712 [^\\\x80-\xff\n\015()] * # normal*
715 [\040\t]* )* # If comment found, allow more spaces.
718 [\040\t]* # Nab whitespace.
721 [^\\\x80-\xff\n\015()] * # normal*
723 (?: \\ [^\x80-\xff] |
725 [^\\\x80-\xff\n\015()] * # normal*
726 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
729 [^\\\x80-\xff\n\015()] * # normal*
732 [\040\t]* )* # If comment found, allow more spaces.
734 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
735 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
739 [^\\\x80-\xff\n\015"] * # normal
740 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
744 [\040\t]* # Nab whitespace.
747 [^\\\x80-\xff\n\015()] * # normal*
749 (?: \\ [^\x80-\xff] |
751 [^\\\x80-\xff\n\015()] * # normal*
752 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
755 [^\\\x80-\xff\n\015()] * # normal*
758 [\040\t]* )* # If comment found, allow more spaces.
762 [\040\t]* # Nab whitespace.
765 [^\\\x80-\xff\n\015()] * # normal*
767 (?: \\ [^\x80-\xff] |
769 [^\\\x80-\xff\n\015()] * # normal*
770 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
773 [^\\\x80-\xff\n\015()] * # normal*
776 [\040\t]* )* # If comment found, allow more spaces.
778 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
779 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
782 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
785 [\040\t]* # Nab whitespace.
788 [^\\\x80-\xff\n\015()] * # normal*
790 (?: \\ [^\x80-\xff] |
792 [^\\\x80-\xff\n\015()] * # normal*
793 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
796 [^\\\x80-\xff\n\015()] * # normal*
799 [\040\t]* )* # If comment found, allow more spaces.
800 # optional trailing comments
803 [\040\t]* # Nab whitespace.
806 [^\\\x80-\xff\n\015()] * # normal*
808 (?: \\ [^\x80-\xff] |
810 [^\\\x80-\xff\n\015()] * # normal*
811 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
814 [^\\\x80-\xff\n\015()] * # normal*
817 [\040\t]* )* # If comment found, allow more spaces.
819 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
820 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
823 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
826 [\040\t]* # Nab whitespace.
829 [^\\\x80-\xff\n\015()] * # normal*
831 (?: \\ [^\x80-\xff] |
833 [^\\\x80-\xff\n\015()] * # normal*
834 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
837 [^\\\x80-\xff\n\015()] * # normal*
840 [\040\t]* )* # If comment found, allow more spaces.
841 # optional trailing comments
846 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
847 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
851 [^\\\x80-\xff\n\015"] * # normal
852 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
857 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
861 [^\\\x80-\xff\n\015()] * # normal*
863 (?: \\ [^\x80-\xff] |
865 [^\\\x80-\xff\n\015()] * # normal*
866 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
869 [^\\\x80-\xff\n\015()] * # normal*
874 [^\\\x80-\xff\n\015"] * # normal
875 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
877 ) # "special" comment or quoted string
878 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
881 [\040\t]* # Nab whitespace.
884 [^\\\x80-\xff\n\015()] * # normal*
886 (?: \\ [^\x80-\xff] |
888 [^\\\x80-\xff\n\015()] * # normal*
889 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
892 [^\\\x80-\xff\n\015()] * # normal*
895 [\040\t]* )* # If comment found, allow more spaces.
899 [\040\t]* # Nab whitespace.
902 [^\\\x80-\xff\n\015()] * # normal*
904 (?: \\ [^\x80-\xff] |
906 [^\\\x80-\xff\n\015()] * # normal*
907 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
910 [^\\\x80-\xff\n\015()] * # normal*
913 [\040\t]* )* # If comment found, allow more spaces.
915 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
916 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
919 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
922 [\040\t]* # Nab whitespace.
925 [^\\\x80-\xff\n\015()] * # normal*
927 (?: \\ [^\x80-\xff] |
929 [^\\\x80-\xff\n\015()] * # normal*
930 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
933 [^\\\x80-\xff\n\015()] * # normal*
936 [\040\t]* )* # If comment found, allow more spaces.
937 # optional trailing comments
940 [\040\t]* # Nab whitespace.
943 [^\\\x80-\xff\n\015()] * # normal*
945 (?: \\ [^\x80-\xff] |
947 [^\\\x80-\xff\n\015()] * # normal*
948 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
951 [^\\\x80-\xff\n\015()] * # normal*
954 [\040\t]* )* # If comment found, allow more spaces.
956 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
957 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
960 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
963 [\040\t]* # Nab whitespace.
966 [^\\\x80-\xff\n\015()] * # normal*
968 (?: \\ [^\x80-\xff] |
970 [^\\\x80-\xff\n\015()] * # normal*
971 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
974 [^\\\x80-\xff\n\015()] * # normal*
977 [\040\t]* )* # If comment found, allow more spaces.
978 # optional trailing comments
981 [\040\t]* # Nab whitespace.
984 [^\\\x80-\xff\n\015()] * # normal*
986 (?: \\ [^\x80-\xff] |
988 [^\\\x80-\xff\n\015()] * # normal*
989 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
992 [^\\\x80-\xff\n\015()] * # normal*
995 [\040\t]* )* # If comment found, allow more spaces.
997 [\040\t]* # Nab whitespace.
1000 [^\\\x80-\xff\n\015()] * # normal*
1002 (?: \\ [^\x80-\xff] |
1004 [^\\\x80-\xff\n\015()] * # normal*
1005 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1008 [^\\\x80-\xff\n\015()] * # normal*
1011 [\040\t]* )* # If comment found, allow more spaces.
1013 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1014 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1017 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1020 [\040\t]* # Nab whitespace.
1023 [^\\\x80-\xff\n\015()] * # normal*
1025 (?: \\ [^\x80-\xff] |
1027 [^\\\x80-\xff\n\015()] * # normal*
1028 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1031 [^\\\x80-\xff\n\015()] * # normal*
1034 [\040\t]* )* # If comment found, allow more spaces.
1035 # optional trailing comments
1038 [\040\t]* # Nab whitespace.
1041 [^\\\x80-\xff\n\015()] * # normal*
1043 (?: \\ [^\x80-\xff] |
1045 [^\\\x80-\xff\n\015()] * # normal*
1046 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1049 [^\\\x80-\xff\n\015()] * # normal*
1052 [\040\t]* )* # If comment found, allow more spaces.
1054 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1055 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1058 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1061 [\040\t]* # Nab whitespace.
1064 [^\\\x80-\xff\n\015()] * # normal*
1066 (?: \\ [^\x80-\xff] |
1068 [^\\\x80-\xff\n\015()] * # normal*
1069 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1072 [^\\\x80-\xff\n\015()] * # normal*
1075 [\040\t]* )* # If comment found, allow more spaces.
1076 # optional trailing comments
1078 )* # additional domains
1080 [\040\t]* # Nab whitespace.
1083 [^\\\x80-\xff\n\015()] * # normal*
1085 (?: \\ [^\x80-\xff] |
1087 [^\\\x80-\xff\n\015()] * # normal*
1088 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1091 [^\\\x80-\xff\n\015()] * # normal*
1094 [\040\t]* )* # If comment found, allow more spaces.
1095 # optional trailing comments
1098 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1099 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1103 [^\\\x80-\xff\n\015"] * # normal
1104 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
1108 [\040\t]* # Nab whitespace.
1111 [^\\\x80-\xff\n\015()] * # normal*
1113 (?: \\ [^\x80-\xff] |
1115 [^\\\x80-\xff\n\015()] * # normal*
1116 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1119 [^\\\x80-\xff\n\015()] * # normal*
1122 [\040\t]* )* # If comment found, allow more spaces.
1125 [\040\t]* # Nab whitespace.
1128 [^\\\x80-\xff\n\015()] * # normal*
1130 (?: \\ [^\x80-\xff] |
1132 [^\\\x80-\xff\n\015()] * # normal*
1133 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1136 [^\\\x80-\xff\n\015()] * # normal*
1139 [\040\t]* )* # If comment found, allow more spaces.
1141 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1142 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1146 [^\\\x80-\xff\n\015"] * # normal
1147 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
1151 [\040\t]* # Nab whitespace.
1154 [^\\\x80-\xff\n\015()] * # normal*
1156 (?: \\ [^\x80-\xff] |
1158 [^\\\x80-\xff\n\015()] * # normal*
1159 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1162 [^\\\x80-\xff\n\015()] * # normal*
1165 [\040\t]* )* # If comment found, allow more spaces.
1169 [\040\t]* # Nab whitespace.
1172 [^\\\x80-\xff\n\015()] * # normal*
1174 (?: \\ [^\x80-\xff] |
1176 [^\\\x80-\xff\n\015()] * # normal*
1177 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1180 [^\\\x80-\xff\n\015()] * # normal*
1183 [\040\t]* )* # If comment found, allow more spaces.
1185 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1186 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1189 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1192 [\040\t]* # Nab whitespace.
1195 [^\\\x80-\xff\n\015()] * # normal*
1197 (?: \\ [^\x80-\xff] |
1199 [^\\\x80-\xff\n\015()] * # normal*
1200 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1203 [^\\\x80-\xff\n\015()] * # normal*
1206 [\040\t]* )* # If comment found, allow more spaces.
1207 # optional trailing comments
1210 [\040\t]* # Nab whitespace.
1213 [^\\\x80-\xff\n\015()] * # normal*
1215 (?: \\ [^\x80-\xff] |
1217 [^\\\x80-\xff\n\015()] * # normal*
1218 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1221 [^\\\x80-\xff\n\015()] * # normal*
1224 [\040\t]* )* # If comment found, allow more spaces.
1226 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1227 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1230 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1233 [\040\t]* # Nab whitespace.
1236 [^\\\x80-\xff\n\015()] * # normal*
1238 (?: \\ [^\x80-\xff] |
1240 [^\\\x80-\xff\n\015()] * # normal*
1241 (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1244 [^\\\x80-\xff\n\015()] * # normal*
1247 [\040\t]* )* # If comment found, allow more spaces.
1248 # optional trailing comments
1255 Alan Other <user\@dom.ain>
1258 \"A. Other\" <user.1234\@dom.ain> (a comment)
1259 A. Other <user.1234\@dom.ain> (a comment)
1260 \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
1261 A missing angle <user\@some.where
1265 /abc\0def\00pqr\000xyz\0000AB/
1266 abc\0def\00pqr\000xyz\0000AB
1267 abc456 abc\0def\00pqr\000xyz\0000ABCDE
1269 /abc\x0def\x00pqr\x000xyz\x0000AB/
1270 abc\x0def\x00pqr\x000xyz\x0000AB
1271 abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
1353 /([^.]*)\.([^:]*):[T ]+(.*)/
1354 track1.title:TBlah blah blah
1356 /([^.]*)\.([^:]*):[T ]+(.*)/i
1357 track1.title:TBlah blah blah
1359 /([^.]*)\.([^:]*):[t ]+(.*)/i
1360 track1.title:TBlah blah blah
1495 /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/
1498 /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
1522 /^([^a])([^\b])([^c]*)([^d]{3,4})/
1590 /\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
1591 \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
1593 /P[^*]TAIRE[^*]{1,6}?LL/
1594 xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
1596 /P[^*]TAIRE[^*]{1,}?LL/
1597 xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
1604 /(\.\d\d((?=0)|\d(?=\d)))/
1614 Food is on the foo table
1617 The food is under the bar in the barn.
1620 The food is under the bar in the barn.
1623 I have 2 numbers: 53147
1626 I have 2 numbers: 53147
1629 I have 2 numbers: 53147
1632 I have 2 numbers: 53147
1635 I have 2 numbers: 53147
1638 I have 2 numbers: 53147
1641 I have 2 numbers: 53147
1644 I have 2 numbers: 53147
1649 /^(\D*)(?=\d)(?!123)/
1677 /\d\d\/\d\d\/\d\d\d\d/
1680 /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
1681 word cat dog elephant mussel cow horse canary baboon snake shark otherword
1682 word cat dog elephant mussel cow horse canary baboon snake shark
1684 /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
1685 word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
1766 borfle\nbib.gif\nno\n
1769 borfle\nbib.gif\nno\n
1772 borfle\nbib.gif\nno\n
1775 borfle\nbib.gif\nno\n
1830 /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
1833 /^\d\d\d\d\d\d\d\d\d\d\d\d/
1836 /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
1848 /^[abcdefghijklmnopqrstuvwxy0123456789]/
1881 the \"quick\" brown fox
1882 \"the \\\"quick\\\" brown fox\"
1896 /<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
1897 <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
1980 /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
1983 /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
1985 /(?>(\.\d\d[1-9]?))\d+/
1991 /^((?>\w+)|(?>\s+))*$/
1992 now is the time for all good men to come to the aid of the party
1994 this is not a line with only words and spaces!
2020 /((?>[^()]+)|\([^()]*\))+/
2023 /\(((?>[^()]+)|\([^()]+\))+\)/
2027 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2043 /(a b(?x)c d (?-x)e f)/
2081 /(?s-i:more.*than).*million/i
2084 more \n than Million
2087 more \n than \n million
2089 /(?:(?s-i)more.*than).*million/i
2092 more \n than Million
2095 more \n than \n million
2114 /(?<=a(?i)b)(\w\w)c/
2122 /(?:(a)|b)(?(1)A|B)/
2136 /^(?(?=abc)\w{3}:|\d\d)$/
2143 /^(?(?!abc)\d\d|\w{3}:)$/
2150 /(?(?<=foo)bar|cat)/
2158 /(?(?<!foo)cat|bar)/
2166 /( \( )? [^()]+ (?(1) \) |) /x
2169 the quick (abcd) fox
2172 /( \( )? [^()]+ (?(1) \) ) /x
2175 the quick (abcd) fox
2195 /((?i)blah)\s+(?i:\1)/
2267 /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
2280 /(?i:saturday|sunday)/
2300 /^([ab](?i)[cd]|[ef])/
2311 /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
2328 /(?<=(?<!foo)bar)baz/
2336 /The cases of aaaa and aaaaaa are missed out below because Perl does things/
2337 /differently. We know that odd, and maybe incorrect, things happen with/
2338 /recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./
2356 /^(a\1?)(a\1?)(a\2?)(a\3?)$/
2374 /The following tests are taken from the Perl 5.005 test suite; some of them/
2375 /are compatible with 5.004, but I'd rather not have to sort them out./
2717 /[a-zA-Z_][a-zA-Z0-9_]*/
2720 /^a(bc+|b[eh])g|.h$/
2723 /(bc+d$|ef*g.|h?i(j|k))/
2731 /((((((((((a))))))))))/
2734 /((((((((((a))))))))))\10/
2737 /(((((((((a)))))))))/
2740 /multiple words of text/
2746 multiple words, yeah
2787 bbaababbabaaaaabbaaaabba
3054 /[a-zA-Z_][a-zA-Z0-9_]*/i
3057 /^a(bc+|b[eh])g|.h$/i
3060 /(bc+d$|ef*g.|h?i(j|k))/i
3069 /((((((((((a))))))))))/i
3072 /((((((((((a))))))))))\10/i
3075 /(((((((((a)))))))))/i
3078 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
3081 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
3084 /multiple words of text/i
3090 MULTIPLE WORDS, YEAH
3140 /a(?:b|c|d){4,5}(.)/
3143 /a(?:b|c|d){4,5}?(.)/
3149 /a(?:b|c|d){6,7}(.)/
3152 /a(?:b|c|d){6,7}?(.)/
3155 /a(?:b|c|d){5,6}(.)/
3158 /a(?:b|c|d){5,6}?(.)/
3161 /a(?:b|c|d){5,7}(.)/
3164 /a(?:b|c|d){5,7}?(.)/
3167 /a(?:b|(c|e){1,2}?|d)+?(.)/
3192 /(?:(f)(o)(o)|(b)(a)(r))*/
3212 /^(?:b|a(?=(.)))*\1/
3343 /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
3346 /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
3347 caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
3362 /^a (?#xxx) (?#yyy) {3}c/x
3391 /((?s)^a(.))((?m)^b$)/
3443 /^(\()?blah(?(1)(\)))$/
3451 /^(\(+)?blah(?(1)(\)))$/
3530 /((?>[^()]+)|\([^()]*\))+/
3550 /^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
3570 the.quick.brown.fox-
3571 the.quick.brown.fox.
3572 the.quick.brown.fox_
3573 the.quick.brown.fox+
3575 /(?>.*)(?<=(abcd|wxyz))/
3579 a rather long string that doesn't end with one of them
3581 /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
3582 word cat dog elephant mussel cow horse canary baboon snake shark otherword
3583 word cat dog elephant mussel cow horse canary baboon snake shark
3585 /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
3586 word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
3588 /(?<=\d{3}(?!999))foo/
3594 /(?<=(?!...999)\d{3})foo/
3600 /(?<=\d{3}(?!999)...)foo/
3606 /(?<=\d{3}...)(?<!999)foo/
3612 /<a[\s]+href[\s]*=[\s]* # find <a href=
3613 ([\"\'])? # find single or double quote
3614 (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
3615 # quote, otherwise match up to next space
3618 <a href=\"abcd xyz pqr\" cats
3619 <a href=\'abcd xyz pqr\' cats
3621 /<a\s+href\s*=\s* # find <a href=
3622 (["'])? # find single or double quote
3623 (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
3624 # quote, otherwise match up to next space
3627 <a href=\"abcd xyz pqr\" cats
3628 <a href = \'abcd xyz pqr\' cats
3630 /<a\s+href(?>\s*)=(?>\s*) # find <a href=
3631 (["'])? # find single or double quote
3632 (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
3633 # quote, otherwise match up to next space
3636 <a href=\"abcd xyz pqr\" cats
3637 <a href = \'abcd xyz pqr\' cats
3672 > \x09\x0a\x0c\x0d\x0b<
3675 > \x09\x0a\x0c\x0d\x0b<
3678 > \x09\x0a\x0c\x0d\x0b<
3681 > \x09\x0a\x0c\x0d\x0b<
3706 abc#not comment\n literal
3711 abc#not comment\n literal
3715 literal\E #more comment
3717 abc#not comment\n literal
3721 literal\E #more comment/x
3722 abc#not comment\n literal
3746 /((?x)x y z | a b c)/
3776 /-- This tests for an IPv6 address in the form where it can have up to --/
3777 /-- eight components, one and only one of which is empty. This must be --/
3778 /-- an internal component. --/
3780 /^(?!:) # colon disallowed at start
3782 (?: [0-9a-f]{1,4} | # 1-4 hex digits or
3783 (?(1)0 | () ) ) # if null previously matched, fail; else null
3784 : # followed by colon
3785 ){1,7} # end item; 1-7 of them required
3786 [0-9a-f]{1,4} $ # final hex number at end of string
3787 (?(1)|.) # check that there was an empty component
3791 a123:b342::324e:abcd
3792 a123:ddde:b342::324e:abcd
3793 a123:ddde:b342::324e:dcba:abcd
3794 a123:ddde:9999:b342::324e:dcba:abcd
3797 a123:bce:ddde:9999:b342::324e:dcba:abcd
3798 a123::9999:b342::324e:dcba:abcd
3822 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3824 /(?i)reg(?:ul(?:[aä]|ae)r|ex)/
3872 /(?:(?(1)\1a|b)(X|Y))+/
3876 /()()()()()()()()()(?:(?(10)\10a|b)(X|Y))+/
3887 "(?x)(?-x: \s*#\s*)"
3892 "(?x-is)(?:(?-ixs) \s*#\s*) include"
3987 /(a){0,3}(?(1)b|(c|))*D/
3993 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3994 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
3997 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3998 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
4001 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4002 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
4007 /^(?s)(?>.*)(?<!\n)/
4022 /( (A | (?(1)0|) )* )/x
4025 /( ( (?(1)0|) )* )/x
4067 /^%((?(?=[a])[^%])|b)*%$/
4152 /(?:(?>(a))b|(a)c)++/
4155 /(?=(?>(a))b|(a)c)(..)/
4161 /(?:(?>([ab])))+a=/+
4167 /((?>(a+)b)+(aabab))/
4227 /^(?=(?1))?[az]([abc])d/
4329 \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
4330 \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
4331 \x09\x20\xa0\x0a\x0b\x0c
4333 \x09\x20\xa0\x0a\x0b
4349 /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
4350 >XY\x0aZ\x0aA\x0bNN\x0c
4351 >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
4377 /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
4380 /(?<A>tom|bon)-\g{A}/
4394 /(?|(abc)|(xyz))(?1)/
4400 /^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/
4403 /^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/
4406 /^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/
4409 /(?'abc'\w+):\k<abc>{2}/
4416 /(?'abc'\w+):\g{abc}{2}/
4423 /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
4433 /^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
4436 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
4443 /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
4451 /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
4460 now is the time for all good men to come to the aid of the party
4462 this is not a line with only words and spaces!
4478 /([^()]++|\([^()]*\))+/
4481 /\(([^()]++|\([^()]+\))+\)/
4485 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4487 /^([^()]|\((?1)*\))*$/
4494 /^>abc>([^()]|\((?1)*\))*<xyz<$/
4499 /^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
4501 Satanoscillatemymetallicsonatas
4502 AmanaplanacanalPanama
4507 /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
4521 /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
4537 /a+b?(*PRUNE)c+(*FAIL)/
4540 /a+b?(*COMMIT)c+(*FAIL)/
4543 /a+b?(*SKIP)c+(*FAIL)/
4546 /^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
4555 /^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
4564 /a+b?(*THEN)c+(*FAIL)/
4567 /(A (A|B(*ACCEPT)|C) D)(E)/x
4575 /^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$/i
4577 Satan, oscillate my metallic sonatas!
4578 A man, a plan, a canal: Panama!
4579 Able was I ere I saw Elba.
4603 /(?<X>a)(?<=b(?&X))/
4606 /^(?|(abc)|(def))\1/
4613 /^(?|(abc)|(def))(?1)/
4620 /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
4626 /(?:(?1)|B)(A(*F)|C)/
4632 /^(?:(?1)|B)(A(*F)|C)/
4640 /(?:(?1)|B)(A(*ACCEPT)XX|C)D/
4650 /(?(DEFINE)(A))B(?1)C/
4653 /(?(DEFINE)((A)\2))B(?1)C/
4656 /(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
4695 /^(?&t)(?(DEFINE)(?<t>a\Kb))$/
4698 /^([^()]|\((?1)*\))*$/
4702 /(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
4707 /(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
4712 /--- This one does fail, as expected, in Perl. It needs the complex item at the
4713 end of the pattern. A single letter instead of (B|D) makes it not fail,
4714 which I think is a Perl bug. --- /
4719 /--- Check the use of names for failure ---/
4721 /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
4726 /--- Force no study, otherwise mark is not seen. The studied version is in
4727 test 2 because it isn't Perl-compatible. ---/
4729 /(*MARK:A)(*SKIP:B)(C|X)/KSS
4733 /^(A(*THEN:A)B|C(*THEN:B)D)/K
4737 /^(?:A(*THEN:A)B|C(*THEN:B)D)/K
4740 /^(?>A(*THEN:A)B|C(*THEN:B)D)/K
4743 /--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
4744 that we have to have something complicated such as (B|Z) at the end because,
4745 for Perl, a simple character somehow causes an unwanted optimization to mess
4746 with the handling of backtracking verbs. ---/
4748 /A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
4751 /--- Test skipping over a non-matching mark. ---/
4753 /A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
4756 /--- Check shorthand for MARK ---/
4758 /A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
4761 /--- Don't loop! Force no study, otherwise mark is not seen. ---/
4763 /(*:A)A+(*SKIP:A)(B|Z)/KSS
4766 /--- This should succeed, as a non-existent skip name disables the skip ---/
4768 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
4771 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
4774 /--- COMMIT at the start of a pattern should act like an anchor. Again,
4775 however, we need the complication for Perl. ---/
4777 /(*COMMIT)(A|P)(B|P)(C|P)/
4782 /--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
4784 /(\w+)(?>b(*COMMIT))\w{2}/
4787 /(\w+)b(*COMMIT)\w{2}/
4790 /--- Check opening parens in comment when seeking forward reference. ---/
4792 /(?&t)(?#()(?(DEFINE)(?<t>a))/
4795 /--- COMMIT should override THEN ---/
4797 /(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/
4800 /(?>(*COMMIT)(yes|no)(*THEN)(*F))?/
4813 /(?P<abn>(?P=abn)xxx|)+/
4825 /^(?&t)*+(?(DEFINE)(?<t>a))\w$/
4830 /^(?&t)*(?(DEFINE)(?<t>a))\w$/
4896 /(foo ( \( ((?:(?> [^()]+ )|(?2))*) \) ) )/x
4897 foo(bar(baz)+baz(bop))
4899 /(A (A|B(*ACCEPT)|C) D)(E)/x
4902 /\A.*?(?:a|b(*THEN)c)/
4908 /\A.*?(a|b(*THEN)c)/
4914 /\A.*?(?:a|b(*THEN)c)++/
4920 /\A.*?(a|b(*THEN)c)++/
4926 /\A.*?(?:a|b(*THEN)c|d)/
4935 /(?(?=(a(*ACCEPT)z))a)/
4950 /(?(DEFINE)(a))?b(?1)/
4975 /(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
4980 /--- Checking revised (*THEN) handling ---/
4984 /^.*? (a(*THEN)b) c/x
4987 /^.*? (a(*THEN)b|(*F)) c/x
4990 /^.*? ( (a(*THEN)b) | (*F) ) c/x
4993 /^.*? ( (a(*THEN)b) ) c/x
4996 /--- Non-capture ---/
4998 /^.*? (?:a(*THEN)b) c/x
5001 /^.*? (?:a(*THEN)b|(*F)) c/x
5004 /^.*? (?: (?:a(*THEN)b) | (*F) ) c/x
5007 /^.*? (?: (?:a(*THEN)b) ) c/x
5012 /^.*? (?>a(*THEN)b) c/x
5015 /^.*? (?>a(*THEN)b|(*F)) c/x
5018 /^.*? (?> (?>a(*THEN)b) | (*F) ) c/x
5021 /^.*? (?> (?>a(*THEN)b) ) c/x
5024 /--- Possessive capture ---/
5026 /^.*? (a(*THEN)b)++ c/x
5029 /^.*? (a(*THEN)b|(*F))++ c/x
5032 /^.*? ( (a(*THEN)b)++ | (*F) )++ c/x
5035 /^.*? ( (a(*THEN)b)++ )++ c/x
5038 /--- Possessive non-capture ---/
5040 /^.*? (?:a(*THEN)b)++ c/x
5043 /^.*? (?:a(*THEN)b|(*F))++ c/x
5046 /^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c/x
5049 /^.*? (?: (?:a(*THEN)b)++ )++ c/x
5052 /--- Condition assertion ---/
5054 /^(?(?=a(*THEN)b)ab|ac)/
5059 /^.*?(?(?=a)a|b(*THEN)c)/
5062 /^.*?(?:(?(?=a)a|b(*THEN)c)|d)/
5065 /^.*?(?(?=a)a(*THEN)b|c)/
5073 /------------------------------/
5078 /(?>(a)(*:m))/imsxSK
5084 /(?<=(a(*ACCEPT)b))c/
5087 /(?<=(a(*COMMIT)b))c/
5111 /(*MARK:A)(*PRUNE:B)(C|X)/KS
5115 /(*MARK:A)(*PRUNE:B)(C|X)/KSS
5119 /(*MARK:A)(*THEN:B)(C|X)/KS
5123 /(*MARK:A)(*THEN:B)(C|X)/KSY
5127 /(*MARK:A)(*THEN:B)(C|X)/KSS
5131 /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
5133 /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
5138 /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
5141 /A(*:A)A+(*SKIP)(B|Z) | AC/xK
5144 /--- This should fail, as a null name is the same as no name ---/
5146 /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
5149 /--- A check on what happens after hitting a mark and them bumping along to
5150 something that does not even start. Perl reports tags after the failures here,
5151 though it does not when the individual letters are made into something
5152 more complicated. ---/
5163 /^(A(*THEN:A)B|C(*THEN:B)D)/K
5170 /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
5177 /--- An empty name does not pass back an empty string. It is the same as if no
5178 name were given. ---/
5180 /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
5184 /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
5189 /--- Mark names can be duplicated ---/
5206 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
5209 /a(*PRUNE:X)bc|qq/KY
5217 /(?=a(*MARK:A)b)..x/K
5222 /(?=a(*MARK:A)b)..(*:Y)x/K
5227 /(?=a(*PRUNE:A)b)..x/K
5232 /(?=a(*PRUNE:A)b)..(*:Y)x/K
5237 /(?=a(*THEN:A)b)..x/K
5242 /(?=a(*THEN:A)b)..(*:Y)x/K
5247 /(another)?(\1?)test/
5250 /(another)?(\1+)test/
5253 /-- End of testinput1 --/