1/-- This set of tests is for features that are compatible with all versions of 2 Perl 5, in non-UTF-8 mode. --/ 3 4/the quick brown fox/ 5 the quick brown fox 6 0: the quick brown fox 7 The quick brown FOX 8No match 9 What do you know about the quick brown fox? 10 0: the quick brown fox 11 What do you know about THE QUICK BROWN FOX? 12No match 13 14/The quick brown fox/i 15 the quick brown fox 16 0: the quick brown fox 17 The quick brown FOX 18 0: The quick brown FOX 19 What do you know about the quick brown fox? 20 0: the quick brown fox 21 What do you know about THE QUICK BROWN FOX? 22 0: THE QUICK BROWN FOX 23 24/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/ 25 abcd\t\n\r\f\a\e9;\$\\?caxyz 26 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz 27 28/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/ 29 abxyzpqrrrabbxyyyypqAzz 30 0: abxyzpqrrrabbxyyyypqAzz 31 abxyzpqrrrabbxyyyypqAzz 32 0: abxyzpqrrrabbxyyyypqAzz 33 aabxyzpqrrrabbxyyyypqAzz 34 0: aabxyzpqrrrabbxyyyypqAzz 35 aaabxyzpqrrrabbxyyyypqAzz 36 0: aaabxyzpqrrrabbxyyyypqAzz 37 aaaabxyzpqrrrabbxyyyypqAzz 38 0: aaaabxyzpqrrrabbxyyyypqAzz 39 abcxyzpqrrrabbxyyyypqAzz 40 0: abcxyzpqrrrabbxyyyypqAzz 41 aabcxyzpqrrrabbxyyyypqAzz 42 0: aabcxyzpqrrrabbxyyyypqAzz 43 aaabcxyzpqrrrabbxyyyypAzz 44 0: aaabcxyzpqrrrabbxyyyypAzz 45 aaabcxyzpqrrrabbxyyyypqAzz 46 0: aaabcxyzpqrrrabbxyyyypqAzz 47 aaabcxyzpqrrrabbxyyyypqqAzz 48 0: aaabcxyzpqrrrabbxyyyypqqAzz 49 aaabcxyzpqrrrabbxyyyypqqqAzz 50 0: aaabcxyzpqrrrabbxyyyypqqqAzz 51 aaabcxyzpqrrrabbxyyyypqqqqAzz 52 0: aaabcxyzpqrrrabbxyyyypqqqqAzz 53 aaabcxyzpqrrrabbxyyyypqqqqqAzz 54 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz 55 aaabcxyzpqrrrabbxyyyypqqqqqqAzz 56 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz 57 aaaabcxyzpqrrrabbxyyyypqAzz 58 0: aaaabcxyzpqrrrabbxyyyypqAzz 59 abxyzzpqrrrabbxyyyypqAzz 60 0: abxyzzpqrrrabbxyyyypqAzz 61 aabxyzzzpqrrrabbxyyyypqAzz 62 0: aabxyzzzpqrrrabbxyyyypqAzz 63 aaabxyzzzzpqrrrabbxyyyypqAzz 64 0: aaabxyzzzzpqrrrabbxyyyypqAzz 65 aaaabxyzzzzpqrrrabbxyyyypqAzz 66 0: aaaabxyzzzzpqrrrabbxyyyypqAzz 67 abcxyzzpqrrrabbxyyyypqAzz 68 0: abcxyzzpqrrrabbxyyyypqAzz 69 aabcxyzzzpqrrrabbxyyyypqAzz 70 0: aabcxyzzzpqrrrabbxyyyypqAzz 71 aaabcxyzzzzpqrrrabbxyyyypqAzz 72 0: aaabcxyzzzzpqrrrabbxyyyypqAzz 73 aaaabcxyzzzzpqrrrabbxyyyypqAzz 74 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz 75 aaaabcxyzzzzpqrrrabbbxyyyypqAzz 76 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz 77 aaaabcxyzzzzpqrrrabbbxyyyyypqAzz 78 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz 79 aaabcxyzpqrrrabbxyyyypABzz 80 0: aaabcxyzpqrrrabbxyyyypABzz 81 aaabcxyzpqrrrabbxyyyypABBzz 82 0: aaabcxyzpqrrrabbxyyyypABBzz 83 >>>aaabxyzpqrrrabbxyyyypqAzz 84 0: aaabxyzpqrrrabbxyyyypqAzz 85 >aaaabxyzpqrrrabbxyyyypqAzz 86 0: aaaabxyzpqrrrabbxyyyypqAzz 87 >>>>abcxyzpqrrrabbxyyyypqAzz 88 0: abcxyzpqrrrabbxyyyypqAzz 89 *** Failers 90No match 91 abxyzpqrrabbxyyyypqAzz 92No match 93 abxyzpqrrrrabbxyyyypqAzz 94No match 95 abxyzpqrrrabxyyyypqAzz 96No match 97 aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz 98No match 99 aaaabcxyzzzzpqrrrabbbxyyypqAzz 100No match 101 aaabcxyzpqrrrabbxyyyypqqqqqqqAzz 102No match 103 104/^(abc){1,2}zz/ 105 abczz 106 0: abczz 107 1: abc 108 abcabczz 109 0: abcabczz 110 1: abc 111 *** Failers 112No match 113 zz 114No match 115 abcabcabczz 116No match 117 >>abczz 118No match 119 120/^(b+?|a){1,2}?c/ 121 bc 122 0: bc 123 1: b 124 bbc 125 0: bbc 126 1: b 127 bbbc 128 0: bbbc 129 1: bb 130 bac 131 0: bac 132 1: a 133 bbac 134 0: bbac 135 1: a 136 aac 137 0: aac 138 1: a 139 abbbbbbbbbbbc 140 0: abbbbbbbbbbbc 141 1: bbbbbbbbbbb 142 bbbbbbbbbbbac 143 0: bbbbbbbbbbbac 144 1: a 145 *** Failers 146No match 147 aaac 148No match 149 abbbbbbbbbbbac 150No match 151 152/^(b+|a){1,2}c/ 153 bc 154 0: bc 155 1: b 156 bbc 157 0: bbc 158 1: bb 159 bbbc 160 0: bbbc 161 1: bbb 162 bac 163 0: bac 164 1: a 165 bbac 166 0: bbac 167 1: a 168 aac 169 0: aac 170 1: a 171 abbbbbbbbbbbc 172 0: abbbbbbbbbbbc 173 1: bbbbbbbbbbb 174 bbbbbbbbbbbac 175 0: bbbbbbbbbbbac 176 1: a 177 *** Failers 178No match 179 aaac 180No match 181 abbbbbbbbbbbac 182No match 183 184/^(b+|a){1,2}?bc/ 185 bbc 186 0: bbc 187 1: b 188 189/^(b*|ba){1,2}?bc/ 190 babc 191 0: babc 192 1: ba 193 bbabc 194 0: bbabc 195 1: ba 196 bababc 197 0: bababc 198 1: ba 199 *** Failers 200No match 201 bababbc 202No match 203 babababc 204No match 205 206/^(ba|b*){1,2}?bc/ 207 babc 208 0: babc 209 1: ba 210 bbabc 211 0: bbabc 212 1: ba 213 bababc 214 0: bababc 215 1: ba 216 *** Failers 217No match 218 bababbc 219No match 220 babababc 221No match 222 223/^\ca\cA\c[\c{\c:/ 224 \x01\x01\e;z 225 0: \x01\x01\x1b;z 226 227/^[ab\]cde]/ 228 athing 229 0: a 230 bthing 231 0: b 232 ]thing 233 0: ] 234 cthing 235 0: c 236 dthing 237 0: d 238 ething 239 0: e 240 *** Failers 241No match 242 fthing 243No match 244 [thing 245No match 246 \\thing 247No match 248 249/^[]cde]/ 250 ]thing 251 0: ] 252 cthing 253 0: c 254 dthing 255 0: d 256 ething 257 0: e 258 *** Failers 259No match 260 athing 261No match 262 fthing 263No match 264 265/^[^ab\]cde]/ 266 fthing 267 0: f 268 [thing 269 0: [ 270 \\thing 271 0: \ 272 *** Failers 273 0: * 274 athing 275No match 276 bthing 277No match 278 ]thing 279No match 280 cthing 281No match 282 dthing 283No match 284 ething 285No match 286 287/^[^]cde]/ 288 athing 289 0: a 290 fthing 291 0: f 292 *** Failers 293 0: * 294 ]thing 295No match 296 cthing 297No match 298 dthing 299No match 300 ething 301No match 302 303/^\�/ 304 � 305 0: \x81 306 307/^�/ 308 � 309 0: \xff 310 311/^[0-9]+$/ 312 0 313 0: 0 314 1 315 0: 1 316 2 317 0: 2 318 3 319 0: 3 320 4 321 0: 4 322 5 323 0: 5 324 6 325 0: 6 326 7 327 0: 7 328 8 329 0: 8 330 9 331 0: 9 332 10 333 0: 10 334 100 335 0: 100 336 *** Failers 337No match 338 abc 339No match 340 341/^.*nter/ 342 enter 343 0: enter 344 inter 345 0: inter 346 uponter 347 0: uponter 348 349/^xxx[0-9]+$/ 350 xxx0 351 0: xxx0 352 xxx1234 353 0: xxx1234 354 *** Failers 355No match 356 xxx 357No match 358 359/^.+[0-9][0-9][0-9]$/ 360 x123 361 0: x123 362 xx123 363 0: xx123 364 123456 365 0: 123456 366 *** Failers 367No match 368 123 369No match 370 x1234 371 0: x1234 372 373/^.+?[0-9][0-9][0-9]$/ 374 x123 375 0: x123 376 xx123 377 0: xx123 378 123456 379 0: 123456 380 *** Failers 381No match 382 123 383No match 384 x1234 385 0: x1234 386 387/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/ 388 abc!pqr=apquxz.ixr.zzz.ac.uk 389 0: abc!pqr=apquxz.ixr.zzz.ac.uk 390 1: abc 391 2: pqr 392 *** Failers 393No match 394 !pqr=apquxz.ixr.zzz.ac.uk 395No match 396 abc!=apquxz.ixr.zzz.ac.uk 397No match 398 abc!pqr=apquxz:ixr.zzz.ac.uk 399No match 400 abc!pqr=apquxz.ixr.zzz.ac.ukk 401No match 402 403/:/ 404 Well, we need a colon: somewhere 405 0: : 406 *** Fail if we don't 407No match 408 409/([\da-f:]+)$/i 410 0abc 411 0: 0abc 412 1: 0abc 413 abc 414 0: abc 415 1: abc 416 fed 417 0: fed 418 1: fed 419 E 420 0: E 421 1: E 422 :: 423 0: :: 424 1: :: 425 5f03:12C0::932e 426 0: 5f03:12C0::932e 427 1: 5f03:12C0::932e 428 fed def 429 0: def 430 1: def 431 Any old stuff 432 0: ff 433 1: ff 434 *** Failers 435No match 436 0zzz 437No match 438 gzzz 439No match 440 fed\x20 441No match 442 Any old rubbish 443No match 444 445/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/ 446 .1.2.3 447 0: .1.2.3 448 1: 1 449 2: 2 450 3: 3 451 A.12.123.0 452 0: A.12.123.0 453 1: 12 454 2: 123 455 3: 0 456 *** Failers 457No match 458 .1.2.3333 459No match 460 1.2.3 461No match 462 1234.2.3 463No match 464 465/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/ 466 1 IN SOA non-sp1 non-sp2( 467 0: 1 IN SOA non-sp1 non-sp2( 468 1: 1 469 2: non-sp1 470 3: non-sp2 471 1 IN SOA non-sp1 non-sp2 ( 472 0: 1 IN SOA non-sp1 non-sp2 ( 473 1: 1 474 2: non-sp1 475 3: non-sp2 476 *** Failers 477No match 478 1IN SOA non-sp1 non-sp2( 479No match 480 481/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/ 482 a. 483 0: a. 484 Z. 485 0: Z. 486 2. 487 0: 2. 488 ab-c.pq-r. 489 0: ab-c.pq-r. 490 1: .pq-r 491 sxk.zzz.ac.uk. 492 0: sxk.zzz.ac.uk. 493 1: .uk 494 x-.y-. 495 0: x-.y-. 496 1: .y- 497 *** Failers 498No match 499 -abc.peq. 500No match 501 502/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/ 503 *.a 504 0: *.a 505 *.b0-a 506 0: *.b0-a 507 1: 0-a 508 *.c3-b.c 509 0: *.c3-b.c 510 1: 3-b 511 2: .c 512 *.c-a.b-c 513 0: *.c-a.b-c 514 1: -a 515 2: .b-c 516 3: -c 517 *** Failers 518No match 519 *.0 520No match 521 *.a- 522No match 523 *.a-b.c- 524No match 525 *.c-a.0-c 526No match 527 528/^(?=ab(de))(abd)(e)/ 529 abde 530 0: abde 531 1: de 532 2: abd 533 3: e 534 535/^(?!(ab)de|x)(abd)(f)/ 536 abdf 537 0: abdf 538 1: <unset> 539 2: abd 540 3: f 541 542/^(?=(ab(cd)))(ab)/ 543 abcd 544 0: ab 545 1: abcd 546 2: cd 547 3: ab 548 549/^[\da-f](\.[\da-f])*$/i 550 a.b.c.d 551 0: a.b.c.d 552 1: .d 553 A.B.C.D 554 0: A.B.C.D 555 1: .D 556 a.b.c.1.2.3.C 557 0: a.b.c.1.2.3.C 558 1: .C 559 560/^\".*\"\s*(;.*)?$/ 561 \"1234\" 562 0: "1234" 563 \"abcd\" ; 564 0: "abcd" ; 565 1: ; 566 \"\" ; rhubarb 567 0: "" ; rhubarb 568 1: ; rhubarb 569 *** Failers 570No match 571 \"1234\" : things 572No match 573 574/^$/ 575 \ 576 0: 577 *** Failers 578No match 579 580/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x 581 ab c 582 0: ab c 583 *** Failers 584No match 585 abc 586No match 587 ab cde 588No match 589 590/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/ 591 ab c 592 0: ab c 593 *** Failers 594No match 595 abc 596No match 597 ab cde 598No match 599 600/^ a\ b[c ]d $/x 601 a bcd 602 0: a bcd 603 a b d 604 0: a b d 605 *** Failers 606No match 607 abcd 608No match 609 ab d 610No match 611 612/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/ 613 abcdefhijklm 614 0: abcdefhijklm 615 1: abc 616 2: bc 617 3: c 618 4: def 619 5: ef 620 6: f 621 7: hij 622 8: ij 623 9: j 62410: klm 62511: lm 62612: m 627 628/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/ 629 abcdefhijklm 630 0: abcdefhijklm 631 1: bc 632 2: c 633 3: ef 634 4: f 635 5: ij 636 6: j 637 7: lm 638 8: m 639 640/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/ 641 a+ Z0+\x08\n\x1d\x12 642 0: a+ Z0+\x08\x0a\x1d\x12 643 644/^[.^$|()*+?{,}]+/ 645 .^\$(*+)|{?,?} 646 0: .^$(*+)|{?,?} 647 648/^a*\w/ 649 z 650 0: z 651 az 652 0: az 653 aaaz 654 0: aaaz 655 a 656 0: a 657 aa 658 0: aa 659 aaaa 660 0: aaaa 661 a+ 662 0: a 663 aa+ 664 0: aa 665 666/^a*?\w/ 667 z 668 0: z 669 az 670 0: a 671 aaaz 672 0: a 673 a 674 0: a 675 aa 676 0: a 677 aaaa 678 0: a 679 a+ 680 0: a 681 aa+ 682 0: a 683 684/^a+\w/ 685 az 686 0: az 687 aaaz 688 0: aaaz 689 aa 690 0: aa 691 aaaa 692 0: aaaa 693 aa+ 694 0: aa 695 696/^a+?\w/ 697 az 698 0: az 699 aaaz 700 0: aa 701 aa 702 0: aa 703 aaaa 704 0: aa 705 aa+ 706 0: aa 707 708/^\d{8}\w{2,}/ 709 1234567890 710 0: 1234567890 711 12345678ab 712 0: 12345678ab 713 12345678__ 714 0: 12345678__ 715 *** Failers 716No match 717 1234567 718No match 719 720/^[aeiou\d]{4,5}$/ 721 uoie 722 0: uoie 723 1234 724 0: 1234 725 12345 726 0: 12345 727 aaaaa 728 0: aaaaa 729 *** Failers 730No match 731 123456 732No match 733 734/^[aeiou\d]{4,5}?/ 735 uoie 736 0: uoie 737 1234 738 0: 1234 739 12345 740 0: 1234 741 aaaaa 742 0: aaaa 743 123456 744 0: 1234 745 746/\A(abc|def)=(\1){2,3}\Z/ 747 abc=abcabc 748 0: abc=abcabc 749 1: abc 750 2: abc 751 def=defdefdef 752 0: def=defdefdef 753 1: def 754 2: def 755 *** Failers 756No match 757 abc=defdef 758No match 759 760/^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/ 761 abcdefghijkcda2 762 0: abcdefghijkcda2 763 1: a 764 2: b 765 3: c 766 4: d 767 5: e 768 6: f 769 7: g 770 8: h 771 9: i 77210: j 77311: k 77412: cd 775 abcdefghijkkkkcda2 776 0: abcdefghijkkkkcda2 777 1: a 778 2: b 779 3: c 780 4: d 781 5: e 782 6: f 783 7: g 784 8: h 785 9: i 78610: j 78711: k 78812: cd 789 790/(cat(a(ract|tonic)|erpillar)) \1()2(3)/ 791 cataract cataract23 792 0: cataract cataract23 793 1: cataract 794 2: aract 795 3: ract 796 4: 797 5: 3 798 catatonic catatonic23 799 0: catatonic catatonic23 800 1: catatonic 801 2: atonic 802 3: tonic 803 4: 804 5: 3 805 caterpillar caterpillar23 806 0: caterpillar caterpillar23 807 1: caterpillar 808 2: erpillar 809 3: <unset> 810 4: 811 5: 3 812 813 814/^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]/ 815 From abcd Mon Sep 01 12:33:02 1997 816 0: From abcd Mon Sep 01 12:33 817 1: abcd 818 819/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/ 820 From abcd Mon Sep 01 12:33:02 1997 821 0: From abcd Mon Sep 01 12:33 822 1: Sep 823 From abcd Mon Sep 1 12:33:02 1997 824 0: From abcd Mon Sep 1 12:33 825 1: Sep 826 *** Failers 827No match 828 From abcd Sep 01 12:33:02 1997 829No match 830 831/^12.34/s 832 12\n34 833 0: 12\x0a34 834 12\r34 835 0: 12\x0d34 836 837/\w+(?=\t)/ 838 the quick brown\t fox 839 0: brown 840 841/foo(?!bar)(.*)/ 842 foobar is foolish see? 843 0: foolish see? 844 1: lish see? 845 846/(?:(?!foo)...|^.{0,2})bar(.*)/ 847 foobar crowbar etc 848 0: rowbar etc 849 1: etc 850 barrel 851 0: barrel 852 1: rel 853 2barrel 854 0: 2barrel 855 1: rel 856 A barrel 857 0: A barrel 858 1: rel 859 860/^(\D*)(?=\d)(?!123)/ 861 abc456 862 0: abc 863 1: abc 864 *** Failers 865No match 866 abc123 867No match 868 869/^1234(?# test newlines 870 inside)/ 871 1234 872 0: 1234 873 874/^1234 #comment in extended re 875 /x 876 1234 877 0: 1234 878 879/#rhubarb 880 abcd/x 881 abcd 882 0: abcd 883 884/^abcd#rhubarb/x 885 abcd 886 0: abcd 887 888/^(a)\1{2,3}(.)/ 889 aaab 890 0: aaab 891 1: a 892 2: b 893 aaaab 894 0: aaaab 895 1: a 896 2: b 897 aaaaab 898 0: aaaaa 899 1: a 900 2: a 901 aaaaaab 902 0: aaaaa 903 1: a 904 2: a 905 906/(?!^)abc/ 907 the abc 908 0: abc 909 *** Failers 910No match 911 abc 912No match 913 914/(?=^)abc/ 915 abc 916 0: abc 917 *** Failers 918No match 919 the abc 920No match 921 922/^[ab]{1,3}(ab*|b)/ 923 aabbbbb 924 0: aabb 925 1: b 926 927/^[ab]{1,3}?(ab*|b)/ 928 aabbbbb 929 0: aabbbbb 930 1: abbbbb 931 932/^[ab]{1,3}?(ab*?|b)/ 933 aabbbbb 934 0: aa 935 1: a 936 937/^[ab]{1,3}(ab*?|b)/ 938 aabbbbb 939 0: aabb 940 1: b 941 942/ (?: [\040\t] | \( 943(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 944\) )* # optional leading comment 945(?: (?: 946[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 947(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 948| 949" (?: # opening quote... 950[^\\\x80-\xff\n\015"] # Anything except backslash and quote 951| # or 952\\ [^\x80-\xff] # Escaped something (something != CR) 953)* " # closing quote 954) # initial word 955(?: (?: [\040\t] | \( 956(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 957\) )* \. (?: [\040\t] | \( 958(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 959\) )* (?: 960[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 961(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 962| 963" (?: # opening quote... 964[^\\\x80-\xff\n\015"] # Anything except backslash and quote 965| # or 966\\ [^\x80-\xff] # Escaped something (something != CR) 967)* " # closing quote 968) )* # further okay, if led by a period 969(?: [\040\t] | \( 970(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 971\) )* @ (?: [\040\t] | \( 972(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 973\) )* (?: 974[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 975(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 976| \[ # [ 977(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 978\] # ] 979) # initial subdomain 980(?: # 981(?: [\040\t] | \( 982(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 983\) )* \. # if led by a period... 984(?: [\040\t] | \( 985(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 986\) )* (?: 987[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 988(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 989| \[ # [ 990(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 991\] # ] 992) # ...further okay 993)* 994# address 995| # or 996(?: 997[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 998(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 999| 1000" (?: # opening quote... 1001[^\\\x80-\xff\n\015"] # Anything except backslash and quote 1002| # or 1003\\ [^\x80-\xff] # Escaped something (something != CR) 1004)* " # closing quote 1005) # one word, optionally followed by.... 1006(?: 1007[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or... 1008\( 1009(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1010\) | # comments, or... 1011 1012" (?: # opening quote... 1013[^\\\x80-\xff\n\015"] # Anything except backslash and quote 1014| # or 1015\\ [^\x80-\xff] # Escaped something (something != CR) 1016)* " # closing quote 1017# quoted strings 1018)* 1019< (?: [\040\t] | \( 1020(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1021\) )* # leading < 1022(?: @ (?: [\040\t] | \( 1023(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1024\) )* (?: 1025[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1026(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1027| \[ # [ 1028(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1029\] # ] 1030) # initial subdomain 1031(?: # 1032(?: [\040\t] | \( 1033(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1034\) )* \. # if led by a period... 1035(?: [\040\t] | \( 1036(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1037\) )* (?: 1038[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1039(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1040| \[ # [ 1041(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1042\] # ] 1043) # ...further okay 1044)* 1045 1046(?: (?: [\040\t] | \( 1047(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1048\) )* , (?: [\040\t] | \( 1049(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1050\) )* @ (?: [\040\t] | \( 1051(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1052\) )* (?: 1053[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1054(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1055| \[ # [ 1056(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1057\] # ] 1058) # initial subdomain 1059(?: # 1060(?: [\040\t] | \( 1061(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1062\) )* \. # if led by a period... 1063(?: [\040\t] | \( 1064(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1065\) )* (?: 1066[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1067(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1068| \[ # [ 1069(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1070\] # ] 1071) # ...further okay 1072)* 1073)* # further okay, if led by comma 1074: # closing colon 1075(?: [\040\t] | \( 1076(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1077\) )* )? # optional route 1078(?: 1079[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1080(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1081| 1082" (?: # opening quote... 1083[^\\\x80-\xff\n\015"] # Anything except backslash and quote 1084| # or 1085\\ [^\x80-\xff] # Escaped something (something != CR) 1086)* " # closing quote 1087) # initial word 1088(?: (?: [\040\t] | \( 1089(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1090\) )* \. (?: [\040\t] | \( 1091(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1092\) )* (?: 1093[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1094(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1095| 1096" (?: # opening quote... 1097[^\\\x80-\xff\n\015"] # Anything except backslash and quote 1098| # or 1099\\ [^\x80-\xff] # Escaped something (something != CR) 1100)* " # closing quote 1101) )* # further okay, if led by a period 1102(?: [\040\t] | \( 1103(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1104\) )* @ (?: [\040\t] | \( 1105(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1106\) )* (?: 1107[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1108(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1109| \[ # [ 1110(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1111\] # ] 1112) # initial subdomain 1113(?: # 1114(?: [\040\t] | \( 1115(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1116\) )* \. # if led by a period... 1117(?: [\040\t] | \( 1118(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1119\) )* (?: 1120[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1121(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1122| \[ # [ 1123(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1124\] # ] 1125) # ...further okay 1126)* 1127# address spec 1128(?: [\040\t] | \( 1129(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1130\) )* > # trailing > 1131# name and address 1132) (?: [\040\t] | \( 1133(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* 1134\) )* # optional trailing comment 1135/x 1136 Alan Other <user\@dom.ain> 1137 0: Alan Other <user@dom.ain> 1138 <user\@dom.ain> 1139 0: user@dom.ain 1140 user\@dom.ain 1141 0: user@dom.ain 1142 \"A. Other\" <user.1234\@dom.ain> (a comment) 1143 0: "A. Other" <user.1234@dom.ain> (a comment) 1144 A. Other <user.1234\@dom.ain> (a comment) 1145 0: Other <user.1234@dom.ain> (a comment) 1146 \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay 1147 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay 1148 A missing angle <user\@some.where 1149 0: user@some.where 1150 *** Failers 1151No match 1152 The quick brown fox 1153No match 1154 1155/[\040\t]* # Nab whitespace. 1156(?: 1157\( # ( 1158[^\\\x80-\xff\n\015()] * # normal* 1159(?: # ( 1160(?: \\ [^\x80-\xff] | 1161\( # ( 1162[^\\\x80-\xff\n\015()] * # normal* 1163(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1164\) # ) 1165) # special 1166[^\\\x80-\xff\n\015()] * # normal* 1167)* # )* 1168\) # ) 1169[\040\t]* )* # If comment found, allow more spaces. 1170# optional leading comment 1171(?: 1172(?: 1173[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1174(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1175# Atom 1176| # or 1177" # " 1178[^\\\x80-\xff\n\015"] * # normal 1179(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )* 1180" # " 1181# Quoted string 1182) 1183[\040\t]* # Nab whitespace. 1184(?: 1185\( # ( 1186[^\\\x80-\xff\n\015()] * # normal* 1187(?: # ( 1188(?: \\ [^\x80-\xff] | 1189\( # ( 1190[^\\\x80-\xff\n\015()] * # normal* 1191(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1192\) # ) 1193) # special 1194[^\\\x80-\xff\n\015()] * # normal* 1195)* # )* 1196\) # ) 1197[\040\t]* )* # If comment found, allow more spaces. 1198(?: 1199\. 1200[\040\t]* # Nab whitespace. 1201(?: 1202\( # ( 1203[^\\\x80-\xff\n\015()] * # normal* 1204(?: # ( 1205(?: \\ [^\x80-\xff] | 1206\( # ( 1207[^\\\x80-\xff\n\015()] * # normal* 1208(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1209\) # ) 1210) # special 1211[^\\\x80-\xff\n\015()] * # normal* 1212)* # )* 1213\) # ) 1214[\040\t]* )* # If comment found, allow more spaces. 1215(?: 1216[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1217(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1218# Atom 1219| # or 1220" # " 1221[^\\\x80-\xff\n\015"] * # normal 1222(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )* 1223" # " 1224# Quoted string 1225) 1226[\040\t]* # Nab whitespace. 1227(?: 1228\( # ( 1229[^\\\x80-\xff\n\015()] * # normal* 1230(?: # ( 1231(?: \\ [^\x80-\xff] | 1232\( # ( 1233[^\\\x80-\xff\n\015()] * # normal* 1234(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1235\) # ) 1236) # special 1237[^\\\x80-\xff\n\015()] * # normal* 1238)* # )* 1239\) # ) 1240[\040\t]* )* # If comment found, allow more spaces. 1241# additional words 1242)* 1243@ 1244[\040\t]* # Nab whitespace. 1245(?: 1246\( # ( 1247[^\\\x80-\xff\n\015()] * # normal* 1248(?: # ( 1249(?: \\ [^\x80-\xff] | 1250\( # ( 1251[^\\\x80-\xff\n\015()] * # normal* 1252(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1253\) # ) 1254) # special 1255[^\\\x80-\xff\n\015()] * # normal* 1256)* # )* 1257\) # ) 1258[\040\t]* )* # If comment found, allow more spaces. 1259(?: 1260[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1261(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1262| 1263\[ # [ 1264(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1265\] # ] 1266) 1267[\040\t]* # Nab whitespace. 1268(?: 1269\( # ( 1270[^\\\x80-\xff\n\015()] * # normal* 1271(?: # ( 1272(?: \\ [^\x80-\xff] | 1273\( # ( 1274[^\\\x80-\xff\n\015()] * # normal* 1275(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1276\) # ) 1277) # special 1278[^\\\x80-\xff\n\015()] * # normal* 1279)* # )* 1280\) # ) 1281[\040\t]* )* # If comment found, allow more spaces. 1282# optional trailing comments 1283(?: 1284\. 1285[\040\t]* # Nab whitespace. 1286(?: 1287\( # ( 1288[^\\\x80-\xff\n\015()] * # normal* 1289(?: # ( 1290(?: \\ [^\x80-\xff] | 1291\( # ( 1292[^\\\x80-\xff\n\015()] * # normal* 1293(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1294\) # ) 1295) # special 1296[^\\\x80-\xff\n\015()] * # normal* 1297)* # )* 1298\) # ) 1299[\040\t]* )* # If comment found, allow more spaces. 1300(?: 1301[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1302(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1303| 1304\[ # [ 1305(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1306\] # ] 1307) 1308[\040\t]* # Nab whitespace. 1309(?: 1310\( # ( 1311[^\\\x80-\xff\n\015()] * # normal* 1312(?: # ( 1313(?: \\ [^\x80-\xff] | 1314\( # ( 1315[^\\\x80-\xff\n\015()] * # normal* 1316(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1317\) # ) 1318) # special 1319[^\\\x80-\xff\n\015()] * # normal* 1320)* # )* 1321\) # ) 1322[\040\t]* )* # If comment found, allow more spaces. 1323# optional trailing comments 1324)* 1325# address 1326| # or 1327(?: 1328[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1329(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1330# Atom 1331| # or 1332" # " 1333[^\\\x80-\xff\n\015"] * # normal 1334(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )* 1335" # " 1336# Quoted string 1337) 1338# leading word 1339[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces 1340(?: 1341(?: 1342\( # ( 1343[^\\\x80-\xff\n\015()] * # normal* 1344(?: # ( 1345(?: \\ [^\x80-\xff] | 1346\( # ( 1347[^\\\x80-\xff\n\015()] * # normal* 1348(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1349\) # ) 1350) # special 1351[^\\\x80-\xff\n\015()] * # normal* 1352)* # )* 1353\) # ) 1354| 1355" # " 1356[^\\\x80-\xff\n\015"] * # normal 1357(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )* 1358" # " 1359) # "special" comment or quoted string 1360[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal" 1361)* 1362< 1363[\040\t]* # Nab whitespace. 1364(?: 1365\( # ( 1366[^\\\x80-\xff\n\015()] * # normal* 1367(?: # ( 1368(?: \\ [^\x80-\xff] | 1369\( # ( 1370[^\\\x80-\xff\n\015()] * # normal* 1371(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1372\) # ) 1373) # special 1374[^\\\x80-\xff\n\015()] * # normal* 1375)* # )* 1376\) # ) 1377[\040\t]* )* # If comment found, allow more spaces. 1378# < 1379(?: 1380@ 1381[\040\t]* # Nab whitespace. 1382(?: 1383\( # ( 1384[^\\\x80-\xff\n\015()] * # normal* 1385(?: # ( 1386(?: \\ [^\x80-\xff] | 1387\( # ( 1388[^\\\x80-\xff\n\015()] * # normal* 1389(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1390\) # ) 1391) # special 1392[^\\\x80-\xff\n\015()] * # normal* 1393)* # )* 1394\) # ) 1395[\040\t]* )* # If comment found, allow more spaces. 1396(?: 1397[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1398(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1399| 1400\[ # [ 1401(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1402\] # ] 1403) 1404[\040\t]* # Nab whitespace. 1405(?: 1406\( # ( 1407[^\\\x80-\xff\n\015()] * # normal* 1408(?: # ( 1409(?: \\ [^\x80-\xff] | 1410\( # ( 1411[^\\\x80-\xff\n\015()] * # normal* 1412(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1413\) # ) 1414) # special 1415[^\\\x80-\xff\n\015()] * # normal* 1416)* # )* 1417\) # ) 1418[\040\t]* )* # If comment found, allow more spaces. 1419# optional trailing comments 1420(?: 1421\. 1422[\040\t]* # Nab whitespace. 1423(?: 1424\( # ( 1425[^\\\x80-\xff\n\015()] * # normal* 1426(?: # ( 1427(?: \\ [^\x80-\xff] | 1428\( # ( 1429[^\\\x80-\xff\n\015()] * # normal* 1430(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1431\) # ) 1432) # special 1433[^\\\x80-\xff\n\015()] * # normal* 1434)* # )* 1435\) # ) 1436[\040\t]* )* # If comment found, allow more spaces. 1437(?: 1438[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1439(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1440| 1441\[ # [ 1442(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1443\] # ] 1444) 1445[\040\t]* # Nab whitespace. 1446(?: 1447\( # ( 1448[^\\\x80-\xff\n\015()] * # normal* 1449(?: # ( 1450(?: \\ [^\x80-\xff] | 1451\( # ( 1452[^\\\x80-\xff\n\015()] * # normal* 1453(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1454\) # ) 1455) # special 1456[^\\\x80-\xff\n\015()] * # normal* 1457)* # )* 1458\) # ) 1459[\040\t]* )* # If comment found, allow more spaces. 1460# optional trailing comments 1461)* 1462(?: , 1463[\040\t]* # Nab whitespace. 1464(?: 1465\( # ( 1466[^\\\x80-\xff\n\015()] * # normal* 1467(?: # ( 1468(?: \\ [^\x80-\xff] | 1469\( # ( 1470[^\\\x80-\xff\n\015()] * # normal* 1471(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1472\) # ) 1473) # special 1474[^\\\x80-\xff\n\015()] * # normal* 1475)* # )* 1476\) # ) 1477[\040\t]* )* # If comment found, allow more spaces. 1478@ 1479[\040\t]* # Nab whitespace. 1480(?: 1481\( # ( 1482[^\\\x80-\xff\n\015()] * # normal* 1483(?: # ( 1484(?: \\ [^\x80-\xff] | 1485\( # ( 1486[^\\\x80-\xff\n\015()] * # normal* 1487(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1488\) # ) 1489) # special 1490[^\\\x80-\xff\n\015()] * # normal* 1491)* # )* 1492\) # ) 1493[\040\t]* )* # If comment found, allow more spaces. 1494(?: 1495[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1496(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1497| 1498\[ # [ 1499(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1500\] # ] 1501) 1502[\040\t]* # Nab whitespace. 1503(?: 1504\( # ( 1505[^\\\x80-\xff\n\015()] * # normal* 1506(?: # ( 1507(?: \\ [^\x80-\xff] | 1508\( # ( 1509[^\\\x80-\xff\n\015()] * # normal* 1510(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1511\) # ) 1512) # special 1513[^\\\x80-\xff\n\015()] * # normal* 1514)* # )* 1515\) # ) 1516[\040\t]* )* # If comment found, allow more spaces. 1517# optional trailing comments 1518(?: 1519\. 1520[\040\t]* # Nab whitespace. 1521(?: 1522\( # ( 1523[^\\\x80-\xff\n\015()] * # normal* 1524(?: # ( 1525(?: \\ [^\x80-\xff] | 1526\( # ( 1527[^\\\x80-\xff\n\015()] * # normal* 1528(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1529\) # ) 1530) # special 1531[^\\\x80-\xff\n\015()] * # normal* 1532)* # )* 1533\) # ) 1534[\040\t]* )* # If comment found, allow more spaces. 1535(?: 1536[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1537(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1538| 1539\[ # [ 1540(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1541\] # ] 1542) 1543[\040\t]* # Nab whitespace. 1544(?: 1545\( # ( 1546[^\\\x80-\xff\n\015()] * # normal* 1547(?: # ( 1548(?: \\ [^\x80-\xff] | 1549\( # ( 1550[^\\\x80-\xff\n\015()] * # normal* 1551(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1552\) # ) 1553) # special 1554[^\\\x80-\xff\n\015()] * # normal* 1555)* # )* 1556\) # ) 1557[\040\t]* )* # If comment found, allow more spaces. 1558# optional trailing comments 1559)* 1560)* # additional domains 1561: 1562[\040\t]* # Nab whitespace. 1563(?: 1564\( # ( 1565[^\\\x80-\xff\n\015()] * # normal* 1566(?: # ( 1567(?: \\ [^\x80-\xff] | 1568\( # ( 1569[^\\\x80-\xff\n\015()] * # normal* 1570(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1571\) # ) 1572) # special 1573[^\\\x80-\xff\n\015()] * # normal* 1574)* # )* 1575\) # ) 1576[\040\t]* )* # If comment found, allow more spaces. 1577# optional trailing comments 1578)? # optional route 1579(?: 1580[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1581(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1582# Atom 1583| # or 1584" # " 1585[^\\\x80-\xff\n\015"] * # normal 1586(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )* 1587" # " 1588# Quoted string 1589) 1590[\040\t]* # Nab whitespace. 1591(?: 1592\( # ( 1593[^\\\x80-\xff\n\015()] * # normal* 1594(?: # ( 1595(?: \\ [^\x80-\xff] | 1596\( # ( 1597[^\\\x80-\xff\n\015()] * # normal* 1598(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1599\) # ) 1600) # special 1601[^\\\x80-\xff\n\015()] * # normal* 1602)* # )* 1603\) # ) 1604[\040\t]* )* # If comment found, allow more spaces. 1605(?: 1606\. 1607[\040\t]* # Nab whitespace. 1608(?: 1609\( # ( 1610[^\\\x80-\xff\n\015()] * # normal* 1611(?: # ( 1612(?: \\ [^\x80-\xff] | 1613\( # ( 1614[^\\\x80-\xff\n\015()] * # normal* 1615(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1616\) # ) 1617) # special 1618[^\\\x80-\xff\n\015()] * # normal* 1619)* # )* 1620\) # ) 1621[\040\t]* )* # If comment found, allow more spaces. 1622(?: 1623[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1624(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1625# Atom 1626| # or 1627" # " 1628[^\\\x80-\xff\n\015"] * # normal 1629(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )* 1630" # " 1631# Quoted string 1632) 1633[\040\t]* # Nab whitespace. 1634(?: 1635\( # ( 1636[^\\\x80-\xff\n\015()] * # normal* 1637(?: # ( 1638(?: \\ [^\x80-\xff] | 1639\( # ( 1640[^\\\x80-\xff\n\015()] * # normal* 1641(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1642\) # ) 1643) # special 1644[^\\\x80-\xff\n\015()] * # normal* 1645)* # )* 1646\) # ) 1647[\040\t]* )* # If comment found, allow more spaces. 1648# additional words 1649)* 1650@ 1651[\040\t]* # Nab whitespace. 1652(?: 1653\( # ( 1654[^\\\x80-\xff\n\015()] * # normal* 1655(?: # ( 1656(?: \\ [^\x80-\xff] | 1657\( # ( 1658[^\\\x80-\xff\n\015()] * # normal* 1659(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1660\) # ) 1661) # special 1662[^\\\x80-\xff\n\015()] * # normal* 1663)* # )* 1664\) # ) 1665[\040\t]* )* # If comment found, allow more spaces. 1666(?: 1667[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1668(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1669| 1670\[ # [ 1671(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1672\] # ] 1673) 1674[\040\t]* # Nab whitespace. 1675(?: 1676\( # ( 1677[^\\\x80-\xff\n\015()] * # normal* 1678(?: # ( 1679(?: \\ [^\x80-\xff] | 1680\( # ( 1681[^\\\x80-\xff\n\015()] * # normal* 1682(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1683\) # ) 1684) # special 1685[^\\\x80-\xff\n\015()] * # normal* 1686)* # )* 1687\) # ) 1688[\040\t]* )* # If comment found, allow more spaces. 1689# optional trailing comments 1690(?: 1691\. 1692[\040\t]* # Nab whitespace. 1693(?: 1694\( # ( 1695[^\\\x80-\xff\n\015()] * # normal* 1696(?: # ( 1697(?: \\ [^\x80-\xff] | 1698\( # ( 1699[^\\\x80-\xff\n\015()] * # normal* 1700(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1701\) # ) 1702) # special 1703[^\\\x80-\xff\n\015()] * # normal* 1704)* # )* 1705\) # ) 1706[\040\t]* )* # If comment found, allow more spaces. 1707(?: 1708[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... 1709(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom 1710| 1711\[ # [ 1712(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff 1713\] # ] 1714) 1715[\040\t]* # Nab whitespace. 1716(?: 1717\( # ( 1718[^\\\x80-\xff\n\015()] * # normal* 1719(?: # ( 1720(?: \\ [^\x80-\xff] | 1721\( # ( 1722[^\\\x80-\xff\n\015()] * # normal* 1723(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)* 1724\) # ) 1725) # special 1726[^\\\x80-\xff\n\015()] * # normal* 1727)* # )* 1728\) # ) 1729[\040\t]* )* # If comment found, allow more spaces. 1730# optional trailing comments 1731)* 1732# address spec 1733> # > 1734# name and address 1735) 1736/x 1737 Alan Other <user\@dom.ain> 1738 0: Alan Other <user@dom.ain> 1739 <user\@dom.ain> 1740 0: user@dom.ain 1741 user\@dom.ain 1742 0: user@dom.ain 1743 \"A. Other\" <user.1234\@dom.ain> (a comment) 1744 0: "A. Other" <user.1234@dom.ain> 1745 A. Other <user.1234\@dom.ain> (a comment) 1746 0: Other <user.1234@dom.ain> 1747 \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay 1748 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay 1749 A missing angle <user\@some.where 1750 0: user@some.where 1751 *** Failers 1752No match 1753 The quick brown fox 1754No match 1755 1756/abc\0def\00pqr\000xyz\0000AB/ 1757 abc\0def\00pqr\000xyz\0000AB 1758 0: abc\x00def\x00pqr\x00xyz\x000AB 1759 abc456 abc\0def\00pqr\000xyz\0000ABCDE 1760 0: abc\x00def\x00pqr\x00xyz\x000AB 1761 1762/abc\x0def\x00pqr\x000xyz\x0000AB/ 1763 abc\x0def\x00pqr\x000xyz\x0000AB 1764 0: abc\x0def\x00pqr\x000xyz\x0000AB 1765 abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE 1766 0: abc\x0def\x00pqr\x000xyz\x0000AB 1767 1768/^[\000-\037]/ 1769 \0A 1770 0: \x00 1771 \01B 1772 0: \x01 1773 \037C 1774 0: \x1f 1775 1776/\0*/ 1777 \0\0\0\0 1778 0: \x00\x00\x00\x00 1779 1780/A\x0{2,3}Z/ 1781 The A\x0\x0Z 1782 0: A\x00\x00Z 1783 An A\0\x0\0Z 1784 0: A\x00\x00\x00Z 1785 *** Failers 1786No match 1787 A\0Z 1788No match 1789 A\0\x0\0\x0Z 1790No match 1791 1792/^(cow|)\1(bell)/ 1793 cowcowbell 1794 0: cowcowbell 1795 1: cow 1796 2: bell 1797 bell 1798 0: bell 1799 1: 1800 2: bell 1801 *** Failers 1802No match 1803 cowbell 1804No match 1805 1806/^\s/ 1807 \040abc 1808 0: 1809 \x0cabc 1810 0: \x0c 1811 \nabc 1812 0: \x0a 1813 \rabc 1814 0: \x0d 1815 \tabc 1816 0: \x09 1817 *** Failers 1818No match 1819 abc 1820No match 1821 1822/^a b 1823 c/x 1824 abc 1825 0: abc 1826 1827/^(a|)\1*b/ 1828 ab 1829 0: ab 1830 1: a 1831 aaaab 1832 0: aaaab 1833 1: a 1834 b 1835 0: b 1836 1: 1837 *** Failers 1838No match 1839 acb 1840No match 1841 1842/^(a|)\1+b/ 1843 aab 1844 0: aab 1845 1: a 1846 aaaab 1847 0: aaaab 1848 1: a 1849 b 1850 0: b 1851 1: 1852 *** Failers 1853No match 1854 ab 1855No match 1856 1857/^(a|)\1?b/ 1858 ab 1859 0: ab 1860 1: a 1861 aab 1862 0: aab 1863 1: a 1864 b 1865 0: b 1866 1: 1867 *** Failers 1868No match 1869 acb 1870No match 1871 1872/^(a|)\1{2}b/ 1873 aaab 1874 0: aaab 1875 1: a 1876 b 1877 0: b 1878 1: 1879 *** Failers 1880No match 1881 ab 1882No match 1883 aab 1884No match 1885 aaaab 1886No match 1887 1888/^(a|)\1{2,3}b/ 1889 aaab 1890 0: aaab 1891 1: a 1892 aaaab 1893 0: aaaab 1894 1: a 1895 b 1896 0: b 1897 1: 1898 *** Failers 1899No match 1900 ab 1901No match 1902 aab 1903No match 1904 aaaaab 1905No match 1906 1907/ab{1,3}bc/ 1908 abbbbc 1909 0: abbbbc 1910 abbbc 1911 0: abbbc 1912 abbc 1913 0: abbc 1914 *** Failers 1915No match 1916 abc 1917No match 1918 abbbbbc 1919No match 1920 1921/([^.]*)\.([^:]*):[T ]+(.*)/ 1922 track1.title:TBlah blah blah 1923 0: track1.title:TBlah blah blah 1924 1: track1 1925 2: title 1926 3: Blah blah blah 1927 1928/([^.]*)\.([^:]*):[T ]+(.*)/i 1929 track1.title:TBlah blah blah 1930 0: track1.title:TBlah blah blah 1931 1: track1 1932 2: title 1933 3: Blah blah blah 1934 1935/([^.]*)\.([^:]*):[t ]+(.*)/i 1936 track1.title:TBlah blah blah 1937 0: track1.title:TBlah blah blah 1938 1: track1 1939 2: title 1940 3: Blah blah blah 1941 1942/^[W-c]+$/ 1943 WXY_^abc 1944 0: WXY_^abc 1945 *** Failers 1946No match 1947 wxy 1948No match 1949 1950/^[W-c]+$/i 1951 WXY_^abc 1952 0: WXY_^abc 1953 wxy_^ABC 1954 0: wxy_^ABC 1955 1956/^[\x3f-\x5F]+$/i 1957 WXY_^abc 1958 0: WXY_^abc 1959 wxy_^ABC 1960 0: wxy_^ABC 1961 1962/^abc$/m 1963 abc 1964 0: abc 1965 qqq\nabc 1966 0: abc 1967 abc\nzzz 1968 0: abc 1969 qqq\nabc\nzzz 1970 0: abc 1971 1972/^abc$/ 1973 abc 1974 0: abc 1975 *** Failers 1976No match 1977 qqq\nabc 1978No match 1979 abc\nzzz 1980No match 1981 qqq\nabc\nzzz 1982No match 1983 1984/\Aabc\Z/m 1985 abc 1986 0: abc 1987 abc\n 1988 0: abc 1989 *** Failers 1990No match 1991 qqq\nabc 1992No match 1993 abc\nzzz 1994No match 1995 qqq\nabc\nzzz 1996No match 1997 1998/\A(.)*\Z/s 1999 abc\ndef 2000 0: abc\x0adef 2001 1: f 2002 2003/\A(.)*\Z/m 2004 *** Failers 2005 0: *** Failers 2006 1: s 2007 abc\ndef 2008No match 2009 2010/(?:b)|(?::+)/ 2011 b::c 2012 0: b 2013 c::b 2014 0: :: 2015 2016/[-az]+/ 2017 az- 2018 0: az- 2019 *** Failers 2020 0: a 2021 b 2022No match 2023 2024/[az-]+/ 2025 za- 2026 0: za- 2027 *** Failers 2028 0: a 2029 b 2030No match 2031 2032/[a\-z]+/ 2033 a-z 2034 0: a-z 2035 *** Failers 2036 0: a 2037 b 2038No match 2039 2040/[a-z]+/ 2041 abcdxyz 2042 0: abcdxyz 2043 2044/[\d-]+/ 2045 12-34 2046 0: 12-34 2047 *** Failers 2048No match 2049 aaa 2050No match 2051 2052/[\d-z]+/ 2053 12-34z 2054 0: 12-34z 2055 *** Failers 2056No match 2057 aaa 2058No match 2059 2060/\x5c/ 2061 \\ 2062 0: \ 2063 2064/\x20Z/ 2065 the Zoo 2066 0: Z 2067 *** Failers 2068No match 2069 Zulu 2070No match 2071 2072/(abc)\1/i 2073 abcabc 2074 0: abcabc 2075 1: abc 2076 ABCabc 2077 0: ABCabc 2078 1: ABC 2079 abcABC 2080 0: abcABC 2081 1: abc 2082 2083/ab{3cd/ 2084 ab{3cd 2085 0: ab{3cd 2086 2087/ab{3,cd/ 2088 ab{3,cd 2089 0: ab{3,cd 2090 2091/ab{3,4a}cd/ 2092 ab{3,4a}cd 2093 0: ab{3,4a}cd 2094 2095/{4,5a}bc/ 2096 {4,5a}bc 2097 0: {4,5a}bc 2098 2099/abc$/ 2100 abc 2101 0: abc 2102 abc\n 2103 0: abc 2104 *** Failers 2105No match 2106 abc\ndef 2107No match 2108 2109/(abc)\123/ 2110 abc\x53 2111 0: abcS 2112 1: abc 2113 2114/(abc)\223/ 2115 abc\x93 2116 0: abc\x93 2117 1: abc 2118 2119/(abc)\323/ 2120 abc\xd3 2121 0: abc\xd3 2122 1: abc 2123 2124/(abc)\100/ 2125 abc\x40 2126 0: abc@ 2127 1: abc 2128 abc\100 2129 0: abc@ 2130 1: abc 2131 2132/(abc)\1000/ 2133 abc\x400 2134 0: abc@0 2135 1: abc 2136 abc\x40\x30 2137 0: abc@0 2138 1: abc 2139 abc\1000 2140 0: abc@0 2141 1: abc 2142 abc\100\x30 2143 0: abc@0 2144 1: abc 2145 abc\100\060 2146 0: abc@0 2147 1: abc 2148 abc\100\60 2149 0: abc@0 2150 1: abc 2151 2152/abc\81/ 2153 abc\081 2154 0: abc\x0081 2155 abc\0\x38\x31 2156 0: abc\x0081 2157 2158/abc\91/ 2159 abc\091 2160 0: abc\x0091 2161 abc\0\x39\x31 2162 0: abc\x0091 2163 2164/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/ 2165 abcdefghijkllS 2166 0: abcdefghijkllS 2167 1: a 2168 2: b 2169 3: c 2170 4: d 2171 5: e 2172 6: f 2173 7: g 2174 8: h 2175 9: i 217610: j 217711: k 217812: l 2179 2180/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/ 2181 abcdefghijk\12S 2182 0: abcdefghijk\x0aS 2183 1: a 2184 2: b 2185 3: c 2186 4: d 2187 5: e 2188 6: f 2189 7: g 2190 8: h 2191 9: i 219210: j 219311: k 2194 2195/ab\idef/ 2196 abidef 2197 0: abidef 2198 2199/a{0}bc/ 2200 bc 2201 0: bc 2202 2203/(a|(bc)){0,0}?xyz/ 2204 xyz 2205 0: xyz 2206 2207/abc[\10]de/ 2208 abc\010de 2209 0: abc\x08de 2210 2211/abc[\1]de/ 2212 abc\1de 2213 0: abc\x01de 2214 2215/(abc)[\1]de/ 2216 abc\1de 2217 0: abc\x01de 2218 1: abc 2219 2220/(?s)a.b/ 2221 a\nb 2222 0: a\x0ab 2223 2224/^([^a])([^\b])([^c]*)([^d]{3,4})/ 2225 baNOTccccd 2226 0: baNOTcccc 2227 1: b 2228 2: a 2229 3: NOT 2230 4: cccc 2231 baNOTcccd 2232 0: baNOTccc 2233 1: b 2234 2: a 2235 3: NOT 2236 4: ccc 2237 baNOTccd 2238 0: baNOTcc 2239 1: b 2240 2: a 2241 3: NO 2242 4: Tcc 2243 bacccd 2244 0: baccc 2245 1: b 2246 2: a 2247 3: 2248 4: ccc 2249 *** Failers 2250 0: *** Failers 2251 1: * 2252 2: * 2253 3: * Fail 2254 4: ers 2255 anything 2256No match 2257 b\bc 2258No match 2259 baccd 2260No match 2261 2262/[^a]/ 2263 Abc 2264 0: A 2265 2266/[^a]/i 2267 Abc 2268 0: b 2269 2270/[^a]+/ 2271 AAAaAbc 2272 0: AAA 2273 2274/[^a]+/i 2275 AAAaAbc 2276 0: bc 2277 2278/[^a]+/ 2279 bbb\nccc 2280 0: bbb\x0accc 2281 2282/[^k]$/ 2283 abc 2284 0: c 2285 *** Failers 2286 0: s 2287 abk 2288No match 2289 2290/[^k]{2,3}$/ 2291 abc 2292 0: abc 2293 kbc 2294 0: bc 2295 kabc 2296 0: abc 2297 *** Failers 2298 0: ers 2299 abk 2300No match 2301 akb 2302No match 2303 akk 2304No match 2305 2306/^\d{8,}\@.+[^k]$/ 2307 12345678\@a.b.c.d 2308 0: 12345678@a.b.c.d 2309 123456789\@x.y.z 2310 0: 123456789@x.y.z 2311 *** Failers 2312No match 2313 12345678\@x.y.uk 2314No match 2315 1234567\@a.b.c.d 2316No match 2317 2318/(a)\1{8,}/ 2319 aaaaaaaaa 2320 0: aaaaaaaaa 2321 1: a 2322 aaaaaaaaaa 2323 0: aaaaaaaaaa 2324 1: a 2325 *** Failers 2326No match 2327 aaaaaaa 2328No match 2329 2330/[^a]/ 2331 aaaabcd 2332 0: b 2333 aaAabcd 2334 0: A 2335 2336/[^a]/i 2337 aaaabcd 2338 0: b 2339 aaAabcd 2340 0: b 2341 2342/[^az]/ 2343 aaaabcd 2344 0: b 2345 aaAabcd 2346 0: A 2347 2348/[^az]/i 2349 aaaabcd 2350 0: b 2351 aaAabcd 2352 0: b 2353 2354/\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/ 2355 \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 2356 0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff 2357 2358/P[^*]TAIRE[^*]{1,6}?LL/ 2359 xxxxxxxxxxxPSTAIREISLLxxxxxxxxx 2360 0: PSTAIREISLL 2361 2362/P[^*]TAIRE[^*]{1,}?LL/ 2363 xxxxxxxxxxxPSTAIREISLLxxxxxxxxx 2364 0: PSTAIREISLL 2365 2366/(\.\d\d[1-9]?)\d+/ 2367 1.230003938 2368 0: .230003938 2369 1: .23 2370 1.875000282 2371 0: .875000282 2372 1: .875 2373 1.235 2374 0: .235 2375 1: .23 2376 2377/(\.\d\d((?=0)|\d(?=\d)))/ 2378 1.230003938 2379 0: .23 2380 1: .23 2381 2: 2382 1.875000282 2383 0: .875 2384 1: .875 2385 2: 5 2386 *** Failers 2387No match 2388 1.235 2389No match 2390 2391/a(?)b/ 2392 ab 2393 0: ab 2394 2395/\b(foo)\s+(\w+)/i 2396 Food is on the foo table 2397 0: foo table 2398 1: foo 2399 2: table 2400 2401/foo(.*)bar/ 2402 The food is under the bar in the barn. 2403 0: food is under the bar in the bar 2404 1: d is under the bar in the 2405 2406/foo(.*?)bar/ 2407 The food is under the bar in the barn. 2408 0: food is under the bar 2409 1: d is under the 2410 2411/(.*)(\d*)/ 2412 I have 2 numbers: 53147 2413 0: I have 2 numbers: 53147 2414 1: I have 2 numbers: 53147 2415 2: 2416 2417/(.*)(\d+)/ 2418 I have 2 numbers: 53147 2419 0: I have 2 numbers: 53147 2420 1: I have 2 numbers: 5314 2421 2: 7 2422 2423/(.*?)(\d*)/ 2424 I have 2 numbers: 53147 2425 0: 2426 1: 2427 2: 2428 2429/(.*?)(\d+)/ 2430 I have 2 numbers: 53147 2431 0: I have 2 2432 1: I have 2433 2: 2 2434 2435/(.*)(\d+)$/ 2436 I have 2 numbers: 53147 2437 0: I have 2 numbers: 53147 2438 1: I have 2 numbers: 5314 2439 2: 7 2440 2441/(.*?)(\d+)$/ 2442 I have 2 numbers: 53147 2443 0: I have 2 numbers: 53147 2444 1: I have 2 numbers: 2445 2: 53147 2446 2447/(.*)\b(\d+)$/ 2448 I have 2 numbers: 53147 2449 0: I have 2 numbers: 53147 2450 1: I have 2 numbers: 2451 2: 53147 2452 2453/(.*\D)(\d+)$/ 2454 I have 2 numbers: 53147 2455 0: I have 2 numbers: 53147 2456 1: I have 2 numbers: 2457 2: 53147 2458 2459/^\D*(?!123)/ 2460 ABC123 2461 0: AB 2462 2463/^(\D*)(?=\d)(?!123)/ 2464 ABC445 2465 0: ABC 2466 1: ABC 2467 *** Failers 2468No match 2469 ABC123 2470No match 2471 2472/^[W-]46]/ 2473 W46]789 2474 0: W46] 2475 -46]789 2476 0: -46] 2477 *** Failers 2478No match 2479 Wall 2480No match 2481 Zebra 2482No match 2483 42 2484No match 2485 [abcd] 2486No match 2487 ]abcd[ 2488No match 2489 2490/^[W-\]46]/ 2491 W46]789 2492 0: W 2493 Wall 2494 0: W 2495 Zebra 2496 0: Z 2497 Xylophone 2498 0: X 2499 42 2500 0: 4 2501 [abcd] 2502 0: [ 2503 ]abcd[ 2504 0: ] 2505 \\backslash 2506 0: \ 2507 *** Failers 2508No match 2509 -46]789 2510No match 2511 well 2512No match 2513 2514/\d\d\/\d\d\/\d\d\d\d/ 2515 01/01/2000 2516 0: 01/01/2000 2517 2518/word (?:[a-zA-Z0-9]+ ){0,10}otherword/ 2519 word cat dog elephant mussel cow horse canary baboon snake shark otherword 2520 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword 2521 word cat dog elephant mussel cow horse canary baboon snake shark 2522No match 2523 2524/word (?:[a-zA-Z0-9]+ ){0,300}otherword/ 2525 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 2526No match 2527 2528/^(a){0,0}/ 2529 bcd 2530 0: 2531 abc 2532 0: 2533 aab 2534 0: 2535 2536/^(a){0,1}/ 2537 bcd 2538 0: 2539 abc 2540 0: a 2541 1: a 2542 aab 2543 0: a 2544 1: a 2545 2546/^(a){0,2}/ 2547 bcd 2548 0: 2549 abc 2550 0: a 2551 1: a 2552 aab 2553 0: aa 2554 1: a 2555 2556/^(a){0,3}/ 2557 bcd 2558 0: 2559 abc 2560 0: a 2561 1: a 2562 aab 2563 0: aa 2564 1: a 2565 aaa 2566 0: aaa 2567 1: a 2568 2569/^(a){0,}/ 2570 bcd 2571 0: 2572 abc 2573 0: a 2574 1: a 2575 aab 2576 0: aa 2577 1: a 2578 aaa 2579 0: aaa 2580 1: a 2581 aaaaaaaa 2582 0: aaaaaaaa 2583 1: a 2584 2585/^(a){1,1}/ 2586 bcd 2587No match 2588 abc 2589 0: a 2590 1: a 2591 aab 2592 0: a 2593 1: a 2594 2595/^(a){1,2}/ 2596 bcd 2597No match 2598 abc 2599 0: a 2600 1: a 2601 aab 2602 0: aa 2603 1: a 2604 2605/^(a){1,3}/ 2606 bcd 2607No match 2608 abc 2609 0: a 2610 1: a 2611 aab 2612 0: aa 2613 1: a 2614 aaa 2615 0: aaa 2616 1: a 2617 2618/^(a){1,}/ 2619 bcd 2620No match 2621 abc 2622 0: a 2623 1: a 2624 aab 2625 0: aa 2626 1: a 2627 aaa 2628 0: aaa 2629 1: a 2630 aaaaaaaa 2631 0: aaaaaaaa 2632 1: a 2633 2634/.*\.gif/ 2635 borfle\nbib.gif\nno 2636 0: bib.gif 2637 2638/.{0,}\.gif/ 2639 borfle\nbib.gif\nno 2640 0: bib.gif 2641 2642/.*\.gif/m 2643 borfle\nbib.gif\nno 2644 0: bib.gif 2645 2646/.*\.gif/s 2647 borfle\nbib.gif\nno 2648 0: borfle\x0abib.gif 2649 2650/.*\.gif/ms 2651 borfle\nbib.gif\nno 2652 0: borfle\x0abib.gif 2653 2654/.*$/ 2655 borfle\nbib.gif\nno 2656 0: no 2657 2658/.*$/m 2659 borfle\nbib.gif\nno 2660 0: borfle 2661 2662/.*$/s 2663 borfle\nbib.gif\nno 2664 0: borfle\x0abib.gif\x0ano 2665 2666/.*$/ms 2667 borfle\nbib.gif\nno 2668 0: borfle\x0abib.gif\x0ano 2669 2670/.*$/ 2671 borfle\nbib.gif\nno\n 2672 0: no 2673 2674/.*$/m 2675 borfle\nbib.gif\nno\n 2676 0: borfle 2677 2678/.*$/s 2679 borfle\nbib.gif\nno\n 2680 0: borfle\x0abib.gif\x0ano\x0a 2681 2682/.*$/ms 2683 borfle\nbib.gif\nno\n 2684 0: borfle\x0abib.gif\x0ano\x0a 2685 2686/(.*X|^B)/ 2687 abcde\n1234Xyz 2688 0: 1234X 2689 1: 1234X 2690 BarFoo 2691 0: B 2692 1: B 2693 *** Failers 2694No match 2695 abcde\nBar 2696No match 2697 2698/(.*X|^B)/m 2699 abcde\n1234Xyz 2700 0: 1234X 2701 1: 1234X 2702 BarFoo 2703 0: B 2704 1: B 2705 abcde\nBar 2706 0: B 2707 1: B 2708 2709/(.*X|^B)/s 2710 abcde\n1234Xyz 2711 0: abcde\x0a1234X 2712 1: abcde\x0a1234X 2713 BarFoo 2714 0: B 2715 1: B 2716 *** Failers 2717No match 2718 abcde\nBar 2719No match 2720 2721/(.*X|^B)/ms 2722 abcde\n1234Xyz 2723 0: abcde\x0a1234X 2724 1: abcde\x0a1234X 2725 BarFoo 2726 0: B 2727 1: B 2728 abcde\nBar 2729 0: B 2730 1: B 2731 2732/(?s)(.*X|^B)/ 2733 abcde\n1234Xyz 2734 0: abcde\x0a1234X 2735 1: abcde\x0a1234X 2736 BarFoo 2737 0: B 2738 1: B 2739 *** Failers 2740No match 2741 abcde\nBar 2742No match 2743 2744/(?s:.*X|^B)/ 2745 abcde\n1234Xyz 2746 0: abcde\x0a1234X 2747 BarFoo 2748 0: B 2749 *** Failers 2750No match 2751 abcde\nBar 2752No match 2753 2754/^.*B/ 2755 **** Failers 2756No match 2757 abc\nB 2758No match 2759 2760/(?s)^.*B/ 2761 abc\nB 2762 0: abc\x0aB 2763 2764/(?m)^.*B/ 2765 abc\nB 2766 0: B 2767 2768/(?ms)^.*B/ 2769 abc\nB 2770 0: abc\x0aB 2771 2772/(?ms)^B/ 2773 abc\nB 2774 0: B 2775 2776/(?s)B$/ 2777 B\n 2778 0: B 2779 2780/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/ 2781 123456654321 2782 0: 123456654321 2783 2784/^\d\d\d\d\d\d\d\d\d\d\d\d/ 2785 123456654321 2786 0: 123456654321 2787 2788/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/ 2789 123456654321 2790 0: 123456654321 2791 2792/^[abc]{12}/ 2793 abcabcabcabc 2794 0: abcabcabcabc 2795 2796/^[a-c]{12}/ 2797 abcabcabcabc 2798 0: abcabcabcabc 2799 2800/^(a|b|c){12}/ 2801 abcabcabcabc 2802 0: abcabcabcabc 2803 1: c 2804 2805/^[abcdefghijklmnopqrstuvwxy0123456789]/ 2806 n 2807 0: n 2808 *** Failers 2809No match 2810 z 2811No match 2812 2813/abcde{0,0}/ 2814 abcd 2815 0: abcd 2816 *** Failers 2817No match 2818 abce 2819No match 2820 2821/ab[cd]{0,0}e/ 2822 abe 2823 0: abe 2824 *** Failers 2825No match 2826 abcde 2827No match 2828 2829/ab(c){0,0}d/ 2830 abd 2831 0: abd 2832 *** Failers 2833No match 2834 abcd 2835No match 2836 2837/a(b*)/ 2838 a 2839 0: a 2840 1: 2841 ab 2842 0: ab 2843 1: b 2844 abbbb 2845 0: abbbb 2846 1: bbbb 2847 *** Failers 2848 0: a 2849 1: 2850 bbbbb 2851No match 2852 2853/ab\d{0}e/ 2854 abe 2855 0: abe 2856 *** Failers 2857No match 2858 ab1e 2859No match 2860 2861/"([^\\"]+|\\.)*"/ 2862 the \"quick\" brown fox 2863 0: "quick" 2864 1: quick 2865 \"the \\\"quick\\\" brown fox\" 2866 0: "the \"quick\" brown fox" 2867 1: brown fox 2868 2869/.*?/g+ 2870 abc 2871 0: 2872 0+ abc 2873 0: a 2874 0+ bc 2875 0: 2876 0+ bc 2877 0: b 2878 0+ c 2879 0: 2880 0+ c 2881 0: c 2882 0+ 2883 0: 2884 0+ 2885 2886/\b/g+ 2887 abc 2888 0: 2889 0+ abc 2890 0: 2891 0+ 2892 2893/\b/+g 2894 abc 2895 0: 2896 0+ abc 2897 0: 2898 0+ 2899 2900//g 2901 abc 2902 0: 2903 0: 2904 0: 2905 0: 2906 2907/<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 2908 <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> 2909 0: <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> 2910 1: BGCOLOR='#DBE9E9' 2911 2: align=left valign=top 2912 3: 43. 2913 4: <a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286) 2914 5: 2915 6: 2916 7: <unset> 2917 8: align=left valign=top 2918 9: Lega lstaff.com 291910: align=left valign=top 292011: CA - Statewide 2921 2922/a[^a]b/ 2923 acb 2924 0: acb 2925 a\nb 2926 0: a\x0ab 2927 2928/a.b/ 2929 acb 2930 0: acb 2931 *** Failers 2932No match 2933 a\nb 2934No match 2935 2936/a[^a]b/s 2937 acb 2938 0: acb 2939 a\nb 2940 0: a\x0ab 2941 2942/a.b/s 2943 acb 2944 0: acb 2945 a\nb 2946 0: a\x0ab 2947 2948/^(b+?|a){1,2}?c/ 2949 bac 2950 0: bac 2951 1: a 2952 bbac 2953 0: bbac 2954 1: a 2955 bbbac 2956 0: bbbac 2957 1: a 2958 bbbbac 2959 0: bbbbac 2960 1: a 2961 bbbbbac 2962 0: bbbbbac 2963 1: a 2964 2965/^(b+|a){1,2}?c/ 2966 bac 2967 0: bac 2968 1: a 2969 bbac 2970 0: bbac 2971 1: a 2972 bbbac 2973 0: bbbac 2974 1: a 2975 bbbbac 2976 0: bbbbac 2977 1: a 2978 bbbbbac 2979 0: bbbbbac 2980 1: a 2981 2982/(?!\A)x/m 2983 x\nb\n 2984No match 2985 a\bx\n 2986 0: x 2987 2988/\x0{ab}/ 2989 \0{ab} 2990 0: \x00{ab} 2991 2992/(A|B)*?CD/ 2993 CD 2994 0: CD 2995 2996/(A|B)*CD/ 2997 CD 2998 0: CD 2999 3000/(AB)*?\1/ 3001 ABABAB 3002 0: ABAB 3003 1: AB 3004 3005/(AB)*\1/ 3006 ABABAB 3007 0: ABABAB 3008 1: AB 3009 3010/(?<!bar)foo/ 3011 foo 3012 0: foo 3013 catfood 3014 0: foo 3015 arfootle 3016 0: foo 3017 rfoosh 3018 0: foo 3019 *** Failers 3020No match 3021 barfoo 3022No match 3023 towbarfoo 3024No match 3025 3026/\w{3}(?<!bar)foo/ 3027 catfood 3028 0: catfoo 3029 *** Failers 3030No match 3031 foo 3032No match 3033 barfoo 3034No match 3035 towbarfoo 3036No match 3037 3038/(?<=(foo)a)bar/ 3039 fooabar 3040 0: bar 3041 1: foo 3042 *** Failers 3043No match 3044 bar 3045No match 3046 foobbar 3047No match 3048 3049/\Aabc\z/m 3050 abc 3051 0: abc 3052 *** Failers 3053No match 3054 abc\n 3055No match 3056 qqq\nabc 3057No match 3058 abc\nzzz 3059No match 3060 qqq\nabc\nzzz 3061No match 3062 3063"(?>.*/)foo" 3064 /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/ 3065No match 3066 3067"(?>.*/)foo" 3068 /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo 3069 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo 3070 3071/(?>(\.\d\d[1-9]?))\d+/ 3072 1.230003938 3073 0: .230003938 3074 1: .23 3075 1.875000282 3076 0: .875000282 3077 1: .875 3078 *** Failers 3079No match 3080 1.235 3081No match 3082 3083/^((?>\w+)|(?>\s+))*$/ 3084 now is the time for all good men to come to the aid of the party 3085 0: now is the time for all good men to come to the aid of the party 3086 1: party 3087 *** Failers 3088No match 3089 this is not a line with only words and spaces! 3090No match 3091 3092/(\d+)(\w)/ 3093 12345a 3094 0: 12345a 3095 1: 12345 3096 2: a 3097 12345+ 3098 0: 12345 3099 1: 1234 3100 2: 5 3101 3102/((?>\d+))(\w)/ 3103 12345a 3104 0: 12345a 3105 1: 12345 3106 2: a 3107 *** Failers 3108No match 3109 12345+ 3110No match 3111 3112/(?>a+)b/ 3113 aaab 3114 0: aaab 3115 3116/((?>a+)b)/ 3117 aaab 3118 0: aaab 3119 1: aaab 3120 3121/(?>(a+))b/ 3122 aaab 3123 0: aaab 3124 1: aaa 3125 3126/(?>b)+/ 3127 aaabbbccc 3128 0: bbb 3129 3130/(?>a+|b+|c+)*c/ 3131 aaabbbbccccd 3132 0: aaabbbbc 3133 3134/((?>[^()]+)|\([^()]*\))+/ 3135 ((abc(ade)ufh()()x 3136 0: abc(ade)ufh()()x 3137 1: x 3138 3139/\(((?>[^()]+)|\([^()]+\))+\)/ 3140 (abc) 3141 0: (abc) 3142 1: abc 3143 (abc(def)xyz) 3144 0: (abc(def)xyz) 3145 1: xyz 3146 *** Failers 3147No match 3148 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3149No match 3150 3151/a(?-i)b/i 3152 ab 3153 0: ab 3154 Ab 3155 0: Ab 3156 *** Failers 3157No match 3158 aB 3159No match 3160 AB 3161No match 3162 3163/(a (?x)b c)d e/ 3164 a bcd e 3165 0: a bcd e 3166 1: a bc 3167 *** Failers 3168No match 3169 a b cd e 3170No match 3171 abcd e 3172No match 3173 a bcde 3174No match 3175 3176/(a b(?x)c d (?-x)e f)/ 3177 a bcde f 3178 0: a bcde f 3179 1: a bcde f 3180 *** Failers 3181No match 3182 abcdef 3183No match 3184 3185/(a(?i)b)c/ 3186 abc 3187 0: abc 3188 1: ab 3189 aBc 3190 0: aBc 3191 1: aB 3192 *** Failers 3193No match 3194 abC 3195No match 3196 aBC 3197No match 3198 Abc 3199No match 3200 ABc 3201No match 3202 ABC 3203No match 3204 AbC 3205No match 3206 3207/a(?i:b)c/ 3208 abc 3209 0: abc 3210 aBc 3211 0: aBc 3212 *** Failers 3213No match 3214 ABC 3215No match 3216 abC 3217No match 3218 aBC 3219No match 3220 3221/a(?i:b)*c/ 3222 aBc 3223 0: aBc 3224 aBBc 3225 0: aBBc 3226 *** Failers 3227No match 3228 aBC 3229No match 3230 aBBC 3231No match 3232 3233/a(?=b(?i)c)\w\wd/ 3234 abcd 3235 0: abcd 3236 abCd 3237 0: abCd 3238 *** Failers 3239No match 3240 aBCd 3241No match 3242 abcD 3243No match 3244 3245/(?s-i:more.*than).*million/i 3246 more than million 3247 0: more than million 3248 more than MILLION 3249 0: more than MILLION 3250 more \n than Million 3251 0: more \x0a than Million 3252 *** Failers 3253No match 3254 MORE THAN MILLION 3255No match 3256 more \n than \n million 3257No match 3258 3259/(?:(?s-i)more.*than).*million/i 3260 more than million 3261 0: more than million 3262 more than MILLION 3263 0: more than MILLION 3264 more \n than Million 3265 0: more \x0a than Million 3266 *** Failers 3267No match 3268 MORE THAN MILLION 3269No match 3270 more \n than \n million 3271No match 3272 3273/(?>a(?i)b+)+c/ 3274 abc 3275 0: abc 3276 aBbc 3277 0: aBbc 3278 aBBc 3279 0: aBBc 3280 *** Failers 3281No match 3282 Abc 3283No match 3284 abAb 3285No match 3286 abbC 3287No match 3288 3289/(?=a(?i)b)\w\wc/ 3290 abc 3291 0: abc 3292 aBc 3293 0: aBc 3294 *** Failers 3295No match 3296 Ab 3297No match 3298 abC 3299No match 3300 aBC 3301No match 3302 3303/(?<=a(?i)b)(\w\w)c/ 3304 abxxc 3305 0: xxc 3306 1: xx 3307 aBxxc 3308 0: xxc 3309 1: xx 3310 *** Failers 3311No match 3312 Abxxc 3313No match 3314 ABxxc 3315No match 3316 abxxC 3317No match 3318 3319/(?:(a)|b)(?(1)A|B)/ 3320 aA 3321 0: aA 3322 1: a 3323 bB 3324 0: bB 3325 *** Failers 3326No match 3327 aB 3328No match 3329 bA 3330No match 3331 3332/^(a)?(?(1)a|b)+$/ 3333 aa 3334 0: aa 3335 1: a 3336 b 3337 0: b 3338 bb 3339 0: bb 3340 *** Failers 3341No match 3342 ab 3343No match 3344 3345/^(?(?=abc)\w{3}:|\d\d)$/ 3346 abc: 3347 0: abc: 3348 12 3349 0: 12 3350 *** Failers 3351No match 3352 123 3353No match 3354 xyz 3355No match 3356 3357/^(?(?!abc)\d\d|\w{3}:)$/ 3358 abc: 3359 0: abc: 3360 12 3361 0: 12 3362 *** Failers 3363No match 3364 123 3365No match 3366 xyz 3367No match 3368 3369/(?(?<=foo)bar|cat)/ 3370 foobar 3371 0: bar 3372 cat 3373 0: cat 3374 fcat 3375 0: cat 3376 focat 3377 0: cat 3378 *** Failers 3379No match 3380 foocat 3381No match 3382 3383/(?(?<!foo)cat|bar)/ 3384 foobar 3385 0: bar 3386 cat 3387 0: cat 3388 fcat 3389 0: cat 3390 focat 3391 0: cat 3392 *** Failers 3393No match 3394 foocat 3395No match 3396 3397/( \( )? [^()]+ (?(1) \) |) /x 3398 abcd 3399 0: abcd 3400 (abcd) 3401 0: (abcd) 3402 1: ( 3403 the quick (abcd) fox 3404 0: the quick 3405 (abcd 3406 0: abcd 3407 3408/( \( )? [^()]+ (?(1) \) ) /x 3409 abcd 3410 0: abcd 3411 (abcd) 3412 0: (abcd) 3413 1: ( 3414 the quick (abcd) fox 3415 0: the quick 3416 (abcd 3417 0: abcd 3418 3419/^(?(2)a|(1)(2))+$/ 3420 12 3421 0: 12 3422 1: 1 3423 2: 2 3424 12a 3425 0: 12a 3426 1: 1 3427 2: 2 3428 12aa 3429 0: 12aa 3430 1: 1 3431 2: 2 3432 *** Failers 3433No match 3434 1234 3435No match 3436 3437/((?i)blah)\s+\1/ 3438 blah blah 3439 0: blah blah 3440 1: blah 3441 BLAH BLAH 3442 0: BLAH BLAH 3443 1: BLAH 3444 Blah Blah 3445 0: Blah Blah 3446 1: Blah 3447 blaH blaH 3448 0: blaH blaH 3449 1: blaH 3450 *** Failers 3451No match 3452 blah BLAH 3453No match 3454 Blah blah 3455No match 3456 blaH blah 3457No match 3458 3459/((?i)blah)\s+(?i:\1)/ 3460 blah blah 3461 0: blah blah 3462 1: blah 3463 BLAH BLAH 3464 0: BLAH BLAH 3465 1: BLAH 3466 Blah Blah 3467 0: Blah Blah 3468 1: Blah 3469 blaH blaH 3470 0: blaH blaH 3471 1: blaH 3472 blah BLAH 3473 0: blah BLAH 3474 1: blah 3475 Blah blah 3476 0: Blah blah 3477 1: Blah 3478 blaH blah 3479 0: blaH blah 3480 1: blaH 3481 3482/(?>a*)*/ 3483 a 3484 0: a 3485 aa 3486 0: aa 3487 aaaa 3488 0: aaaa 3489 3490/(abc|)+/ 3491 abc 3492 0: abc 3493 1: 3494 abcabc 3495 0: abcabc 3496 1: 3497 abcabcabc 3498 0: abcabcabc 3499 1: 3500 xyz 3501 0: 3502 1: 3503 3504/([a]*)*/ 3505 a 3506 0: a 3507 1: 3508 aaaaa 3509 0: aaaaa 3510 1: 3511 3512/([ab]*)*/ 3513 a 3514 0: a 3515 1: 3516 b 3517 0: b 3518 1: 3519 ababab 3520 0: ababab 3521 1: 3522 aaaabcde 3523 0: aaaab 3524 1: 3525 bbbb 3526 0: bbbb 3527 1: 3528 3529/([^a]*)*/ 3530 b 3531 0: b 3532 1: 3533 bbbb 3534 0: bbbb 3535 1: 3536 aaa 3537 0: 3538 1: 3539 3540/([^ab]*)*/ 3541 cccc 3542 0: cccc 3543 1: 3544 abab 3545 0: 3546 1: 3547 3548/([a]*?)*/ 3549 a 3550 0: 3551 1: 3552 aaaa 3553 0: 3554 1: 3555 3556/([ab]*?)*/ 3557 a 3558 0: 3559 1: 3560 b 3561 0: 3562 1: 3563 abab 3564 0: 3565 1: 3566 baba 3567 0: 3568 1: 3569 3570/([^a]*?)*/ 3571 b 3572 0: 3573 1: 3574 bbbb 3575 0: 3576 1: 3577 aaa 3578 0: 3579 1: 3580 3581/([^ab]*?)*/ 3582 c 3583 0: 3584 1: 3585 cccc 3586 0: 3587 1: 3588 baba 3589 0: 3590 1: 3591 3592/(?>a*)*/ 3593 a 3594 0: a 3595 aaabcde 3596 0: aaa 3597 3598/((?>a*))*/ 3599 aaaaa 3600 0: aaaaa 3601 1: 3602 aabbaa 3603 0: aa 3604 1: 3605 3606/((?>a*?))*/ 3607 aaaaa 3608 0: 3609 1: 3610 aabbaa 3611 0: 3612 1: 3613 3614/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x 3615 12-sep-98 3616 0: 12-sep-98 3617 12-09-98 3618 0: 12-09-98 3619 *** Failers 3620No match 3621 sep-12-98 3622No match 3623 3624/(?<=(foo))bar\1/ 3625 foobarfoo 3626 0: barfoo 3627 1: foo 3628 foobarfootling 3629 0: barfoo 3630 1: foo 3631 *** Failers 3632No match 3633 foobar 3634No match 3635 barfoo 3636No match 3637 3638/(?i:saturday|sunday)/ 3639 saturday 3640 0: saturday 3641 sunday 3642 0: sunday 3643 Saturday 3644 0: Saturday 3645 Sunday 3646 0: Sunday 3647 SATURDAY 3648 0: SATURDAY 3649 SUNDAY 3650 0: SUNDAY 3651 SunDay 3652 0: SunDay 3653 3654/(a(?i)bc|BB)x/ 3655 abcx 3656 0: abcx 3657 1: abc 3658 aBCx 3659 0: aBCx 3660 1: aBC 3661 bbx 3662 0: bbx 3663 1: bb 3664 BBx 3665 0: BBx 3666 1: BB 3667 *** Failers 3668No match 3669 abcX 3670No match 3671 aBCX 3672No match 3673 bbX 3674No match 3675 BBX 3676No match 3677 3678/^([ab](?i)[cd]|[ef])/ 3679 ac 3680 0: ac 3681 1: ac 3682 aC 3683 0: aC 3684 1: aC 3685 bD 3686 0: bD 3687 1: bD 3688 elephant 3689 0: e 3690 1: e 3691 Europe 3692 0: E 3693 1: E 3694 frog 3695 0: f 3696 1: f 3697 France 3698 0: F 3699 1: F 3700 *** Failers 3701No match 3702 Africa 3703No match 3704 3705/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/ 3706 ab 3707 0: ab 3708 1: ab 3709 aBd 3710 0: aBd 3711 1: aBd 3712 xy 3713 0: xy 3714 1: xy 3715 xY 3716 0: xY 3717 1: xY 3718 zebra 3719 0: z 3720 1: z 3721 Zambesi 3722 0: Z 3723 1: Z 3724 *** Failers 3725No match 3726 aCD 3727No match 3728 XY 3729No match 3730 3731/(?<=foo\n)^bar/m 3732 foo\nbar 3733 0: bar 3734 *** Failers 3735No match 3736 bar 3737No match 3738 baz\nbar 3739No match 3740 3741/(?<=(?<!foo)bar)baz/ 3742 barbaz 3743 0: baz 3744 barbarbaz 3745 0: baz 3746 koobarbaz 3747 0: baz 3748 *** Failers 3749No match 3750 baz 3751No match 3752 foobarbaz 3753No match 3754 3755/The cases of aaaa and aaaaaa are missed out below because Perl does things/ 3756/differently. We know that odd, and maybe incorrect, things happen with/ 3757No match 3758/recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./ 3759No match 3760 3761/^(a\1?){4}$/ 3762 a 3763No match 3764 aa 3765No match 3766 aaa 3767No match 3768 aaaaa 3769 0: aaaaa 3770 1: a 3771 aaaaaaa 3772 0: aaaaaaa 3773 1: a 3774 aaaaaaaa 3775No match 3776 aaaaaaaaa 3777No match 3778 aaaaaaaaaa 3779 0: aaaaaaaaaa 3780 1: aaaa 3781 aaaaaaaaaaa 3782No match 3783 aaaaaaaaaaaa 3784No match 3785 aaaaaaaaaaaaa 3786No match 3787 aaaaaaaaaaaaaa 3788No match 3789 aaaaaaaaaaaaaaa 3790No match 3791 aaaaaaaaaaaaaaaa 3792No match 3793 3794/^(a\1?)(a\1?)(a\2?)(a\3?)$/ 3795 a 3796No match 3797 aa 3798No match 3799 aaa 3800No match 3801 aaaa 3802 0: aaaa 3803 1: a 3804 2: a 3805 3: a 3806 4: a 3807 aaaaa 3808 0: aaaaa 3809 1: a 3810 2: aa 3811 3: a 3812 4: a 3813 aaaaaa 3814 0: aaaaaa 3815 1: a 3816 2: aa 3817 3: a 3818 4: aa 3819 aaaaaaa 3820 0: aaaaaaa 3821 1: a 3822 2: aa 3823 3: aaa 3824 4: a 3825 aaaaaaaa 3826No match 3827 aaaaaaaaa 3828No match 3829 aaaaaaaaaa 3830 0: aaaaaaaaaa 3831 1: a 3832 2: aa 3833 3: aaa 3834 4: aaaa 3835 aaaaaaaaaaa 3836No match 3837 aaaaaaaaaaaa 3838No match 3839 aaaaaaaaaaaaa 3840No match 3841 aaaaaaaaaaaaaa 3842No match 3843 aaaaaaaaaaaaaaa 3844No match 3845 aaaaaaaaaaaaaaaa 3846No match 3847 3848/The following tests are taken from the Perl 5.005 test suite; some of them/ 3849/are compatible with 5.004, but I'd rather not have to sort them out./ 3850No match 3851 3852/abc/ 3853 abc 3854 0: abc 3855 xabcy 3856 0: abc 3857 ababc 3858 0: abc 3859 *** Failers 3860No match 3861 xbc 3862No match 3863 axc 3864No match 3865 abx 3866No match 3867 3868/ab*c/ 3869 abc 3870 0: abc 3871 3872/ab*bc/ 3873 abc 3874 0: abc 3875 abbc 3876 0: abbc 3877 abbbbc 3878 0: abbbbc 3879 3880/.{1}/ 3881 abbbbc 3882 0: a 3883 3884/.{3,4}/ 3885 abbbbc 3886 0: abbb 3887 3888/ab{0,}bc/ 3889 abbbbc 3890 0: abbbbc 3891 3892/ab+bc/ 3893 abbc 3894 0: abbc 3895 *** Failers 3896No match 3897 abc 3898No match 3899 abq 3900No match 3901 3902/ab{1,}bc/ 3903 3904/ab+bc/ 3905 abbbbc 3906 0: abbbbc 3907 3908/ab{1,}bc/ 3909 abbbbc 3910 0: abbbbc 3911 3912/ab{1,3}bc/ 3913 abbbbc 3914 0: abbbbc 3915 3916/ab{3,4}bc/ 3917 abbbbc 3918 0: abbbbc 3919 3920/ab{4,5}bc/ 3921 *** Failers 3922No match 3923 abq 3924No match 3925 abbbbc 3926No match 3927 3928/ab?bc/ 3929 abbc 3930 0: abbc 3931 abc 3932 0: abc 3933 3934/ab{0,1}bc/ 3935 abc 3936 0: abc 3937 3938/ab?bc/ 3939 3940/ab?c/ 3941 abc 3942 0: abc 3943 3944/ab{0,1}c/ 3945 abc 3946 0: abc 3947 3948/^abc$/ 3949 abc 3950 0: abc 3951 *** Failers 3952No match 3953 abbbbc 3954No match 3955 abcc 3956No match 3957 3958/^abc/ 3959 abcc 3960 0: abc 3961 3962/^abc$/ 3963 3964/abc$/ 3965 aabc 3966 0: abc 3967 *** Failers 3968No match 3969 aabc 3970 0: abc 3971 aabcd 3972No match 3973 3974/^/ 3975 abc 3976 0: 3977 3978/$/ 3979 abc 3980 0: 3981 3982/a.c/ 3983 abc 3984 0: abc 3985 axc 3986 0: axc 3987 3988/a.*c/ 3989 axyzc 3990 0: axyzc 3991 3992/a[bc]d/ 3993 abd 3994 0: abd 3995 *** Failers 3996No match 3997 axyzd 3998No match 3999 abc 4000No match 4001 4002/a[b-d]e/ 4003 ace 4004 0: ace 4005 4006/a[b-d]/ 4007 aac 4008 0: ac 4009 4010/a[-b]/ 4011 a- 4012 0: a- 4013 4014/a[b-]/ 4015 a- 4016 0: a- 4017 4018/a]/ 4019 a] 4020 0: a] 4021 4022/a[]]b/ 4023 a]b 4024 0: a]b 4025 4026/a[^bc]d/ 4027 aed 4028 0: aed 4029 *** Failers 4030No match 4031 abd 4032No match 4033 abd 4034No match 4035 4036/a[^-b]c/ 4037 adc 4038 0: adc 4039 4040/a[^]b]c/ 4041 adc 4042 0: adc 4043 *** Failers 4044No match 4045 a-c 4046 0: a-c 4047 a]c 4048No match 4049 4050/\ba\b/ 4051 a- 4052 0: a 4053 -a 4054 0: a 4055 -a- 4056 0: a 4057 4058/\by\b/ 4059 *** Failers 4060No match 4061 xy 4062No match 4063 yz 4064No match 4065 xyz 4066No match 4067 4068/\Ba\B/ 4069 *** Failers 4070 0: a 4071 a- 4072No match 4073 -a 4074No match 4075 -a- 4076No match 4077 4078/\By\b/ 4079 xy 4080 0: y 4081 4082/\by\B/ 4083 yz 4084 0: y 4085 4086/\By\B/ 4087 xyz 4088 0: y 4089 4090/\w/ 4091 a 4092 0: a 4093 4094/\W/ 4095 - 4096 0: - 4097 *** Failers 4098 0: * 4099 - 4100 0: - 4101 a 4102No match 4103 4104/a\sb/ 4105 a b 4106 0: a b 4107 4108/a\Sb/ 4109 a-b 4110 0: a-b 4111 *** Failers 4112No match 4113 a-b 4114 0: a-b 4115 a b 4116No match 4117 4118/\d/ 4119 1 4120 0: 1 4121 4122/\D/ 4123 - 4124 0: - 4125 *** Failers 4126 0: * 4127 - 4128 0: - 4129 1 4130No match 4131 4132/[\w]/ 4133 a 4134 0: a 4135 4136/[\W]/ 4137 - 4138 0: - 4139 *** Failers 4140 0: * 4141 - 4142 0: - 4143 a 4144No match 4145 4146/a[\s]b/ 4147 a b 4148 0: a b 4149 4150/a[\S]b/ 4151 a-b 4152 0: a-b 4153 *** Failers 4154No match 4155 a-b 4156 0: a-b 4157 a b 4158No match 4159 4160/[\d]/ 4161 1 4162 0: 1 4163 4164/[\D]/ 4165 - 4166 0: - 4167 *** Failers 4168 0: * 4169 - 4170 0: - 4171 1 4172No match 4173 4174/ab|cd/ 4175 abc 4176 0: ab 4177 abcd 4178 0: ab 4179 4180/()ef/ 4181 def 4182 0: ef 4183 1: 4184 4185/$b/ 4186 4187/a\(b/ 4188 a(b 4189 0: a(b 4190 4191/a\(*b/ 4192 ab 4193 0: ab 4194 a((b 4195 0: a((b 4196 4197/a\\b/ 4198 a\b 4199No match 4200 4201/((a))/ 4202 abc 4203 0: a 4204 1: a 4205 2: a 4206 4207/(a)b(c)/ 4208 abc 4209 0: abc 4210 1: a 4211 2: c 4212 4213/a+b+c/ 4214 aabbabc 4215 0: abc 4216 4217/a{1,}b{1,}c/ 4218 aabbabc 4219 0: abc 4220 4221/a.+?c/ 4222 abcabc 4223 0: abc 4224 4225/(a+|b)*/ 4226 ab 4227 0: ab 4228 1: b 4229 4230/(a+|b){0,}/ 4231 ab 4232 0: ab 4233 1: b 4234 4235/(a+|b)+/ 4236 ab 4237 0: ab 4238 1: b 4239 4240/(a+|b){1,}/ 4241 ab 4242 0: ab 4243 1: b 4244 4245/(a+|b)?/ 4246 ab 4247 0: a 4248 1: a 4249 4250/(a+|b){0,1}/ 4251 ab 4252 0: a 4253 1: a 4254 4255/[^ab]*/ 4256 cde 4257 0: cde 4258 4259/abc/ 4260 *** Failers 4261No match 4262 b 4263No match 4264 4265 4266/a*/ 4267 4268 4269/([abc])*d/ 4270 abbbcd 4271 0: abbbcd 4272 1: c 4273 4274/([abc])*bcd/ 4275 abcd 4276 0: abcd 4277 1: a 4278 4279/a|b|c|d|e/ 4280 e 4281 0: e 4282 4283/(a|b|c|d|e)f/ 4284 ef 4285 0: ef 4286 1: e 4287 4288/abcd*efg/ 4289 abcdefg 4290 0: abcdefg 4291 4292/ab*/ 4293 xabyabbbz 4294 0: ab 4295 xayabbbz 4296 0: a 4297 4298/(ab|cd)e/ 4299 abcde 4300 0: cde 4301 1: cd 4302 4303/[abhgefdc]ij/ 4304 hij 4305 0: hij 4306 4307/^(ab|cd)e/ 4308 4309/(abc|)ef/ 4310 abcdef 4311 0: ef 4312 1: 4313 4314/(a|b)c*d/ 4315 abcd 4316 0: bcd 4317 1: b 4318 4319/(ab|ab*)bc/ 4320 abc 4321 0: abc 4322 1: a 4323 4324/a([bc]*)c*/ 4325 abc 4326 0: abc 4327 1: bc 4328 4329/a([bc]*)(c*d)/ 4330 abcd 4331 0: abcd 4332 1: bc 4333 2: d 4334 4335/a([bc]+)(c*d)/ 4336 abcd 4337 0: abcd 4338 1: bc 4339 2: d 4340 4341/a([bc]*)(c+d)/ 4342 abcd 4343 0: abcd 4344 1: b 4345 2: cd 4346 4347/a[bcd]*dcdcde/ 4348 adcdcde 4349 0: adcdcde 4350 4351/a[bcd]+dcdcde/ 4352 *** Failers 4353No match 4354 abcde 4355No match 4356 adcdcde 4357No match 4358 4359/(ab|a)b*c/ 4360 abc 4361 0: abc 4362 1: ab 4363 4364/((a)(b)c)(d)/ 4365 abcd 4366 0: abcd 4367 1: abc 4368 2: a 4369 3: b 4370 4: d 4371 4372/[a-zA-Z_][a-zA-Z0-9_]*/ 4373 alpha 4374 0: alpha 4375 4376/^a(bc+|b[eh])g|.h$/ 4377 abh 4378 0: bh 4379 4380/(bc+d$|ef*g.|h?i(j|k))/ 4381 effgz 4382 0: effgz 4383 1: effgz 4384 ij 4385 0: ij 4386 1: ij 4387 2: j 4388 reffgz 4389 0: effgz 4390 1: effgz 4391 *** Failers 4392No match 4393 effg 4394No match 4395 bcdd 4396No match 4397 4398/((((((((((a))))))))))/ 4399 a 4400 0: a 4401 1: a 4402 2: a 4403 3: a 4404 4: a 4405 5: a 4406 6: a 4407 7: a 4408 8: a 4409 9: a 441010: a 4411 4412/((((((((((a))))))))))\10/ 4413 aa 4414 0: aa 4415 1: a 4416 2: a 4417 3: a 4418 4: a 4419 5: a 4420 6: a 4421 7: a 4422 8: a 4423 9: a 442410: a 4425 4426/(((((((((a)))))))))/ 4427 a 4428 0: a 4429 1: a 4430 2: a 4431 3: a 4432 4: a 4433 5: a 4434 6: a 4435 7: a 4436 8: a 4437 9: a 4438 4439/multiple words of text/ 4440 *** Failers 4441No match 4442 aa 4443No match 4444 uh-uh 4445No match 4446 4447/multiple words/ 4448 multiple words, yeah 4449 0: multiple words 4450 4451/(.*)c(.*)/ 4452 abcde 4453 0: abcde 4454 1: ab 4455 2: de 4456 4457/\((.*), (.*)\)/ 4458 (a, b) 4459 0: (a, b) 4460 1: a 4461 2: b 4462 4463/[k]/ 4464 4465/abcd/ 4466 abcd 4467 0: abcd 4468 4469/a(bc)d/ 4470 abcd 4471 0: abcd 4472 1: bc 4473 4474/a[-]?c/ 4475 ac 4476 0: ac 4477 4478/(abc)\1/ 4479 abcabc 4480 0: abcabc 4481 1: abc 4482 4483/([a-c]*)\1/ 4484 abcabc 4485 0: abcabc 4486 1: abc 4487 4488/(a)|\1/ 4489 a 4490 0: a 4491 1: a 4492 *** Failers 4493 0: a 4494 1: a 4495 ab 4496 0: a 4497 1: a 4498 x 4499No match 4500 4501/(([a-c])b*?\2)*/ 4502 ababbbcbc 4503 0: ababb 4504 1: bb 4505 2: b 4506 4507/(([a-c])b*?\2){3}/ 4508 ababbbcbc 4509 0: ababbbcbc 4510 1: cbc 4511 2: c 4512 4513/((\3|b)\2(a)x)+/ 4514 aaaxabaxbaaxbbax 4515 0: bbax 4516 1: bbax 4517 2: b 4518 3: a 4519 4520/((\3|b)\2(a)){2,}/ 4521 bbaababbabaaaaabbaaaabba 4522 0: bbaaaabba 4523 1: bba 4524 2: b 4525 3: a 4526 4527/abc/i 4528 ABC 4529 0: ABC 4530 XABCY 4531 0: ABC 4532 ABABC 4533 0: ABC 4534 *** Failers 4535No match 4536 aaxabxbaxbbx 4537No match 4538 XBC 4539No match 4540 AXC 4541No match 4542 ABX 4543No match 4544 4545/ab*c/i 4546 ABC 4547 0: ABC 4548 4549/ab*bc/i 4550 ABC 4551 0: ABC 4552 ABBC 4553 0: ABBC 4554 4555/ab*?bc/i 4556 ABBBBC 4557 0: ABBBBC 4558 4559/ab{0,}?bc/i 4560 ABBBBC 4561 0: ABBBBC 4562 4563/ab+?bc/i 4564 ABBC 4565 0: ABBC 4566 4567/ab+bc/i 4568 *** Failers 4569No match 4570 ABC 4571No match 4572 ABQ 4573No match 4574 4575/ab{1,}bc/i 4576 4577/ab+bc/i 4578 ABBBBC 4579 0: ABBBBC 4580 4581/ab{1,}?bc/i 4582 ABBBBC 4583 0: ABBBBC 4584 4585/ab{1,3}?bc/i 4586 ABBBBC 4587 0: ABBBBC 4588 4589/ab{3,4}?bc/i 4590 ABBBBC 4591 0: ABBBBC 4592 4593/ab{4,5}?bc/i 4594 *** Failers 4595No match 4596 ABQ 4597No match 4598 ABBBBC 4599No match 4600 4601/ab??bc/i 4602 ABBC 4603 0: ABBC 4604 ABC 4605 0: ABC 4606 4607/ab{0,1}?bc/i 4608 ABC 4609 0: ABC 4610 4611/ab??bc/i 4612 4613/ab??c/i 4614 ABC 4615 0: ABC 4616 4617/ab{0,1}?c/i 4618 ABC 4619 0: ABC 4620 4621/^abc$/i 4622 ABC 4623 0: ABC 4624 *** Failers 4625No match 4626 ABBBBC 4627No match 4628 ABCC 4629No match 4630 4631/^abc/i 4632 ABCC 4633 0: ABC 4634 4635/^abc$/i 4636 4637/abc$/i 4638 AABC 4639 0: ABC 4640 4641/^/i 4642 ABC 4643 0: 4644 4645/$/i 4646 ABC 4647 0: 4648 4649/a.c/i 4650 ABC 4651 0: ABC 4652 AXC 4653 0: AXC 4654 4655/a.*?c/i 4656 AXYZC 4657 0: AXYZC 4658 4659/a.*c/i 4660 *** Failers 4661No match 4662 AABC 4663 0: AABC 4664 AXYZD 4665No match 4666 4667/a[bc]d/i 4668 ABD 4669 0: ABD 4670 4671/a[b-d]e/i 4672 ACE 4673 0: ACE 4674 *** Failers 4675No match 4676 ABC 4677No match 4678 ABD 4679No match 4680 4681/a[b-d]/i 4682 AAC 4683 0: AC 4684 4685/a[-b]/i 4686 A- 4687 0: A- 4688 4689/a[b-]/i 4690 A- 4691 0: A- 4692 4693/a]/i 4694 A] 4695 0: A] 4696 4697/a[]]b/i 4698 A]B 4699 0: A]B 4700 4701/a[^bc]d/i 4702 AED 4703 0: AED 4704 4705/a[^-b]c/i 4706 ADC 4707 0: ADC 4708 *** Failers 4709No match 4710 ABD 4711No match 4712 A-C 4713No match 4714 4715/a[^]b]c/i 4716 ADC 4717 0: ADC 4718 4719/ab|cd/i 4720 ABC 4721 0: AB 4722 ABCD 4723 0: AB 4724 4725/()ef/i 4726 DEF 4727 0: EF 4728 1: 4729 4730/$b/i 4731 *** Failers 4732No match 4733 A]C 4734No match 4735 B 4736No match 4737 4738/a\(b/i 4739 A(B 4740 0: A(B 4741 4742/a\(*b/i 4743 AB 4744 0: AB 4745 A((B 4746 0: A((B 4747 4748/a\\b/i 4749 A\B 4750No match 4751 4752/((a))/i 4753 ABC 4754 0: A 4755 1: A 4756 2: A 4757 4758/(a)b(c)/i 4759 ABC 4760 0: ABC 4761 1: A 4762 2: C 4763 4764/a+b+c/i 4765 AABBABC 4766 0: ABC 4767 4768/a{1,}b{1,}c/i 4769 AABBABC 4770 0: ABC 4771 4772/a.+?c/i 4773 ABCABC 4774 0: ABC 4775 4776/a.*?c/i 4777 ABCABC 4778 0: ABC 4779 4780/a.{0,5}?c/i 4781 ABCABC 4782 0: ABC 4783 4784/(a+|b)*/i 4785 AB 4786 0: AB 4787 1: B 4788 4789/(a+|b){0,}/i 4790 AB 4791 0: AB 4792 1: B 4793 4794/(a+|b)+/i 4795 AB 4796 0: AB 4797 1: B 4798 4799/(a+|b){1,}/i 4800 AB 4801 0: AB 4802 1: B 4803 4804/(a+|b)?/i 4805 AB 4806 0: A 4807 1: A 4808 4809/(a+|b){0,1}/i 4810 AB 4811 0: A 4812 1: A 4813 4814/(a+|b){0,1}?/i 4815 AB 4816 0: 4817 4818/[^ab]*/i 4819 CDE 4820 0: CDE 4821 4822/abc/i 4823 4824/a*/i 4825 4826 4827/([abc])*d/i 4828 ABBBCD 4829 0: ABBBCD 4830 1: C 4831 4832/([abc])*bcd/i 4833 ABCD 4834 0: ABCD 4835 1: A 4836 4837/a|b|c|d|e/i 4838 E 4839 0: E 4840 4841/(a|b|c|d|e)f/i 4842 EF 4843 0: EF 4844 1: E 4845 4846/abcd*efg/i 4847 ABCDEFG 4848 0: ABCDEFG 4849 4850/ab*/i 4851 XABYABBBZ 4852 0: AB 4853 XAYABBBZ 4854 0: A 4855 4856/(ab|cd)e/i 4857 ABCDE 4858 0: CDE 4859 1: CD 4860 4861/[abhgefdc]ij/i 4862 HIJ 4863 0: HIJ 4864 4865/^(ab|cd)e/i 4866 ABCDE 4867No match 4868 4869/(abc|)ef/i 4870 ABCDEF 4871 0: EF 4872 1: 4873 4874/(a|b)c*d/i 4875 ABCD 4876 0: BCD 4877 1: B 4878 4879/(ab|ab*)bc/i 4880 ABC 4881 0: ABC 4882 1: A 4883 4884/a([bc]*)c*/i 4885 ABC 4886 0: ABC 4887 1: BC 4888 4889/a([bc]*)(c*d)/i 4890 ABCD 4891 0: ABCD 4892 1: BC 4893 2: D 4894 4895/a([bc]+)(c*d)/i 4896 ABCD 4897 0: ABCD 4898 1: BC 4899 2: D 4900 4901/a([bc]*)(c+d)/i 4902 ABCD 4903 0: ABCD 4904 1: B 4905 2: CD 4906 4907/a[bcd]*dcdcde/i 4908 ADCDCDE 4909 0: ADCDCDE 4910 4911/a[bcd]+dcdcde/i 4912 4913/(ab|a)b*c/i 4914 ABC 4915 0: ABC 4916 1: AB 4917 4918/((a)(b)c)(d)/i 4919 ABCD 4920 0: ABCD 4921 1: ABC 4922 2: A 4923 3: B 4924 4: D 4925 4926/[a-zA-Z_][a-zA-Z0-9_]*/i 4927 ALPHA 4928 0: ALPHA 4929 4930/^a(bc+|b[eh])g|.h$/i 4931 ABH 4932 0: BH 4933 4934/(bc+d$|ef*g.|h?i(j|k))/i 4935 EFFGZ 4936 0: EFFGZ 4937 1: EFFGZ 4938 IJ 4939 0: IJ 4940 1: IJ 4941 2: J 4942 REFFGZ 4943 0: EFFGZ 4944 1: EFFGZ 4945 *** Failers 4946No match 4947 ADCDCDE 4948No match 4949 EFFG 4950No match 4951 BCDD 4952No match 4953 4954/((((((((((a))))))))))/i 4955 A 4956 0: A 4957 1: A 4958 2: A 4959 3: A 4960 4: A 4961 5: A 4962 6: A 4963 7: A 4964 8: A 4965 9: A 496610: A 4967 4968/((((((((((a))))))))))\10/i 4969 AA 4970 0: AA 4971 1: A 4972 2: A 4973 3: A 4974 4: A 4975 5: A 4976 6: A 4977 7: A 4978 8: A 4979 9: A 498010: A 4981 4982/(((((((((a)))))))))/i 4983 A 4984 0: A 4985 1: A 4986 2: A 4987 3: A 4988 4: A 4989 5: A 4990 6: A 4991 7: A 4992 8: A 4993 9: A 4994 4995/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i 4996 A 4997 0: A 4998 1: A 4999 5000/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i 5001 C 5002 0: C 5003 1: C 5004 5005/multiple words of text/i 5006 *** Failers 5007No match 5008 AA 5009No match 5010 UH-UH 5011No match 5012 5013/multiple words/i 5014 MULTIPLE WORDS, YEAH 5015 0: MULTIPLE WORDS 5016 5017/(.*)c(.*)/i 5018 ABCDE 5019 0: ABCDE 5020 1: AB 5021 2: DE 5022 5023/\((.*), (.*)\)/i 5024 (A, B) 5025 0: (A, B) 5026 1: A 5027 2: B 5028 5029/[k]/i 5030 5031/abcd/i 5032 ABCD 5033 0: ABCD 5034 5035/a(bc)d/i 5036 ABCD 5037 0: ABCD 5038 1: BC 5039 5040/a[-]?c/i 5041 AC 5042 0: AC 5043 5044/(abc)\1/i 5045 ABCABC 5046 0: ABCABC 5047 1: ABC 5048 5049/([a-c]*)\1/i 5050 ABCABC 5051 0: ABCABC 5052 1: ABC 5053 5054/a(?!b)./ 5055 abad 5056 0: ad 5057 5058/a(?=d)./ 5059 abad 5060 0: ad 5061 5062/a(?=c|d)./ 5063 abad 5064 0: ad 5065 5066/a(?:b|c|d)(.)/ 5067 ace 5068 0: ace 5069 1: e 5070 5071/a(?:b|c|d)*(.)/ 5072 ace 5073 0: ace 5074 1: e 5075 5076/a(?:b|c|d)+?(.)/ 5077 ace 5078 0: ace 5079 1: e 5080 acdbcdbe 5081 0: acd 5082 1: d 5083 5084/a(?:b|c|d)+(.)/ 5085 acdbcdbe 5086 0: acdbcdbe 5087 1: e 5088 5089/a(?:b|c|d){2}(.)/ 5090 acdbcdbe 5091 0: acdb 5092 1: b 5093 5094/a(?:b|c|d){4,5}(.)/ 5095 acdbcdbe 5096 0: acdbcdb 5097 1: b 5098 5099/a(?:b|c|d){4,5}?(.)/ 5100 acdbcdbe 5101 0: acdbcd 5102 1: d 5103 5104/((foo)|(bar))*/ 5105 foobar 5106 0: foobar 5107 1: bar 5108 2: foo 5109 3: bar 5110 5111/a(?:b|c|d){6,7}(.)/ 5112 acdbcdbe 5113 0: acdbcdbe 5114 1: e 5115 5116/a(?:b|c|d){6,7}?(.)/ 5117 acdbcdbe 5118 0: acdbcdbe 5119 1: e 5120 5121/a(?:b|c|d){5,6}(.)/ 5122 acdbcdbe 5123 0: acdbcdbe 5124 1: e 5125 5126/a(?:b|c|d){5,6}?(.)/ 5127 acdbcdbe 5128 0: acdbcdb 5129 1: b 5130 5131/a(?:b|c|d){5,7}(.)/ 5132 acdbcdbe 5133 0: acdbcdbe 5134 1: e 5135 5136/a(?:b|c|d){5,7}?(.)/ 5137 acdbcdbe 5138 0: acdbcdb 5139 1: b 5140 5141/a(?:b|(c|e){1,2}?|d)+?(.)/ 5142 ace 5143 0: ace 5144 1: c 5145 2: e 5146 5147/^(.+)?B/ 5148 AB 5149 0: AB 5150 1: A 5151 5152/^([^a-z])|(\^)$/ 5153 . 5154 0: . 5155 1: . 5156 5157/^[<>]&/ 5158 <&OUT 5159 0: <& 5160 5161/^(a\1?){4}$/ 5162 aaaaaaaaaa 5163 0: aaaaaaaaaa 5164 1: aaaa 5165 *** Failers 5166No match 5167 AB 5168No match 5169 aaaaaaaaa 5170No match 5171 aaaaaaaaaaa 5172No match 5173 5174/^(a(?(1)\1)){4}$/ 5175 aaaaaaaaaa 5176 0: aaaaaaaaaa 5177 1: aaaa 5178 *** Failers 5179No match 5180 aaaaaaaaa 5181No match 5182 aaaaaaaaaaa 5183No match 5184 5185/(?:(f)(o)(o)|(b)(a)(r))*/ 5186 foobar 5187 0: foobar 5188 1: f 5189 2: o 5190 3: o 5191 4: b 5192 5: a 5193 6: r 5194 5195/(?<=a)b/ 5196 ab 5197 0: b 5198 *** Failers 5199No match 5200 cb 5201No match 5202 b 5203No match 5204 5205/(?<!c)b/ 5206 ab 5207 0: b 5208 b 5209 0: b 5210 b 5211 0: b 5212 5213/(?:..)*a/ 5214 aba 5215 0: aba 5216 5217/(?:..)*?a/ 5218 aba 5219 0: a 5220 5221/^(?:b|a(?=(.)))*\1/ 5222 abc 5223 0: ab 5224 1: b 5225 5226/^(){3,5}/ 5227 abc 5228 0: 5229 1: 5230 5231/^(a+)*ax/ 5232 aax 5233 0: aax 5234 1: a 5235 5236/^((a|b)+)*ax/ 5237 aax 5238 0: aax 5239 1: a 5240 2: a 5241 5242/^((a|bc)+)*ax/ 5243 aax 5244 0: aax 5245 1: a 5246 2: a 5247 5248/(a|x)*ab/ 5249 cab 5250 0: ab 5251 5252/(a)*ab/ 5253 cab 5254 0: ab 5255 5256/(?:(?i)a)b/ 5257 ab 5258 0: ab 5259 5260/((?i)a)b/ 5261 ab 5262 0: ab 5263 1: a 5264 5265/(?:(?i)a)b/ 5266 Ab 5267 0: Ab 5268 5269/((?i)a)b/ 5270 Ab 5271 0: Ab 5272 1: A 5273 5274/(?:(?i)a)b/ 5275 *** Failers 5276No match 5277 cb 5278No match 5279 aB 5280No match 5281 5282/((?i)a)b/ 5283 5284/(?i:a)b/ 5285 ab 5286 0: ab 5287 5288/((?i:a))b/ 5289 ab 5290 0: ab 5291 1: a 5292 5293/(?i:a)b/ 5294 Ab 5295 0: Ab 5296 5297/((?i:a))b/ 5298 Ab 5299 0: Ab 5300 1: A 5301 5302/(?i:a)b/ 5303 *** Failers 5304No match 5305 aB 5306No match 5307 aB 5308No match 5309 5310/((?i:a))b/ 5311 5312/(?:(?-i)a)b/i 5313 ab 5314 0: ab 5315 5316/((?-i)a)b/i 5317 ab 5318 0: ab 5319 1: a 5320 5321/(?:(?-i)a)b/i 5322 aB 5323 0: aB 5324 5325/((?-i)a)b/i 5326 aB 5327 0: aB 5328 1: a 5329 5330/(?:(?-i)a)b/i 5331 *** Failers 5332No match 5333 aB 5334 0: aB 5335 Ab 5336No match 5337 5338/((?-i)a)b/i 5339 5340/(?:(?-i)a)b/i 5341 aB 5342 0: aB 5343 5344/((?-i)a)b/i 5345 aB 5346 0: aB 5347 1: a 5348 5349/(?:(?-i)a)b/i 5350 *** Failers 5351No match 5352 Ab 5353No match 5354 AB 5355No match 5356 5357/((?-i)a)b/i 5358 5359/(?-i:a)b/i 5360 ab 5361 0: ab 5362 5363/((?-i:a))b/i 5364 ab 5365 0: ab 5366 1: a 5367 5368/(?-i:a)b/i 5369 aB 5370 0: aB 5371 5372/((?-i:a))b/i 5373 aB 5374 0: aB 5375 1: a 5376 5377/(?-i:a)b/i 5378 *** Failers 5379No match 5380 AB 5381No match 5382 Ab 5383No match 5384 5385/((?-i:a))b/i 5386 5387/(?-i:a)b/i 5388 aB 5389 0: aB 5390 5391/((?-i:a))b/i 5392 aB 5393 0: aB 5394 1: a 5395 5396/(?-i:a)b/i 5397 *** Failers 5398No match 5399 Ab 5400No match 5401 AB 5402No match 5403 5404/((?-i:a))b/i 5405 5406/((?-i:a.))b/i 5407 *** Failers 5408No match 5409 AB 5410No match 5411 a\nB 5412No match 5413 5414/((?s-i:a.))b/i 5415 a\nB 5416 0: a\x0aB 5417 1: a\x0a 5418 5419/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/ 5420 cabbbb 5421 0: cabbbb 5422 5423/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/ 5424 caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 5425 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 5426 5427/(ab)\d\1/i 5428 Ab4ab 5429 0: Ab4ab 5430 1: Ab 5431 ab4Ab 5432 0: ab4Ab 5433 1: ab 5434 5435/foo\w*\d{4}baz/ 5436 foobar1234baz 5437 0: foobar1234baz 5438 5439/x(~~)*(?:(?:F)?)?/ 5440 x~~ 5441 0: x~~ 5442 1: ~~ 5443 5444/^a(?#xxx){3}c/ 5445 aaac 5446 0: aaac 5447 5448/^a (?#xxx) (?#yyy) {3}c/x 5449 aaac 5450 0: aaac 5451 5452/(?<![cd])b/ 5453 *** Failers 5454No match 5455 B\nB 5456No match 5457 dbcb 5458No match 5459 5460/(?<![cd])[ab]/ 5461 dbaacb 5462 0: a 5463 5464/(?<!(c|d))b/ 5465 5466/(?<!(c|d))[ab]/ 5467 dbaacb 5468 0: a 5469 5470/(?<!cd)[ab]/ 5471 cdaccb 5472 0: b 5473 5474/^(?:a?b?)*$/ 5475 \ 5476 0: 5477 a 5478 0: a 5479 ab 5480 0: ab 5481 aaa 5482 0: aaa 5483 *** Failers 5484No match 5485 dbcb 5486No match 5487 a-- 5488No match 5489 aa-- 5490No match 5491 5492/((?s)^a(.))((?m)^b$)/ 5493 a\nb\nc\n 5494 0: a\x0ab 5495 1: a\x0a 5496 2: \x0a 5497 3: b 5498 5499/((?m)^b$)/ 5500 a\nb\nc\n 5501 0: b 5502 1: b 5503 5504/(?m)^b/ 5505 a\nb\n 5506 0: b 5507 5508/(?m)^(b)/ 5509 a\nb\n 5510 0: b 5511 1: b 5512 5513/((?m)^b)/ 5514 a\nb\n 5515 0: b 5516 1: b 5517 5518/\n((?m)^b)/ 5519 a\nb\n 5520 0: \x0ab 5521 1: b 5522 5523/((?s).)c(?!.)/ 5524 a\nb\nc\n 5525 0: \x0ac 5526 1: \x0a 5527 a\nb\nc\n 5528 0: \x0ac 5529 1: \x0a 5530 5531/((?s)b.)c(?!.)/ 5532 a\nb\nc\n 5533 0: b\x0ac 5534 1: b\x0a 5535 a\nb\nc\n 5536 0: b\x0ac 5537 1: b\x0a 5538 5539/^b/ 5540 5541/()^b/ 5542 *** Failers 5543No match 5544 a\nb\nc\n 5545No match 5546 a\nb\nc\n 5547No match 5548 5549/((?m)^b)/ 5550 a\nb\nc\n 5551 0: b 5552 1: b 5553 5554/(x)?(?(1)a|b)/ 5555 *** Failers 5556No match 5557 a 5558No match 5559 a 5560No match 5561 5562/(x)?(?(1)b|a)/ 5563 a 5564 0: a 5565 5566/()?(?(1)b|a)/ 5567 a 5568 0: a 5569 5570/()(?(1)b|a)/ 5571 5572/()?(?(1)a|b)/ 5573 a 5574 0: a 5575 1: 5576 5577/^(\()?blah(?(1)(\)))$/ 5578 (blah) 5579 0: (blah) 5580 1: ( 5581 2: ) 5582 blah 5583 0: blah 5584 *** Failers 5585No match 5586 a 5587No match 5588 blah) 5589No match 5590 (blah 5591No match 5592 5593/^(\(+)?blah(?(1)(\)))$/ 5594 (blah) 5595 0: (blah) 5596 1: ( 5597 2: ) 5598 blah 5599 0: blah 5600 *** Failers 5601No match 5602 blah) 5603No match 5604 (blah 5605No match 5606 5607/(?(?!a)a|b)/ 5608 5609/(?(?!a)b|a)/ 5610 a 5611 0: a 5612 5613/(?(?=a)b|a)/ 5614 *** Failers 5615No match 5616 a 5617No match 5618 a 5619No match 5620 5621/(?(?=a)a|b)/ 5622 a 5623 0: a 5624 5625/(?=(a+?))(\1ab)/ 5626 aaab 5627 0: aab 5628 1: a 5629 2: aab 5630 5631/^(?=(a+?))\1ab/ 5632 5633/(\w+:)+/ 5634 one: 5635 0: one: 5636 1: one: 5637 5638/$(?<=^(a))/ 5639 a 5640 0: 5641 1: a 5642 5643/(?=(a+?))(\1ab)/ 5644 aaab 5645 0: aab 5646 1: a 5647 2: aab 5648 5649/^(?=(a+?))\1ab/ 5650 *** Failers 5651No match 5652 aaab 5653No match 5654 aaab 5655No match 5656 5657/([\w:]+::)?(\w+)$/ 5658 abcd 5659 0: abcd 5660 1: <unset> 5661 2: abcd 5662 xy:z:::abcd 5663 0: xy:z:::abcd 5664 1: xy:z::: 5665 2: abcd 5666 5667/^[^bcd]*(c+)/ 5668 aexycd 5669 0: aexyc 5670 1: c 5671 5672/(a*)b+/ 5673 caab 5674 0: aab 5675 1: aa 5676 5677/([\w:]+::)?(\w+)$/ 5678 abcd 5679 0: abcd 5680 1: <unset> 5681 2: abcd 5682 xy:z:::abcd 5683 0: xy:z:::abcd 5684 1: xy:z::: 5685 2: abcd 5686 *** Failers 5687 0: Failers 5688 1: <unset> 5689 2: Failers 5690 abcd: 5691No match 5692 abcd: 5693No match 5694 5695/^[^bcd]*(c+)/ 5696 aexycd 5697 0: aexyc 5698 1: c 5699 5700/(>a+)ab/ 5701 5702/(?>a+)b/ 5703 aaab 5704 0: aaab 5705 5706/([[:]+)/ 5707 a:[b]: 5708 0: :[ 5709 1: :[ 5710 5711/([[=]+)/ 5712 a=[b]= 5713 0: =[ 5714 1: =[ 5715 5716/([[.]+)/ 5717 a.[b]. 5718 0: .[ 5719 1: .[ 5720 5721/((?>a+)b)/ 5722 aaab 5723 0: aaab 5724 1: aaab 5725 5726/(?>(a+))b/ 5727 aaab 5728 0: aaab 5729 1: aaa 5730 5731/((?>[^()]+)|\([^()]*\))+/ 5732 ((abc(ade)ufh()()x 5733 0: abc(ade)ufh()()x 5734 1: x 5735 5736/a\Z/ 5737 *** Failers 5738No match 5739 aaab 5740No match 5741 a\nb\n 5742No match 5743 5744/b\Z/ 5745 a\nb\n 5746 0: b 5747 5748/b\z/ 5749 5750/b\Z/ 5751 a\nb 5752 0: b 5753 5754/b\z/ 5755 a\nb 5756 0: b 5757 *** Failers 5758No match 5759 5760/^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/ 5761 a 5762 0: a 5763 1: 5764 abc 5765 0: abc 5766 1: 5767 a-b 5768 0: a-b 5769 1: 5770 0-9 5771 0: 0-9 5772 1: 5773 a.b 5774 0: a.b 5775 1: 5776 5.6.7 5777 0: 5.6.7 5778 1: 5779 the.quick.brown.fox 5780 0: the.quick.brown.fox 5781 1: 5782 a100.b200.300c 5783 0: a100.b200.300c 5784 1: 5785 12-ab.1245 5786 0: 12-ab.1245 5787 1: 5788 *** Failers 5789No match 5790 \ 5791No match 5792 .a 5793No match 5794 -a 5795No match 5796 a- 5797No match 5798 a. 5799No match 5800 a_b 5801No match 5802 a.- 5803No match 5804 a.. 5805No match 5806 ab..bc 5807No match 5808 the.quick.brown.fox- 5809No match 5810 the.quick.brown.fox. 5811No match 5812 the.quick.brown.fox_ 5813No match 5814 the.quick.brown.fox+ 5815No match 5816 5817/(?>.*)(?<=(abcd|wxyz))/ 5818 alphabetabcd 5819 0: alphabetabcd 5820 1: abcd 5821 endingwxyz 5822 0: endingwxyz 5823 1: wxyz 5824 *** Failers 5825No match 5826 a rather long string that doesn't end with one of them 5827No match 5828 5829/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/ 5830 word cat dog elephant mussel cow horse canary baboon snake shark otherword 5831 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword 5832 word cat dog elephant mussel cow horse canary baboon snake shark 5833No match 5834 5835/word (?>[a-zA-Z0-9]+ ){0,30}otherword/ 5836 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 5837No match 5838 5839/(?<=\d{3}(?!999))foo/ 5840 999foo 5841 0: foo 5842 123999foo 5843 0: foo 5844 *** Failers 5845No match 5846 123abcfoo 5847No match 5848 5849/(?<=(?!...999)\d{3})foo/ 5850 999foo 5851 0: foo 5852 123999foo 5853 0: foo 5854 *** Failers 5855No match 5856 123abcfoo 5857No match 5858 5859/(?<=\d{3}(?!999)...)foo/ 5860 123abcfoo 5861 0: foo 5862 123456foo 5863 0: foo 5864 *** Failers 5865No match 5866 123999foo 5867No match 5868 5869/(?<=\d{3}...)(?<!999)foo/ 5870 123abcfoo 5871 0: foo 5872 123456foo 5873 0: foo 5874 *** Failers 5875No match 5876 123999foo 5877No match 5878 5879/<a[\s]+href[\s]*=[\s]* # find <a href= 5880 ([\"\'])? # find single or double quote 5881 (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching 5882 # quote, otherwise match up to next space 5883/isx 5884 <a href=abcd xyz 5885 0: <a href=abcd 5886 1: <unset> 5887 2: <unset> 5888 3: abcd 5889 <a href=\"abcd xyz pqr\" cats 5890 0: <a href="abcd xyz pqr" 5891 1: " 5892 2: abcd xyz pqr 5893 <a href=\'abcd xyz pqr\' cats 5894 0: <a href='abcd xyz pqr' 5895 1: ' 5896 2: abcd xyz pqr 5897 5898/<a\s+href\s*=\s* # find <a href= 5899 (["'])? # find single or double quote 5900 (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching 5901 # quote, otherwise match up to next space 5902/isx 5903 <a href=abcd xyz 5904 0: <a href=abcd 5905 1: <unset> 5906 2: <unset> 5907 3: abcd 5908 <a href=\"abcd xyz pqr\" cats 5909 0: <a href="abcd xyz pqr" 5910 1: " 5911 2: abcd xyz pqr 5912 <a href = \'abcd xyz pqr\' cats 5913 0: <a href = 'abcd xyz pqr' 5914 1: ' 5915 2: abcd xyz pqr 5916 5917/<a\s+href(?>\s*)=(?>\s*) # find <a href= 5918 (["'])? # find single or double quote 5919 (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching 5920 # quote, otherwise match up to next space 5921/isx 5922 <a href=abcd xyz 5923 0: <a href=abcd 5924 1: <unset> 5925 2: <unset> 5926 3: abcd 5927 <a href=\"abcd xyz pqr\" cats 5928 0: <a href="abcd xyz pqr" 5929 1: " 5930 2: abcd xyz pqr 5931 <a href = \'abcd xyz pqr\' cats 5932 0: <a href = 'abcd xyz pqr' 5933 1: ' 5934 2: abcd xyz pqr 5935 5936/((Z)+|A)*/ 5937 ZABCDEFG 5938 0: ZA 5939 1: A 5940 2: Z 5941 5942/(Z()|A)*/ 5943 ZABCDEFG 5944 0: ZA 5945 1: A 5946 2: 5947 5948/(Z(())|A)*/ 5949 ZABCDEFG 5950 0: ZA 5951 1: A 5952 2: 5953 3: 5954 5955/((?>Z)+|A)*/ 5956 ZABCDEFG 5957 0: ZA 5958 1: A 5959 5960/((?>)+|A)*/ 5961 ZABCDEFG 5962 0: 5963 1: 5964 5965/a*/g 5966 abbab 5967 0: a 5968 0: 5969 0: 5970 0: a 5971 0: 5972 0: 5973 5974/^[a-\d]/ 5975 abcde 5976 0: a 5977 -things 5978 0: - 5979 0digit 5980 0: 0 5981 *** Failers 5982No match 5983 bcdef 5984No match 5985 5986/^[\d-a]/ 5987 abcde 5988 0: a 5989 -things 5990 0: - 5991 0digit 5992 0: 0 5993 *** Failers 5994No match 5995 bcdef 5996No match 5997 5998/[[:space:]]+/ 5999 > \x09\x0a\x0c\x0d\x0b< 6000 0: \x09\x0a\x0c\x0d\x0b 6001 6002/[[:blank:]]+/ 6003 > \x09\x0a\x0c\x0d\x0b< 6004 0: \x09 6005 6006/[\s]+/ 6007 > \x09\x0a\x0c\x0d\x0b< 6008 0: \x09\x0a\x0c\x0d 6009 6010/\s+/ 6011 > \x09\x0a\x0c\x0d\x0b< 6012 0: \x09\x0a\x0c\x0d 6013 6014/ab/x 6015 ab 6016No match 6017 6018/(?!\A)x/m 6019 a\nxb\n 6020 0: x 6021 6022/(?!^)x/m 6023 a\nxb\n 6024No match 6025 6026/abc\Qabc\Eabc/ 6027 abcabcabc 6028 0: abcabcabc 6029 6030/abc\Q(*+|\Eabc/ 6031 abc(*+|abc 6032 0: abc(*+|abc 6033 6034/ abc\Q abc\Eabc/x 6035 abc abcabc 6036 0: abc abcabc 6037 *** Failers 6038No match 6039 abcabcabc 6040No match 6041 6042/abc#comment 6043 \Q#not comment 6044 literal\E/x 6045 abc#not comment\n literal 6046 0: abc#not comment\x0a literal 6047 6048/abc#comment 6049 \Q#not comment 6050 literal/x 6051 abc#not comment\n literal 6052 0: abc#not comment\x0a literal 6053 6054/abc#comment 6055 \Q#not comment 6056 literal\E #more comment 6057 /x 6058 abc#not comment\n literal 6059 0: abc#not comment\x0a literal 6060 6061/abc#comment 6062 \Q#not comment 6063 literal\E #more comment/x 6064 abc#not comment\n literal 6065 0: abc#not comment\x0a literal 6066 6067/\Qabc\$xyz\E/ 6068 abc\\\$xyz 6069 0: abc\$xyz 6070 6071/\Qabc\E\$\Qxyz\E/ 6072 abc\$xyz 6073 0: abc$xyz 6074 6075/\Gabc/ 6076 abc 6077 0: abc 6078 *** Failers 6079No match 6080 xyzabc 6081No match 6082 6083/\Gabc./g 6084 abc1abc2xyzabc3 6085 0: abc1 6086 0: abc2 6087 6088/abc./g 6089 abc1abc2xyzabc3 6090 0: abc1 6091 0: abc2 6092 0: abc3 6093 6094/a(?x: b c )d/ 6095 XabcdY 6096 0: abcd 6097 *** Failers 6098No match 6099 Xa b c d Y 6100No match 6101 6102/((?x)x y z | a b c)/ 6103 XabcY 6104 0: abc 6105 1: abc 6106 AxyzB 6107 0: xyz 6108 1: xyz 6109 6110/(?i)AB(?-i)C/ 6111 XabCY 6112 0: abC 6113 *** Failers 6114No match 6115 XabcY 6116No match 6117 6118/((?i)AB(?-i)C|D)E/ 6119 abCE 6120 0: abCE 6121 1: abC 6122 DE 6123 0: DE 6124 1: D 6125 *** Failers 6126No match 6127 abcE 6128No match 6129 abCe 6130No match 6131 dE 6132No match 6133 De 6134No match 6135 6136/(.*)\d+\1/ 6137 abc123abc 6138 0: abc123abc 6139 1: abc 6140 abc123bc 6141 0: bc123bc 6142 1: bc 6143 6144/(.*)\d+\1/s 6145 abc123abc 6146 0: abc123abc 6147 1: abc 6148 abc123bc 6149 0: bc123bc 6150 1: bc 6151 6152/((.*))\d+\1/ 6153 abc123abc 6154 0: abc123abc 6155 1: abc 6156 2: abc 6157 abc123bc 6158 0: bc123bc 6159 1: bc 6160 2: bc 6161 6162/-- This tests for an IPv6 address in the form where it can have up to --/ 6163/-- eight components, one and only one of which is empty. This must be --/ 6164No match 6165/-- an internal component. --/ 6166No match 6167 6168/^(?!:) # colon disallowed at start 6169 (?: # start of item 6170 (?: [0-9a-f]{1,4} | # 1-4 hex digits or 6171 (?(1)0 | () ) ) # if null previously matched, fail; else null 6172 : # followed by colon 6173 ){1,7} # end item; 1-7 of them required 6174 [0-9a-f]{1,4} $ # final hex number at end of string 6175 (?(1)|.) # check that there was an empty component 6176 /xi 6177 a123::a123 6178 0: a123::a123 6179 1: 6180 a123:b342::abcd 6181 0: a123:b342::abcd 6182 1: 6183 a123:b342::324e:abcd 6184 0: a123:b342::324e:abcd 6185 1: 6186 a123:ddde:b342::324e:abcd 6187 0: a123:ddde:b342::324e:abcd 6188 1: 6189 a123:ddde:b342::324e:dcba:abcd 6190 0: a123:ddde:b342::324e:dcba:abcd 6191 1: 6192 a123:ddde:9999:b342::324e:dcba:abcd 6193 0: a123:ddde:9999:b342::324e:dcba:abcd 6194 1: 6195 *** Failers 6196No match 6197 1:2:3:4:5:6:7:8 6198No match 6199 a123:bce:ddde:9999:b342::324e:dcba:abcd 6200No match 6201 a123::9999:b342::324e:dcba:abcd 6202No match 6203 abcde:2:3:4:5:6:7:8 6204No match 6205 ::1 6206No match 6207 abcd:fee0:123:: 6208No match 6209 :1 6210No match 6211 1: 6212No match 6213 6214/[z\Qa-d]\E]/ 6215 z 6216 0: z 6217 a 6218 0: a 6219 - 6220 0: - 6221 d 6222 0: d 6223 ] 6224 0: ] 6225 *** Failers 6226 0: a 6227 b 6228No match 6229 6230/[\z\C]/ 6231 z 6232 0: z 6233 C 6234 0: C 6235 6236/\M/ 6237 M 6238 0: M 6239 6240/(a+)*b/ 6241 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6242No match 6243 6244/(?i)reg(?:ul(?:[a�]|ae)r|ex)/ 6245 REGular 6246 0: REGular 6247 regulaer 6248 0: regulaer 6249 Regex 6250 0: Regex 6251 regul�r 6252 0: regul\xe4r 6253 6254/����[�-��-�]+/ 6255 ����� 6256 0: \xc5\xe6\xe5\xe4\xe0 6257 ����� 6258 0: \xc5\xe6\xe5\xe4\xff 6259 ����� 6260 0: \xc5\xe6\xe5\xe4\xc0 6261 ����� 6262 0: \xc5\xe6\xe5\xe4\xdf 6263 6264/(?<=Z)X./ 6265 \x84XAZXB 6266 0: XB 6267 6268/ab cd (?x) de fg/ 6269 ab cd defg 6270 0: ab cd defg 6271 6272/ab cd(?x) de fg/ 6273 ab cddefg 6274 0: ab cddefg 6275 ** Failers 6276No match 6277 abcddefg 6278No match 6279 6280/(?<![^f]oo)(bar)/ 6281 foobarX 6282 0: bar 6283 1: bar 6284 ** Failers 6285No match 6286 boobarX 6287No match 6288 6289/(?<![^f])X/ 6290 offX 6291 0: X 6292 ** Failers 6293No match 6294 onyX 6295No match 6296 6297/(?<=[^f])X/ 6298 onyX 6299 0: X 6300 ** Failers 6301No match 6302 offX 6303No match 6304 6305/^/mg 6306 a\nb\nc\n 6307 0: 6308 0: 6309 0: 6310 \ 6311 0: 6312 6313/(?<=C\n)^/mg 6314 A\nC\nC\n 6315 0: 6316 6317/(?:(?(1)a|b)(X))+/ 6318 bXaX 6319 0: bXaX 6320 1: X 6321 6322/(?:(?(1)\1a|b)(X|Y))+/ 6323 bXXaYYaY 6324 0: bXXaYYaY 6325 1: Y 6326 bXYaXXaX 6327 0: bX 6328 1: X 6329 6330/()()()()()()()()()(?:(?(10)\10a|b)(X|Y))+/ 6331 bXXaYYaY 6332 0: bX 6333 1: 6334 2: 6335 3: 6336 4: 6337 5: 6338 6: 6339 7: 6340 8: 6341 9: 634210: X 6343 6344/[[,abc,]+]/ 6345 abc] 6346 0: abc] 6347 a,b] 6348 0: a,b] 6349 [a,b,c] 6350 0: [a,b,c] 6351 6352/(?-x: )/x 6353 A\x20B 6354 0: 6355 6356"(?x)(?-x: \s*#\s*)" 6357 A # B 6358 0: # 6359 ** Failers 6360No match 6361 # 6362No match 6363 6364"(?x-is)(?:(?-ixs) \s*#\s*) include" 6365 A #include 6366 0: #include 6367 ** Failers 6368No match 6369 A#include 6370No match 6371 A #Include 6372No match 6373 6374/a*b*\w/ 6375 aaabbbb 6376 0: aaabbbb 6377 aaaa 6378 0: aaaa 6379 a 6380 0: a 6381 6382/a*b?\w/ 6383 aaabbbb 6384 0: aaabb 6385 aaaa 6386 0: aaaa 6387 a 6388 0: a 6389 6390/a*b{0,4}\w/ 6391 aaabbbb 6392 0: aaabbbb 6393 aaaa 6394 0: aaaa 6395 a 6396 0: a 6397 6398/a*b{0,}\w/ 6399 aaabbbb 6400 0: aaabbbb 6401 aaaa 6402 0: aaaa 6403 a 6404 0: a 6405 6406/a*\d*\w/ 6407 0a 6408 0: 0a 6409 a 6410 0: a 6411 6412/a*b *\w/x 6413 a 6414 0: a 6415 6416/a*b#comment 6417 *\w/x 6418 a 6419 0: a 6420 6421/a* b *\w/x 6422 a 6423 0: a 6424 6425/^\w+=.*(\\\n.*)*/ 6426 abc=xyz\\\npqr 6427 0: abc=xyz\ 6428 6429/(?=(\w+))\1:/ 6430 abcd: 6431 0: abcd: 6432 1: abcd 6433 6434/^(?=(\w+))\1:/ 6435 abcd: 6436 0: abcd: 6437 1: abcd 6438 6439/^\Eabc/ 6440 abc 6441 0: abc 6442 6443/^[\Eabc]/ 6444 a 6445 0: a 6446 ** Failers 6447No match 6448 E 6449No match 6450 6451/^[a-\Ec]/ 6452 b 6453 0: b 6454 ** Failers 6455No match 6456 - 6457No match 6458 E 6459No match 6460 6461/^[a\E\E-\Ec]/ 6462 b 6463 0: b 6464 ** Failers 6465No match 6466 - 6467No match 6468 E 6469No match 6470 6471/^[\E\Qa\E-\Qz\E]+/ 6472 b 6473 0: b 6474 ** Failers 6475No match 6476 - 6477No match 6478 6479/^[a\Q]bc\E]/ 6480 a 6481 0: a 6482 ] 6483 0: ] 6484 c 6485 0: c 6486 6487/^[a-\Q\E]/ 6488 a 6489 0: a 6490 - 6491 0: - 6492 6493/^(a()*)*/ 6494 aaaa 6495 0: aaaa 6496 1: a 6497 2: 6498 6499/^(?:a(?:(?:))*)*/ 6500 aaaa 6501 0: aaaa 6502 6503/^(a()+)+/ 6504 aaaa 6505 0: aaaa 6506 1: a 6507 2: 6508 6509/^(?:a(?:(?:))+)+/ 6510 aaaa 6511 0: aaaa 6512 6513/(a){0,3}(?(1)b|(c|))*D/ 6514 abbD 6515 0: abbD 6516 1: a 6517 ccccD 6518 0: ccccD 6519 1: <unset> 6520 2: 6521 D 6522 0: D 6523 1: <unset> 6524 2: 6525 6526/(a|)*\d/ 6527 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6528No match 6529 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 6530 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 6531 1: 6532 6533/(?>a|)*\d/ 6534 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6535No match 6536 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 6537 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 6538 6539/(?:a|)*\d/ 6540 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6541No match 6542 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 6543 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 6544 6545/\Z/g 6546 abc\n 6547 0: 6548 0: 6549 6550/^(?s)(?>.*)(?<!\n)/ 6551 abc 6552 0: abc 6553 abc\n 6554No match 6555 6556/^(?![^\n]*\n\z)/ 6557 abc 6558 0: 6559 abc\n 6560No match 6561 6562/\z(?<!\n)/ 6563 abc 6564 0: 6565 abc\n 6566No match 6567 6568/(.*(.)?)*/ 6569 abcd 6570 0: abcd 6571 1: 6572 6573/( (A | (?(1)0|) )* )/x 6574 abcd 6575 0: 6576 1: 6577 2: 6578 6579/( ( (?(1)0|) )* )/x 6580 abcd 6581 0: 6582 1: 6583 2: 6584 6585/( (?(1)0|)* )/x 6586 abcd 6587 0: 6588 1: 6589 6590/[[:abcd:xyz]]/ 6591 a] 6592 0: a] 6593 :] 6594 0: :] 6595 6596/[abc[:x\]pqr]/ 6597 a 6598 0: a 6599 [ 6600 0: [ 6601 : 6602 0: : 6603 ] 6604 0: ] 6605 p 6606 0: p 6607 6608/.*[op][xyz]/ 6609 fooabcfoo 6610No match 6611 6612/(?(?=.*b)b|^)/ 6613 adc 6614 0: 6615 abc 6616 0: b 6617 6618/(?(?=^.*b)b|^)/ 6619 adc 6620 0: 6621 abc 6622No match 6623 6624/(?(?=.*b)b|^)*/ 6625 adc 6626 0: 6627 abc 6628 0: 6629 6630/(?(?=.*b)b|^)+/ 6631 adc 6632 0: 6633 abc 6634 0: b 6635 6636/(?(?=b).*b|^d)/ 6637 abc 6638 0: b 6639 6640/(?(?=.*b).*b|^d)/ 6641 abc 6642 0: ab 6643 6644/^%((?(?=[a])[^%])|b)*%$/ 6645 %ab% 6646 0: %ab% 6647 1: 6648 6649/(?i)a(?-i)b|c/ 6650 XabX 6651 0: ab 6652 XAbX 6653 0: Ab 6654 CcC 6655 0: c 6656 ** Failers 6657No match 6658 XABX 6659No match 6660 6661/[\x00-\xff\s]+/ 6662 \x0a\x0b\x0c\x0d 6663 0: \x0a\x0b\x0c\x0d 6664 6665/^\c/ 6666 ? 6667 0: ? 6668 6669/-- End of testinput1 --/ 6670