PageRenderTime 42ms CodeModel.GetById 20ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 1ms

/vendor/pcre/testdata/testoutput7

http://github.com/feyeleanor/RubyGoLightly
#! | 7257 lines | 6464 code | 793 blank | 0 comment | 0 complexity | 9c72a53ebadbc73f1eff5e8466fcef62 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/abc/
   2    abc
   3 0: abc
   4    
   5/ab*c/
   6    abc
   7 0: abc
   8    abbbbc
   9 0: abbbbc
  10    ac
  11 0: ac
  12    
  13/ab+c/
  14    abc
  15 0: abc
  16    abbbbbbc
  17 0: abbbbbbc
  18    *** Failers 
  19No match
  20    ac
  21No match
  22    ab
  23No match
  24    
  25/a*/
  26    a
  27 0: a
  28 1: 
  29    aaaaaaaaaaaaaaaaa
  30 0: aaaaaaaaaaaaaaaaa
  31 1: aaaaaaaaaaaaaaaa
  32 2: aaaaaaaaaaaaaaa
  33 3: aaaaaaaaaaaaaa
  34 4: aaaaaaaaaaaaa
  35 5: aaaaaaaaaaaa
  36 6: aaaaaaaaaaa
  37 7: aaaaaaaaaa
  38 8: aaaaaaaaa
  39 9: aaaaaaaa
  4010: aaaaaaa
  4111: aaaaaa
  4212: aaaaa
  4313: aaaa
  4414: aaa
  4515: aa
  4616: a
  4717: 
  48    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
  49Matched, but too many subsidiary matches
  50 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  51 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  52 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa
  53 3: aaaaaaaaaaaaaaaaaaaaaaaaaaa
  54 4: aaaaaaaaaaaaaaaaaaaaaaaaaa
  55 5: aaaaaaaaaaaaaaaaaaaaaaaaa
  56 6: aaaaaaaaaaaaaaaaaaaaaaaa
  57 7: aaaaaaaaaaaaaaaaaaaaaaa
  58 8: aaaaaaaaaaaaaaaaaaaaaa
  59 9: aaaaaaaaaaaaaaaaaaaaa
  6010: aaaaaaaaaaaaaaaaaaaa
  6111: aaaaaaaaaaaaaaaaaaa
  6212: aaaaaaaaaaaaaaaaaa
  6313: aaaaaaaaaaaaaaaaa
  6414: aaaaaaaaaaaaaaaa
  6515: aaaaaaaaaaaaaaa
  6616: aaaaaaaaaaaaaa
  6717: aaaaaaaaaaaaa
  6818: aaaaaaaaaaaa
  6919: aaaaaaaaaaa
  7020: aaaaaaaaaa
  7121: aaaaaaaaa
  72    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F 
  73 0: 
  74    
  75/(a|abcd|african)/
  76    a
  77 0: a
  78    abcd
  79 0: abcd
  80 1: a
  81    african
  82 0: african
  83 1: a
  84    
  85/^abc/
  86    abcdef
  87 0: abc
  88    *** Failers
  89No match
  90    xyzabc
  91No match
  92    xyz\nabc    
  93No match
  94    
  95/^abc/m
  96    abcdef
  97 0: abc
  98    xyz\nabc    
  99 0: abc
 100    *** Failers
 101No match
 102    xyzabc
 103No match
 104    
 105/\Aabc/
 106    abcdef
 107 0: abc
 108    *** Failers
 109No match
 110    xyzabc
 111No match
 112    xyz\nabc    
 113No match
 114    
 115/\Aabc/m
 116    abcdef
 117 0: abc
 118    *** Failers
 119No match
 120    xyzabc
 121No match
 122    xyz\nabc    
 123No match
 124    
 125/\Gabc/
 126    abcdef
 127 0: abc
 128    xyzabc\>3
 129 0: abc
 130    *** Failers
 131No match
 132    xyzabc    
 133No match
 134    xyzabc\>2 
 135No match
 136    
 137/x\dy\Dz/
 138    x9yzz
 139 0: x9yzz
 140    x0y+z
 141 0: x0y+z
 142    *** Failers
 143No match
 144    xyz
 145No match
 146    xxy0z     
 147No match
 148    
 149/x\sy\Sz/
 150    x yzz
 151 0: x yzz
 152    x y+z
 153 0: x y+z
 154    *** Failers
 155No match
 156    xyz
 157No match
 158    xxyyz
 159No match
 160    
 161/x\wy\Wz/
 162    xxy+z
 163 0: xxy+z
 164    *** Failers
 165No match
 166    xxy0z
 167No match
 168    x+y+z         
 169No match
 170    
 171/x.y/
 172    x+y
 173 0: x+y
 174    x-y
 175 0: x-y
 176    *** Failers
 177No match
 178    x\ny
 179No match
 180    
 181/x.y/s
 182    x+y
 183 0: x+y
 184    x-y
 185 0: x-y
 186    x\ny
 187 0: x\x0ay
 188
 189/(a.b(?s)c.d|x.y)p.q/
 190    a+bc+dp+q
 191 0: a+bc+dp+q
 192    a+bc\ndp+q
 193 0: a+bc\x0adp+q
 194    x\nyp+q 
 195 0: x\x0ayp+q
 196    *** Failers 
 197No match
 198    a\nbc\ndp+q
 199No match
 200    a+bc\ndp\nq
 201No match
 202    x\nyp\nq 
 203No match
 204
 205/a\d\z/
 206    ba0
 207 0: a0
 208    *** Failers
 209No match
 210    ba0\n
 211No match
 212    ba0\ncd   
 213No match
 214
 215/a\d\z/m
 216    ba0
 217 0: a0
 218    *** Failers
 219No match
 220    ba0\n
 221No match
 222    ba0\ncd   
 223No match
 224
 225/a\d\Z/
 226    ba0
 227 0: a0
 228    ba0\n
 229 0: a0
 230    *** Failers
 231No match
 232    ba0\ncd   
 233No match
 234
 235/a\d\Z/m
 236    ba0
 237 0: a0
 238    ba0\n
 239 0: a0
 240    *** Failers
 241No match
 242    ba0\ncd   
 243No match
 244
 245/a\d$/
 246    ba0
 247 0: a0
 248    ba0\n
 249 0: a0
 250    *** Failers
 251No match
 252    ba0\ncd   
 253No match
 254
 255/a\d$/m
 256    ba0
 257 0: a0
 258    ba0\n
 259 0: a0
 260    ba0\ncd   
 261 0: a0
 262    *** Failers
 263No match
 264
 265/abc/i
 266    abc
 267 0: abc
 268    aBc
 269 0: aBc
 270    ABC
 271 0: ABC
 272    
 273/[^a]/
 274    abcd
 275 0: b
 276    
 277/ab?\w/
 278    abz
 279 0: abz
 280 1: ab
 281    abbz
 282 0: abb
 283 1: ab
 284    azz  
 285 0: az
 286
 287/x{0,3}yz/
 288    ayzq
 289 0: yz
 290    axyzq
 291 0: xyz
 292    axxyz
 293 0: xxyz
 294    axxxyzq
 295 0: xxxyz
 296    axxxxyzq
 297 0: xxxyz
 298    *** Failers
 299No match
 300    ax
 301No match
 302    axx     
 303No match
 304      
 305/x{3}yz/
 306    axxxyzq
 307 0: xxxyz
 308    axxxxyzq
 309 0: xxxyz
 310    *** Failers
 311No match
 312    ax
 313No match
 314    axx     
 315No match
 316    ayzq
 317No match
 318    axyzq
 319No match
 320    axxyz
 321No match
 322      
 323/x{2,3}yz/
 324    axxyz
 325 0: xxyz
 326    axxxyzq
 327 0: xxxyz
 328    axxxxyzq
 329 0: xxxyz
 330    *** Failers
 331No match
 332    ax
 333No match
 334    axx     
 335No match
 336    ayzq
 337No match
 338    axyzq
 339No match
 340      
 341/[^a]+/
 342    bac
 343 0: b
 344    bcdefax
 345 0: bcdef
 346 1: bcde
 347 2: bcd
 348 3: bc
 349 4: b
 350    *** Failers
 351 0: *** F
 352 1: *** 
 353 2: ***
 354 3: **
 355 4: *
 356    aaaaa   
 357No match
 358
 359/[^a]*/
 360    bac
 361 0: b
 362 1: 
 363    bcdefax
 364 0: bcdef
 365 1: bcde
 366 2: bcd
 367 3: bc
 368 4: b
 369 5: 
 370    *** Failers
 371 0: *** F
 372 1: *** 
 373 2: ***
 374 3: **
 375 4: *
 376 5: 
 377    aaaaa   
 378 0: 
 379    
 380/[^a]{3,5}/
 381    xyz
 382 0: xyz
 383    awxyza
 384 0: wxyz
 385 1: wxy
 386    abcdefa
 387 0: bcdef
 388 1: bcde
 389 2: bcd
 390    abcdefghijk
 391 0: bcdef
 392 1: bcde
 393 2: bcd
 394    *** Failers
 395 0: *** F
 396 1: *** 
 397 2: ***
 398    axya
 399No match
 400    axa
 401No match
 402    aaaaa         
 403No match
 404
 405/\d*/
 406    1234b567
 407 0: 1234
 408 1: 123
 409 2: 12
 410 3: 1
 411 4: 
 412    xyz
 413 0: 
 414    
 415/\D*/
 416    a1234b567
 417 0: a
 418 1: 
 419    xyz
 420 0: xyz
 421 1: xy
 422 2: x
 423 3: 
 424     
 425/\d+/
 426    ab1234c56
 427 0: 1234
 428 1: 123
 429 2: 12
 430 3: 1
 431    *** Failers
 432No match
 433    xyz
 434No match
 435    
 436/\D+/
 437    ab123c56
 438 0: ab
 439 1: a
 440    *** Failers
 441 0: *** Failers
 442 1: *** Failer
 443 2: *** Faile
 444 3: *** Fail
 445 4: *** Fai
 446 5: *** Fa
 447 6: *** F
 448 7: *** 
 449 8: ***
 450 9: **
 45110: *
 452    789
 453No match
 454    
 455/\d?A/
 456    045ABC
 457 0: 5A
 458    ABC
 459 0: A
 460    *** Failers
 461No match
 462    XYZ
 463No match
 464    
 465/\D?A/
 466    ABC
 467 0: A
 468    BAC
 469 0: BA
 470    9ABC             
 471 0: A
 472    *** Failers
 473No match
 474
 475/a+/
 476    aaaa
 477 0: aaaa
 478 1: aaa
 479 2: aa
 480 3: a
 481
 482/^.*xyz/
 483    xyz
 484 0: xyz
 485    ggggggggxyz
 486 0: ggggggggxyz
 487    
 488/^.+xyz/
 489    abcdxyz
 490 0: abcdxyz
 491    axyz
 492 0: axyz
 493    *** Failers
 494No match
 495    xyz
 496No match
 497    
 498/^.?xyz/
 499    xyz
 500 0: xyz
 501    cxyz       
 502 0: cxyz
 503
 504/^\d{2,3}X/
 505    12X
 506 0: 12X
 507    123X
 508 0: 123X
 509    *** Failers
 510No match
 511    X
 512No match
 513    1X
 514No match
 515    1234X     
 516No match
 517
 518/^[abcd]\d/
 519    a45
 520 0: a4
 521    b93
 522 0: b9
 523    c99z
 524 0: c9
 525    d04
 526 0: d0
 527    *** Failers
 528No match
 529    e45
 530No match
 531    abcd      
 532No match
 533    abcd1234
 534No match
 535    1234  
 536No match
 537
 538/^[abcd]*\d/
 539    a45
 540 0: a4
 541    b93
 542 0: b9
 543    c99z
 544 0: c9
 545    d04
 546 0: d0
 547    abcd1234
 548 0: abcd1
 549    1234  
 550 0: 1
 551    *** Failers
 552No match
 553    e45
 554No match
 555    abcd      
 556No match
 557
 558/^[abcd]+\d/
 559    a45
 560 0: a4
 561    b93
 562 0: b9
 563    c99z
 564 0: c9
 565    d04
 566 0: d0
 567    abcd1234
 568 0: abcd1
 569    *** Failers
 570No match
 571    1234  
 572No match
 573    e45
 574No match
 575    abcd      
 576No match
 577
 578/^a+X/
 579    aX
 580 0: aX
 581    aaX 
 582 0: aaX
 583
 584/^[abcd]?\d/
 585    a45
 586 0: a4
 587    b93
 588 0: b9
 589    c99z
 590 0: c9
 591    d04
 592 0: d0
 593    1234  
 594 0: 1
 595    *** Failers
 596No match
 597    abcd1234
 598No match
 599    e45
 600No match
 601
 602/^[abcd]{2,3}\d/
 603    ab45
 604 0: ab4
 605    bcd93
 606 0: bcd9
 607    *** Failers
 608No match
 609    1234 
 610No match
 611    a36 
 612No match
 613    abcd1234
 614No match
 615    ee45
 616No match
 617
 618/^(abc)*\d/
 619    abc45
 620 0: abc4
 621    abcabcabc45
 622 0: abcabcabc4
 623    42xyz 
 624 0: 4
 625    *** Failers
 626No match
 627
 628/^(abc)+\d/
 629    abc45
 630 0: abc4
 631    abcabcabc45
 632 0: abcabcabc4
 633    *** Failers
 634No match
 635    42xyz 
 636No match
 637
 638/^(abc)?\d/
 639    abc45
 640 0: abc4
 641    42xyz 
 642 0: 4
 643    *** Failers
 644No match
 645    abcabcabc45
 646No match
 647
 648/^(abc){2,3}\d/
 649    abcabc45
 650 0: abcabc4
 651    abcabcabc45
 652 0: abcabcabc4
 653    *** Failers
 654No match
 655    abcabcabcabc45
 656No match
 657    abc45
 658No match
 659    42xyz 
 660No match
 661
 662/1(abc|xyz)2(?1)3/
 663    1abc2abc3456
 664 0: 1abc2abc3
 665    1abc2xyz3456 
 666 0: 1abc2xyz3
 667
 668/^(a*\w|ab)=(a*\w|ab)/
 669    ab=ab
 670 0: ab=ab
 671 1: ab=a
 672
 673/^(a*\w|ab)=(?1)/
 674    ab=ab
 675 0: ab=ab
 676
 677/^([^()]|\((?1)*\))*$/
 678    abc
 679 0: abc
 680    a(b)c
 681 0: a(b)c
 682    a(b(c))d  
 683 0: a(b(c))d
 684    *** Failers)
 685No match
 686    a(b(c)d  
 687No match
 688
 689/^>abc>([^()]|\((?1)*\))*<xyz<$/
 690    >abc>123<xyz<
 691 0: >abc>123<xyz<
 692    >abc>1(2)3<xyz<
 693 0: >abc>1(2)3<xyz<
 694    >abc>(1(2)3)<xyz<
 695 0: >abc>(1(2)3)<xyz<
 696
 697/^(?>a*)\d/
 698    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
 699 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9
 700    *** Failers 
 701No match
 702    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 703No match
 704
 705/< (?: (?(R) \d++  | [^<>]*+) | (?R)) * >/x
 706    <>
 707 0: <>
 708    <abcd>
 709 0: <abcd>
 710    <abc <123> hij>
 711 0: <abc <123> hij>
 712    <abc <def> hij>
 713 0: <def>
 714    <abc<>def> 
 715 0: <abc<>def>
 716    <abc<>      
 717 0: <>
 718    *** Failers
 719No match
 720    <abc
 721No match
 722
 723/^(?(?=abc)\w{3}:|\d\d)$/        
 724    abc:                          
 725 0: abc:
 726    12                             
 727 0: 12
 728    *** Failers                     
 729No match
 730    123                       
 731No match
 732    xyz                        
 733No match
 734                                
 735/^(?(?!abc)\d\d|\w{3}:)$/      
 736    abc:                        
 737 0: abc:
 738    12         
 739 0: 12
 740    *** Failers
 741No match
 742    123
 743No match
 744    xyz    
 745No match
 746
 747/^(?=abc)\w{5}:$/        
 748    abcde:                          
 749 0: abcde:
 750    *** Failers                     
 751No match
 752    abc.. 
 753No match
 754    123                       
 755No match
 756    vwxyz                        
 757No match
 758                                
 759/^(?!abc)\d\d$/      
 760    12         
 761 0: 12
 762    *** Failers
 763No match
 764    abcde:
 765No match
 766    abc..  
 767No match
 768    123
 769No match
 770    vwxyz    
 771No match
 772
 773/(?<=abc|xy)123/
 774    abc12345
 775 0: 123
 776    wxy123z
 777 0: 123
 778    *** Failers
 779No match
 780    123abc
 781No match
 782
 783/(?<!abc|xy)123/
 784    123abc
 785 0: 123
 786    mno123456 
 787 0: 123
 788    *** Failers
 789No match
 790    abc12345
 791No match
 792    wxy123z
 793No match
 794
 795/abc(?C1)xyz/
 796    abcxyz
 797--->abcxyz
 798  1 ^  ^       x
 799 0: abcxyz
 800    123abcxyz999 
 801--->123abcxyz999
 802  1    ^  ^          x
 803 0: abcxyz
 804
 805/(ab|cd){3,4}/C
 806  ababab
 807--->ababab
 808 +0 ^          (ab|cd){3,4}
 809 +1 ^          a
 810 +4 ^          c
 811 +2 ^^         b
 812 +3 ^ ^        |
 813 +1 ^ ^        a
 814 +4 ^ ^        c
 815 +2 ^  ^       b
 816 +3 ^   ^      |
 817 +1 ^   ^      a
 818 +4 ^   ^      c
 819 +2 ^    ^     b
 820 +3 ^     ^    |
 821+12 ^     ^    
 822 +1 ^     ^    a
 823 +4 ^     ^    c
 824 0: ababab
 825  abcdabcd
 826--->abcdabcd
 827 +0 ^            (ab|cd){3,4}
 828 +1 ^            a
 829 +4 ^            c
 830 +2 ^^           b
 831 +3 ^ ^          |
 832 +1 ^ ^          a
 833 +4 ^ ^          c
 834 +5 ^  ^         d
 835 +6 ^   ^        )
 836 +1 ^   ^        a
 837 +4 ^   ^        c
 838 +2 ^    ^       b
 839 +3 ^     ^      |
 840+12 ^     ^      
 841 +1 ^     ^      a
 842 +4 ^     ^      c
 843 +5 ^      ^     d
 844 +6 ^       ^    )
 845+12 ^       ^    
 846 0: abcdabcd
 847 1: abcdab
 848  abcdcdcdcdcd  
 849--->abcdcdcdcdcd
 850 +0 ^                (ab|cd){3,4}
 851 +1 ^                a
 852 +4 ^                c
 853 +2 ^^               b
 854 +3 ^ ^              |
 855 +1 ^ ^              a
 856 +4 ^ ^              c
 857 +5 ^  ^             d
 858 +6 ^   ^            )
 859 +1 ^   ^            a
 860 +4 ^   ^            c
 861 +5 ^    ^           d
 862 +6 ^     ^          )
 863+12 ^     ^          
 864 +1 ^     ^          a
 865 +4 ^     ^          c
 866 +5 ^      ^         d
 867 +6 ^       ^        )
 868+12 ^       ^        
 869 0: abcdcdcd
 870 1: abcdcd
 871
 872/^abc/
 873    abcdef
 874 0: abc
 875    *** Failers
 876No match
 877    abcdef\B  
 878No match
 879
 880/^(a*|xyz)/
 881    bcd
 882 0: 
 883    aaabcd
 884 0: aaa
 885 1: aa
 886 2: a
 887 3: 
 888    xyz
 889 0: xyz
 890 1: 
 891    xyz\N  
 892 0: xyz
 893    *** Failers
 894 0: 
 895    bcd\N   
 896No match
 897    
 898/xyz$/
 899    xyz
 900 0: xyz
 901    xyz\n
 902 0: xyz
 903    *** Failers
 904No match
 905    xyz\Z
 906No match
 907    xyz\n\Z    
 908No match
 909    
 910/xyz$/m
 911    xyz
 912 0: xyz
 913    xyz\n 
 914 0: xyz
 915    abcxyz\npqr 
 916 0: xyz
 917    abcxyz\npqr\Z 
 918 0: xyz
 919    xyz\n\Z    
 920 0: xyz
 921    *** Failers
 922No match
 923    xyz\Z
 924No match
 925
 926/\Gabc/
 927    abcdef
 928 0: abc
 929    defabcxyz\>3 
 930 0: abc
 931    *** Failers 
 932No match
 933    defabcxyz
 934No match
 935
 936/^abcdef/
 937    ab\P
 938Partial match: ab
 939    abcde\P
 940Partial match: abcde
 941    abcdef\P
 942 0: abcdef
 943    *** Failers
 944No match
 945    abx\P    
 946No match
 947
 948/^a{2,4}\d+z/
 949    a\P
 950Partial match: a
 951    aa\P
 952Partial match: aa
 953    aa2\P 
 954Partial match: aa2
 955    aaa\P
 956Partial match: aaa
 957    aaa23\P 
 958Partial match: aaa23
 959    aaaa12345\P
 960Partial match: aaaa12345
 961    aa0z\P
 962 0: aa0z
 963    aaaa4444444444444z\P 
 964 0: aaaa4444444444444z
 965    *** Failers
 966No match
 967    az\P 
 968No match
 969    aaaaa\P 
 970No match
 971    a56\P 
 972No match
 973
 974/^abcdef/
 975   abc\P
 976Partial match: abc
 977   def\R 
 978 0: def
 979   
 980/(?<=foo)bar/
 981   xyzfo\P 
 982No match
 983   foob\P\>2 
 984Partial match: b
 985   foobar...\R\P\>4 
 986 0: ar
 987   xyzfo\P
 988No match
 989   foobar\>2  
 990 0: bar
 991   *** Failers
 992No match
 993   xyzfo\P
 994No match
 995   obar\R   
 996No match
 997
 998/(ab*(cd|ef))+X/
 999    adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
1000No match
1001    lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
1002Partial match: abbbbbbcdaefabbbbbbbefa
1003    cdabbbbbbbb\P\R\B\Z
1004Partial match: cdabbbbbbbb
1005    efabbbbbbbbbbbbbbbb\P\R\B\Z
1006Partial match: efabbbbbbbbbbbbbbbb
1007    bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z    
1008 0: bbbbbbbbbbbbcdX
1009
1010/(a|b)/SF>testsavedregex
1011Compiled regex written to testsavedregex
1012Study data written to testsavedregex
1013<testsavedregex
1014Compiled regex (byte-inverted) loaded from testsavedregex
1015Study data loaded from testsavedregex
1016    abc
1017 0: a
1018    ** Failers
1019 0: a
1020    def  
1021No match
1022    
1023/the quick brown fox/
1024    the quick brown fox
1025 0: the quick brown fox
1026    The quick brown FOX
1027No match
1028    What do you know about the quick brown fox?
1029 0: the quick brown fox
1030    What do you know about THE QUICK BROWN FOX?
1031No match
1032
1033/The quick brown fox/i
1034    the quick brown fox
1035 0: the quick brown fox
1036    The quick brown FOX
1037 0: The quick brown FOX
1038    What do you know about the quick brown fox?
1039 0: the quick brown fox
1040    What do you know about THE QUICK BROWN FOX?
1041 0: THE QUICK BROWN FOX
1042
1043/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
1044    abcd\t\n\r\f\a\e9;\$\\?caxyz
1045 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
1046
1047/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
1048    abxyzpqrrrabbxyyyypqAzz
1049 0: abxyzpqrrrabbxyyyypqAzz
1050    abxyzpqrrrabbxyyyypqAzz
1051 0: abxyzpqrrrabbxyyyypqAzz
1052    aabxyzpqrrrabbxyyyypqAzz
1053 0: aabxyzpqrrrabbxyyyypqAzz
1054    aaabxyzpqrrrabbxyyyypqAzz
1055 0: aaabxyzpqrrrabbxyyyypqAzz
1056    aaaabxyzpqrrrabbxyyyypqAzz
1057 0: aaaabxyzpqrrrabbxyyyypqAzz
1058    abcxyzpqrrrabbxyyyypqAzz
1059 0: abcxyzpqrrrabbxyyyypqAzz
1060    aabcxyzpqrrrabbxyyyypqAzz
1061 0: aabcxyzpqrrrabbxyyyypqAzz
1062    aaabcxyzpqrrrabbxyyyypAzz
1063 0: aaabcxyzpqrrrabbxyyyypAzz
1064    aaabcxyzpqrrrabbxyyyypqAzz
1065 0: aaabcxyzpqrrrabbxyyyypqAzz
1066    aaabcxyzpqrrrabbxyyyypqqAzz
1067 0: aaabcxyzpqrrrabbxyyyypqqAzz
1068    aaabcxyzpqrrrabbxyyyypqqqAzz
1069 0: aaabcxyzpqrrrabbxyyyypqqqAzz
1070    aaabcxyzpqrrrabbxyyyypqqqqAzz
1071 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
1072    aaabcxyzpqrrrabbxyyyypqqqqqAzz
1073 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
1074    aaabcxyzpqrrrabbxyyyypqqqqqqAzz
1075 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
1076    aaaabcxyzpqrrrabbxyyyypqAzz
1077 0: aaaabcxyzpqrrrabbxyyyypqAzz
1078    abxyzzpqrrrabbxyyyypqAzz
1079 0: abxyzzpqrrrabbxyyyypqAzz
1080    aabxyzzzpqrrrabbxyyyypqAzz
1081 0: aabxyzzzpqrrrabbxyyyypqAzz
1082    aaabxyzzzzpqrrrabbxyyyypqAzz
1083 0: aaabxyzzzzpqrrrabbxyyyypqAzz
1084    aaaabxyzzzzpqrrrabbxyyyypqAzz
1085 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
1086    abcxyzzpqrrrabbxyyyypqAzz
1087 0: abcxyzzpqrrrabbxyyyypqAzz
1088    aabcxyzzzpqrrrabbxyyyypqAzz
1089 0: aabcxyzzzpqrrrabbxyyyypqAzz
1090    aaabcxyzzzzpqrrrabbxyyyypqAzz
1091 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
1092    aaaabcxyzzzzpqrrrabbxyyyypqAzz
1093 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
1094    aaaabcxyzzzzpqrrrabbbxyyyypqAzz
1095 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
1096    aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
1097 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
1098    aaabcxyzpqrrrabbxyyyypABzz
1099 0: aaabcxyzpqrrrabbxyyyypABzz
1100    aaabcxyzpqrrrabbxyyyypABBzz
1101 0: aaabcxyzpqrrrabbxyyyypABBzz
1102    >>>aaabxyzpqrrrabbxyyyypqAzz
1103 0: aaabxyzpqrrrabbxyyyypqAzz
1104    >aaaabxyzpqrrrabbxyyyypqAzz
1105 0: aaaabxyzpqrrrabbxyyyypqAzz
1106    >>>>abcxyzpqrrrabbxyyyypqAzz
1107 0: abcxyzpqrrrabbxyyyypqAzz
1108    *** Failers
1109No match
1110    abxyzpqrrabbxyyyypqAzz
1111No match
1112    abxyzpqrrrrabbxyyyypqAzz
1113No match
1114    abxyzpqrrrabxyyyypqAzz
1115No match
1116    aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
1117No match
1118    aaaabcxyzzzzpqrrrabbbxyyypqAzz
1119No match
1120    aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
1121No match
1122
1123/^(abc){1,2}zz/
1124    abczz
1125 0: abczz
1126    abcabczz
1127 0: abcabczz
1128    *** Failers
1129No match
1130    zz
1131No match
1132    abcabcabczz
1133No match
1134    >>abczz
1135No match
1136
1137/^(b+?|a){1,2}?c/
1138    bc
1139 0: bc
1140    bbc
1141 0: bbc
1142    bbbc
1143 0: bbbc
1144    bac
1145 0: bac
1146    bbac
1147 0: bbac
1148    aac
1149 0: aac
1150    abbbbbbbbbbbc
1151 0: abbbbbbbbbbbc
1152    bbbbbbbbbbbac
1153 0: bbbbbbbbbbbac
1154    *** Failers
1155No match
1156    aaac
1157No match
1158    abbbbbbbbbbbac
1159No match
1160
1161/^(b+|a){1,2}c/
1162    bc
1163 0: bc
1164    bbc
1165 0: bbc
1166    bbbc
1167 0: bbbc
1168    bac
1169 0: bac
1170    bbac
1171 0: bbac
1172    aac
1173 0: aac
1174    abbbbbbbbbbbc
1175 0: abbbbbbbbbbbc
1176    bbbbbbbbbbbac
1177 0: bbbbbbbbbbbac
1178    *** Failers
1179No match
1180    aaac
1181No match
1182    abbbbbbbbbbbac
1183No match
1184
1185/^(b+|a){1,2}?bc/
1186    bbc
1187 0: bbc
1188
1189/^(b*|ba){1,2}?bc/
1190    babc
1191 0: babc
1192    bbabc
1193 0: bbabc
1194    bababc
1195 0: bababc
1196    *** Failers
1197No match
1198    bababbc
1199No match
1200    babababc
1201No match
1202
1203/^(ba|b*){1,2}?bc/
1204    babc
1205 0: babc
1206    bbabc
1207 0: bbabc
1208    bababc
1209 0: bababc
1210    *** Failers
1211No match
1212    bababbc
1213No match
1214    babababc
1215No match
1216
1217/^\ca\cA\c[\c{\c:/
1218    \x01\x01\e;z
1219 0: \x01\x01\x1b;z
1220
1221/^[ab\]cde]/
1222    athing
1223 0: a
1224    bthing
1225 0: b
1226    ]thing
1227 0: ]
1228    cthing
1229 0: c
1230    dthing
1231 0: d
1232    ething
1233 0: e
1234    *** Failers
1235No match
1236    fthing
1237No match
1238    [thing
1239No match
1240    \\thing
1241No match
1242
1243/^[]cde]/
1244    ]thing
1245 0: ]
1246    cthing
1247 0: c
1248    dthing
1249 0: d
1250    ething
1251 0: e
1252    *** Failers
1253No match
1254    athing
1255No match
1256    fthing
1257No match
1258
1259/^[^ab\]cde]/
1260    fthing
1261 0: f
1262    [thing
1263 0: [
1264    \\thing
1265 0: \
1266    *** Failers
1267 0: *
1268    athing
1269No match
1270    bthing
1271No match
1272    ]thing
1273No match
1274    cthing
1275No match
1276    dthing
1277No match
1278    ething
1279No match
1280
1281/^[^]cde]/
1282    athing
1283 0: a
1284    fthing
1285 0: f
1286    *** Failers
1287 0: *
1288    ]thing
1289No match
1290    cthing
1291No match
1292    dthing
1293No match
1294    ething
1295No match
1296
1297/^\Б/
1298    Б
1299 0: \x81
1300
1301/^€/
13021303 0: \xff
1304
1305/^[0-9]+$/
1306    0
1307 0: 0
1308    1
1309 0: 1
1310    2
1311 0: 2
1312    3
1313 0: 3
1314    4
1315 0: 4
1316    5
1317 0: 5
1318    6
1319 0: 6
1320    7
1321 0: 7
1322    8
1323 0: 8
1324    9
1325 0: 9
1326    10
1327 0: 10
1328    100
1329 0: 100
1330    *** Failers
1331No match
1332    abc
1333No match
1334
1335/^.*nter/
1336    enter
1337 0: enter
1338    inter
1339 0: inter
1340    uponter
1341 0: uponter
1342
1343/^xxx[0-9]+$/
1344    xxx0
1345 0: xxx0
1346    xxx1234
1347 0: xxx1234
1348    *** Failers
1349No match
1350    xxx
1351No match
1352
1353/^.+[0-9][0-9][0-9]$/
1354    x123
1355 0: x123
1356    xx123
1357 0: xx123
1358    123456
1359 0: 123456
1360    *** Failers
1361No match
1362    123
1363No match
1364    x1234
1365 0: x1234
1366
1367/^.+?[0-9][0-9][0-9]$/
1368    x123
1369 0: x123
1370    xx123
1371 0: xx123
1372    123456
1373 0: 123456
1374    *** Failers
1375No match
1376    123
1377No match
1378    x1234
1379 0: x1234
1380
1381/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
1382    abc!pqr=apquxz.ixr.zzz.ac.uk
1383 0: abc!pqr=apquxz.ixr.zzz.ac.uk
1384    *** Failers
1385No match
1386    !pqr=apquxz.ixr.zzz.ac.uk
1387No match
1388    abc!=apquxz.ixr.zzz.ac.uk
1389No match
1390    abc!pqr=apquxz:ixr.zzz.ac.uk
1391No match
1392    abc!pqr=apquxz.ixr.zzz.ac.ukk
1393No match
1394
1395/:/
1396    Well, we need a colon: somewhere
1397 0: :
1398    *** Fail if we don't
1399No match
1400
1401/([\da-f:]+)$/i
1402    0abc
1403 0: 0abc
1404    abc
1405 0: abc
1406    fed
1407 0: fed
1408    E
1409 0: E
1410    ::
1411 0: ::
1412    5f03:12C0::932e
1413 0: 5f03:12C0::932e
1414    fed def
1415 0: def
1416    Any old stuff
1417 0: ff
1418    *** Failers
1419No match
1420    0zzz
1421No match
1422    gzzz
1423No match
1424    fed\x20
1425No match
1426    Any old rubbish
1427No match
1428
1429/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
1430    .1.2.3
1431 0: .1.2.3
1432    A.12.123.0
1433 0: A.12.123.0
1434    *** Failers
1435No match
1436    .1.2.3333
1437No match
1438    1.2.3
1439No match
1440    1234.2.3
1441No match
1442
1443/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
1444    1 IN SOA non-sp1 non-sp2(
1445 0: 1 IN SOA non-sp1 non-sp2(
1446    1    IN    SOA    non-sp1    non-sp2   (
1447 0: 1    IN    SOA    non-sp1    non-sp2   (
1448    *** Failers
1449No match
1450    1IN SOA non-sp1 non-sp2(
1451No match
1452
1453/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
1454    a.
1455 0: a.
1456    Z.
1457 0: Z.
1458    2.
1459 0: 2.
1460    ab-c.pq-r.
1461 0: ab-c.pq-r.
1462    sxk.zzz.ac.uk.
1463 0: sxk.zzz.ac.uk.
1464    x-.y-.
1465 0: x-.y-.
1466    *** Failers
1467No match
1468    -abc.peq.
1469No match
1470
1471/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
1472    *.a
1473 0: *.a
1474    *.b0-a
1475 0: *.b0-a
1476    *.c3-b.c
1477 0: *.c3-b.c
1478    *.c-a.b-c
1479 0: *.c-a.b-c
1480    *** Failers
1481No match
1482    *.0
1483No match
1484    *.a-
1485No match
1486    *.a-b.c-
1487No match
1488    *.c-a.0-c
1489No match
1490
1491/^(?=ab(de))(abd)(e)/
1492    abde
1493 0: abde
1494
1495/^(?!(ab)de|x)(abd)(f)/
1496    abdf
1497 0: abdf
1498
1499/^(?=(ab(cd)))(ab)/
1500    abcd
1501 0: ab
1502
1503/^[\da-f](\.[\da-f])*$/i
1504    a.b.c.d
1505 0: a.b.c.d
1506    A.B.C.D
1507 0: A.B.C.D
1508    a.b.c.1.2.3.C
1509 0: a.b.c.1.2.3.C
1510
1511/^\".*\"\s*(;.*)?$/
1512    \"1234\"
1513 0: "1234"
1514    \"abcd\" ;
1515 0: "abcd" ;
1516    \"\" ; rhubarb
1517 0: "" ; rhubarb
1518    *** Failers
1519No match
1520    \"1234\" : things
1521No match
1522
1523/^$/
1524    \
1525 0: 
1526    *** Failers
1527No match
1528
1529/   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/x
1530    ab c
1531 0: ab c
1532    *** Failers
1533No match
1534    abc
1535No match
1536    ab cde
1537No match
1538
1539/(?x)   ^    a   (?# begins with a)  b\sc (?# then b c) $ (?# then end)/
1540    ab c
1541 0: ab c
1542    *** Failers
1543No match
1544    abc
1545No match
1546    ab cde
1547No match
1548
1549/^   a\ b[c ]d       $/x
1550    a bcd
1551 0: a bcd
1552    a b d
1553 0: a b d
1554    *** Failers
1555No match
1556    abcd
1557No match
1558    ab d
1559No match
1560
1561/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
1562    abcdefhijklm
1563 0: abcdefhijklm
1564
1565/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
1566    abcdefhijklm
1567 0: abcdefhijklm
1568
1569/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
1570    a+ Z0+\x08\n\x1d\x12
1571 0: a+ Z0+\x08\x0a\x1d\x12
1572
1573/^[.^$|()*+?{,}]+/
1574    .^\$(*+)|{?,?}
1575 0: .^$(*+)|{?,?}
1576 1: .^$(*+)|{?,?
1577 2: .^$(*+)|{?,
1578 3: .^$(*+)|{?
1579 4: .^$(*+)|{
1580 5: .^$(*+)|
1581 6: .^$(*+)
1582 7: .^$(*+
1583 8: .^$(*
1584 9: .^$(
158510: .^$
158611: .^
158712: .
1588
1589/^a*\w/
1590    z
1591 0: z
1592    az
1593 0: az
1594 1: a
1595    aaaz
1596 0: aaaz
1597 1: aaa
1598 2: aa
1599 3: a
1600    a
1601 0: a
1602    aa
1603 0: aa
1604 1: a
1605    aaaa
1606 0: aaaa
1607 1: aaa
1608 2: aa
1609 3: a
1610    a+
1611 0: a
1612    aa+
1613 0: aa
1614 1: a
1615
1616/^a*?\w/
1617    z
1618 0: z
1619    az
1620 0: az
1621 1: a
1622    aaaz
1623 0: aaaz
1624 1: aaa
1625 2: aa
1626 3: a
1627    a
1628 0: a
1629    aa
1630 0: aa
1631 1: a
1632    aaaa
1633 0: aaaa
1634 1: aaa
1635 2: aa
1636 3: a
1637    a+
1638 0: a
1639    aa+
1640 0: aa
1641 1: a
1642
1643/^a+\w/
1644    az
1645 0: az
1646    aaaz
1647 0: aaaz
1648 1: aaa
1649 2: aa
1650    aa
1651 0: aa
1652    aaaa
1653 0: aaaa
1654 1: aaa
1655 2: aa
1656    aa+
1657 0: aa
1658
1659/^a+?\w/
1660    az
1661 0: az
1662    aaaz
1663 0: aaaz
1664 1: aaa
1665 2: aa
1666    aa
1667 0: aa
1668    aaaa
1669 0: aaaa
1670 1: aaa
1671 2: aa
1672    aa+
1673 0: aa
1674
1675/^\d{8}\w{2,}/
1676    1234567890
1677 0: 1234567890
1678    12345678ab
1679 0: 12345678ab
1680    12345678__
1681 0: 12345678__
1682    *** Failers
1683No match
1684    1234567
1685No match
1686
1687/^[aeiou\d]{4,5}$/
1688    uoie
1689 0: uoie
1690    1234
1691 0: 1234
1692    12345
1693 0: 12345
1694    aaaaa
1695 0: aaaaa
1696    *** Failers
1697No match
1698    123456
1699No match
1700
1701/^[aeiou\d]{4,5}?/
1702    uoie
1703 0: uoie
1704    1234
1705 0: 1234
1706    12345
1707 0: 12345
1708 1: 1234
1709    aaaaa
1710 0: aaaaa
1711 1: aaaa
1712    123456
1713 0: 12345
1714 1: 1234
1715
1716/^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]/
1717    From abcd  Mon Sep 01 12:33:02 1997
1718 0: From abcd  Mon Sep 01 12:33
1719
1720/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
1721    From abcd  Mon Sep 01 12:33:02 1997
1722 0: From abcd  Mon Sep 01 12:33
1723    From abcd  Mon Sep  1 12:33:02 1997
1724 0: From abcd  Mon Sep  1 12:33
1725    *** Failers
1726No match
1727    From abcd  Sep 01 12:33:02 1997
1728No match
1729
1730/^12.34/s
1731    12\n34
1732 0: 12\x0a34
1733    12\r34
1734 0: 12\x0d34
1735
1736/\w+(?=\t)/
1737    the quick brown\t fox
1738 0: brown
1739
1740/foo(?!bar)(.*)/
1741    foobar is foolish see?
1742 0: foolish see?
1743 1: foolish see
1744 2: foolish se
1745 3: foolish s
1746 4: foolish 
1747 5: foolish
1748 6: foolis
1749 7: fooli
1750 8: fool
1751 9: foo
1752
1753/(?:(?!foo)...|^.{0,2})bar(.*)/
1754    foobar crowbar etc
1755 0: rowbar etc
1756 1: rowbar et
1757 2: rowbar e
1758 3: rowbar 
1759 4: rowbar
1760    barrel
1761 0: barrel
1762 1: barre
1763 2: barr
1764 3: bar
1765    2barrel
1766 0: 2barrel
1767 1: 2barre
1768 2: 2barr
1769 3: 2bar
1770    A barrel
1771 0: A barrel
1772 1: A barre
1773 2: A barr
1774 3: A bar
1775
1776/^(\D*)(?=\d)(?!123)/
1777    abc456
1778 0: abc
1779    *** Failers
1780No match
1781    abc123
1782No match
1783
1784/^1234(?# test newlines
1785  inside)/
1786    1234
1787 0: 1234
1788
1789/^1234 #comment in extended re
1790  /x
1791    1234
1792 0: 1234
1793
1794/#rhubarb
1795  abcd/x
1796    abcd
1797 0: abcd
1798
1799/^abcd#rhubarb/x
1800    abcd
1801 0: abcd
1802
1803/(?!^)abc/
1804    the abc
1805 0: abc
1806    *** Failers
1807No match
1808    abc
1809No match
1810
1811/(?=^)abc/
1812    abc
1813 0: abc
1814    *** Failers
1815No match
1816    the abc
1817No match
1818
1819/^[ab]{1,3}(ab*|b)/
1820    aabbbbb
1821 0: aabbbbb
1822 1: aabbbb
1823 2: aabbb
1824 3: aabb
1825 4: aab
1826 5: aa
1827
1828/^[ab]{1,3}?(ab*|b)/
1829    aabbbbb
1830 0: aabbbbb
1831 1: aabbbb
1832 2: aabbb
1833 3: aabb
1834 4: aab
1835 5: aa
1836
1837/^[ab]{1,3}?(ab*?|b)/
1838    aabbbbb
1839 0: aabbbbb
1840 1: aabbbb
1841 2: aabbb
1842 3: aabb
1843 4: aab
1844 5: aa
1845
1846/^[ab]{1,3}(ab*?|b)/
1847    aabbbbb
1848 0: aabbbbb
1849 1: aabbbb
1850 2: aabbb
1851 3: aabb
1852 4: aab
1853 5: aa
1854
1855/  (?: [\040\t] |  \(
1856(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1857\)  )*                          # optional leading comment
1858(?:    (?:
1859[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1860(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1861|
1862" (?:                      # opening quote...
1863[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1864|                     #    or
1865\\ [^\x80-\xff]           #   Escaped something (something != CR)
1866)* "  # closing quote
1867)                    # initial word
1868(?:  (?: [\040\t] |  \(
1869(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1870\)  )*  \.  (?: [\040\t] |  \(
1871(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1872\)  )*   (?:
1873[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1874(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1875|
1876" (?:                      # opening quote...
1877[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1878|                     #    or
1879\\ [^\x80-\xff]           #   Escaped something (something != CR)
1880)* "  # closing quote
1881)  )* # further okay, if led by a period
1882(?: [\040\t] |  \(
1883(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1884\)  )*  @  (?: [\040\t] |  \(
1885(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1886\)  )*    (?:
1887[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1888(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1889|   \[                         # [
1890(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1891\]                        #           ]
1892)                           # initial subdomain
1893(?:                                  #
1894(?: [\040\t] |  \(
1895(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1896\)  )*  \.                        # if led by a period...
1897(?: [\040\t] |  \(
1898(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1899\)  )*   (?:
1900[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1901(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1902|   \[                         # [
1903(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1904\]                        #           ]
1905)                     #   ...further okay
1906)*
1907# address
1908|                     #  or
1909(?:
1910[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1911(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1912|
1913" (?:                      # opening quote...
1914[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1915|                     #    or
1916\\ [^\x80-\xff]           #   Escaped something (something != CR)
1917)* "  # closing quote
1918)             # one word, optionally followed by....
1919(?:
1920[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
1921\(
1922(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1923\)       |  # comments, or...
1924
1925" (?:                      # opening quote...
1926[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1927|                     #    or
1928\\ [^\x80-\xff]           #   Escaped something (something != CR)
1929)* "  # closing quote
1930# quoted strings
1931)*
1932<  (?: [\040\t] |  \(
1933(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1934\)  )*                     # leading <
1935(?:  @  (?: [\040\t] |  \(
1936(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1937\)  )*    (?:
1938[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1939(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1940|   \[                         # [
1941(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1942\]                        #           ]
1943)                           # initial subdomain
1944(?:                                  #
1945(?: [\040\t] |  \(
1946(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1947\)  )*  \.                        # if led by a period...
1948(?: [\040\t] |  \(
1949(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1950\)  )*   (?:
1951[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1952(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1953|   \[                         # [
1954(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1955\]                        #           ]
1956)                     #   ...further okay
1957)*
1958
1959(?:  (?: [\040\t] |  \(
1960(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1961\)  )*  ,  (?: [\040\t] |  \(
1962(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1963\)  )*  @  (?: [\040\t] |  \(
1964(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1965\)  )*    (?:
1966[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1967(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1968|   \[                         # [
1969(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1970\]                        #           ]
1971)                           # initial subdomain
1972(?:                                  #
1973(?: [\040\t] |  \(
1974(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1975\)  )*  \.                        # if led by a period...
1976(?: [\040\t] |  \(
1977(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1978\)  )*   (?:
1979[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1980(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1981|   \[                         # [
1982(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
1983\]                        #           ]
1984)                     #   ...further okay
1985)*
1986)* # further okay, if led by comma
1987:                                # closing colon
1988(?: [\040\t] |  \(
1989(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
1990\)  )*  )? #       optional route
1991(?:
1992[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
1993(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1994|
1995" (?:                      # opening quote...
1996[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
1997|                     #    or
1998\\ [^\x80-\xff]           #   Escaped something (something != CR)
1999)* "  # closing quote
2000)                    # initial word
2001(?:  (?: [\040\t] |  \(
2002(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2003\)  )*  \.  (?: [\040\t] |  \(
2004(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2005\)  )*   (?:
2006[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2007(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2008|
2009" (?:                      # opening quote...
2010[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
2011|                     #    or
2012\\ [^\x80-\xff]           #   Escaped something (something != CR)
2013)* "  # closing quote
2014)  )* # further okay, if led by a period
2015(?: [\040\t] |  \(
2016(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2017\)  )*  @  (?: [\040\t] |  \(
2018(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2019\)  )*    (?:
2020[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2021(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2022|   \[                         # [
2023(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
2024\]                        #           ]
2025)                           # initial subdomain
2026(?:                                  #
2027(?: [\040\t] |  \(
2028(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2029\)  )*  \.                        # if led by a period...
2030(?: [\040\t] |  \(
2031(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2032\)  )*   (?:
2033[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2034(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2035|   \[                         # [
2036(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
2037\]                        #           ]
2038)                     #   ...further okay
2039)*
2040#       address spec
2041(?: [\040\t] |  \(
2042(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2043\)  )*  > #                  trailing >
2044# name and address
2045)  (?: [\040\t] |  \(
2046(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2047\)  )*                       # optional trailing comment
2048/x
2049    Alan Other <user\@dom.ain>
2050 0: Alan Other <user@dom.ain>
2051    <user\@dom.ain>
2052 0: user@dom.ain
2053 1: user@dom
2054    user\@dom.ain
2055 0: user@dom.ain
2056 1: user@dom
2057    \"A. Other\" <user.1234\@dom.ain> (a comment)
2058 0: "A. Other" <user.1234@dom.ain> (a comment)
2059 1: "A. Other" <user.1234@dom.ain> 
2060 2: "A. Other" <user.1234@dom.ain>
2061    A. Other <user.1234\@dom.ain> (a comment)
2062 0:  Other <user.1234@dom.ain> (a comment)
2063 1:  Other <user.1234@dom.ain> 
2064 2:  Other <user.1234@dom.ain>
2065    \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
2066 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
2067 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
2068    A missing angle <user\@some.where
2069 0: user@some.where
2070 1: user@some
2071    *** Failers
2072No match
2073    The quick brown fox
2074No match
2075
2076/[\040\t]*                    # Nab whitespace.
2077(?:
2078\(                              #  (
2079[^\\\x80-\xff\n\015()] *                             #     normal*
2080(?:                                 #       (
2081(?:  \\ [^\x80-\xff]  |
2082\(                            #  (
2083[^\\\x80-\xff\n\015()] *                            #     normal*
2084(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2085\)                           #                       )
2086)    #         special
2087[^\\\x80-\xff\n\015()] *                         #         normal*
2088)*                                  #            )*
2089\)                             #                )
2090[\040\t]* )*    # If comment found, allow more spaces.
2091# optional leading comment
2092(?:
2093(?:
2094[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2095(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2096# Atom
2097|                       #  or
2098"                                     # "
2099[^\\\x80-\xff\n\015"] *                            #   normal
2100(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2101"                                     #        "
2102# Quoted string
2103)
2104[\040\t]*                    # Nab whitespace.
2105(?:
2106\(                              #  (
2107[^\\\x80-\xff\n\015()] *                             #     normal*
2108(?:                                 #       (
2109(?:  \\ [^\x80-\xff]  |
2110\(                            #  (
2111[^\\\x80-\xff\n\015()] *                            #     normal*
2112(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2113\)                           #                       )
2114)    #         special
2115[^\\\x80-\xff\n\015()] *                         #         normal*
2116)*                                  #            )*
2117\)                             #                )
2118[\040\t]* )*    # If comment found, allow more spaces.
2119(?:
2120\.
2121[\040\t]*                    # Nab whitespace.
2122(?:
2123\(                              #  (
2124[^\\\x80-\xff\n\015()] *                             #     normal*
2125(?:                                 #       (
2126(?:  \\ [^\x80-\xff]  |
2127\(                            #  (
2128[^\\\x80-\xff\n\015()] *                            #     normal*
2129(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2130\)                           #                       )
2131)    #         special
2132[^\\\x80-\xff\n\015()] *                         #         normal*
2133)*                                  #            )*
2134\)                             #                )
2135[\040\t]* )*    # If comment found, allow more spaces.
2136(?:
2137[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2138(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2139# Atom
2140|                       #  or
2141"                                     # "
2142[^\\\x80-\xff\n\015"] *                            #   normal
2143(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2144"                                     #        "
2145# Quoted string
2146)
2147[\040\t]*                    # Nab whitespace.
2148(?:
2149\(                              #  (
2150[^\\\x80-\xff\n\015()] *                             #     normal*
2151(?:                                 #       (
2152(?:  \\ [^\x80-\xff]  |
2153\(                            #  (
2154[^\\\x80-\xff\n\015()] *                            #     normal*
2155(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2156\)                           #                       )
2157)    #         special
2158[^\\\x80-\xff\n\015()] *                         #         normal*
2159)*                                  #            )*
2160\)                             #                )
2161[\040\t]* )*    # If comment found, allow more spaces.
2162# additional words
2163)*
2164@
2165[\040\t]*                    # Nab whitespace.
2166(?:
2167\(                              #  (
2168[^\\\x80-\xff\n\015()] *                             #     normal*
2169(?:                                 #       (
2170(?:  \\ [^\x80-\xff]  |
2171\(                            #  (
2172[^\\\x80-\xff\n\015()] *                            #     normal*
2173(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2174\)                           #                       )
2175)    #         special
2176[^\\\x80-\xff\n\015()] *                         #         normal*
2177)*                                  #            )*
2178\)                             #                )
2179[\040\t]* )*    # If comment found, allow more spaces.
2180(?:
2181[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2182(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2183|
2184\[                            # [
2185(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2186\]                           #           ]
2187)
2188[\040\t]*                    # Nab whitespace.
2189(?:
2190\(                              #  (
2191[^\\\x80-\xff\n\015()] *                             #     normal*
2192(?:                                 #       (
2193(?:  \\ [^\x80-\xff]  |
2194\(                            #  (
2195[^\\\x80-\xff\n\015()] *                            #     normal*
2196(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2197\)                           #                       )
2198)    #         special
2199[^\\\x80-\xff\n\015()] *                         #         normal*
2200)*                                  #            )*
2201\)                             #                )
2202[\040\t]* )*    # If comment found, allow more spaces.
2203# optional trailing comments
2204(?:
2205\.
2206[\040\t]*                    # Nab whitespace.
2207(?:
2208\(                              #  (
2209[^\\\x80-\xff\n\015()] *                             #     normal*
2210(?:                                 #       (
2211(?:  \\ [^\x80-\xff]  |
2212\(                            #  (
2213[^\\\x80-\xff\n\015()] *                            #     normal*
2214(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2215\)                           #                       )
2216)    #         special
2217[^\\\x80-\xff\n\015()] *                         #         normal*
2218)*                                  #            )*
2219\)                             #                )
2220[\040\t]* )*    # If comment found, allow more spaces.
2221(?:
2222[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2223(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2224|
2225\[                            # [
2226(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2227\]                           #           ]
2228)
2229[\040\t]*                    # Nab whitespace.
2230(?:
2231\(                              #  (
2232[^\\\x80-\xff\n\015()] *                             #     normal*
2233(?:                                 #       (
2234(?:  \\ [^\x80-\xff]  |
2235\(                            #  (
2236[^\\\x80-\xff\n\015()] *                            #     normal*
2237(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2238\)                           #                       )
2239)    #         special
2240[^\\\x80-\xff\n\015()] *                         #         normal*
2241)*                                  #            )*
2242\)                             #                )
2243[\040\t]* )*    # If comment found, allow more spaces.
2244# optional trailing comments
2245)*
2246# address
2247|                             #  or
2248(?:
2249[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2250(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2251# Atom
2252|                       #  or
2253"                                     # "
2254[^\\\x80-\xff\n\015"] *                            #   normal
2255(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2256"                                     #        "
2257# Quoted string
2258)
2259# leading word
2260[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *               # "normal" atoms and or spaces
2261(?:
2262(?:
2263\(                              #  (
2264[^\\\x80-\xff\n\015()] *                             #     normal*
2265(?:                                 #       (
2266(?:  \\ [^\x80-\xff]  |
2267\(                            #  (
2268[^\\\x80-\xff\n\015()] *                            #     normal*
2269(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2270\)                           #                       )
2271)    #         special
2272[^\\\x80-\xff\n\015()] *                         #         normal*
2273)*                                  #            )*
2274\)                             #                )
2275|
2276"                                     # "
2277[^\\\x80-\xff\n\015"] *                            #   normal
2278(?:  \\ [^\x80-\xff]  [^\\\x80-\xff\n\015"] * )*        #   ( special normal* )*
2279"                                     #        "
2280) # "special" comment or quoted string
2281[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] *            #  more "normal"
2282)*
2283<
2284[\040\t]*                    # Nab whitespace.
2285(?:
2286\(                              #  (
2287[^\\\x80-\xff\n\015()] *                             #     normal*
2288(?:                                 #       (
2289(?:  \\ [^\x80-\xff]  |
2290\(                            #  (
2291[^\\\x80-\xff\n\015()] *                            #     normal*
2292(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2293\)                           #                       )
2294)    #         special
2295[^\\\x80-\xff\n\015()] *                         #         normal*
2296)*                                  #            )*
2297\)                             #                )
2298[\040\t]* )*    # If comment found, allow more spaces.
2299# <
2300(?:
2301@
2302[\040\t]*                    # Nab whitespace.
2303(?:
2304\(                              #  (
2305[^\\\x80-\xff\n\015()] *                             #     normal*
2306(?:                                 #       (
2307(?:  \\ [^\x80-\xff]  |
2308\(                            #  (
2309[^\\\x80-\xff\n\015()] *                            #     normal*
2310(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2311\)                           #                       )
2312)    #         special
2313[^\\\x80-\xff\n\015()] *                         #         normal*
2314)*                                  #            )*
2315\)                             #                )
2316[\040\t]* )*    # If comment found, allow more spaces.
2317(?:
2318[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2319(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2320|
2321\[                            # [
2322(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2323\]                           #           ]
2324)
2325[\040\t]*                    # Nab whitespace.
2326(?:
2327\(                              #  (
2328[^\\\x80-\xff\n\015()] *                             #     normal*
2329(?:                                 #       (
2330(?:  \\ [^\x80-\xff]  |
2331\(                            #  (
2332[^\\\x80-\xff\n\015()] *                            #     normal*
2333(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2334\)                           #                       )
2335)    #         special
2336[^\\\x80-\xff\n\015()] *                         #         normal*
2337)*                                  #            )*
2338\)                             #                )
2339[\040\t]* )*    # If comment found, allow more spaces.
2340# optional trailing comments
2341(?:
2342\.
2343[\040\t]*                    # Nab whitespace.
2344(?:
2345\(                              #  (
2346[^\\\x80-\xff\n\015()] *                             #     normal*
2347(?:                                 #       (
2348(?:  \\ [^\x80-\xff]  |
2349\(                            #  (
2350[^\\\x80-\xff\n\015()] *                            #     normal*
2351(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2352\)                           #                       )
2353)    #         special
2354[^\\\x80-\xff\n\015()] *                         #         normal*
2355)*                                  #            )*
2356\)                             #                )
2357[\040\t]* )*    # If comment found, allow more spaces.
2358(?:
2359[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2360(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2361|
2362\[                            # [
2363(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2364\]                           #           ]
2365)
2366[\040\t]*                    # Nab whitespace.
2367(?:
2368\(                              #  (
2369[^\\\x80-\xff\n\015()] *                             #     normal*
2370(?:                                 #       (
2371(?:  \\ [^\x80-\xff]  |
2372\(                            #  (
2373[^\\\x80-\xff\n\015()] *                            #     normal*
2374(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2375\)                           #                       )
2376)    #         special
2377[^\\\x80-\xff\n\015()] *                         #         normal*
2378)*                                  #            )*
2379\)                             #                )
2380[\040\t]* )*    # If comment found, allow more spaces.
2381# optional trailing comments
2382)*
2383(?: ,
2384[\040\t]*                    # Nab whitespace.
2385(?:
2386\(                              #  (
2387[^\\\x80-\xff\n\015()] *                             #     normal*
2388(?:                                 #       (
2389(?:  \\ [^\x80-\xff]  |
2390\(                            #  (
2391[^\\\x80-\xff\n\015()] *                            #     normal*
2392(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2393\)                           #                       )
2394)    #         special
2395[^\\\x80-\xff\n\015()] *                         #         normal*
2396)*                                  #            )*
2397\)                             #                )
2398[\040\t]* )*    # If comment found, allow more spaces.
2399@
2400[\040\t]*                    # Nab whitespace.
2401(?:
2402\(                              #  (
2403[^\\\x80-\xff\n\015()] *                             #     normal*
2404(?:                                 #       (
2405(?:  \\ [^\x80-\xff]  |
2406\(                            #  (
2407[^\\\x80-\xff\n\015()] *                            #     normal*
2408(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2409\)                           #                       )
2410)    #         special
2411[^\\\x80-\xff\n\015()] *                         #         normal*
2412)*                                  #            )*
2413\)                             #                )
2414[\040\t]* )*    # If comment found, allow more spaces.
2415(?:
2416[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2417(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2418|
2419\[                            # [
2420(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*     #    stuff
2421\]                           #           ]
2422)
2423[\040\t]*                    # Nab whitespace.
2424(?:
2425\(                              #  (
2426[^\\\x80-\xff\n\015()] *                             #     normal*
2427(?:                                 #       (
2428(?:  \\ [^\x80-\xff]  |
2429\(                            #  (
2430[^\\\x80-\xff\n\015()] *                            #     normal*
2431(?:  \\ [^\x80-\xff]   [^\\\x80-\xff\n\015()] * )*        #     (special normal*)*
2432\)                           #                       )
2433)    #         special
2434[^\\\x80-\xff\n\015()] *                         #         normal*
2435)*                                  #            )*
2436\)                             #                )
2437[\040\t…

Large files files are truncated, but you can click here to view the full file