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/(a)|\1/ 1778 a 1779 0: a 1780 1: a 1781 *** Failers 1782 0: a 1783 1: a 1784 ab 1785 0: a 1786 1: a 1787 x 1788No match 1789 1790/abc/i 1791 ABC 1792 0: ABC 1793 XABCY 1794 0: ABC 1795 ABABC 1796 0: ABC 1797 *** Failers 1798No match 1799 aaxabxbaxbbx 1800No match 1801 XBC 1802No match 1803 AXC 1804No match 1805 ABX 1806No match 1807 1808/ab*c/i 1809 ABC 1810 0: ABC 1811 1812/ab*bc/i 1813 ABC 1814 0: ABC 1815 ABBC 1816 0: ABBC 1817 1818/ab+bc/i 1819 *** Failers 1820No match 1821 ABC 1822No match 1823 ABQ 1824No match 1825 1826/ab+bc/i 1827 ABBBBC 1828 0: ABBBBC 1829 1830/^abc$/i 1831 ABC 1832 0: ABC 1833 *** Failers 1834No match 1835 ABBBBC 1836No match 1837 ABCC 1838No match 1839 1840/^abc/i 1841 ABCC 1842 0: ABC 1843 1844/abc$/i 1845 AABC 1846 0: ABC 1847 1848/^/i 1849 ABC 1850 0: 1851 1852/$/i 1853 ABC 1854 0: 1855 1856/a.c/i 1857 ABC 1858 0: ABC 1859 AXC 1860 0: AXC 1861 1862/a.*c/i 1863 *** Failers 1864No match 1865 AABC 1866 0: AABC 1867 AXYZD 1868No match 1869 1870/a[bc]d/i 1871 ABD 1872 0: ABD 1873 1874/a[b-d]e/i 1875 ACE 1876 0: ACE 1877 *** Failers 1878No match 1879 ABC 1880No match 1881 ABD 1882No match 1883 1884/a[b-d]/i 1885 AAC 1886 0: AC 1887 1888/a[-b]/i 1889 A- 1890 0: A- 1891 1892/a[b-]/i 1893 A- 1894 0: A- 1895 1896/a[]]b/i 1897 A]B 1898 0: A]B 1899 1900/a[^bc]d/i 1901 AED 1902 0: AED 1903 1904/a[^-b]c/i 1905 ADC 1906 0: ADC 1907 *** Failers 1908No match 1909 ABD 1910No match 1911 A-C 1912No match 1913 1914/a[^]b]c/i 1915 ADC 1916 0: ADC 1917 1918/ab|cd/i 1919 ABC 1920 0: AB 1921 ABCD 1922 0: AB 1923 1924/()ef/i 1925 DEF 1926 0: EF 1927 1: 1928 1929/$b/i 1930 *** Failers 1931No match 1932 A]C 1933No match 1934 B 1935No match 1936 1937/a\(b/i 1938 A(B 1939 0: A(B 1940 1941/a\(*b/i 1942 AB 1943 0: AB 1944 A((B 1945 0: A((B 1946 1947/((a))/i 1948 ABC 1949 0: A 1950 1: A 1951 2: A 1952 1953/(a)b(c)/i 1954 ABC 1955 0: ABC 1956 1: A 1957 2: C 1958 1959/a+b+c/i 1960 AABBABC 1961 0: ABC 1962 1963/a{1,}b{1,}c/i 1964 AABBABC 1965 0: ABC 1966 1967/(a+|b)*/i 1968 AB 1969 0: AB 1970 1: B 1971 1972/(a+|b){0,}/i 1973 AB 1974 0: AB 1975 1: B 1976 1977/(a+|b)+/i 1978 AB 1979 0: AB 1980 1: B 1981 1982/(a+|b){1,}/i 1983 AB 1984 0: AB 1985 1: B 1986 1987/(a+|b)?/i 1988 AB 1989 0: A 1990 1: A 1991 1992/(a+|b){0,1}/i 1993 AB 1994 0: A 1995 1: A 1996 1997/[^ab]*/i 1998 CDE 1999 0: CDE 2000 2001/([abc])*d/i 2002 ABBBCD 2003 0: ABBBCD 2004 1: C 2005 2006/([abc])*bcd/i 2007 ABCD 2008 0: ABCD 2009 1: A 2010 2011/a|b|c|d|e/i 2012 E 2013 0: E 2014 2015/(a|b|c|d|e)f/i 2016 EF 2017 0: EF 2018 1: E 2019 2020/abcd*efg/i 2021 ABCDEFG 2022 0: ABCDEFG 2023 2024/ab*/i 2025 XABYABBBZ 2026 0: AB 2027 XAYABBBZ 2028 0: A 2029 2030/(ab|cd)e/i 2031 ABCDE 2032 0: CDE 2033 1: CD 2034 2035/[abhgefdc]ij/i 2036 HIJ 2037 0: HIJ 2038 2039/^(ab|cd)e/i 2040 ABCDE 2041No match 2042 2043/(abc|)ef/i 2044 ABCDEF 2045 0: EF 2046 1: 2047 2048/(a|b)c*d/i 2049 ABCD 2050 0: BCD 2051 1: B 2052 2053/(ab|ab*)bc/i 2054 ABC 2055 0: ABC 2056 1: A 2057 2058/a([bc]*)c*/i 2059 ABC 2060 0: ABC 2061 1: BC 2062 2063/a([bc]*)(c*d)/i 2064 ABCD 2065 0: ABCD 2066 1: BC 2067 2: D 2068 2069/a([bc]+)(c*d)/i 2070 ABCD 2071 0: ABCD 2072 1: BC 2073 2: D 2074 2075/a([bc]*)(c+d)/i 2076 ABCD 2077 0: ABCD 2078 1: B 2079 2: CD 2080 2081/a[bcd]*dcdcde/i 2082 ADCDCDE 2083 0: ADCDCDE 2084 2085/a[bcd]+dcdcde/i 2086 2087/(ab|a)b*c/i 2088 ABC 2089 0: ABC 2090 1: AB 2091 2092/((a)(b)c)(d)/i 2093 ABCD 2094 0: ABCD 2095 1: ABC 2096 2: A 2097 3: B 2098 4: D 2099 2100/[a-zA-Z_][a-zA-Z0-9_]*/i 2101 ALPHA 2102 0: ALPHA 2103 2104/^a(bc+|b[eh])g|.h$/i 2105 ABH 2106 0: BH 2107 2108/(bc+d$|ef*g.|h?i(j|k))/i 2109 EFFGZ 2110 0: EFFGZ 2111 1: EFFGZ 2112 IJ 2113 0: IJ 2114 1: IJ 2115 2: J 2116 REFFGZ 2117 0: EFFGZ 2118 1: EFFGZ 2119 *** Failers 2120No match 2121 ADCDCDE 2122No match 2123 EFFG 2124No match 2125 BCDD 2126No match 2127 2128/((((((((((a))))))))))/i 2129 A 2130 0: A 2131 1: A 2132 2: A 2133 3: A 2134 4: A 2135 5: A 2136 6: A 2137 7: A 2138 8: A 2139 9: A 214010: A 2141 2142/((((((((((a))))))))))\9/i 2143 AA 2144 0: AA 2145 1: A 2146 2: A 2147 3: A 2148 4: A 2149 5: A 2150 6: A 2151 7: A 2152 8: A 2153 9: A 215410: A 2155 2156/(((((((((a)))))))))/i 2157 A 2158 0: A 2159 1: A 2160 2: A 2161 3: A 2162 4: A 2163 5: A 2164 6: A 2165 7: A 2166 8: A 2167 9: A 2168 2169/multiple words of text/i 2170 *** Failers 2171No match 2172 AA 2173No match 2174 UH-UH 2175No match 2176 2177/multiple words/i 2178 MULTIPLE WORDS, YEAH 2179 0: MULTIPLE WORDS 2180 2181/(.*)c(.*)/i 2182 ABCDE 2183 0: ABCDE 2184 1: AB 2185 2: DE 2186 2187/\((.*), (.*)\)/i 2188 (A, B) 2189 0: (A, B) 2190 1: A 2191 2: B 2192 2193/abcd/i 2194 ABCD 2195 0: ABCD 2196 2197/a(bc)d/i 2198 ABCD 2199 0: ABCD 2200 1: BC 2201 2202/a[-]?c/i 2203 AC 2204 0: AC 2205 2206/(abc)\1/i 2207 ABCABC 2208 0: ABCABC 2209 1: ABC 2210 2211/([a-c]*)\1/i 2212 ABCABC 2213 0: ABCABC 2214 1: ABC 2215 2216/((foo)|(bar))*/ 2217 foobar 2218 0: foobar 2219 1: bar 2220 2: foo 2221 3: bar 2222 2223/^(.+)?B/ 2224 AB 2225 0: AB 2226 1: A 2227 2228/^([^a-z])|(\^)$/ 2229 . 2230 0: . 2231 1: . 2232 2233/^[<>]&/ 2234 <&OUT 2235 0: <& 2236 2237/^(){3,5}/ 2238 abc 2239 0: 2240 1: 2241 2242/^(a+)*ax/ 2243 aax 2244 0: aax 2245 1: a 2246 2247/^((a|b)+)*ax/ 2248 aax 2249 0: aax 2250 1: a 2251 2: a 2252 2253/^((a|bc)+)*ax/ 2254 aax 2255 0: aax 2256 1: a 2257 2: a 2258 2259/(a|x)*ab/ 2260 cab 2261 0: ab 2262 2263/(a)*ab/ 2264 cab 2265 0: ab 2266 2267/(ab)[0-9]\1/i 2268 Ab4ab 2269 0: Ab4ab 2270 1: Ab 2271 ab4Ab 2272 0: ab4Ab 2273 1: ab 2274 2275/foo\w*[0-9]{4}baz/ 2276 foobar1234baz 2277 0: foobar1234baz 2278 2279/(\w+:)+/ 2280 one: 2281 0: one: 2282 1: one: 2283 2284/((\w|:)+::)?(\w+)$/ 2285 abcd 2286 0: abcd 2287 1: <unset> 2288 2: <unset> 2289 3: abcd 2290 xy:z:::abcd 2291 0: xy:z:::abcd 2292 1: xy:z::: 2293 2: : 2294 3: abcd 2295 2296/^[^bcd]*(c+)/ 2297 aexycd 2298 0: aexyc 2299 1: c 2300 2301/(a*)b+/ 2302 caab 2303 0: aab 2304 1: aa 2305 2306/((\w|:)+::)?(\w+)$/ 2307 abcd 2308 0: abcd 2309 1: <unset> 2310 2: <unset> 2311 3: abcd 2312 xy:z:::abcd 2313 0: xy:z:::abcd 2314 1: xy:z::: 2315 2: : 2316 3: abcd 2317 *** Failers 2318 0: Failers 2319 1: <unset> 2320 2: <unset> 2321 3: Failers 2322 abcd: 2323No match 2324 abcd: 2325No match 2326 2327/^[^bcd]*(c+)/ 2328 aexycd 2329 0: aexyc 2330 1: c 2331 2332/((Z)+|A)*/ 2333 ZABCDEFG 2334 0: ZA 2335 1: A 2336 2: Z 2337 2338/(Z()|A)*/ 2339 ZABCDEFG 2340 0: ZA 2341 1: A 2342 2: 2343 2344/(Z(())|A)*/ 2345 ZABCDEFG 2346 0: ZA 2347 1: A 2348 2: 2349 3: 2350 2351/(.*)[0-9]+\1/ 2352 abc123abc 2353 0: abc123abc 2354 1: abc 2355 abc123bc 2356 0: bc123bc 2357 1: bc 2358 2359/((.*))[0-9]+\1/ 2360 abc123abc 2361 0: abc123abc 2362 1: abc 2363 2: abc 2364 abc123bc 2365 0: bc123bc 2366 1: bc 2367 2: bc 2368 2369/^a{2,5}$/ 2370 aa 2371 0: aa 2372 aaa 2373 0: aaa 2374 aaaa 2375 0: aaaa 2376 aaaaa 2377 0: aaaaa 2378 *** Failers 2379No match 2380 a 2381No match 2382 b 2383No match 2384 aaaaab 2385No match 2386 aaaaaa 2387