1# PCRE version 4.4 21-August-2003 2 3# Tests taken from PCRE and modified to suit glibc regex. 4# 5# PCRE LICENCE 6# ------------ 7# 8# PCRE is a library of functions to support regular expressions whose syntax 9# and semantics are as close as possible to those of the Perl 5 language. 10# 11# Written by: Philip Hazel <ph10@cam.ac.uk> 12# 13# University of Cambridge Computing Service, 14# Cambridge, England. Phone: +44 1223 334714. 15# 16# Copyright (c) 1997-2003 University of Cambridge 17# 18# Permission is granted to anyone to use this software for any purpose on any 19# computer system, and to redistribute it freely, subject to the following 20# restrictions: 21# 22# 1. This software is distributed in the hope that it will be useful, 23# but WITHOUT ANY WARRANTY; without even the implied warranty of 24# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 25# 26# 2. The origin of this software must not be misrepresented, either by 27# explicit claim or by omission. In practice, this means that if you use 28# PCRE in software that you distribute to others, commercially or 29# otherwise, you must put a sentence like this 30# 31# Regular expression support is provided by the PCRE library package, 32# which is open source software, written by Philip Hazel, and copyright 33# by the University of Cambridge, England. 34# 35# somewhere reasonably visible in your documentation and in any relevant 36# files or online help data or similar. A reference to the ftp site for 37# the source, that is, to 38# 39# ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 40# 41# should also be given in the documentation. However, this condition is not 42# intended to apply to whole chains of software. If package A includes PCRE, 43# it must acknowledge it, but if package B is software that includes package 44# A, the condition is not imposed on package B (unless it uses PCRE 45# independently). 46# 47# 3. Altered versions must be plainly marked as such, and must not be 48# misrepresented as being the original software. 49# 50# 4. If PCRE is embedded in any software that is released under the GNU 51# General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL), 52# then the terms of that licence shall supersede any condition above with 53# which it is incompatible. 54# 55# The documentation for PCRE, supplied in the "doc" directory, is distributed 56# under the same terms as the software itself. 57# 58# End 59# 60 61/the quick brown fox/ 62 the quick brown fox 63 0: the quick brown fox 64 The quick brown FOX 65No match 66 What do you know about the quick brown fox? 67 0: the quick brown fox 68 What do you know about THE QUICK BROWN FOX? 69No match 70 71/The quick brown fox/i 72 the quick brown fox 73 0: the quick brown fox 74 The quick brown FOX 75 0: The quick brown FOX 76 What do you know about the quick brown fox? 77 0: the quick brown fox 78 What do you know about THE QUICK BROWN FOX? 79 0: THE QUICK BROWN FOX 80 81/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/ 82 abxyzpqrrrabbxyyyypqAzz 83 0: abxyzpqrrrabbxyyyypqAzz 84 abxyzpqrrrabbxyyyypqAzz 85 0: abxyzpqrrrabbxyyyypqAzz 86 aabxyzpqrrrabbxyyyypqAzz 87 0: aabxyzpqrrrabbxyyyypqAzz 88 aaabxyzpqrrrabbxyyyypqAzz 89 0: aaabxyzpqrrrabbxyyyypqAzz 90 aaaabxyzpqrrrabbxyyyypqAzz 91 0: aaaabxyzpqrrrabbxyyyypqAzz 92 abcxyzpqrrrabbxyyyypqAzz 93 0: abcxyzpqrrrabbxyyyypqAzz 94 aabcxyzpqrrrabbxyyyypqAzz 95 0: aabcxyzpqrrrabbxyyyypqAzz 96 aaabcxyzpqrrrabbxyyyypAzz 97 0: aaabcxyzpqrrrabbxyyyypAzz 98 aaabcxyzpqrrrabbxyyyypqAzz 99 0: aaabcxyzpqrrrabbxyyyypqAzz 100 aaabcxyzpqrrrabbxyyyypqqAzz 101 0: aaabcxyzpqrrrabbxyyyypqqAzz 102 aaabcxyzpqrrrabbxyyyypqqqAzz 103 0: aaabcxyzpqrrrabbxyyyypqqqAzz 104 aaabcxyzpqrrrabbxyyyypqqqqAzz 105 0: aaabcxyzpqrrrabbxyyyypqqqqAzz 106 aaabcxyzpqrrrabbxyyyypqqqqqAzz 107 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz 108 aaabcxyzpqrrrabbxyyyypqqqqqqAzz 109 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz 110 aaaabcxyzpqrrrabbxyyyypqAzz 111 0: aaaabcxyzpqrrrabbxyyyypqAzz 112 abxyzzpqrrrabbxyyyypqAzz 113 0: abxyzzpqrrrabbxyyyypqAzz 114 aabxyzzzpqrrrabbxyyyypqAzz 115 0: aabxyzzzpqrrrabbxyyyypqAzz 116 aaabxyzzzzpqrrrabbxyyyypqAzz 117 0: aaabxyzzzzpqrrrabbxyyyypqAzz 118 aaaabxyzzzzpqrrrabbxyyyypqAzz 119 0: aaaabxyzzzzpqrrrabbxyyyypqAzz 120 abcxyzzpqrrrabbxyyyypqAzz 121 0: abcxyzzpqrrrabbxyyyypqAzz 122 aabcxyzzzpqrrrabbxyyyypqAzz 123 0: aabcxyzzzpqrrrabbxyyyypqAzz 124 aaabcxyzzzzpqrrrabbxyyyypqAzz 125 0: aaabcxyzzzzpqrrrabbxyyyypqAzz 126 aaaabcxyzzzzpqrrrabbxyyyypqAzz 127 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz 128 aaaabcxyzzzzpqrrrabbbxyyyypqAzz 129 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz 130 aaaabcxyzzzzpqrrrabbbxyyyyypqAzz 131 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz 132 aaabcxyzpqrrrabbxyyyypABzz 133 0: aaabcxyzpqrrrabbxyyyypABzz 134 aaabcxyzpqrrrabbxyyyypABBzz 135 0: aaabcxyzpqrrrabbxyyyypABBzz 136 >>>aaabxyzpqrrrabbxyyyypqAzz 137 0: aaabxyzpqrrrabbxyyyypqAzz 138 >aaaabxyzpqrrrabbxyyyypqAzz 139 0: aaaabxyzpqrrrabbxyyyypqAzz 140 >>>>abcxyzpqrrrabbxyyyypqAzz 141 0: abcxyzpqrrrabbxyyyypqAzz 142 *** Failers 143No match 144 abxyzpqrrabbxyyyypqAzz 145No match 146 abxyzpqrrrrabbxyyyypqAzz 147No match 148 abxyzpqrrrabxyyyypqAzz 149No match 150 aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz 151No match 152 aaaabcxyzzzzpqrrrabbbxyyypqAzz 153No match 154 aaabcxyzpqrrrabbxyyyypqqqqqqqAzz 155No match 156 157/^(abc){1,2}zz/ 158 abczz 159 0: abczz 160 1: abc 161 abcabczz 162 0: abcabczz 163 1: abc 164 *** Failers 165No match 166 zz 167No match 168 abcabcabczz 169No match 170 >>abczz 171No match 172 173/^(b+|a){1,2}c/ 174 bc 175 0: bc 176 1: b 177 bbc 178 0: bbc 179 1: bb 180 bbbc 181 0: bbbc 182 1: bbb 183 bac 184 0: bac 185 1: a 186 bbac 187 0: bbac 188 1: a 189 aac 190 0: aac 191 1: a 192 abbbbbbbbbbbc 193 0: abbbbbbbbbbbc 194 1: bbbbbbbbbbb 195 bbbbbbbbbbbac 196 0: bbbbbbbbbbbac 197 1: a 198 *** Failers 199No match 200 aaac 201No match 202 abbbbbbbbbbbac 203No match 204 205/^[]cde]/ 206 ]thing 207 0: ] 208 cthing 209 0: c 210 dthing 211 0: d 212 ething 213 0: e 214 *** Failers 215No match 216 athing 217No match 218 fthing 219No match 220 221/^[^]cde]/ 222 athing 223 0: a 224 fthing 225 0: f 226 *** Failers 227 0: * 228 ]thing 229No match 230 cthing 231No match 232 dthing 233No match 234 ething 235No match 236 237/^[0-9]+$/ 238 0 239 0: 0 240 1 241 0: 1 242 2 243 0: 2 244 3 245 0: 3 246 4 247 0: 4 248 5 249 0: 5 250 6 251 0: 6 252 7 253 0: 7 254 8 255 0: 8 256 9 257 0: 9 258 10 259 0: 10 260 100 261 0: 100 262 *** Failers 263No match 264 abc 265No match 266 267/^.*nter/ 268 enter 269 0: enter 270 inter 271 0: inter 272 uponter 273 0: uponter 274 275/^xxx[0-9]+$/ 276 xxx0 277 0: xxx0 278 xxx1234 279 0: xxx1234 280 *** Failers 281No match 282 xxx 283No match 284 285/^.+[0-9][0-9][0-9]$/ 286 x123 287 0: x123 288 xx123 289 0: xx123 290 123456 291 0: 123456 292 *** Failers 293No match 294 123 295No match 296 x1234 297 0: x1234 298 299/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/ 300 abc!pqr=apquxz.ixr.zzz.ac.uk 301 0: abc!pqr=apquxz.ixr.zzz.ac.uk 302 1: abc 303 2: pqr 304 *** Failers 305No match 306 !pqr=apquxz.ixr.zzz.ac.uk 307No match 308 abc!=apquxz.ixr.zzz.ac.uk 309No match 310 abc!pqr=apquxz:ixr.zzz.ac.uk 311No match 312 abc!pqr=apquxz.ixr.zzz.ac.ukk 313No match 314 315/:/ 316 Well, we need a colon: somewhere 317 0: : 318 *** Fail if we don't 319No match 320 321/([0-9a-f:]+)$/i 322 0abc 323 0: 0abc 324 1: 0abc 325 abc 326 0: abc 327 1: abc 328 fed 329 0: fed 330 1: fed 331 E 332 0: E 333 1: E 334 :: 335 0: :: 336 1: :: 337 5f03:12C0::932e 338 0: 5f03:12C0::932e 339 1: 5f03:12C0::932e 340 fed def 341 0: def 342 1: def 343 Any old stuff 344 0: ff 345 1: ff 346 *** Failers 347No match 348 0zzz 349No match 350 gzzz 351No match 352 Any old rubbish 353No match 354 355/^.*\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/ 356 .1.2.3 357 0: .1.2.3 358 1: 1 359 2: 2 360 3: 3 361 A.12.123.0 362 0: A.12.123.0 363 1: 12 364 2: 123 365 3: 0 366 *** Failers 367No match 368 .1.2.3333 369No match 370 1.2.3 371No match 372 1234.2.3 373No match 374 375/^([0-9]+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/ 376 1 IN SOA non-sp1 non-sp2( 377 0: 1 IN SOA non-sp1 non-sp2( 378 1: 1 379 2: non-sp1 380 3: non-sp2 381 1 IN SOA non-sp1 non-sp2 ( 382 0: 1 IN SOA non-sp1 non-sp2 ( 383 1: 1 384 2: non-sp1 385 3: non-sp2 386 *** Failers 387No match 388 1IN SOA non-sp1 non-sp2( 389No match 390 391/^[a-zA-Z0-9][a-zA-Z0-9-]*(\.[a-zA-Z0-9][a-zA-z0-9-]*)*\.$/ 392 a. 393 0: a. 394 Z. 395 0: Z. 396 2. 397 0: 2. 398 ab-c.pq-r. 399 0: ab-c.pq-r. 400 1: .pq-r 401 sxk.zzz.ac.uk. 402 0: sxk.zzz.ac.uk. 403 1: .uk 404 x-.y-. 405 0: x-.y-. 406 1: .y- 407 *** Failers 408No match 409 -abc.peq. 410No match 411 412/^\*\.[a-z]([a-z0-9-]*[a-z0-9]+)?(\.[a-z]([a-z0-9-]*[a-z0-9]+)?)*$/ 413 *.a 414 0: *.a 415 *.b0-a 416 0: *.b0-a 417 1: 0-a 418 *.c3-b.c 419 0: *.c3-b.c 420 1: 3-b 421 2: .c 422 *.c-a.b-c 423 0: *.c-a.b-c 424 1: -a 425 2: .b-c 426 3: -c 427 *** Failers 428No match 429 *.0 430No match 431 *.a- 432No match 433 *.a-b.c- 434No match 435 *.c-a.0-c 436No match 437 438/^[0-9a-f](\.[0-9a-f])*$/i 439 a.b.c.d 440 0: a.b.c.d 441 1: .d 442 A.B.C.D 443 0: A.B.C.D 444 1: .D 445 a.b.c.1.2.3.C 446 0: a.b.c.1.2.3.C 447 1: .C 448 449/^".*"\s*(;.*)?$/ 450 "1234" 451 0: "1234" 452 "abcd" ; 453 0: "abcd" ; 454 1: ; 455 "" ; rhubarb 456 0: "" ; rhubarb 457 1: ; rhubarb 458 *** Failers 459No match 460 "1234" : things 461No match 462 463/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/ 464 abcdefhijklm 465 0: abcdefhijklm 466 1: abc 467 2: bc 468 3: c 469 4: def 470 5: ef 471 6: f 472 7: hij 473 8: ij 474 9: j 47510: klm 47611: lm 47712: m 478 479/^a*\w/ 480 z 481 0: z 482 az 483 0: az 484 aaaz 485 0: aaaz 486 a 487 0: a 488 aa 489 0: aa 490 aaaa 491 0: aaaa 492 a+ 493 0: a 494 aa+ 495 0: aa 496 497/^a+\w/ 498 az 499 0: az 500 aaaz 501 0: aaaz 502 aa 503 0: aa 504 aaaa 505 0: aaaa 506 aa+ 507 0: aa 508 509/^[0-9]{8}\w{2,}/ 510 1234567890 511 0: 1234567890 512 12345678ab 513 0: 12345678ab 514 12345678__ 515 0: 12345678__ 516 *** Failers 517No match 518 1234567 519No match 520 521/^[aeiou0-9]{4,5}$/ 522 uoie 523 0: uoie 524 1234 525 0: 1234 526 12345 527 0: 12345 528 aaaaa 529 0: aaaaa 530 *** Failers 531No match 532 123456 533No match 534 535/\`(abc|def)=(\1){2,3}\'/ 536 abc=abcabc 537 0: abc=abcabc 538 1: abc 539 2: abc 540 def=defdefdef 541 0: def=defdefdef 542 1: def 543 2: def 544 *** Failers 545No match 546 abc=defdef 547No match 548 549/(cat(a(ract|tonic)|erpillar)) \1()2(3)/ 550 cataract cataract23 551 0: cataract cataract23 552 1: cataract 553 2: aract 554 3: ract 555 4: 556 5: 3 557 catatonic catatonic23 558 0: catatonic catatonic23 559 1: catatonic 560 2: atonic 561 3: tonic 562 4: 563 5: 3 564 caterpillar caterpillar23 565 0: caterpillar caterpillar23 566 1: caterpillar 567 2: erpillar 568 3: <unset> 569 4: 570 5: 3 571 572 573/^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]/ 574 From abcd Mon Sep 01 12:33:02 1997 575 0: From abcd Mon Sep 01 12:33 576 1: abcd 577 578/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}[0-9]{1,2}\s+[0-9][0-9]:[0-9][0-9]/ 579 From abcd Mon Sep 01 12:33:02 1997 580 0: From abcd Mon Sep 01 12:33 581 1: Sep 582 From abcd Mon Sep 1 12:33:02 1997 583 0: From abcd Mon Sep 1 12:33 584 1: Sep 585 *** Failers 586No match 587 From abcd Sep 01 12:33:02 1997 588No match 589 590/^(a)\1{2,3}(.)/ 591 aaab 592 0: aaab 593 1: a 594 2: b 595 aaaab 596 0: aaaab 597 1: a 598 2: b 599 aaaaab 600 0: aaaaa 601 1: a 602 2: a 603 aaaaaab 604 0: aaaaa 605 1: a 606 2: a 607 608/^[ab]{1,3}(ab*|b)/ 609 aabbbbb 610 0: aabbbbb 611 1: abbbbb 612 613/^(cow|)\1(bell)/ 614 cowcowbell 615 0: cowcowbell 616 1: cow 617 2: bell 618 bell 619 0: bell 620 1: 621 2: bell 622 *** Failers 623No match 624 cowbell 625No match 626 627/^(a|)\1+b/ 628 aab 629 0: aab 630 1: a 631 aaaab 632 0: aaaab 633 1: a 634 b 635 0: b 636 1: 637 *** Failers 638No match 639 ab 640No match 641 642/^(a|)\1{2}b/ 643 aaab 644 0: aaab 645 1: a 646 b 647 0: b 648 1: 649 *** Failers 650No match 651 ab 652No match 653 aab 654No match 655 aaaab 656No match 657 658/^(a|)\1{2,3}b/ 659 aaab 660 0: aaab 661 1: a 662 aaaab 663 0: aaaab 664 1: a 665 b 666 0: b 667 1: 668 *** Failers 669No match 670 ab 671No match 672 aab 673No match 674 aaaaab 675No match 676 677/ab{1,3}bc/ 678 abbbbc 679 0: abbbbc 680 abbbc 681 0: abbbc 682 abbc 683 0: abbc 684 *** Failers 685No match 686 abc 687No match 688 abbbbbc 689No match 690 691/([^.]*)\.([^:]*):[T ]+(.*)/ 692 track1.title:TBlah blah blah 693 0: track1.title:TBlah blah blah 694 1: track1 695 2: title 696 3: Blah blah blah 697 698/([^.]*)\.([^:]*):[T ]+(.*)/i 699 track1.title:TBlah blah blah 700 0: track1.title:TBlah blah blah 701 1: track1 702 2: title 703 3: Blah blah blah 704 705/([^.]*)\.([^:]*):[t ]+(.*)/i 706 track1.title:TBlah blah blah 707 0: track1.title:TBlah blah blah 708 1: track1 709 2: title 710 3: Blah blah blah 711 712/^abc$/ 713 abc 714 0: abc 715 *** Failers 716No match 717 718/[-az]+/ 719 az- 720 0: az- 721 *** Failers 722 0: a 723 b 724No match 725 726/[az-]+/ 727 za- 728 0: za- 729 *** Failers 730 0: a 731 b 732No match 733 734/[a-z]+/ 735 abcdxyz 736 0: abcdxyz 737 738/[0-9-]+/ 739 12-34 740 0: 12-34 741 *** Failers 742No match 743 aaa 744No match 745 746/(abc)\1/i 747 abcabc 748 0: abcabc 749 1: abc 750 ABCabc 751 0: ABCabc 752 1: ABC 753 abcABC 754 0: abcABC 755 1: abc 756 757/a{0}bc/ 758 bc 759 0: bc 760 761/^([^a])([^b])([^c]*)([^d]{3,4})/ 762 baNOTccccd 763 0: baNOTcccc 764 1: b 765 2: a 766 3: NOT 767 4: cccc 768 baNOTcccd 769 0: baNOTccc 770 1: b 771 2: a 772 3: NOT 773 4: ccc 774 baNOTccd 775 0: baNOTcc 776 1: b 777 2: a 778 3: NO 779 4: Tcc 780 bacccd 781 0: baccc 782 1: b 783 2: a 784 3: 785 4: ccc 786 *** Failers 787 0: *** Failers 788 1: * 789 2: * 790 3: * Fail 791 4: ers 792 anything 793No match 794 baccd 795No match 796 797/[^a]/ 798 Abc 799 0: A 800 801/[^a]/i 802 Abc 803 0: b 804 805/[^a]+/ 806 AAAaAbc 807 0: AAA 808 809/[^a]+/i 810 AAAaAbc 811 0: bc 812 813/[^k]$/ 814 abc 815 0: c 816 *** Failers 817 0: s 818 abk 819No match 820 821/[^k]{2,3}$/ 822 abc 823 0: abc 824 kbc 825 0: bc 826 kabc 827 0: abc 828 *** Failers 829 0: ers 830 abk 831No match 832 akb 833No match 834 akk 835No match 836 837/^[0-9]{8,}@.+[^k]$/ 838 12345678@a.b.c.d 839 0: 12345678@a.b.c.d 840 123456789@x.y.z 841 0: 123456789@x.y.z 842 *** Failers 843No match 844 12345678@x.y.uk 845No match 846 1234567@a.b.c.d 847No match 848 849/(a)\1{8,}/ 850 aaaaaaaaa 851 0: aaaaaaaaa 852 1: a 853 aaaaaaaaaa 854 0: aaaaaaaaaa 855 1: a 856 *** Failers 857No match 858 aaaaaaa 859No match 860 861/[^a]/ 862 aaaabcd 863 0: b 864 aaAabcd 865 0: A 866 867/[^a]/i 868 aaaabcd 869 0: b 870 aaAabcd 871 0: b 872 873/[^az]/ 874 aaaabcd 875 0: b 876 aaAabcd 877 0: A 878 879/[^az]/i 880 aaaabcd 881 0: b 882 aaAabcd 883 0: b 884 885/P[^*]TAIRE[^*]{1,6}LL/ 886 xxxxxxxxxxxPSTAIREISLLxxxxxxxxx 887 0: PSTAIREISLL 888 889/P[^*]TAIRE[^*]{1,}LL/ 890 xxxxxxxxxxxPSTAIREISLLxxxxxxxxx 891 0: PSTAIREISLL 892 893/(\.[0-9][0-9][1-9]?)[0-9]+/ 894 1.230003938 895 0: .230003938 896 1: .23 897 1.875000282 898 0: .875000282 899 1: .875 900 1.235 901 0: .235 902 1: .23 903 904/\b(foo)\s+(\w+)/i 905 Food is on the foo table 906 0: foo table 907 1: foo 908 2: table 909 910/foo(.*)bar/ 911 The food is under the bar in the barn. 912 0: food is under the bar in the bar 913 1: d is under the bar in the 914 915/(.*)([0-9]*)/ 916 I have 2 numbers: 53147 917 0: I have 2 numbers: 53147 918 1: I have 2 numbers: 53147 919 2: 920 921/(.*)([0-9]+)/ 922 I have 2 numbers: 53147 923 0: I have 2 numbers: 53147 924 1: I have 2 numbers: 5314 925 2: 7 926 927/(.*)([0-9]+)$/ 928 I have 2 numbers: 53147 929 0: I have 2 numbers: 53147 930 1: I have 2 numbers: 5314 931 2: 7 932 933/(.*)\b([0-9]+)$/ 934 I have 2 numbers: 53147 935 0: I have 2 numbers: 53147 936 1: I have 2 numbers: 937 2: 53147 938 939/(.*[^0-9])([0-9]+)$/ 940 I have 2 numbers: 53147 941 0: I have 2 numbers: 53147 942 1: I have 2 numbers: 943 2: 53147 944 945/[[:digit:]][[:digit:]]\/[[:digit:]][[:digit:]]\/[[:digit:]][[:digit:]][[:digit:]][[:digit:]]/ 946 01/01/2000 947 0: 01/01/2000 948 949/^(a){0,0}/ 950 bcd 951 0: 952 abc 953 0: 954 aab 955 0: 956 957/^(a){0,1}/ 958 bcd 959 0: 960 abc 961 0: a 962 1: a 963 aab 964 0: a 965 1: a 966 967/^(a){0,2}/ 968 bcd 969 0: 970 abc 971 0: a 972 1: a 973 aab 974 0: aa 975 1: a 976 977/^(a){0,3}/ 978 bcd 979 0: 980 abc 981 0: a 982 1: a 983 aab 984 0: aa 985 1: a 986 aaa 987 0: aaa 988 1: a 989 990/^(a){0,}/ 991 bcd 992 0: 993 abc 994 0: a 995 1: a 996 aab 997 0: aa 998 1: a 999 aaa 1000 0: aaa 1001 1: a 1002 aaaaaaaa 1003 0: aaaaaaaa 1004 1: a 1005 1006/^(a){1,1}/ 1007 bcd 1008No match 1009 abc 1010 0: a 1011 1: a 1012 aab 1013 0: a 1014 1: a 1015 1016/^(a){1,2}/ 1017 bcd 1018No match 1019 abc 1020 0: a 1021 1: a 1022 aab 1023 0: aa 1024 1: a 1025 1026/^(a){1,3}/ 1027 bcd 1028No match 1029 abc 1030 0: a 1031 1: a 1032 aab 1033 0: aa 1034 1: a 1035 aaa 1036 0: aaa 1037 1: a 1038 1039/^(a){1,}/ 1040 bcd 1041No match 1042 abc 1043 0: a 1044 1: a 1045 aab 1046 0: aa 1047 1: a 1048 aaa 1049 0: aaa 1050 1: a 1051 aaaaaaaa 1052 0: aaaaaaaa 1053 1: a 1054 1055/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/ 1056 123456654321 1057 0: 123456654321 1058 1059/^[[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]/ 1060 123456654321 1061 0: 123456654321 1062 1063/^[abc]{12}/ 1064 abcabcabcabc 1065 0: abcabcabcabc 1066 1067/^[a-c]{12}/ 1068 abcabcabcabc 1069 0: abcabcabcabc 1070 1071/^(a|b|c){12}/ 1072 abcabcabcabc 1073 0: abcabcabcabc 1074 1: c 1075 1076/^[abcdefghijklmnopqrstuvwxy0123456789]/ 1077 n 1078 0: n 1079 *** Failers 1080No match 1081 z 1082No match 1083 1084/abcde{0,0}/ 1085 abcd 1086 0: abcd 1087 *** Failers 1088No match 1089 abce 1090No match 1091 1092/ab[cd]{0,0}e/ 1093 abe 1094 0: abe 1095 *** Failers 1096No match 1097 abcde 1098No match 1099 1100/ab(c){0,0}d/ 1101 abd 1102 0: abd 1103 *** Failers 1104No match 1105 abcd 1106No match 1107 1108/a(b*)/ 1109 a 1110 0: a 1111 1: 1112 ab 1113 0: ab 1114 1: b 1115 abbbb 1116 0: abbbb 1117 1: bbbb 1118 *** Failers 1119 0: a 1120 1: 1121 bbbbb 1122No match 1123 1124/ab[0-9]{0}e/ 1125 abe 1126 0: abe 1127 *** Failers 1128No match 1129 ab1e 1130No match 1131 1132/(A|B)*CD/ 1133 CD 1134 0: CD 1135 1136/(AB)*\1/ 1137 ABABAB 1138 0: ABABAB 1139 1: AB 1140 1141/([0-9]+)(\w)/ 1142 12345a 1143 0: 12345a 1144 1: 12345 1145 2: a 1146 12345+ 1147 0: 12345 1148 1: 1234 1149 2: 5 1150 1151/(abc|)+/ 1152 abc 1153 0: abc 1154 1: abc 1155 abcabc 1156 0: abcabc 1157 1: abc 1158 abcabcabc 1159 0: abcabcabc 1160 1: abc 1161 xyz 1162 0: 1163 1: 1164 1165/([a]*)*/ 1166 a 1167 0: a 1168 1: a 1169 aaaaa 1170 0: aaaaa 1171 1: aaaaa 1172 1173/([ab]*)*/ 1174 a 1175 0: a 1176 1: a 1177 b 1178 0: b 1179 1: b 1180 ababab 1181 0: ababab 1182 1: ababab 1183 aaaabcde 1184 0: aaaab 1185 1: aaaab 1186 bbbb 1187 0: bbbb 1188 1: bbbb 1189 1190/([^a]*)*/ 1191 b 1192 0: b 1193 1: b 1194 bbbb 1195 0: bbbb 1196 1: bbbb 1197 aaa 1198 0: 1199 1200/([^ab]*)*/ 1201 cccc 1202 0: cccc 1203 1: cccc 1204 abab 1205 0: 1206 1207/abc/ 1208 abc 1209 0: abc 1210 xabcy 1211 0: abc 1212 ababc 1213 0: abc 1214 *** Failers 1215No match 1216 xbc 1217No match 1218 axc 1219No match 1220 abx 1221No match 1222 1223/ab*c/ 1224 abc 1225 0: abc 1226 1227/ab*bc/ 1228 abc 1229 0: abc 1230 abbc 1231 0: abbc 1232 abbbbc 1233 0: abbbbc 1234 1235/.{1}/ 1236 abbbbc 1237 0: a 1238 1239/.{3,4}/ 1240 abbbbc 1241 0: abbb 1242 1243/ab{0,}bc/ 1244 abbbbc 1245 0: abbbbc 1246 1247/ab+bc/ 1248 abbc 1249 0: abbc 1250 *** Failers 1251No match 1252 abc 1253No match 1254 abq 1255No match 1256 1257/ab+bc/ 1258 abbbbc 1259 0: abbbbc 1260 1261/ab{1,}bc/ 1262 abbbbc 1263 0: abbbbc 1264 1265/ab{1,3}bc/ 1266 abbbbc 1267 0: abbbbc 1268 1269/ab{3,4}bc/ 1270 abbbbc 1271 0: abbbbc 1272 1273/ab{4,5}bc/ 1274 *** Failers 1275No match 1276 abq 1277No match 1278 abbbbc 1279No match 1280 1281/ab?bc/ 1282 abbc 1283 0: abbc 1284 abc 1285 0: abc 1286 1287/ab{0,1}bc/ 1288 abc 1289 0: abc 1290 1291/ab?c/ 1292 abc 1293 0: abc 1294 1295/ab{0,1}c/ 1296 abc 1297 0: abc 1298 1299/^abc$/ 1300 abc 1301 0: abc 1302 *** Failers 1303No match 1304 abbbbc 1305No match 1306 abcc 1307No match 1308 1309/^abc/ 1310 abcc 1311 0: abc 1312 1313/abc$/ 1314 aabc 1315 0: abc 1316 *** Failers 1317No match 1318 aabc 1319 0: abc 1320 aabcd 1321No match 1322 1323/^/ 1324 abc 1325 0: 1326 1327/$/ 1328 abc 1329 0: 1330 1331/a.c/ 1332 abc 1333 0: abc 1334 axc 1335 0: axc 1336 1337/a.*c/ 1338 axyzc 1339 0: axyzc 1340 1341/a[bc]d/ 1342 abd 1343 0: abd 1344 *** Failers 1345No match 1346 axyzd 1347No match 1348 abc 1349No match 1350 1351/a[b-d]e/ 1352 ace 1353 0: ace 1354 1355/a[b-d]/ 1356 aac 1357 0: ac 1358 1359/a[-b]/ 1360 a- 1361 0: a- 1362 1363/a[b-]/ 1364 a- 1365 0: a- 1366 1367/a[]]b/ 1368 a]b 1369 0: a]b 1370 1371/a[^bc]d/ 1372 aed 1373 0: aed 1374 *** Failers 1375No match 1376 abd 1377No match 1378 abd 1379No match 1380 1381/a[^-b]c/ 1382 adc 1383 0: adc 1384 1385/a[^]b]c/ 1386 adc 1387 0: adc 1388 *** Failers 1389No match 1390 a-c 1391 0: a-c 1392 a]c 1393No match 1394 1395/\ba\b/ 1396 a- 1397 0: a 1398 -a 1399 0: a 1400 -a- 1401 0: a 1402 1403/\by\b/ 1404 *** Failers 1405No match 1406 xy 1407No match 1408 yz 1409No match 1410 xyz 1411No match 1412 1413/\Ba\B/ 1414 *** Failers 1415 0: a 1416 a- 1417No match 1418 -a 1419No match 1420 -a- 1421No match 1422 1423/\By\b/ 1424 xy 1425 0: y 1426 1427/\by\B/ 1428 yz 1429 0: y 1430 1431/\By\B/ 1432 xyz 1433 0: y 1434 1435/\w/ 1436 a 1437 0: a 1438 1439/\W/ 1440 - 1441 0: - 1442 *** Failers 1443 0: * 1444 - 1445 0: - 1446 a 1447No match 1448 1449/a\sb/ 1450 a b 1451 0: a b 1452 1453/a\Sb/ 1454 a-b 1455 0: a-b 1456 *** Failers 1457No match 1458 a-b 1459 0: a-b 1460 a b 1461No match 1462 1463/[0-9]/ 1464 1 1465 0: 1 1466 1467/[^0-9]/ 1468 - 1469 0: - 1470 *** Failers 1471 0: * 1472 - 1473 0: - 1474 1 1475No match 1476 1477/ab|cd/ 1478 abc 1479 0: ab 1480 abcd 1481 0: ab 1482 1483/()ef/ 1484 def 1485 0: ef 1486 1: 1487 1488/a\(b/ 1489 a(b 1490 0: a(b 1491 1492/a\(*b/ 1493 ab 1494 0: ab 1495 a((b 1496 0: a((b 1497 1498/((a))/ 1499 abc 1500 0: a 1501 1: a 1502 2: a 1503 1504/(a)b(c)/ 1505 abc 1506 0: abc 1507 1: a 1508 2: c 1509 1510/a+b+c/ 1511 aabbabc 1512 0: abc 1513 1514/a{1,}b{1,}c/ 1515 aabbabc 1516 0: abc 1517 1518/(a+|b)*/ 1519 ab 1520 0: ab 1521 1: b 1522 1523/(a+|b){0,}/ 1524 ab 1525 0: ab 1526 1: b 1527 1528/(a+|b)+/ 1529 ab 1530 0: ab 1531 1: b 1532 1533/(a+|b){1,}/ 1534 ab 1535 0: ab 1536 1: b 1537 1538/(a+|b)?/ 1539 ab 1540 0: a 1541 1: a 1542 1543/(a+|b){0,1}/ 1544 ab 1545 0: a 1546 1: a 1547 1548/[^ab]*/ 1549 cde 1550 0: cde 1551 1552/abc/ 1553 *** Failers 1554No match 1555 b 1556No match 1557 1558 1559/a*/ 1560 1561 1562/([abc])*d/ 1563 abbbcd 1564 0: abbbcd 1565 1: c 1566 1567/([abc])*bcd/ 1568 abcd 1569 0: abcd 1570 1: a 1571 1572/a|b|c|d|e/ 1573 e 1574 0: e 1575 1576/(a|b|c|d|e)f/ 1577 ef 1578 0: ef 1579 1: e 1580 1581/abcd*efg/ 1582 abcdefg 1583 0: abcdefg 1584 1585/ab*/ 1586 xabyabbbz 1587 0: ab 1588 xayabbbz 1589 0: a 1590 1591/(ab|cd)e/ 1592 abcde 1593 0: cde 1594 1: cd 1595 1596/[abhgefdc]ij/ 1597 hij 1598 0: hij 1599 1600/(abc|)ef/ 1601 abcdef 1602 0: ef 1603 1: 1604 1605/(a|b)c*d/ 1606 abcd 1607 0: bcd 1608 1: b 1609 1610/(ab|ab*)bc/ 1611 abc 1612 0: abc 1613 1: a 1614 1615/a([bc]*)c*/ 1616 abc 1617 0: abc 1618 1: bc 1619 1620/a([bc]*)(c*d)/ 1621 abcd 1622 0: abcd 1623 1: bc 1624 2: d 1625 1626/a([bc]+)(c*d)/ 1627 abcd 1628 0: abcd 1629 1: bc 1630 2: d 1631 1632/a([bc]*)(c+d)/ 1633 abcd 1634 0: abcd 1635 1: b 1636 2: cd 1637 1638/a[bcd]*dcdcde/ 1639 adcdcde 1640 0: adcdcde 1641 1642/a[bcd]+dcdcde/ 1643 *** Failers 1644No match 1645 abcde 1646No match 1647 adcdcde 1648No match 1649 1650/(ab|a)b*c/ 1651 abc 1652 0: abc 1653 1: ab 1654 1655/((a)(b)c)(d)/ 1656 abcd 1657 0: abcd 1658 1: abc 1659 2: a 1660 3: b 1661 4: d 1662 1663/[a-zA-Z_][a-zA-Z0-9_]*/ 1664 alpha 1665 0: alpha 1666 1667/^a(bc+|b[eh])g|.h$/ 1668 abh 1669 0: bh 1670 1671/(bc+d$|ef*g.|h?i(j|k))/ 1672 effgz 1673 0: effgz 1674 1: effgz 1675 ij 1676 0: ij 1677 1: ij 1678 2: j 1679 reffgz 1680 0: effgz 1681 1: effgz 1682 *** Failers 1683No match 1684 effg 1685No match 1686 bcdd 1687No match 1688 1689/((((((((((a))))))))))/ 1690 a 1691 0: a 1692 1: a 1693 2: a 1694 3: a 1695 4: a 1696 5: a 1697 6: a 1698 7: a 1699 8: a 1700 9: a 170110: a 1702 1703/((((((((((a))))))))))\9/ 1704 aa 1705 0: aa 1706 1: a 1707 2: a 1708 3: a 1709 4: a 1710 5: a 1711 6: a 1712 7: a 1713 8: a 1714 9: a 171510: a 1716 1717/(((((((((a)))))))))/ 1718 a 1719 0: a 1720 1: a 1721 2: a 1722 3: a 1723 4: a 1724 5: a 1725 6: a 1726 7: a 1727 8: a 1728 9: a 1729 1730/multiple words of text/ 1731 *** Failers 1732No match 1733 aa 1734No match 1735 uh-uh 1736No match 1737 1738/multiple words/ 1739 multiple words, yeah 1740 0: multiple words 1741 1742/(.*)c(.*)/ 1743 abcde 1744 0: abcde 1745 1: ab 1746 2: de 1747 1748/\((.*), (.*)\)/ 1749 (a, b) 1750 0: (a, b) 1751 1: a 1752 2: b 1753 1754/abcd/ 1755 abcd 1756 0: abcd 1757 1758/a(bc)d/ 1759 abcd 1760 0: abcd 1761 1: bc 1762 1763/a[-]?c/ 1764 ac 1765 0: ac 1766 1767/(abc)\1/ 1768 abcabc 1769 0: abcabc 1770 1: abc 1771 1772/([a-c]*)\1/ 1773 abcabc 1774 0: abcabc 1775 1: abc 1776 1777/abc/i 1778 ABC 1779 0: ABC 1780 XABCY 1781 0: ABC 1782 ABABC 1783 0: ABC 1784 *** Failers 1785No match 1786 aaxabxbaxbbx 1787No match 1788 XBC 1789No match 1790 AXC 1791No match 1792 ABX 1793No match 1794 1795/ab*c/i 1796 ABC 1797 0: ABC 1798 1799/ab*bc/i 1800 ABC 1801 0: ABC 1802 ABBC 1803 0: ABBC 1804 1805/ab+bc/i 1806 *** Failers 1807No match 1808 ABC 1809No match 1810 ABQ 1811No match 1812 1813/ab+bc/i 1814 ABBBBC 1815 0: ABBBBC 1816 1817/^abc$/i 1818 ABC 1819 0: ABC 1820 *** Failers 1821No match 1822 ABBBBC 1823No match 1824 ABCC 1825No match 1826 1827/^abc/i 1828 ABCC 1829 0: ABC 1830 1831/abc$/i 1832 AABC 1833 0: ABC 1834 1835/^/i 1836 ABC 1837 0: 1838 1839/$/i 1840 ABC 1841 0: 1842 1843/a.c/i 1844 ABC 1845 0: ABC 1846 AXC 1847 0: AXC 1848 1849/a.*c/i 1850 *** Failers 1851No match 1852 AABC 1853 0: AABC 1854 AXYZD 1855No match 1856 1857/a[bc]d/i 1858 ABD 1859 0: ABD 1860 1861/a[b-d]e/i 1862 ACE 1863 0: ACE 1864 *** Failers 1865No match 1866 ABC 1867No match 1868 ABD 1869No match 1870 1871/a[b-d]/i 1872 AAC 1873 0: AC 1874 1875/a[-b]/i 1876 A- 1877 0: A- 1878 1879/a[b-]/i 1880 A- 1881 0: A- 1882 1883/a[]]b/i 1884 A]B 1885 0: A]B 1886 1887/a[^bc]d/i 1888 AED 1889 0: AED 1890 1891/a[^-b]c/i 1892 ADC 1893 0: ADC 1894 *** Failers 1895No match 1896 ABD 1897No match 1898 A-C 1899No match 1900 1901/a[^]b]c/i 1902 ADC 1903 0: ADC 1904 1905/ab|cd/i 1906 ABC 1907 0: AB 1908 ABCD 1909 0: AB 1910 1911/()ef/i 1912 DEF 1913 0: EF 1914 1: 1915 1916/$b/i 1917 *** Failers 1918No match 1919 A]C 1920No match 1921 B 1922No match 1923 1924/a\(b/i 1925 A(B 1926 0: A(B 1927 1928/a\(*b/i 1929 AB 1930 0: AB 1931 A((B 1932 0: A((B 1933 1934/((a))/i 1935 ABC 1936 0: A 1937 1: A 1938 2: A 1939 1940/(a)b(c)/i 1941 ABC 1942 0: ABC 1943 1: A 1944 2: C 1945 1946/a+b+c/i 1947 AABBABC 1948 0: ABC 1949 1950/a{1,}b{1,}c/i 1951 AABBABC 1952 0: ABC 1953 1954/(a+|b)*/i 1955 AB 1956 0: AB 1957 1: B 1958 1959/(a+|b){0,}/i 1960 AB 1961 0: AB 1962 1: B 1963 1964/(a+|b)+/i 1965 AB 1966 0: AB 1967 1: B 1968 1969/(a+|b){1,}/i 1970 AB 1971 0: AB 1972 1: B 1973 1974/(a+|b)?/i 1975 AB 1976 0: A 1977 1: A 1978 1979/(a+|b){0,1}/i 1980 AB 1981 0: A 1982 1: A 1983 1984/[^ab]*/i 1985 CDE 1986 0: CDE 1987 1988/([abc])*d/i 1989 ABBBCD 1990 0: ABBBCD 1991 1: C 1992 1993/([abc])*bcd/i 1994 ABCD 1995 0: ABCD 1996 1: A 1997 1998/a|b|c|d|e/i 1999 E 2000 0: E 2001 2002/(a|b|c|d|e)f/i 2003 EF 2004 0: EF 2005 1: E 2006 2007/abcd*efg/i 2008 ABCDEFG 2009 0: ABCDEFG 2010 2011/ab*/i 2012 XABYABBBZ 2013 0: AB 2014 XAYABBBZ 2015 0: A 2016 2017/(ab|cd)e/i 2018 ABCDE 2019 0: CDE 2020 1: CD 2021 2022/[abhgefdc]ij/i 2023 HIJ 2024 0: HIJ 2025 2026/^(ab|cd)e/i 2027 ABCDE 2028No match 2029 2030/(abc|)ef/i 2031 ABCDEF 2032 0: EF 2033 1: 2034 2035/(a|b)c*d/i 2036 ABCD 2037 0: BCD 2038 1: B 2039 2040/(ab|ab*)bc/i 2041 ABC 2042 0: ABC 2043 1: A 2044 2045/a([bc]*)c*/i 2046 ABC 2047 0: ABC 2048 1: BC 2049 2050/a([bc]*)(c*d)/i 2051 ABCD 2052 0: ABCD 2053 1: BC 2054 2: D 2055 2056/a([bc]+)(c*d)/i 2057 ABCD 2058 0: ABCD 2059 1: BC 2060 2: D 2061 2062/a([bc]*)(c+d)/i 2063 ABCD 2064 0: ABCD 2065 1: B 2066 2: CD 2067 2068/a[bcd]*dcdcde/i 2069 ADCDCDE 2070 0: ADCDCDE 2071 2072/a[bcd]+dcdcde/i 2073 2074/(ab|a)b*c/i 2075 ABC 2076 0: ABC 2077 1: AB 2078 2079/((a)(b)c)(d)/i 2080 ABCD 2081 0: ABCD 2082 1: ABC 2083 2: A 2084 3: B 2085 4: D 2086 2087/[a-zA-Z_][a-zA-Z0-9_]*/i 2088 ALPHA 2089 0: ALPHA 2090 2091/^a(bc+|b[eh])g|.h$/i 2092 ABH 2093 0: BH 2094 2095/(bc+d$|ef*g.|h?i(j|k))/i 2096 EFFGZ 2097 0: EFFGZ 2098 1: EFFGZ 2099 IJ 2100 0: IJ 2101 1: IJ 2102 2: J 2103 REFFGZ 2104 0: EFFGZ 2105 1: EFFGZ 2106 *** Failers 2107No match 2108 ADCDCDE 2109No match 2110 EFFG 2111No match 2112 BCDD 2113No match 2114 2115/((((((((((a))))))))))/i 2116 A 2117 0: A 2118 1: A 2119 2: A 2120 3: A 2121 4: A 2122 5: A 2123 6: A 2124 7: A 2125 8: A 2126 9: A 212710: A 2128 2129/((((((((((a))))))))))\9/i 2130 AA 2131 0: AA 2132 1: A 2133 2: A 2134 3: A 2135 4: A 2136 5: A 2137 6: A 2138 7: A 2139 8: A 2140 9: A 214110: A 2142 2143/(((((((((a)))))))))/i 2144 A 2145 0: A 2146 1: A 2147 2: A 2148 3: A 2149 4: A 2150 5: A 2151 6: A 2152 7: A 2153 8: A 2154 9: A 2155 2156/multiple words of text/i 2157 *** Failers 2158No match 2159 AA 2160No match 2161 UH-UH 2162No match 2163 2164/multiple words/i 2165 MULTIPLE WORDS, YEAH 2166 0: MULTIPLE WORDS 2167 2168/(.*)c(.*)/i 2169 ABCDE 2170 0: ABCDE 2171 1: AB 2172 2: DE 2173 2174/\((.*), (.*)\)/i 2175 (A, B) 2176 0: (A, B) 2177 1: A 2178 2: B 2179 2180/abcd/i 2181 ABCD 2182 0: ABCD 2183 2184/a(bc)d/i 2185 ABCD 2186 0: ABCD 2187 1: BC 2188 2189/a[-]?c/i 2190 AC 2191 0: AC 2192 2193/(abc)\1/i 2194 ABCABC 2195 0: ABCABC 2196 1: ABC 2197 2198/([a-c]*)\1/i 2199 ABCABC 2200 0: ABCABC 2201 1: ABC 2202 2203/((foo)|(bar))*/ 2204 foobar 2205 0: foobar 2206 1: bar 2207 2: foo 2208 3: bar 2209 2210/^(.+)?B/ 2211 AB 2212 0: AB 2213 1: A 2214 2215/^([^a-z])|(\^)$/ 2216 . 2217 0: . 2218 1: . 2219 2220/^[<>]&/ 2221 <&OUT 2222 0: <& 2223 2224/^(){3,5}/ 2225 abc 2226 0: 2227 1: 2228 2229/^(a+)*ax/ 2230 aax 2231 0: aax 2232 1: a 2233 2234/^((a|b)+)*ax/ 2235 aax 2236 0: aax 2237 1: a 2238 2: a 2239 2240/^((a|bc)+)*ax/ 2241 aax 2242 0: aax 2243 1: a 2244 2: a 2245 2246/(a|x)*ab/ 2247 cab 2248 0: ab 2249 2250/(a)*ab/ 2251 cab 2252 0: ab 2253 2254/(ab)[0-9]\1/i 2255 Ab4ab 2256 0: Ab4ab 2257 1: Ab 2258 ab4Ab 2259 0: ab4Ab 2260 1: ab 2261 2262/foo\w*[0-9]{4}baz/ 2263 foobar1234baz 2264 0: foobar1234baz 2265 2266/(\w+:)+/ 2267 one: 2268 0: one: 2269 1: one: 2270 2271/((\w|:)+::)?(\w+)$/ 2272 abcd 2273 0: abcd 2274 1: <unset> 2275 2: <unset> 2276 3: abcd 2277 xy:z:::abcd 2278 0: xy:z:::abcd 2279 1: xy:z::: 2280 2: : 2281 3: abcd 2282 2283/^[^bcd]*(c+)/ 2284 aexycd 2285 0: aexyc 2286 1: c 2287 2288/(a*)b+/ 2289 caab 2290 0: aab 2291 1: aa 2292 2293/((\w|:)+::)?(\w+)$/ 2294 abcd 2295 0: abcd 2296 1: <unset> 2297 2: <unset> 2298 3: abcd 2299 xy:z:::abcd 2300 0: xy:z:::abcd 2301 1: xy:z::: 2302 2: : 2303 3: abcd 2304 *** Failers 2305 0: Failers 2306 1: <unset> 2307 2: <unset> 2308 3: Failers 2309 abcd: 2310No match 2311 abcd: 2312No match 2313 2314/^[^bcd]*(c+)/ 2315 aexycd 2316 0: aexyc 2317 1: c 2318 2319/((Z)+|A)*/ 2320 ZABCDEFG 2321 0: ZA 2322 1: A 2323 2: Z 2324 2325/(Z()|A)*/ 2326 ZABCDEFG 2327 0: ZA 2328 1: A 2329 2: 2330 2331/(Z(())|A)*/ 2332 ZABCDEFG 2333 0: ZA 2334 1: A 2335 2: 2336 3: 2337 2338/(.*)[0-9]+\1/ 2339 abc123abc 2340 0: abc123abc 2341 1: abc 2342 abc123bc 2343 0: bc123bc 2344 1: bc 2345 2346/((.*))[0-9]+\1/ 2347 abc123abc 2348 0: abc123abc 2349 1: abc 2350 2: abc 2351 abc123bc 2352 0: bc123bc 2353 1: bc 2354 2: bc 2355 2356/^a{2,5}$/ 2357 aa 2358 0: aa 2359 aaa 2360 0: aaa 2361 aaaa 2362 0: aaaa 2363 aaaaa 2364 0: aaaaa 2365 *** Failers 2366No match 2367 a 2368No match 2369 b 2370No match 2371 aaaaab 2372No match 2373 aaaaaa 2374