1# This set of tests is not Perl-compatible. It checks on special features 2# of PCRE2's API, error diagnostics, and the compiled code of some patterns. 3# It also checks the non-Perl syntax that PCRE2 supports (Python, .NET, 4# Oniguruma). There are also some tests where PCRE2 and Perl differ, 5# either because PCRE2 can't be compatible, or there is a possible Perl 6# bug. 7 8# NOTE: This is a non-UTF set of tests. When UTF support is needed, use 9# test 5. 10 11#forbid_utf 12#newline_default lf any anycrlf 13 14# Test binary zeroes in the pattern 15 16# /a\0B/ where 0 is a binary zero 17/61 5c 00 62/B,hex 18------------------------------------------------------------------ 19 Bra 20 a\x00b 21 Ket 22 End 23------------------------------------------------------------------ 24 a\x{0}b 25 0: a\x00b 26 27# /a0b/ where 0 is a binary zero 28/61 00 62/B,hex 29------------------------------------------------------------------ 30 Bra 31 a\x00b 32 Ket 33 End 34------------------------------------------------------------------ 35 a\x{0}b 36 0: a\x00b 37 38# /(?#B0C)DE/ where 0 is a binary zero 39/28 3f 23 42 00 43 29 44 45/B,hex 40------------------------------------------------------------------ 41 Bra 42 DE 43 Ket 44 End 45------------------------------------------------------------------ 46 DE 47 0: DE 48 49/(a)b|/I 50Capturing subpattern count = 1 51May match empty string 52Subject length lower bound = 0 53 54/abc/I 55Capturing subpattern count = 0 56First code unit = 'a' 57Last code unit = 'c' 58Subject length lower bound = 3 59 abc 60 0: abc 61 defabc 62 0: abc 63 abc\=anchored 64 0: abc 65\= Expect no match 66 defabc\=anchored 67No match 68 ABC 69No match 70 71/^abc/I 72Capturing subpattern count = 0 73Compile options: <none> 74Overall options: anchored 75Subject length lower bound = 3 76 abc 77 0: abc 78 abc\=anchored 79 0: abc 80\= Expect no match 81 defabc 82No match 83 defabc\=anchored 84No match 85 86/a+bc/I 87Capturing subpattern count = 0 88First code unit = 'a' 89Last code unit = 'c' 90Subject length lower bound = 3 91 92/a*bc/I 93Capturing subpattern count = 0 94Starting code units: a b 95Last code unit = 'c' 96Subject length lower bound = 2 97 98/a{3}bc/I 99Capturing subpattern count = 0 100First code unit = 'a' 101Last code unit = 'c' 102Subject length lower bound = 5 103 104/(abc|a+z)/I 105Capturing subpattern count = 1 106First code unit = 'a' 107Subject length lower bound = 2 108 109/^abc$/I 110Capturing subpattern count = 0 111Compile options: <none> 112Overall options: anchored 113Subject length lower bound = 3 114 abc 115 0: abc 116\= Expect no match 117 def\nabc 118No match 119 120/ab\idef/ 121Failed: error 103 at offset 3: unrecognized character follows \ 122 123/(?X)ab\idef/ 124Failed: error 111 at offset 2: unrecognized character after (? or (?- 125 126/x{5,4}/ 127Failed: error 104 at offset 5: numbers out of order in {} quantifier 128 129/z{65536}/ 130Failed: error 105 at offset 7: number too big in {} quantifier 131 132/[abcd/ 133Failed: error 106 at offset 5: missing terminating ] for character class 134 135/[\B]/B 136Failed: error 107 at offset 2: invalid escape sequence in character class 137 138/[\R]/B 139Failed: error 107 at offset 2: invalid escape sequence in character class 140 141/[\X]/B 142Failed: error 107 at offset 2: invalid escape sequence in character class 143 144/[z-a]/ 145Failed: error 108 at offset 3: range out of order in character class 146 147/^*/ 148Failed: error 109 at offset 1: quantifier does not follow a repeatable item 149 150/(abc/ 151Failed: error 114 at offset 4: missing closing parenthesis 152 153/(?# abc/ 154Failed: error 118 at offset 7: missing ) after (?# comment 155 156/(?z)abc/ 157Failed: error 111 at offset 2: unrecognized character after (? or (?- 158 159/.*b/I 160Capturing subpattern count = 0 161First code unit at start or follows newline 162Last code unit = 'b' 163Subject length lower bound = 1 164 165/.*?b/I 166Capturing subpattern count = 0 167First code unit at start or follows newline 168Last code unit = 'b' 169Subject length lower bound = 1 170 171/cat|dog|elephant/I 172Capturing subpattern count = 0 173Starting code units: c d e 174Subject length lower bound = 3 175 this sentence eventually mentions a cat 176 0: cat 177 this sentences rambles on and on for a while and then reaches elephant 178 0: elephant 179 180/cat|dog|elephant/I 181Capturing subpattern count = 0 182Starting code units: c d e 183Subject length lower bound = 3 184 this sentence eventually mentions a cat 185 0: cat 186 this sentences rambles on and on for a while and then reaches elephant 187 0: elephant 188 189/cat|dog|elephant/Ii 190Capturing subpattern count = 0 191Options: caseless 192Starting code units: C D E c d e 193Subject length lower bound = 3 194 this sentence eventually mentions a CAT cat 195 0: CAT 196 this sentences rambles on and on for a while to elephant ElePhant 197 0: elephant 198 199/a|[bcd]/I 200Capturing subpattern count = 0 201Starting code units: a b c d 202Subject length lower bound = 1 203 204/(a|[^\dZ])/I 205Capturing subpattern count = 1 206Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 207 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 208 \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = > 209 ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y [ \ ] ^ _ ` a b c d 210 e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \x80 \x81 \x82 \x83 211 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92 212 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1 213 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0 214 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf 215 \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce 216 \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd 217 \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec 218 \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb 219 \xfc \xfd \xfe \xff 220Subject length lower bound = 1 221 222/(a|b)*[\s]/I 223Capturing subpattern count = 1 224Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 a b 225Subject length lower bound = 1 226 227/(ab\2)/ 228Failed: error 115 at offset 4: reference to non-existent subpattern 229 230/{4,5}abc/ 231Failed: error 109 at offset 4: quantifier does not follow a repeatable item 232 233/(a)(b)(c)\2/I 234Capturing subpattern count = 3 235Max back reference = 2 236First code unit = 'a' 237Last code unit = 'c' 238Subject length lower bound = 4 239 abcb 240 0: abcb 241 1: a 242 2: b 243 3: c 244 abcb\=ovector=0 245 0: abcb 246 1: a 247 2: b 248 3: c 249 abcb\=ovector=1 250Matched, but too many substrings 251 0: abcb 252 abcb\=ovector=2 253Matched, but too many substrings 254 0: abcb 255 1: a 256 abcb\=ovector=3 257Matched, but too many substrings 258 0: abcb 259 1: a 260 2: b 261 abcb\=ovector=4 262 0: abcb 263 1: a 264 2: b 265 3: c 266 267/(a)bc|(a)(b)\2/I 268Capturing subpattern count = 3 269Max back reference = 2 270First code unit = 'a' 271Subject length lower bound = 3 272 abc 273 0: abc 274 1: a 275 abc\=ovector=0 276 0: abc 277 1: a 278 abc\=ovector=1 279Matched, but too many substrings 280 0: abc 281 abc\=ovector=2 282 0: abc 283 1: a 284 aba 285 0: aba 286 1: <unset> 287 2: a 288 3: b 289 aba\=ovector=0 290 0: aba 291 1: <unset> 292 2: a 293 3: b 294 aba\=ovector=1 295Matched, but too many substrings 296 0: aba 297 aba\=ovector=2 298Matched, but too many substrings 299 0: aba 300 1: <unset> 301 aba\=ovector=3 302Matched, but too many substrings 303 0: aba 304 1: <unset> 305 2: a 306 aba\=ovector=4 307 0: aba 308 1: <unset> 309 2: a 310 3: b 311 312/abc$/I,dollar_endonly 313Capturing subpattern count = 0 314Options: dollar_endonly 315First code unit = 'a' 316Last code unit = 'c' 317Subject length lower bound = 3 318 abc 319 0: abc 320\= Expect no match 321 abc\n 322No match 323 abc\ndef 324No match 325 326/(a)(b)(c)(d)(e)\6/ 327Failed: error 115 at offset 16: reference to non-existent subpattern 328 329/the quick brown fox/I 330Capturing subpattern count = 0 331First code unit = 't' 332Last code unit = 'x' 333Subject length lower bound = 19 334 the quick brown fox 335 0: the quick brown fox 336 this is a line with the quick brown fox 337 0: the quick brown fox 338 339/the quick brown fox/I,anchored 340Capturing subpattern count = 0 341Options: anchored 342Subject length lower bound = 19 343 the quick brown fox 344 0: the quick brown fox 345\= Expect no match 346 this is a line with the quick brown fox 347No match 348 349/ab(?z)cd/ 350Failed: error 111 at offset 4: unrecognized character after (? or (?- 351 352/^abc|def/I 353Capturing subpattern count = 0 354Subject length lower bound = 3 355 abcdef 356 0: abc 357 abcdef\=notbol 358 0: def 359 360/.*((abc)$|(def))/I 361Capturing subpattern count = 3 362First code unit at start or follows newline 363Subject length lower bound = 3 364 defabc 365 0: defabc 366 1: abc 367 2: abc 368 defabc\=noteol 369 0: def 370 1: def 371 2: <unset> 372 3: def 373 374/)/ 375Failed: error 122 at offset 0: unmatched closing parenthesis 376 377/a[]b/ 378Failed: error 106 at offset 4: missing terminating ] for character class 379 380/[^aeiou ]{3,}/I 381Capturing subpattern count = 0 382Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 383 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 384 \x1a \x1b \x1c \x1d \x1e \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 385 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 386 \ ] ^ _ ` b c d f g h j k l m n p q r s t v w x y z { | } ~ \x7f \x80 \x81 387 \x82 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 388 \x91 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f 389 \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae 390 \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd 391 \xbe \xbf \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc 392 \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb 393 \xdc \xdd \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea 394 \xeb \xec \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 395 \xfa \xfb \xfc \xfd \xfe \xff 396Subject length lower bound = 3 397 co-processors, and for 398 0: -pr 399 400/<.*>/I 401Capturing subpattern count = 0 402First code unit = '<' 403Last code unit = '>' 404Subject length lower bound = 2 405 abc<def>ghi<klm>nop 406 0: <def>ghi<klm> 407 408/<.*?>/I 409Capturing subpattern count = 0 410First code unit = '<' 411Last code unit = '>' 412Subject length lower bound = 2 413 abc<def>ghi<klm>nop 414 0: <def> 415 416/<.*>/I,ungreedy 417Capturing subpattern count = 0 418Options: ungreedy 419First code unit = '<' 420Last code unit = '>' 421Subject length lower bound = 2 422 abc<def>ghi<klm>nop 423 0: <def> 424 425/(?U)<.*>/I 426Capturing subpattern count = 0 427First code unit = '<' 428Last code unit = '>' 429Subject length lower bound = 2 430 abc<def>ghi<klm>nop 431 0: <def> 432 433/<.*?>/I,ungreedy 434Capturing subpattern count = 0 435Options: ungreedy 436First code unit = '<' 437Last code unit = '>' 438Subject length lower bound = 2 439 abc<def>ghi<klm>nop 440 0: <def>ghi<klm> 441 442/={3,}/I,ungreedy 443Capturing subpattern count = 0 444Options: ungreedy 445First code unit = '=' 446Last code unit = '=' 447Subject length lower bound = 3 448 abc========def 449 0: === 450 451/(?U)={3,}?/I 452Capturing subpattern count = 0 453First code unit = '=' 454Last code unit = '=' 455Subject length lower bound = 3 456 abc========def 457 0: ======== 458 459/(?<!bar|cattle)foo/I 460Capturing subpattern count = 0 461Max lookbehind = 6 462First code unit = 'f' 463Last code unit = 'o' 464Subject length lower bound = 3 465 foo 466 0: foo 467 catfoo 468 0: foo 469\= Expect no match 470 the barfoo 471No match 472 and cattlefoo 473No match 474 475/(?<=a+)b/ 476Failed: error 125 at offset 6: lookbehind assertion is not fixed length 477 478/(?<=aaa|b{0,3})b/ 479Failed: error 125 at offset 14: lookbehind assertion is not fixed length 480 481/(?<!(foo)a\1)bar/ 482Failed: error 125 at offset 12: lookbehind assertion is not fixed length 483 484/(?i)abc/I 485Capturing subpattern count = 0 486First code unit = 'a' (caseless) 487Last code unit = 'c' (caseless) 488Subject length lower bound = 3 489 490/(a|(?m)a)/I 491Capturing subpattern count = 1 492First code unit = 'a' 493Subject length lower bound = 1 494 495/(?i)^1234/I 496Capturing subpattern count = 0 497Compile options: <none> 498Overall options: anchored 499Subject length lower bound = 4 500 501/(^b|(?i)^d)/I 502Capturing subpattern count = 1 503Compile options: <none> 504Overall options: anchored 505Subject length lower bound = 1 506 507/(?s).*/I 508Capturing subpattern count = 0 509May match empty string 510Compile options: <none> 511Overall options: anchored 512Subject length lower bound = 0 513 514/[abcd]/I 515Capturing subpattern count = 0 516Starting code units: a b c d 517Subject length lower bound = 1 518 519/(?i)[abcd]/I 520Capturing subpattern count = 0 521Starting code units: A B C D a b c d 522Subject length lower bound = 1 523 524/(?m)[xy]|(b|c)/I 525Capturing subpattern count = 1 526Starting code units: b c x y 527Subject length lower bound = 1 528 529/(^a|^b)/Im 530Capturing subpattern count = 1 531Options: multiline 532First code unit at start or follows newline 533Subject length lower bound = 1 534 535/(?i)(^a|^b)/Im 536Capturing subpattern count = 1 537Options: multiline 538First code unit at start or follows newline 539Subject length lower bound = 1 540 541/(a)(?(1)a|b|c)/ 542Failed: error 127 at offset 13: conditional group contains more than two branches 543 544/(?(?=a)a|b|c)/ 545Failed: error 127 at offset 12: conditional group contains more than two branches 546 547/(?(1a)/ 548Failed: error 114 at offset 6: missing closing parenthesis 549 550/(?(1a))/ 551Failed: error 126 at offset 4: malformed number or name after (?( 552 553/(?(?i))/ 554Failed: error 128 at offset 3: assertion expected after (?( or (?(?C) 555 556/(?(abc))/ 557Failed: error 115 at offset 7: reference to non-existent subpattern 558 559/(?(?<ab))/ 560Failed: error 128 at offset 3: assertion expected after (?( or (?(?C) 561 562/((?s)blah)\s+\1/I 563Capturing subpattern count = 1 564Max back reference = 1 565First code unit = 'b' 566Last code unit = 'h' 567Subject length lower bound = 9 568 569/((?i)blah)\s+\1/I 570Capturing subpattern count = 1 571Max back reference = 1 572First code unit = 'b' (caseless) 573Last code unit = 'h' (caseless) 574Subject length lower bound = 9 575 576/((?i)b)/IB 577------------------------------------------------------------------ 578 Bra 579 CBra 1 580 /i b 581 Ket 582 Ket 583 End 584------------------------------------------------------------------ 585Capturing subpattern count = 1 586First code unit = 'b' (caseless) 587Subject length lower bound = 1 588 589/(a*b|(?i:c*(?-i)d))/I 590Capturing subpattern count = 1 591Starting code units: C a b c d 592Subject length lower bound = 1 593 594/a$/I 595Capturing subpattern count = 0 596First code unit = 'a' 597Subject length lower bound = 1 598 a 599 0: a 600 a\n 601 0: a 602\= Expect no match 603 a\=noteol 604No match 605 a\n\=noteol 606No match 607 608/a$/Im 609Capturing subpattern count = 0 610Options: multiline 611First code unit = 'a' 612Subject length lower bound = 1 613 a 614 0: a 615 a\n 616 0: a 617 a\n\=noteol 618 0: a 619\= Expect no match 620 a\=noteol 621No match 622 623/\Aabc/Im 624Capturing subpattern count = 0 625Max lookbehind = 1 626Compile options: multiline 627Overall options: anchored multiline 628Subject length lower bound = 3 629 630/^abc/Im 631Capturing subpattern count = 0 632Options: multiline 633First code unit at start or follows newline 634Last code unit = 'c' 635Subject length lower bound = 3 636 637/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I 638Capturing subpattern count = 5 639Compile options: <none> 640Overall options: anchored 641Subject length lower bound = 3 642 aaaaabbbbbcccccdef 643 0: aaaaabbbbbcccccdef 644 1: aaaaabbbbbcccccdef 645 2: aaaaa 646 3: b 647 4: bbbbccccc 648 5: def 649 650/(?<=foo)[ab]/I 651Capturing subpattern count = 0 652Max lookbehind = 3 653Starting code units: a b 654Subject length lower bound = 1 655 656/(?<!foo)(alpha|omega)/I 657Capturing subpattern count = 1 658Max lookbehind = 3 659Starting code units: a o 660Last code unit = 'a' 661Subject length lower bound = 5 662 663/(?!alphabet)[ab]/I 664Capturing subpattern count = 0 665Starting code units: a b 666Subject length lower bound = 1 667 668/(?<=foo\n)^bar/Im 669Capturing subpattern count = 0 670Max lookbehind = 4 671Contains explicit CR or LF match 672Options: multiline 673Last code unit = 'r' 674Subject length lower bound = 3 675 foo\nbarbar 676 0: bar 677\= Expect no match 678 rhubarb 679No match 680 barbell 681No match 682 abc\nbarton 683No match 684 685/^(?<=foo\n)bar/Im 686Capturing subpattern count = 0 687Max lookbehind = 4 688Contains explicit CR or LF match 689Options: multiline 690First code unit at start or follows newline 691Last code unit = 'r' 692Subject length lower bound = 3 693 foo\nbarbar 694 0: bar 695\= Expect no match 696 rhubarb 697No match 698 barbell 699No match 700 abc\nbarton 701No match 702 703/(?>^abc)/Im 704Capturing subpattern count = 0 705Options: multiline 706First code unit at start or follows newline 707Last code unit = 'c' 708Subject length lower bound = 3 709 abc 710 0: abc 711 def\nabc 712 0: abc 713\= Expect no match 714 defabc 715No match 716 717/(?<=ab(c+)d)ef/ 718Failed: error 125 at offset 11: lookbehind assertion is not fixed length 719 720/(?<=ab(?<=c+)d)ef/ 721Failed: error 125 at offset 12: lookbehind assertion is not fixed length 722 723/(?<=ab(c|de)f)g/ 724Failed: error 125 at offset 13: lookbehind assertion is not fixed length 725 726/The next three are in testinput2 because they have variable length branches/ 727 728/(?<=bullock|donkey)-cart/I 729Capturing subpattern count = 0 730Max lookbehind = 7 731First code unit = '-' 732Last code unit = 't' 733Subject length lower bound = 5 734 the bullock-cart 735 0: -cart 736 a donkey-cart race 737 0: -cart 738\= Expect no match 739 cart 740No match 741 horse-and-cart 742No match 743 744/(?<=ab(?i)x|y|z)/I 745Capturing subpattern count = 0 746Max lookbehind = 3 747May match empty string 748Subject length lower bound = 0 749 750/(?>.*)(?<=(abcd)|(xyz))/I 751Capturing subpattern count = 2 752Max lookbehind = 4 753May match empty string 754Subject length lower bound = 0 755 alphabetabcd 756 0: alphabetabcd 757 1: abcd 758 endingxyz 759 0: endingxyz 760 1: <unset> 761 2: xyz 762 763/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I 764Capturing subpattern count = 0 765Max lookbehind = 4 766First code unit = 'Z' 767Last code unit = 'Z' 768Subject length lower bound = 2 769 abxyZZ 770 0: ZZ 771 abXyZZ 772 0: ZZ 773 ZZZ 774 0: ZZ 775 zZZ 776 0: ZZ 777 bZZ 778 0: ZZ 779 BZZ 780 0: ZZ 781\= Expect no match 782 ZZ 783No match 784 abXYZZ 785No match 786 zzz 787No match 788 bzz 789No match 790 791/(?<!(foo)a)bar/I 792Capturing subpattern count = 1 793Max lookbehind = 4 794First code unit = 'b' 795Last code unit = 'r' 796Subject length lower bound = 3 797 bar 798 0: bar 799 foobbar 800 0: bar 801\= Expect no match 802 fooabar 803No match 804 805# This one is here because Perl behaves differently; see also the following. 806 807/^(a\1?){4}$/I 808Capturing subpattern count = 1 809Max back reference = 1 810Compile options: <none> 811Overall options: anchored 812Subject length lower bound = 4 813\= Expect no match 814 aaaa 815No match 816 aaaaaa 817No match 818 819# Perl does not fail these two for the final subjects. Neither did PCRE until 820# release 8.01. The problem is in backtracking into a subpattern that contains 821# a recursive reference to itself. PCRE has now made these into atomic patterns. 822 823/^(xa|=?\1a){2}$/ 824 xa=xaa 825 0: xa=xaa 826 1: =xaa 827\= Expect no match 828 xa=xaaa 829No match 830 831/^(xa|=?\1a)+$/ 832 xa=xaa 833 0: xa=xaa 834 1: =xaa 835\= Expect no match 836 xa=xaaa 837No match 838 839# These are syntax tests from Perl 5.005 840 841/a[b-a]/ 842Failed: error 108 at offset 4: range out of order in character class 843 844/a[]b/ 845Failed: error 106 at offset 4: missing terminating ] for character class 846 847/a[/ 848Failed: error 106 at offset 2: missing terminating ] for character class 849 850/*a/ 851Failed: error 109 at offset 0: quantifier does not follow a repeatable item 852 853/(*)b/ 854Failed: error 109 at offset 1: quantifier does not follow a repeatable item 855 856/abc)/ 857Failed: error 122 at offset 3: unmatched closing parenthesis 858 859/(abc/ 860Failed: error 114 at offset 4: missing closing parenthesis 861 862/a**/ 863Failed: error 109 at offset 2: quantifier does not follow a repeatable item 864 865/)(/ 866Failed: error 122 at offset 0: unmatched closing parenthesis 867 868/\1/ 869Failed: error 115 at offset 1: reference to non-existent subpattern 870 871/\2/ 872Failed: error 115 at offset 1: reference to non-existent subpattern 873 874/(a)|\2/ 875Failed: error 115 at offset 5: reference to non-existent subpattern 876 877/a[b-a]/Ii 878Failed: error 108 at offset 4: range out of order in character class 879 880/a[]b/Ii 881Failed: error 106 at offset 4: missing terminating ] for character class 882 883/a[/Ii 884Failed: error 106 at offset 2: missing terminating ] for character class 885 886/*a/Ii 887Failed: error 109 at offset 0: quantifier does not follow a repeatable item 888 889/(*)b/Ii 890Failed: error 109 at offset 1: quantifier does not follow a repeatable item 891 892/abc)/Ii 893Failed: error 122 at offset 3: unmatched closing parenthesis 894 895/(abc/Ii 896Failed: error 114 at offset 4: missing closing parenthesis 897 898/a**/Ii 899Failed: error 109 at offset 2: quantifier does not follow a repeatable item 900 901/)(/Ii 902Failed: error 122 at offset 0: unmatched closing parenthesis 903 904/:(?:/ 905Failed: error 114 at offset 4: missing closing parenthesis 906 907/(?<%)b/ 908Failed: error 124 at offset 3: letter or underscore expected after (?< or (?' 909 910/a(?{)b/ 911Failed: error 111 at offset 3: unrecognized character after (? or (?- 912 913/a(?{{})b/ 914Failed: error 111 at offset 3: unrecognized character after (? or (?- 915 916/a(?{}})b/ 917Failed: error 111 at offset 3: unrecognized character after (? or (?- 918 919/a(?{"{"})b/ 920Failed: error 111 at offset 3: unrecognized character after (? or (?- 921 922/a(?{"{"}})b/ 923Failed: error 111 at offset 3: unrecognized character after (? or (?- 924 925/(?(1?)a|b)/ 926Failed: error 126 at offset 4: malformed number or name after (?( 927 928/[a[:xyz:/ 929Failed: error 106 at offset 8: missing terminating ] for character class 930 931/(?<=x+)y/ 932Failed: error 125 at offset 6: lookbehind assertion is not fixed length 933 934/a{37,17}/ 935Failed: error 104 at offset 7: numbers out of order in {} quantifier 936 937/abc/\ 938Failed: error 101 at offset 3: \ at end of pattern 939 940/abc/\i 941Failed: error 101 at offset 3: \ at end of pattern 942 943/(a)bc(d)/I 944Capturing subpattern count = 2 945First code unit = 'a' 946Last code unit = 'd' 947Subject length lower bound = 4 948 abcd 949 0: abcd 950 1: a 951 2: d 952 abcd\=copy=2 953 0: abcd 954 1: a 955 2: d 956 2C d (1) 957 abcd\=copy=5 958 0: abcd 959 1: a 960 2: d 961Copy substring 5 failed (-49): unknown substring 962 963/(.{20})/I 964Capturing subpattern count = 1 965Subject length lower bound = 20 966 abcdefghijklmnopqrstuvwxyz 967 0: abcdefghijklmnopqrst 968 1: abcdefghijklmnopqrst 969 abcdefghijklmnopqrstuvwxyz\=copy=1 970 0: abcdefghijklmnopqrst 971 1: abcdefghijklmnopqrst 972 1C abcdefghijklmnopqrst (20) 973 abcdefghijklmnopqrstuvwxyz\=get=1 974 0: abcdefghijklmnopqrst 975 1: abcdefghijklmnopqrst 976 1G abcdefghijklmnopqrst (20) 977 978/(.{15})/I 979Capturing subpattern count = 1 980Subject length lower bound = 15 981 abcdefghijklmnopqrstuvwxyz 982 0: abcdefghijklmno 983 1: abcdefghijklmno 984 abcdefghijklmnopqrstuvwxyz\=copy=1,get=1 985 0: abcdefghijklmno 986 1: abcdefghijklmno 987 1C abcdefghijklmno (15) 988 1G abcdefghijklmno (15) 989 990/(.{16})/I 991Capturing subpattern count = 1 992Subject length lower bound = 16 993 abcdefghijklmnopqrstuvwxyz 994 0: abcdefghijklmnop 995 1: abcdefghijklmnop 996 abcdefghijklmnopqrstuvwxyz\=copy=1,get=1,getall 997 0: abcdefghijklmnop 998 1: abcdefghijklmnop 999 1C abcdefghijklmnop (16) 1000 1G abcdefghijklmnop (16) 1001 0L abcdefghijklmnop 1002 1L abcdefghijklmnop 1003 1004/^(a|(bc))de(f)/I 1005Capturing subpattern count = 3 1006Compile options: <none> 1007Overall options: anchored 1008Subject length lower bound = 4 1009 adef\=get=1,get=2,get=3,get=4,getall 1010 0: adef 1011 1: a 1012 2: <unset> 1013 3: f 1014 1G a (1) 1015Get substring 2 failed (-55): requested value is not set 1016 3G f (1) 1017Get substring 4 failed (-49): unknown substring 1018 0L adef 1019 1L a 1020 2L 1021 3L f 1022 bcdef\=get=1,get=2,get=3,get=4,getall 1023 0: bcdef 1024 1: bc 1025 2: bc 1026 3: f 1027 1G bc (2) 1028 2G bc (2) 1029 3G f (1) 1030Get substring 4 failed (-49): unknown substring 1031 0L bcdef 1032 1L bc 1033 2L bc 1034 3L f 1035 adefghijk\=copy=0 1036 0: adef 1037 1: a 1038 2: <unset> 1039 3: f 1040 0C adef (4) 1041 1042/^abc\00def/I 1043Capturing subpattern count = 0 1044Compile options: <none> 1045Overall options: anchored 1046Subject length lower bound = 7 1047 abc\00def\=copy=0,getall 1048 0: abc\x00def 1049 0C abc\x00def (7) 1050 0L abc\x00def 1051 1052/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ 1053)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ 1054)?)?)?)?)?)?)?)?)?otherword/I 1055Capturing subpattern count = 8 1056Contains explicit CR or LF match 1057First code unit = 'w' 1058Last code unit = 'd' 1059Subject length lower bound = 14 1060 1061/.*X/IB 1062------------------------------------------------------------------ 1063 Bra 1064 Any* 1065 X 1066 Ket 1067 End 1068------------------------------------------------------------------ 1069Capturing subpattern count = 0 1070First code unit at start or follows newline 1071Last code unit = 'X' 1072Subject length lower bound = 1 1073 1074/.*X/IBs 1075------------------------------------------------------------------ 1076 Bra 1077 AllAny* 1078 X 1079 Ket 1080 End 1081------------------------------------------------------------------ 1082Capturing subpattern count = 0 1083Compile options: dotall 1084Overall options: anchored dotall 1085Last code unit = 'X' 1086Subject length lower bound = 1 1087 1088/(.*X|^B)/IB 1089------------------------------------------------------------------ 1090 Bra 1091 CBra 1 1092 Any* 1093 X 1094 Alt 1095 ^ 1096 B 1097 Ket 1098 Ket 1099 End 1100------------------------------------------------------------------ 1101Capturing subpattern count = 1 1102First code unit at start or follows newline 1103Subject length lower bound = 1 1104 1105/(.*X|^B)/IBs 1106------------------------------------------------------------------ 1107 Bra 1108 CBra 1 1109 AllAny* 1110 X 1111 Alt 1112 ^ 1113 B 1114 Ket 1115 Ket 1116 End 1117------------------------------------------------------------------ 1118Capturing subpattern count = 1 1119Compile options: dotall 1120Overall options: anchored dotall 1121Subject length lower bound = 1 1122 1123/(?s)(.*X|^B)/IB 1124------------------------------------------------------------------ 1125 Bra 1126 CBra 1 1127 AllAny* 1128 X 1129 Alt 1130 ^ 1131 B 1132 Ket 1133 Ket 1134 End 1135------------------------------------------------------------------ 1136Capturing subpattern count = 1 1137Compile options: <none> 1138Overall options: anchored 1139Subject length lower bound = 1 1140 1141/(?s:.*X|^B)/IB 1142------------------------------------------------------------------ 1143 Bra 1144 Bra 1145 AllAny* 1146 X 1147 Alt 1148 ^ 1149 B 1150 Ket 1151 Ket 1152 End 1153------------------------------------------------------------------ 1154Capturing subpattern count = 0 1155Compile options: <none> 1156Overall options: anchored 1157Subject length lower bound = 1 1158 1159/\Biss\B/I,aftertext 1160Capturing subpattern count = 0 1161Max lookbehind = 1 1162First code unit = 'i' 1163Last code unit = 's' 1164Subject length lower bound = 3 1165 Mississippi 1166 0: iss 1167 0+ issippi 1168 1169/iss/I,aftertext,altglobal 1170Capturing subpattern count = 0 1171First code unit = 'i' 1172Last code unit = 's' 1173Subject length lower bound = 3 1174 Mississippi 1175 0: iss 1176 0+ issippi 1177 0: iss 1178 0+ ippi 1179 1180/\Biss\B/I,aftertext,altglobal 1181Capturing subpattern count = 0 1182Max lookbehind = 1 1183First code unit = 'i' 1184Last code unit = 's' 1185Subject length lower bound = 3 1186 Mississippi 1187 0: iss 1188 0+ issippi 1189 1190/\Biss\B/Ig,aftertext 1191Capturing subpattern count = 0 1192Max lookbehind = 1 1193First code unit = 'i' 1194Last code unit = 's' 1195Subject length lower bound = 3 1196 Mississippi 1197 0: iss 1198 0+ issippi 1199 0: iss 1200 0+ ippi 1201\= Expect no match 1202 Mississippi\=anchored 1203No match 1204 1205/(?<=[Ms])iss/Ig,aftertext 1206Capturing subpattern count = 0 1207Max lookbehind = 1 1208First code unit = 'i' 1209Last code unit = 's' 1210Subject length lower bound = 3 1211 Mississippi 1212 0: iss 1213 0+ issippi 1214 0: iss 1215 0+ ippi 1216 1217/(?<=[Ms])iss/I,aftertext,altglobal 1218Capturing subpattern count = 0 1219Max lookbehind = 1 1220First code unit = 'i' 1221Last code unit = 's' 1222Subject length lower bound = 3 1223 Mississippi 1224 0: iss 1225 0+ issippi 1226 1227/^iss/Ig,aftertext 1228Capturing subpattern count = 0 1229Compile options: <none> 1230Overall options: anchored 1231Subject length lower bound = 3 1232 ississippi 1233 0: iss 1234 0+ issippi 1235 1236/.*iss/Ig,aftertext 1237Capturing subpattern count = 0 1238First code unit at start or follows newline 1239Last code unit = 's' 1240Subject length lower bound = 3 1241 abciss\nxyzisspqr 1242 0: abciss 1243 0+ \x0axyzisspqr 1244 0: xyziss 1245 0+ pqr 1246 1247/.i./Ig,aftertext 1248Capturing subpattern count = 0 1249Last code unit = 'i' 1250Subject length lower bound = 3 1251 Mississippi 1252 0: Mis 1253 0+ sissippi 1254 0: sis 1255 0+ sippi 1256 0: sip 1257 0+ pi 1258 Mississippi\=anchored 1259 0: Mis 1260 0+ sissippi 1261 0: sis 1262 0+ sippi 1263 0: sip 1264 0+ pi 1265 Missouri river 1266 0: Mis 1267 0+ souri river 1268 0: ri 1269 0+ river 1270 0: riv 1271 0+ er 1272 Missouri river\=anchored 1273 0: Mis 1274 0+ souri river 1275 1276/^.is/Ig,aftertext 1277Capturing subpattern count = 0 1278Compile options: <none> 1279Overall options: anchored 1280Subject length lower bound = 3 1281 Mississippi 1282 0: Mis 1283 0+ sissippi 1284 1285/^ab\n/Ig,aftertext 1286Capturing subpattern count = 0 1287Contains explicit CR or LF match 1288Compile options: <none> 1289Overall options: anchored 1290Subject length lower bound = 3 1291 ab\nab\ncd 1292 0: ab\x0a 1293 0+ ab\x0acd 1294 1295/^ab\n/Igm,aftertext 1296Capturing subpattern count = 0 1297Contains explicit CR or LF match 1298Options: multiline 1299First code unit at start or follows newline 1300Last code unit = \x0a 1301Subject length lower bound = 3 1302 ab\nab\ncd 1303 0: ab\x0a 1304 0+ ab\x0acd 1305 0: ab\x0a 1306 0+ cd 1307 1308/^/gm,newline=any 1309 a\rb\nc\r\nxyz\=aftertext 1310 0: 1311 0+ a\x0db\x0ac\x0d\x0axyz 1312 0: 1313 0+ b\x0ac\x0d\x0axyz 1314 0: 1315 0+ c\x0d\x0axyz 1316 0: 1317 0+ xyz 1318 1319/abc/I 1320Capturing subpattern count = 0 1321First code unit = 'a' 1322Last code unit = 'c' 1323Subject length lower bound = 3 1324 1325/abc|bac/I 1326Capturing subpattern count = 0 1327Starting code units: a b 1328Last code unit = 'c' 1329Subject length lower bound = 3 1330 1331/(abc|bac)/I 1332Capturing subpattern count = 1 1333Starting code units: a b 1334Last code unit = 'c' 1335Subject length lower bound = 3 1336 1337/(abc|(c|dc))/I 1338Capturing subpattern count = 2 1339Starting code units: a c d 1340Last code unit = 'c' 1341Subject length lower bound = 1 1342 1343/(abc|(d|de)c)/I 1344Capturing subpattern count = 2 1345Starting code units: a d 1346Last code unit = 'c' 1347Subject length lower bound = 2 1348 1349/a*/I 1350Capturing subpattern count = 0 1351May match empty string 1352Subject length lower bound = 0 1353 1354/a+/I 1355Capturing subpattern count = 0 1356First code unit = 'a' 1357Subject length lower bound = 1 1358 1359/(baa|a+)/I 1360Capturing subpattern count = 1 1361Starting code units: a b 1362Last code unit = 'a' 1363Subject length lower bound = 1 1364 1365/a{0,3}/I 1366Capturing subpattern count = 0 1367May match empty string 1368Subject length lower bound = 0 1369 1370/baa{3,}/I 1371Capturing subpattern count = 0 1372First code unit = 'b' 1373Last code unit = 'a' 1374Subject length lower bound = 5 1375 1376/"([^\\"]+|\\.)*"/I 1377Capturing subpattern count = 1 1378First code unit = '"' 1379Last code unit = '"' 1380Subject length lower bound = 2 1381 1382/(abc|ab[cd])/I 1383Capturing subpattern count = 1 1384First code unit = 'a' 1385Subject length lower bound = 3 1386 1387/(a|.)/I 1388Capturing subpattern count = 1 1389Subject length lower bound = 1 1390 1391/a|ba|\w/I 1392Capturing subpattern count = 0 1393Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P 1394 Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z 1395Subject length lower bound = 1 1396 1397/abc(?=pqr)/I 1398Capturing subpattern count = 0 1399First code unit = 'a' 1400Last code unit = 'r' 1401Subject length lower bound = 3 1402 1403/...(?<=abc)/I 1404Capturing subpattern count = 0 1405Max lookbehind = 3 1406Subject length lower bound = 3 1407 1408/abc(?!pqr)/I 1409Capturing subpattern count = 0 1410First code unit = 'a' 1411Last code unit = 'c' 1412Subject length lower bound = 3 1413 1414/ab./I 1415Capturing subpattern count = 0 1416First code unit = 'a' 1417Last code unit = 'b' 1418Subject length lower bound = 3 1419 1420/ab[xyz]/I 1421Capturing subpattern count = 0 1422First code unit = 'a' 1423Last code unit = 'b' 1424Subject length lower bound = 3 1425 1426/abc*/I 1427Capturing subpattern count = 0 1428First code unit = 'a' 1429Last code unit = 'b' 1430Subject length lower bound = 2 1431 1432/ab.c*/I 1433Capturing subpattern count = 0 1434First code unit = 'a' 1435Last code unit = 'b' 1436Subject length lower bound = 3 1437 1438/a.c*/I 1439Capturing subpattern count = 0 1440First code unit = 'a' 1441Subject length lower bound = 2 1442 1443/.c*/I 1444Capturing subpattern count = 0 1445Subject length lower bound = 1 1446 1447/ac*/I 1448Capturing subpattern count = 0 1449First code unit = 'a' 1450Subject length lower bound = 1 1451 1452/(a.c*|b.c*)/I 1453Capturing subpattern count = 1 1454Starting code units: a b 1455Subject length lower bound = 2 1456 1457/a.c*|aba/I 1458Capturing subpattern count = 0 1459First code unit = 'a' 1460Subject length lower bound = 2 1461 1462/.+a/I 1463Capturing subpattern count = 0 1464Last code unit = 'a' 1465Subject length lower bound = 2 1466 1467/(?=abcda)a.*/I 1468Capturing subpattern count = 0 1469First code unit = 'a' 1470Last code unit = 'a' 1471Subject length lower bound = 1 1472 1473/(?=a)a.*/I 1474Capturing subpattern count = 0 1475First code unit = 'a' 1476Subject length lower bound = 1 1477 1478/a(b)*/I 1479Capturing subpattern count = 1 1480First code unit = 'a' 1481Subject length lower bound = 1 1482 1483/a\d*/I 1484Capturing subpattern count = 0 1485First code unit = 'a' 1486Subject length lower bound = 1 1487 1488/ab\d*/I 1489Capturing subpattern count = 0 1490First code unit = 'a' 1491Last code unit = 'b' 1492Subject length lower bound = 2 1493 1494/a(\d)*/I 1495Capturing subpattern count = 1 1496First code unit = 'a' 1497Subject length lower bound = 1 1498 1499/abcde{0,0}/I 1500Capturing subpattern count = 0 1501First code unit = 'a' 1502Last code unit = 'd' 1503Subject length lower bound = 4 1504 1505/ab\d+/I 1506Capturing subpattern count = 0 1507First code unit = 'a' 1508Last code unit = 'b' 1509Subject length lower bound = 3 1510 1511/a(?(1)b)(.)/I 1512Capturing subpattern count = 1 1513Max back reference = 1 1514First code unit = 'a' 1515Subject length lower bound = 2 1516 1517/a(?(1)bag|big)(.)/I 1518Capturing subpattern count = 1 1519Max back reference = 1 1520First code unit = 'a' 1521Last code unit = 'g' 1522Subject length lower bound = 5 1523 1524/a(?(1)bag|big)*(.)/I 1525Capturing subpattern count = 1 1526Max back reference = 1 1527First code unit = 'a' 1528Subject length lower bound = 2 1529 1530/a(?(1)bag|big)+(.)/I 1531Capturing subpattern count = 1 1532Max back reference = 1 1533First code unit = 'a' 1534Last code unit = 'g' 1535Subject length lower bound = 5 1536 1537/a(?(1)b..|b..)(.)/I 1538Capturing subpattern count = 1 1539Max back reference = 1 1540First code unit = 'a' 1541Last code unit = 'b' 1542Subject length lower bound = 5 1543 1544/ab\d{0}e/I 1545Capturing subpattern count = 0 1546First code unit = 'a' 1547Last code unit = 'e' 1548Subject length lower bound = 3 1549 1550/a?b?/I 1551Capturing subpattern count = 0 1552May match empty string 1553Subject length lower bound = 0 1554 a 1555 0: a 1556 b 1557 0: b 1558 ab 1559 0: ab 1560 \ 1561 0: 1562\= Expect no match 1563 \=notempty 1564No match 1565 1566/|-/I 1567Capturing subpattern count = 0 1568May match empty string 1569Subject length lower bound = 0 1570 abcd 1571 0: 1572 -abc 1573 0: 1574 ab-c\=notempty 1575 0: - 1576\= Expect no match 1577 abc\=notempty 1578No match 1579 1580/^.?abcd/I 1581Capturing subpattern count = 0 1582Compile options: <none> 1583Overall options: anchored 1584Last code unit = 'd' 1585Subject length lower bound = 4 1586 1587/\( # ( at start 1588 (?: # Non-capturing bracket 1589 (?>[^()]+) # Either a sequence of non-brackets (no backtracking) 1590 | # Or 1591 (?R) # Recurse - i.e. nested bracketed string 1592 )* # Zero or more contents 1593 \) # Closing ) 1594 /Ix 1595Capturing subpattern count = 0 1596Options: extended 1597First code unit = '(' 1598Last code unit = ')' 1599Subject length lower bound = 2 1600 (abcd) 1601 0: (abcd) 1602 (abcd)xyz 1603 0: (abcd) 1604 xyz(abcd) 1605 0: (abcd) 1606 (ab(xy)cd)pqr 1607 0: (ab(xy)cd) 1608 (ab(xycd)pqr 1609 0: (xycd) 1610 () abc () 1611 0: () 1612 12(abcde(fsh)xyz(foo(bar))lmno)89 1613 0: (abcde(fsh)xyz(foo(bar))lmno) 1614\= Expect no match 1615 abcd 1616No match 1617 abcd) 1618No match 1619 (abcd 1620No match 1621 1622/\( ( (?>[^()]+) | (?R) )* \) /Igx 1623Capturing subpattern count = 1 1624Options: extended 1625First code unit = '(' 1626Last code unit = ')' 1627Subject length lower bound = 2 1628 (ab(xy)cd)pqr 1629 0: (ab(xy)cd) 1630 1: cd 1631 1(abcd)(x(y)z)pqr 1632 0: (abcd) 1633 1: abcd 1634 0: (x(y)z) 1635 1: z 1636 1637/\( (?: (?>[^()]+) | (?R) ) \) /Ix 1638Capturing subpattern count = 0 1639Options: extended 1640First code unit = '(' 1641Last code unit = ')' 1642Subject length lower bound = 3 1643 (abcd) 1644 0: (abcd) 1645 (ab(xy)cd) 1646 0: (xy) 1647 (a(b(c)d)e) 1648 0: (c) 1649 ((ab)) 1650 0: ((ab)) 1651\= Expect no match 1652 () 1653No match 1654 1655/\( (?: (?>[^()]+) | (?R) )? \) /Ix 1656Capturing subpattern count = 0 1657Options: extended 1658First code unit = '(' 1659Last code unit = ')' 1660Subject length lower bound = 2 1661 () 1662 0: () 1663 12(abcde(fsh)xyz(foo(bar))lmno)89 1664 0: (fsh) 1665 1666/\( ( (?>[^()]+) | (?R) )* \) /Ix 1667Capturing subpattern count = 1 1668Options: extended 1669First code unit = '(' 1670Last code unit = ')' 1671Subject length lower bound = 2 1672 (ab(xy)cd) 1673 0: (ab(xy)cd) 1674 1: cd 1675 1676/\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix 1677Capturing subpattern count = 2 1678Options: extended 1679First code unit = '(' 1680Last code unit = ')' 1681Subject length lower bound = 2 1682 (ab(xy)cd) 1683 0: (ab(xy)cd) 1684 1: ab(xy)cd 1685 2: cd 1686 1687/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix 1688Capturing subpattern count = 3 1689Options: extended 1690First code unit = '(' 1691Last code unit = ')' 1692Subject length lower bound = 2 1693 (ab(xy)cd) 1694 0: (ab(xy)cd) 1695 1: <unset> 1696 2: ab(xy)cd 1697 3: cd 1698 (123ab(xy)cd) 1699 0: (123ab(xy)cd) 1700 1: 123 1701 2: ab(xy)cd 1702 3: cd 1703 1704/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix 1705Capturing subpattern count = 3 1706Options: extended 1707First code unit = '(' 1708Last code unit = ')' 1709Subject length lower bound = 2 1710 (ab(xy)cd) 1711 0: (ab(xy)cd) 1712 1: ab(xy)cd 1713 2: <unset> 1714 3: cd 1715 (123ab(xy)cd) 1716 0: (123ab(xy)cd) 1717 1: 123ab(xy)cd 1718 2: 123 1719 3: cd 1720 1721/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix 1722Capturing subpattern count = 11 1723Options: extended 1724First code unit = '(' 1725Last code unit = ')' 1726Subject length lower bound = 2 1727 (ab(xy)cd) 1728 0: (ab(xy)cd) 1729 1: ab(xy)cd 1730 2: ab(xy)cd 1731 3: ab(xy)cd 1732 4: ab(xy)cd 1733 5: ab(xy)cd 1734 6: ab(xy)cd 1735 7: ab(xy)cd 1736 8: ab(xy)cd 1737 9: ab(xy)cd 173810: ab(xy)cd 173911: cd 1740 1741/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix 1742Capturing subpattern count = 3 1743Options: extended 1744First code unit = '(' 1745Last code unit = ')' 1746Subject length lower bound = 2 1747 (abcd(xyz<p>qrs)123) 1748 0: (abcd(xyz<p>qrs)123) 1749 1: abcd(xyz<p>qrs)123 1750 2: 123 1751 1752/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix 1753Capturing subpattern count = 3 1754Options: extended 1755First code unit = '(' 1756Last code unit = ')' 1757Subject length lower bound = 2 1758 (ab(cd)ef) 1759 0: (ab(cd)ef) 1760 1: ab(cd)ef 1761 2: ef 1762 3: (cd) 1763 (ab(cd(ef)gh)ij) 1764 0: (ab(cd(ef)gh)ij) 1765 1: ab(cd(ef)gh)ij 1766 2: ij 1767 3: (cd(ef)gh) 1768 1769/^[[:alnum:]]/IB 1770------------------------------------------------------------------ 1771 Bra 1772 ^ 1773 [0-9A-Za-z] 1774 Ket 1775 End 1776------------------------------------------------------------------ 1777Capturing subpattern count = 0 1778Compile options: <none> 1779Overall options: anchored 1780Subject length lower bound = 1 1781 1782/^[[:^alnum:]]/IB 1783------------------------------------------------------------------ 1784 Bra 1785 ^ 1786 [\x00-/:-@[-`{-\xff] (neg) 1787 Ket 1788 End 1789------------------------------------------------------------------ 1790Capturing subpattern count = 0 1791Compile options: <none> 1792Overall options: anchored 1793Subject length lower bound = 1 1794 1795/^[[:alpha:]]/IB 1796------------------------------------------------------------------ 1797 Bra 1798 ^ 1799 [A-Za-z] 1800 Ket 1801 End 1802------------------------------------------------------------------ 1803Capturing subpattern count = 0 1804Compile options: <none> 1805Overall options: anchored 1806Subject length lower bound = 1 1807 1808/^[[:^alpha:]]/IB 1809------------------------------------------------------------------ 1810 Bra 1811 ^ 1812 [\x00-@[-`{-\xff] (neg) 1813 Ket 1814 End 1815------------------------------------------------------------------ 1816Capturing subpattern count = 0 1817Compile options: <none> 1818Overall options: anchored 1819Subject length lower bound = 1 1820 1821/[_[:alpha:]]/I 1822Capturing subpattern count = 0 1823Starting code units: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1824 _ a b c d e f g h i j k l m n o p q r s t u v w x y z 1825Subject length lower bound = 1 1826 1827/^[[:ascii:]]/IB 1828------------------------------------------------------------------ 1829 Bra 1830 ^ 1831 [\x00-\x7f] 1832 Ket 1833 End 1834------------------------------------------------------------------ 1835Capturing subpattern count = 0 1836Compile options: <none> 1837Overall options: anchored 1838Subject length lower bound = 1 1839 1840/^[[:^ascii:]]/IB 1841------------------------------------------------------------------ 1842 Bra 1843 ^ 1844 [\x80-\xff] (neg) 1845 Ket 1846 End 1847------------------------------------------------------------------ 1848Capturing subpattern count = 0 1849Compile options: <none> 1850Overall options: anchored 1851Subject length lower bound = 1 1852 1853/^[[:blank:]]/IB 1854------------------------------------------------------------------ 1855 Bra 1856 ^ 1857 [\x09 ] 1858 Ket 1859 End 1860------------------------------------------------------------------ 1861Capturing subpattern count = 0 1862Compile options: <none> 1863Overall options: anchored 1864Subject length lower bound = 1 1865 1866/^[[:^blank:]]/IB 1867------------------------------------------------------------------ 1868 Bra 1869 ^ 1870 [\x00-\x08\x0a-\x1f!-\xff] (neg) 1871 Ket 1872 End 1873------------------------------------------------------------------ 1874Capturing subpattern count = 0 1875Compile options: <none> 1876Overall options: anchored 1877Subject length lower bound = 1 1878 1879/[\n\x0b\x0c\x0d[:blank:]]/I 1880Capturing subpattern count = 0 1881Contains explicit CR or LF match 1882Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 1883Subject length lower bound = 1 1884 1885/^[[:cntrl:]]/IB 1886------------------------------------------------------------------ 1887 Bra 1888 ^ 1889 [\x00-\x1f\x7f] 1890 Ket 1891 End 1892------------------------------------------------------------------ 1893Capturing subpattern count = 0 1894Compile options: <none> 1895Overall options: anchored 1896Subject length lower bound = 1 1897 1898/^[[:digit:]]/IB 1899------------------------------------------------------------------ 1900 Bra 1901 ^ 1902 [0-9] 1903 Ket 1904 End 1905------------------------------------------------------------------ 1906Capturing subpattern count = 0 1907Compile options: <none> 1908Overall options: anchored 1909Subject length lower bound = 1 1910 1911/^[[:graph:]]/IB 1912------------------------------------------------------------------ 1913 Bra 1914 ^ 1915 [!-~] 1916 Ket 1917 End 1918------------------------------------------------------------------ 1919Capturing subpattern count = 0 1920Compile options: <none> 1921Overall options: anchored 1922Subject length lower bound = 1 1923 1924/^[[:lower:]]/IB 1925------------------------------------------------------------------ 1926 Bra 1927 ^ 1928 [a-z] 1929 Ket 1930 End 1931------------------------------------------------------------------ 1932Capturing subpattern count = 0 1933Compile options: <none> 1934Overall options: anchored 1935Subject length lower bound = 1 1936 1937/^[[:print:]]/IB 1938------------------------------------------------------------------ 1939 Bra 1940 ^ 1941 [ -~] 1942 Ket 1943 End 1944------------------------------------------------------------------ 1945Capturing subpattern count = 0 1946Compile options: <none> 1947Overall options: anchored 1948Subject length lower bound = 1 1949 1950/^[[:punct:]]/IB 1951------------------------------------------------------------------ 1952 Bra 1953 ^ 1954 [!-/:-@[-`{-~] 1955 Ket 1956 End 1957------------------------------------------------------------------ 1958Capturing subpattern count = 0 1959Compile options: <none> 1960Overall options: anchored 1961Subject length lower bound = 1 1962 1963/^[[:space:]]/IB 1964------------------------------------------------------------------ 1965 Bra 1966 ^ 1967 [\x09-\x0d ] 1968 Ket 1969 End 1970------------------------------------------------------------------ 1971Capturing subpattern count = 0 1972Compile options: <none> 1973Overall options: anchored 1974Subject length lower bound = 1 1975 1976/^[[:upper:]]/IB 1977------------------------------------------------------------------ 1978 Bra 1979 ^ 1980 [A-Z] 1981 Ket 1982 End 1983------------------------------------------------------------------ 1984Capturing subpattern count = 0 1985Compile options: <none> 1986Overall options: anchored 1987Subject length lower bound = 1 1988 1989/^[[:xdigit:]]/IB 1990------------------------------------------------------------------ 1991 Bra 1992 ^ 1993 [0-9A-Fa-f] 1994 Ket 1995 End 1996------------------------------------------------------------------ 1997Capturing subpattern count = 0 1998Compile options: <none> 1999Overall options: anchored 2000Subject length lower bound = 1 2001 2002/^[[:word:]]/IB 2003------------------------------------------------------------------ 2004 Bra 2005 ^ 2006 [0-9A-Z_a-z] 2007 Ket 2008 End 2009------------------------------------------------------------------ 2010Capturing subpattern count = 0 2011Compile options: <none> 2012Overall options: anchored 2013Subject length lower bound = 1 2014 2015/^[[:^cntrl:]]/IB 2016------------------------------------------------------------------ 2017 Bra 2018 ^ 2019 [ -~\x80-\xff] (neg) 2020 Ket 2021 End 2022------------------------------------------------------------------ 2023Capturing subpattern count = 0 2024Compile options: <none> 2025Overall options: anchored 2026Subject length lower bound = 1 2027 2028/^[12[:^digit:]]/IB 2029------------------------------------------------------------------ 2030 Bra 2031 ^ 2032 [\x00-/12:-\xff] (neg) 2033 Ket 2034 End 2035------------------------------------------------------------------ 2036Capturing subpattern count = 0 2037Compile options: <none> 2038Overall options: anchored 2039Subject length lower bound = 1 2040 2041/^[[:^blank:]]/IB 2042------------------------------------------------------------------ 2043 Bra 2044 ^ 2045 [\x00-\x08\x0a-\x1f!-\xff] (neg) 2046 Ket 2047 End 2048------------------------------------------------------------------ 2049Capturing subpattern count = 0 2050Compile options: <none> 2051Overall options: anchored 2052Subject length lower bound = 1 2053 2054/[01[:alpha:]%]/IB 2055------------------------------------------------------------------ 2056 Bra 2057 [%01A-Za-z] 2058 Ket 2059 End 2060------------------------------------------------------------------ 2061Capturing subpattern count = 0 2062Starting code units: % 0 1 A B C D E F G H I J K L M N O P Q R S T U V W 2063 X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 2064Subject length lower bound = 1 2065 2066/[[.ch.]]/I 2067Failed: error 113 at offset 1: POSIX collating elements are not supported 2068 2069/[[=ch=]]/I 2070Failed: error 113 at offset 1: POSIX collating elements are not supported 2071 2072/[[:rhubarb:]]/I 2073Failed: error 130 at offset 3: unknown POSIX class name 2074 2075/[[:upper:]]/Ii 2076Capturing subpattern count = 0 2077Options: caseless 2078Starting code units: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 2079 a b c d e f g h i j k l m n o p q r s t u v w x y z 2080Subject length lower bound = 1 2081 A 2082 0: A 2083 a 2084 0: a 2085 2086/[[:lower:]]/Ii 2087Capturing subpattern count = 0 2088Options: caseless 2089Starting code units: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 2090 a b c d e f g h i j k l m n o p q r s t u v w x y z 2091Subject length lower bound = 1 2092 A 2093 0: A 2094 a 2095 0: a 2096 2097/((?-i)[[:lower:]])[[:lower:]]/Ii 2098Capturing subpattern count = 1 2099Options: caseless 2100Starting code units: a b c d e f g h i j k l m n o p q r s t u v w x y z 2101Subject length lower bound = 2 2102 ab 2103 0: ab 2104 1: a 2105 aB 2106 0: aB 2107 1: a 2108\= Expect no match 2109 Ab 2110No match 2111 AB 2112No match 2113 2114/[\200-\110]/I 2115Failed: error 108 at offset 9: range out of order in character class 2116 2117/^(?(0)f|b)oo/I 2118Failed: error 135 at offset 6: invalid condition (?(0) 2119 2120# This one's here because of the large output vector needed 2121 2122/(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/I 2123Capturing subpattern count = 271 2124Max back reference = 270 2125Starting code units: 0 1 2 3 4 5 6 7 8 9 2126Subject length lower bound = 272 2127 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC\=ovector=300 2128 0: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC 2129 1: 1 2130 2: 2 2131 3: 3 2132 4: 4 2133 5: 5 2134 6: 6 2135 7: 7 2136 8: 8 2137 9: 9 213810: 10 213911: 11 214012: 12 214113: 13 214214: 14 214315: 15 214416: 16 214517: 17 214618: 18 214719: 19 214820: 20 214921: 21 215022: 22 215123: 23 215224: 24 215325: 25 215426: 26 215527: 27 215628: 28 215729: 29 215830: 30 215931: 31 216032: 32 216133: 33 216234: 34 216335: 35 216436: 36 216537: 37 216638: 38 216739: 39 216840: 40 216941: 41 217042: 42 217143: 43 217244: 44 217345: 45 217446: 46 217547: 47 217648: 48 217749: 49 217850: 50 217951: 51 218052: 52 218153: 53 218254: 54 218355: 55 218456: 56 218557: 57 218658: 58 218759: 59 218860: 60 218961: 61 219062: 62 219163: 63 219264: 64 219365: 65 219466: 66 219567: 67 219668: 68 219769: 69 219870: 70 219971: 71 220072: 72 220173: 73 220274: 74 220375: 75 220476: 76 220577: 77 220678: 78 220779: 79 220880: 80 220981: 81 221082: 82 221183: 83 221284: 84 221385: 85 221486: 86 221587: 87 221688: 88 221789: 89 221890: 90 221991: 91 222092: 92 222193: 93 222294: 94 222395: 95 222496: 96 222597: 97 222698: 98 222799: 99 2228100: 100 2229101: 101 2230102: 102 2231103: 103 2232104: 104 2233105: 105 2234106: 106 2235107: 107 2236108: 108 2237109: 109 2238110: 110 2239111: 111 2240112: 112 2241113: 113 2242114: 114 2243115: 115 2244116: 116 2245117: 117 2246118: 118 2247119: 119 2248120: 120 2249121: 121 2250122: 122 2251123: 123 2252124: 124 2253125: 125 2254126: 126 2255127: 127 2256128: 128 2257129: 129 2258130: 130 2259131: 131 2260132: 132 2261133: 133 2262134: 134 2263135: 135 2264136: 136 2265137: 137 2266138: 138 2267139: 139 2268140: 140 2269141: 141 2270142: 142 2271143: 143 2272144: 144 2273145: 145 2274146: 146 2275147: 147 2276148: 148 2277149: 149 2278150: 150 2279151: 151 2280152: 152 2281153: 153 2282154: 154 2283155: 155 2284156: 156 2285157: 157 2286158: 158 2287159: 159 2288160: 160 2289161: 161 2290162: 162 2291163: 163 2292164: 164 2293165: 165 2294166: 166 2295167: 167 2296168: 168 2297169: 169 2298170: 170 2299171: 171 2300172: 172 2301173: 173 2302174: 174 2303175: 175 2304176: 176 2305177: 177 2306178: 178 2307179: 179 2308180: 180 2309181: 181 2310182: 182 2311183: 183 2312184: 184 2313185: 185 2314186: 186 2315187: 187 2316188: 188 2317189: 189 2318190: 190 2319191: 191 2320192: 192 2321193: 193 2322194: 194 2323195: 195 2324196: 196 2325197: 197 2326198: 198 2327199: 199 2328200: 200 2329201: 201 2330202: 202 2331203: 203 2332204: 204 2333205: 205 2334206: 206 2335207: 207 2336208: 208 2337209: 209 2338210: 210 2339211: 211 2340212: 212 2341213: 213 2342214: 214 2343215: 215 2344216: 216 2345217: 217 2346218: 218 2347219: 219 2348220: 220 2349221: 221 2350222: 222 2351223: 223 2352224: 224 2353225: 225 2354226: 226 2355227: 227 2356228: 228 2357229: 229 2358230: 230 2359231: 231 2360232: 232 2361233: 233 2362234: 234 2363235: 235 2364236: 236 2365237: 237 2366238: 238 2367239: 239 2368240: 240 2369241: 241 2370242: 242 2371243: 243 2372244: 244 2373245: 245 2374246: 246 2375247: 247 2376248: 248 2377249: 249 2378250: 250 2379251: 251 2380252: 252 2381253: 253 2382254: 254 2383255: 255 2384256: 256 2385257: 257 2386258: 258 2387259: 259 2388260: 260 2389261: 261 2390262: 262 2391263: 263 2392264: 264 2393265: 265 2394266: 266 2395267: 267 2396268: 268 2397269: 269 2398270: ABC 2399271: ABC 2400 2401# This one's here because Perl does this differently and PCRE2 can't at present 2402 2403/(main(O)?)+/I 2404Capturing subpattern count = 2 2405First code unit = 'm' 2406Last code unit = 'n' 2407Subject length lower bound = 4 2408 mainmain 2409 0: mainmain 2410 1: main 2411 mainOmain 2412 0: mainOmain 2413 1: main 2414 2: O 2415 2416# These are all cases where Perl does it differently (nested captures) 2417 2418/^(a(b)?)+$/I 2419Capturing subpattern count = 2 2420Compile options: <none> 2421Overall options: anchored 2422Subject length lower bound = 1 2423 aba 2424 0: aba 2425 1: a 2426 2: b 2427 2428/^(aa(bb)?)+$/I 2429Capturing subpattern count = 2 2430Compile options: <none> 2431Overall options: anchored 2432Subject length lower bound = 2 2433 aabbaa 2434 0: aabbaa 2435 1: aa 2436 2: bb 2437 2438/^(aa|aa(bb))+$/I 2439Capturing subpattern count = 2 2440Compile options: <none> 2441Overall options: anchored 2442Subject length lower bound = 2 2443 aabbaa 2444 0: aabbaa 2445 1: aa 2446 2: bb 2447 2448/^(aa(bb)??)+$/I 2449Capturing subpattern count = 2 2450Compile options: <none> 2451Overall options: anchored 2452Subject length lower bound = 2 2453 aabbaa 2454 0: aabbaa 2455 1: aa 2456 2: bb 2457 2458/^(?:aa(bb)?)+$/I 2459Capturing subpattern count = 1 2460Compile options: <none> 2461Overall options: anchored 2462Subject length lower bound = 2 2463 aabbaa 2464 0: aabbaa 2465 1: bb 2466 2467/^(aa(b(b))?)+$/I 2468Capturing subpattern count = 3 2469Compile options: <none> 2470Overall options: anchored 2471Subject length lower bound = 2 2472 aabbaa 2473 0: aabbaa 2474 1: aa 2475 2: bb 2476 3: b 2477 2478/^(?:aa(b(b))?)+$/I 2479Capturing subpattern count = 2 2480Compile options: <none> 2481Overall options: anchored 2482Subject length lower bound = 2 2483 aabbaa 2484 0: aabbaa 2485 1: bb 2486 2: b 2487 2488/^(?:aa(b(?:b))?)+$/I 2489Capturing subpattern count = 1 2490Compile options: <none> 2491Overall options: anchored 2492Subject length lower bound = 2 2493 aabbaa 2494 0: aabbaa 2495 1: bb 2496 2497/^(?:aa(bb(?:b))?)+$/I 2498Capturing subpattern count = 1 2499Compile options: <none> 2500Overall options: anchored 2501Subject length lower bound = 2 2502 aabbbaa 2503 0: aabbbaa 2504 1: bbb 2505 2506/^(?:aa(b(?:bb))?)+$/I 2507Capturing subpattern count = 1 2508Compile options: <none> 2509Overall options: anchored 2510Subject length lower bound = 2 2511 aabbbaa 2512 0: aabbbaa 2513 1: bbb 2514 2515/^(?:aa(?:b(b))?)+$/I 2516Capturing subpattern count = 1 2517Compile options: <none> 2518Overall options: anchored 2519Subject length lower bound = 2 2520 aabbaa 2521 0: aabbaa 2522 1: b 2523 2524/^(?:aa(?:b(bb))?)+$/I 2525Capturing subpattern count = 1 2526Compile options: <none> 2527Overall options: anchored 2528Subject length lower bound = 2 2529 aabbbaa 2530 0: aabbbaa 2531 1: bb 2532 2533/^(aa(b(bb))?)+$/I 2534Capturing subpattern count = 3 2535Compile options: <none> 2536Overall options: anchored 2537Subject length lower bound = 2 2538 aabbbaa 2539 0: aabbbaa 2540 1: aa 2541 2: bbb 2542 3: bb 2543 2544/^(aa(bb(bb))?)+$/I 2545Capturing subpattern count = 3 2546Compile options: <none> 2547Overall options: anchored 2548Subject length lower bound = 2 2549 aabbbbaa 2550 0: aabbbbaa 2551 1: aa 2552 2: bbbb 2553 3: bb 2554 2555# ---------------- 2556 2557/#/IBx 2558------------------------------------------------------------------ 2559 Bra 2560 Ket 2561 End 2562------------------------------------------------------------------ 2563Capturing subpattern count = 0 2564May match empty string 2565Options: extended 2566Subject length lower bound = 0 2567 2568/a#/IBx 2569------------------------------------------------------------------ 2570 Bra 2571 a 2572 Ket 2573 End 2574------------------------------------------------------------------ 2575Capturing subpattern count = 0 2576Options: extended 2577First code unit = 'a' 2578Subject length lower bound = 1 2579 2580/[\s]/IB 2581------------------------------------------------------------------ 2582 Bra 2583 [\x09-\x0d ] 2584 Ket 2585 End 2586------------------------------------------------------------------ 2587Capturing subpattern count = 0 2588Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 2589Subject length lower bound = 1 2590 2591/[\S]/IB 2592------------------------------------------------------------------ 2593 Bra 2594 [\x00-\x08\x0e-\x1f!-\xff] (neg) 2595 Ket 2596 End 2597------------------------------------------------------------------ 2598Capturing subpattern count = 0 2599Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0e \x0f 2600 \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \x1b \x1c \x1d \x1e 2601 \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C 2602 D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h 2603 i j k l m n o p q r s t u v w x y z { | } ~ \x7f \x80 \x81 \x82 \x83 \x84 2604 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92 \x93 2605 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1 \xa2 2606 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0 \xb1 2607 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf \xc0 2608 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf 2609 \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde 2610 \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed 2611 \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc 2612 \xfd \xfe \xff 2613Subject length lower bound = 1 2614 2615/a(?i)b/IB 2616------------------------------------------------------------------ 2617 Bra 2618 a 2619 /i b 2620 Ket 2621 End 2622------------------------------------------------------------------ 2623Capturing subpattern count = 0 2624First code unit = 'a' 2625Last code unit = 'b' (caseless) 2626Subject length lower bound = 2 2627 ab 2628 0: ab 2629 aB 2630 0: aB 2631\= Expect no match 2632 AB 2633No match 2634 2635/(a(?i)b)/IB 2636------------------------------------------------------------------ 2637 Bra 2638 CBra 1 2639 a 2640 /i b 2641 Ket 2642 Ket 2643 End 2644------------------------------------------------------------------ 2645Capturing subpattern count = 1 2646First code unit = 'a' 2647Last code unit = 'b' (caseless) 2648Subject length lower bound = 2 2649 ab 2650 0: ab 2651 1: ab 2652 aB 2653 0: aB 2654 1: aB 2655\= Expect no match 2656 AB 2657No match 2658 2659/ (?i)abc/IBx 2660------------------------------------------------------------------ 2661 Bra 2662 /i abc 2663 Ket 2664 End 2665------------------------------------------------------------------ 2666Capturing subpattern count = 0 2667Options: extended 2668First code unit = 'a' (caseless) 2669Last code unit = 'c' (caseless) 2670Subject length lower bound = 3 2671 2672/#this is a comment 2673 (?i)abc/IBx 2674------------------------------------------------------------------ 2675 Bra 2676 /i abc 2677 Ket 2678 End 2679------------------------------------------------------------------ 2680Capturing subpattern count = 0 2681Options: extended 2682First code unit = 'a' (caseless) 2683Last code unit = 'c' (caseless) 2684Subject length lower bound = 3 2685 2686/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/IB 2687------------------------------------------------------------------ 2688 Bra 2689 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 2690 Ket 2691 End 2692------------------------------------------------------------------ 2693Capturing subpattern count = 0 2694First code unit = '1' 2695Last code unit = '0' 2696Subject length lower bound = 300 2697 2698/\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/IB 2699------------------------------------------------------------------ 2700 Bra 2701 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 2702 Ket 2703 End 2704------------------------------------------------------------------ 2705Capturing subpattern count = 0 2706First code unit = '1' 2707Last code unit = '0' 2708Subject length lower bound = 300 2709 2710/\Q\E/IB 2711------------------------------------------------------------------ 2712 Bra 2713 Ket 2714 End 2715------------------------------------------------------------------ 2716Capturing subpattern count = 0 2717May match empty string 2718Subject length lower bound = 0 2719 \ 2720 0: 2721 2722/\Q\Ex/IB 2723------------------------------------------------------------------ 2724 Bra 2725 x 2726 Ket 2727 End 2728------------------------------------------------------------------ 2729Capturing subpattern count = 0 2730First code unit = 'x' 2731Subject length lower bound = 1 2732 2733/ \Q\E/IB 2734------------------------------------------------------------------ 2735 Bra 2736 2737 Ket 2738 End 2739------------------------------------------------------------------ 2740Capturing subpattern count = 0 2741First code unit = ' ' 2742Subject length lower bound = 1 2743 2744/a\Q\E/IB 2745------------------------------------------------------------------ 2746 Bra 2747 a 2748 Ket 2749 End 2750------------------------------------------------------------------ 2751Capturing subpattern count = 0 2752First code unit = 'a' 2753Subject length lower bound = 1 2754 abc 2755 0: a 2756 bca 2757 0: a 2758 bac 2759 0: a 2760 2761/a\Q\Eb/IB 2762------------------------------------------------------------------ 2763 Bra 2764 ab 2765 Ket 2766 End 2767------------------------------------------------------------------ 2768Capturing subpattern count = 0 2769First code unit = 'a' 2770Last code unit = 'b' 2771Subject length lower bound = 2 2772 abc 2773 0: ab 2774 2775/\Q\Eabc/IB 2776------------------------------------------------------------------ 2777 Bra 2778 abc 2779 Ket 2780 End 2781------------------------------------------------------------------ 2782Capturing subpattern count = 0 2783First code unit = 'a' 2784Last code unit = 'c' 2785Subject length lower bound = 3 2786 2787/x*+\w/IB 2788------------------------------------------------------------------ 2789 Bra 2790 x*+ 2791 \w 2792 Ket 2793 End 2794------------------------------------------------------------------ 2795Capturing subpattern count = 0 2796Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P 2797 Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z 2798Subject length lower bound = 1 2799\= Expect no match 2800 xxxxx 2801No match 2802 2803/x?+/IB 2804------------------------------------------------------------------ 2805 Bra 2806 x?+ 2807 Ket 2808 End 2809------------------------------------------------------------------ 2810Capturing subpattern count = 0 2811May match empty string 2812Subject length lower bound = 0 2813 2814/x++/IB 2815------------------------------------------------------------------ 2816 Bra 2817 x++ 2818 Ket 2819 End 2820------------------------------------------------------------------ 2821Capturing subpattern count = 0 2822First code unit = 'x' 2823Subject length lower bound = 1 2824 2825/x{1,3}+/B,no_auto_possess 2826------------------------------------------------------------------ 2827 Bra 2828 x 2829 x{0,2}+ 2830 Ket 2831 End 2832------------------------------------------------------------------ 2833 2834/x{1,3}+/Bi,no_auto_possess 2835------------------------------------------------------------------ 2836 Bra 2837 /i x 2838 /i x{0,2}+ 2839 Ket 2840 End 2841------------------------------------------------------------------ 2842 2843/[^x]{1,3}+/B,no_auto_possess 2844------------------------------------------------------------------ 2845 Bra 2846 [^x] 2847 [^x]{0,2}+ 2848 Ket 2849 End 2850------------------------------------------------------------------ 2851 2852/[^x]{1,3}+/Bi,no_auto_possess 2853------------------------------------------------------------------ 2854 Bra 2855 /i [^x] 2856 /i [^x]{0,2}+ 2857 Ket 2858 End 2859------------------------------------------------------------------ 2860 2861/(x)*+/IB 2862------------------------------------------------------------------ 2863 Bra 2864 Braposzero 2865 CBraPos 1 2866 x 2867 KetRpos 2868 Ket 2869 End 2870------------------------------------------------------------------ 2871Capturing subpattern count = 1 2872May match empty string 2873Subject length lower bound = 0 2874 2875/^(\w++|\s++)*$/I 2876Capturing subpattern count = 1 2877May match empty string 2878Compile options: <none> 2879Overall options: anchored 2880Subject length lower bound = 0 2881 now is the time for all good men to come to the aid of the party 2882 0: now is the time for all good men to come to the aid of the party 2883 1: party 2884\= Expect no match 2885 this is not a line with only words and spaces! 2886No match 2887 2888/(\d++)(\w)/I 2889Capturing subpattern count = 2 2890Starting code units: 0 1 2 3 4 5 6 7 8 9 2891Subject length lower bound = 2 2892 12345a 2893 0: 12345a 2894 1: 12345 2895 2: a 2896\= Expect no match 2897 12345+ 2898No match 2899 2900/a++b/I 2901Capturing subpattern count = 0 2902First code unit = 'a' 2903Last code unit = 'b' 2904Subject length lower bound = 2 2905 aaab 2906 0: aaab 2907 2908/(a++b)/I 2909Capturing subpattern count = 1 2910First code unit = 'a' 2911Last code unit = 'b' 2912Subject length lower bound = 2 2913 aaab 2914 0: aaab 2915 1: aaab 2916 2917/(a++)b/I 2918Capturing subpattern count = 1 2919First code unit = 'a' 2920Last code unit = 'b' 2921Subject length lower bound = 2 2922 aaab 2923 0: aaab 2924 1: aaa 2925 2926/([^()]++|\([^()]*\))+/I 2927Capturing subpattern count = 1 2928Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 2929 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 2930 \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( * + , - . / 0 1 2 3 4 5 2931 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 2932 [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f 2933 \x80 \x81 \x82 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e 2934 \x8f \x90 \x91 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d 2935 \x9e \x9f \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac 2936 \xad \xae \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb 2937 \xbc \xbd \xbe \xbf \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca 2938 \xcb \xcc \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 2939 \xda \xdb \xdc \xdd \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 2940 \xe9 \xea \xeb \xec \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 2941 \xf8 \xf9 \xfa \xfb \xfc \xfd \xfe \xff 2942Subject length lower bound = 1 2943 ((abc(ade)ufh()()x 2944 0: abc(ade)ufh()()x 2945 1: x 2946 2947/\(([^()]++|\([^()]+\))+\)/I 2948Capturing subpattern count = 1 2949First code unit = '(' 2950Last code unit = ')' 2951Subject length lower bound = 3 2952 (abc) 2953 0: (abc) 2954 1: abc 2955 (abc(def)xyz) 2956 0: (abc(def)xyz) 2957 1: xyz 2958\= Expect no match 2959 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2960No match 2961 2962/(abc){1,3}+/IB 2963------------------------------------------------------------------ 2964 Bra 2965 Once 2966 CBra 1 2967 abc 2968 Ket 2969 Brazero 2970 Bra 2971 CBra 1 2972 abc 2973 Ket 2974 Brazero 2975 CBra 1 2976 abc 2977 Ket 2978 Ket 2979 Ket 2980 Ket 2981 End 2982------------------------------------------------------------------ 2983Capturing subpattern count = 1 2984First code unit = 'a' 2985Last code unit = 'c' 2986Subject length lower bound = 3 2987 2988/a+?+/I 2989Failed: error 109 at offset 3: quantifier does not follow a repeatable item 2990 2991/a{2,3}?+b/I 2992Failed: error 109 at offset 7: quantifier does not follow a repeatable item 2993 2994/(?U)a+?+/I 2995Failed: error 109 at offset 7: quantifier does not follow a repeatable item 2996 2997/a{2,3}?+b/I,ungreedy 2998Failed: error 109 at offset 7: quantifier does not follow a repeatable item 2999 3000/x(?U)a++b/IB 3001------------------------------------------------------------------ 3002 Bra 3003 x 3004 a++ 3005 b 3006 Ket 3007 End 3008------------------------------------------------------------------ 3009Capturing subpattern count = 0 3010First code unit = 'x' 3011Last code unit = 'b' 3012Subject length lower bound = 3 3013 xaaaab 3014 0: xaaaab 3015 3016/(?U)xa++b/IB 3017------------------------------------------------------------------ 3018 Bra 3019 x 3020 a++ 3021 b 3022 Ket 3023 End 3024------------------------------------------------------------------ 3025Capturing subpattern count = 0 3026First code unit = 'x' 3027Last code unit = 'b' 3028Subject length lower bound = 3 3029 xaaaab 3030 0: xaaaab 3031 3032/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/IB 3033------------------------------------------------------------------ 3034 Bra 3035 ^ 3036 CBra 1 3037 CBra 2 3038 a+ 3039 Ket 3040 CBra 3 3041 [ab]+? 3042 Ket 3043 CBra 4 3044 [bc]+ 3045 Ket 3046 CBra 5 3047 \w*+ 3048 Ket 3049 Ket 3050 Ket 3051 End 3052------------------------------------------------------------------ 3053Capturing subpattern count = 5 3054Compile options: <none> 3055Overall options: anchored 3056Subject length lower bound = 3 3057 3058/^x(?U)a+b/IB 3059------------------------------------------------------------------ 3060 Bra 3061 ^ 3062 x 3063 a++ 3064 b 3065 Ket 3066 End 3067------------------------------------------------------------------ 3068Capturing subpattern count = 0 3069Compile options: <none> 3070Overall options: anchored 3071Last code unit = 'b' 3072Subject length lower bound = 3 3073 3074/^x(?U)(a+)b/IB 3075------------------------------------------------------------------ 3076 Bra 3077 ^ 3078 x 3079 CBra 1 3080 a+? 3081 Ket 3082 b 3083 Ket 3084 End 3085------------------------------------------------------------------ 3086Capturing subpattern count = 1 3087Compile options: <none> 3088Overall options: anchored 3089Last code unit = 'b' 3090Subject length lower bound = 3 3091 3092/[.x.]/I 3093Failed: error 113 at offset 0: POSIX collating elements are not supported 3094 3095/[=x=]/I 3096Failed: error 113 at offset 0: POSIX collating elements are not supported 3097 3098/[:x:]/I 3099Failed: error 112 at offset 0: POSIX named classes are supported only within a class 3100 3101/\l/I 3102Failed: error 137 at offset 1: PCRE does not support \L, \l, \N{name}, \U, or \u 3103 3104/\L/I 3105Failed: error 137 at offset 1: PCRE does not support \L, \l, \N{name}, \U, or \u 3106 3107/\N{name}/I 3108Failed: error 137 at offset 1: PCRE does not support \L, \l, \N{name}, \U, or \u 3109 3110/\u/I 3111Failed: error 137 at offset 1: PCRE does not support \L, \l, \N{name}, \U, or \u 3112 3113/\U/I 3114Failed: error 137 at offset 1: PCRE does not support \L, \l, \N{name}, \U, or \u 3115 3116/a{1,3}b/ungreedy 3117 ab 3118 0: ab 3119 3120/[/I 3121Failed: error 106 at offset 1: missing terminating ] for character class 3122 3123/[a-/I 3124Failed: error 106 at offset 3: missing terminating ] for character class 3125 3126/[[:space:]/I 3127Failed: error 106 at offset 10: missing terminating ] for character class 3128 3129/[\s]/IB 3130------------------------------------------------------------------ 3131 Bra 3132 [\x09-\x0d ] 3133 Ket 3134 End 3135------------------------------------------------------------------ 3136Capturing subpattern count = 0 3137Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 3138Subject length lower bound = 1 3139 3140/[[:space:]]/IB 3141------------------------------------------------------------------ 3142 Bra 3143 [\x09-\x0d ] 3144 Ket 3145 End 3146------------------------------------------------------------------ 3147Capturing subpattern count = 0 3148Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 3149Subject length lower bound = 1 3150 3151/[[:space:]abcde]/IB 3152------------------------------------------------------------------ 3153 Bra 3154 [\x09-\x0d a-e] 3155 Ket 3156 End 3157------------------------------------------------------------------ 3158Capturing subpattern count = 0 3159Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 a b c d e 3160Subject length lower bound = 1 3161 3162/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix 3163Capturing subpattern count = 0 3164Options: extended 3165First code unit = '<' 3166Last code unit = '>' 3167Subject length lower bound = 2 3168 <> 3169 0: <> 3170 <abcd> 3171 0: <abcd> 3172 <abc <123> hij> 3173 0: <abc <123> hij> 3174 <abc <def> hij> 3175 0: <def> 3176 <abc<>def> 3177 0: <abc<>def> 3178 <abc<> 3179 0: <> 3180\= Expect no match 3181 <abc 3182No match 3183 3184/8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b/IB 3185------------------------------------------------------------------ 3186 Bra 3187 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X 3188 \b 3189 Ket 3190 End 3191------------------------------------------------------------------ 3192Capturing subpattern count = 0 3193Max lookbehind = 1 3194First code unit = '8' 3195Last code unit = 'X' 3196Subject length lower bound = 409 3197 3198/\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b/IB 3199------------------------------------------------------------------ 3200 Bra 3201 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X 3202 \b 3203 Ket 3204 End 3205------------------------------------------------------------------ 3206Capturing subpattern count = 0 3207Max lookbehind = 1 3208First code unit = '$' 3209Last code unit = 'X' 3210Subject length lower bound = 404 3211 3212/(.*)\d+\1/I 3213Capturing subpattern count = 1 3214Max back reference = 1 3215Subject length lower bound = 1 3216 3217/(.*)\d+/I 3218Capturing subpattern count = 1 3219First code unit at start or follows newline 3220Subject length lower bound = 1 3221 3222/(.*)\d+\1/Is 3223Capturing subpattern count = 1 3224Max back reference = 1 3225Options: dotall 3226Subject length lower bound = 1 3227 3228/(.*)\d+/Is 3229Capturing subpattern count = 1 3230Compile options: dotall 3231Overall options: anchored dotall 3232Subject length lower bound = 1 3233 3234/(.*(xyz))\d+\2/I 3235Capturing subpattern count = 2 3236Max back reference = 2 3237First code unit at start or follows newline 3238Last code unit = 'z' 3239Subject length lower bound = 7 3240 3241/((.*))\d+\1/I 3242Capturing subpattern count = 2 3243Max back reference = 1 3244Subject length lower bound = 1 3245 abc123bc 3246 0: bc123bc 3247 1: bc 3248 2: bc 3249 3250/a[b]/I 3251Capturing subpattern count = 0 3252First code unit = 'a' 3253Last code unit = 'b' 3254Subject length lower bound = 2 3255 3256/(?=a).*/I 3257Capturing subpattern count = 0 3258May match empty string 3259First code unit = 'a' 3260Subject length lower bound = 0 3261 3262/(?=abc).xyz/Ii 3263Capturing subpattern count = 0 3264Options: caseless 3265First code unit = 'a' (caseless) 3266Last code unit = 'z' (caseless) 3267Subject length lower bound = 4 3268 3269/(?=abc)(?i).xyz/I 3270Capturing subpattern count = 0 3271First code unit = 'a' 3272Last code unit = 'z' (caseless) 3273Subject length lower bound = 4 3274 3275/(?=a)(?=b)/I 3276Capturing subpattern count = 0 3277May match empty string 3278First code unit = 'a' 3279Subject length lower bound = 0 3280 3281/(?=.)a/I 3282Capturing subpattern count = 0 3283First code unit = 'a' 3284Subject length lower bound = 1 3285 3286/((?=abcda)a)/I 3287Capturing subpattern count = 1 3288First code unit = 'a' 3289Last code unit = 'a' 3290Subject length lower bound = 1 3291 3292/((?=abcda)ab)/I 3293Capturing subpattern count = 1 3294First code unit = 'a' 3295Last code unit = 'b' 3296Subject length lower bound = 2 3297 3298/()a/I 3299Capturing subpattern count = 1 3300First code unit = 'a' 3301Subject length lower bound = 1 3302 3303/(?:(?=.)|(?<!x))a/I 3304Capturing subpattern count = 0 3305Max lookbehind = 1 3306First code unit = 'a' 3307Subject length lower bound = 1 3308 3309/(?(1)ab|ac)(.)/I 3310Capturing subpattern count = 1 3311Max back reference = 1 3312First code unit = 'a' 3313Subject length lower bound = 3 3314 3315/(?(1)abz|acz)(.)/I 3316Capturing subpattern count = 1 3317Max back reference = 1 3318First code unit = 'a' 3319Last code unit = 'z' 3320Subject length lower bound = 4 3321 3322/(?(1)abz)(.)/I 3323Capturing subpattern count = 1 3324Max back reference = 1 3325Subject length lower bound = 1 3326 3327/(?(1)abz)(1)23/I 3328Capturing subpattern count = 1 3329Max back reference = 1 3330Last code unit = '3' 3331Subject length lower bound = 3 3332 3333/(a)+/I 3334Capturing subpattern count = 1 3335First code unit = 'a' 3336Subject length lower bound = 1 3337 3338/(a){2,3}/I 3339Capturing subpattern count = 1 3340First code unit = 'a' 3341Last code unit = 'a' 3342Subject length lower bound = 2 3343 3344/(a)*/I 3345Capturing subpattern count = 1 3346May match empty string 3347Subject length lower bound = 0 3348 3349/[a]/I 3350Capturing subpattern count = 0 3351First code unit = 'a' 3352Subject length lower bound = 1 3353 3354/[ab]/I 3355Capturing subpattern count = 0 3356Starting code units: a b 3357Subject length lower bound = 1 3358 3359/[ab]/I 3360Capturing subpattern count = 0 3361Starting code units: a b 3362Subject length lower bound = 1 3363 3364/[^a]/I 3365Capturing subpattern count = 0 3366Subject length lower bound = 1 3367 3368/\d456/I 3369Capturing subpattern count = 0 3370Starting code units: 0 1 2 3 4 5 6 7 8 9 3371Last code unit = '6' 3372Subject length lower bound = 4 3373 3374/\d456/I 3375Capturing subpattern count = 0 3376Starting code units: 0 1 2 3 4 5 6 7 8 9 3377Last code unit = '6' 3378Subject length lower bound = 4 3379 3380/a^b/I 3381Capturing subpattern count = 0 3382First code unit = 'a' 3383Last code unit = 'b' 3384Subject length lower bound = 2 3385 3386/^a/Im 3387Capturing subpattern count = 0 3388Options: multiline 3389First code unit at start or follows newline 3390Last code unit = 'a' 3391Subject length lower bound = 1 3392 abcde 3393 0: a 3394 xy\nabc 3395 0: a 3396\= Expect no match 3397 xyabc 3398No match 3399 3400/c|abc/I 3401Capturing subpattern count = 0 3402Starting code units: a c 3403Last code unit = 'c' 3404Subject length lower bound = 1 3405 3406/(?i)[ab]/I 3407Capturing subpattern count = 0 3408Starting code units: A B a b 3409Subject length lower bound = 1 3410 3411/[ab](?i)cd/I 3412Capturing subpattern count = 0 3413Starting code units: a b 3414Last code unit = 'd' (caseless) 3415Subject length lower bound = 3 3416 3417/abc(?C)def/I 3418Capturing subpattern count = 0 3419First code unit = 'a' 3420Last code unit = 'f' 3421Subject length lower bound = 6 3422 abcdef 3423--->abcdef 3424 0 ^ ^ d 3425 0: abcdef 3426 1234abcdef 3427--->1234abcdef 3428 0 ^ ^ d 3429 0: abcdef 3430\= Expect no match 3431 abcxyz 3432No match 3433 abcxyzf 3434--->abcxyzf 3435 0 ^ ^ d 3436No match 3437 3438/abc(?C)de(?C1)f/I 3439Capturing subpattern count = 0 3440First code unit = 'a' 3441Last code unit = 'f' 3442Subject length lower bound = 6 3443 123abcdef 3444--->123abcdef 3445 0 ^ ^ d 3446 1 ^ ^ f 3447 0: abcdef 3448 3449/(?C1)\dabc(?C2)def/I 3450Capturing subpattern count = 0 3451Starting code units: 0 1 2 3 4 5 6 7 8 9 3452Last code unit = 'f' 3453Subject length lower bound = 7 3454 1234abcdef 3455--->1234abcdef 3456 1 ^ \d 3457 1 ^ \d 3458 1 ^ \d 3459 1 ^ \d 3460 2 ^ ^ d 3461 0: 4abcdef 3462\= Expect no match 3463 abcdef 3464No match 3465 3466/(?C1)\dabc(?C2)def/I 3467Capturing subpattern count = 0 3468Starting code units: 0 1 2 3 4 5 6 7 8 9 3469Last code unit = 'f' 3470Subject length lower bound = 7 3471 1234abcdef 3472--->1234abcdef 3473 1 ^ \d 3474 1 ^ \d 3475 1 ^ \d 3476 1 ^ \d 3477 2 ^ ^ d 3478 0: 4abcdef 3479\= Expect no match 3480 abcdef 3481No match 3482 3483/(?C255)ab/I 3484Capturing subpattern count = 0 3485First code unit = 'a' 3486Last code unit = 'b' 3487Subject length lower bound = 2 3488 3489/(?C256)ab/I 3490Failed: error 138 at offset 6: number after (?C is greater than 255 3491 3492/(?Cab)xx/I 3493Failed: error 182 at offset 3: unrecognized string delimiter follows (?C 3494 3495/(?C12vr)x/I 3496Failed: error 139 at offset 5: closing parenthesis for (?C expected 3497 3498/abc(?C)def/I 3499Capturing subpattern count = 0 3500First code unit = 'a' 3501Last code unit = 'f' 3502Subject length lower bound = 6 3503 \x83\x0\x61bcdef 3504--->\x83\x00abcdef 3505 0 ^ ^ d 3506 0: abcdef 3507 3508/(abc)(?C)de(?C1)f/I 3509Capturing subpattern count = 1 3510First code unit = 'a' 3511Last code unit = 'f' 3512Subject length lower bound = 6 3513 123abcdef 3514--->123abcdef 3515 0 ^ ^ d 3516 1 ^ ^ f 3517 0: abcdef 3518 1: abc 3519 123abcdef\=callout_capture 3520Callout 0: last capture = 1 3521 0: <unset> 3522 1: abc 3523--->123abcdef 3524 ^ ^ d 3525Callout 1: last capture = 1 3526 0: <unset> 3527 1: abc 3528--->123abcdef 3529 ^ ^ f 3530 0: abcdef 3531 1: abc 3532 123abcdefC-\=callout_none 3533 0: abcdef 3534 1: abc 3535\= Expect no match 3536 123abcdef\=callout_fail=1 3537--->123abcdef 3538 0 ^ ^ d 3539 1 ^ ^ f 3540No match 3541 3542/(?C0)(abc(?C1))*/I 3543Capturing subpattern count = 1 3544May match empty string 3545Subject length lower bound = 0 3546 abcabcabc 3547--->abcabcabc 3548 0 ^ (abc(?C1))* 3549 1 ^ ^ ) 3550 1 ^ ^ ) 3551 1 ^ ^ ) 3552 0: abcabcabc 3553 1: abc 3554 abcabc\=callout_fail=1:3 3555--->abcabc 3556 0 ^ (abc(?C1))* 3557 1 ^ ^ ) 3558 1 ^ ^ ) 3559 0: abcabc 3560 1: abc 3561 abcabcabc\=callout_fail=1:3 3562--->abcabcabc 3563 0 ^ (abc(?C1))* 3564 1 ^ ^ ) 3565 1 ^ ^ ) 3566 1 ^ ^ ) 3567 0: abcabc 3568 1: abc 3569 3570/(\d{3}(?C))*/I 3571Capturing subpattern count = 1 3572May match empty string 3573Subject length lower bound = 0 3574 123\=callout_capture 3575Callout 0: last capture = 0 3576 0: <unset> 3577--->123 3578 ^ ^ ) 3579 0: 123 3580 1: 123 3581 123456\=callout_capture 3582Callout 0: last capture = 0 3583 0: <unset> 3584--->123456 3585 ^ ^ ) 3586Callout 0: last capture = 1 3587 0: <unset> 3588 1: 123 3589--->123456 3590 ^ ^ ) 3591 0: 123456 3592 1: 456 3593 123456789\=callout_capture 3594Callout 0: last capture = 0 3595 0: <unset> 3596--->123456789 3597 ^ ^ ) 3598Callout 0: last capture = 1 3599 0: <unset> 3600 1: 123 3601--->123456789 3602 ^ ^ ) 3603Callout 0: last capture = 1 3604 0: <unset> 3605 1: 456 3606--->123456789 3607 ^ ^ ) 3608 0: 123456789 3609 1: 789 3610 3611/((xyz)(?C)p|(?C1)xyzabc)/I 3612Capturing subpattern count = 2 3613First code unit = 'x' 3614Subject length lower bound = 4 3615 xyzabc\=callout_capture 3616Callout 0: last capture = 2 3617 0: <unset> 3618 1: <unset> 3619 2: xyz 3620--->xyzabc 3621 ^ ^ p 3622Callout 1: last capture = 0 3623 0: <unset> 3624--->xyzabc 3625 ^ x 3626 0: xyzabc 3627 1: xyzabc 3628 3629/(X)((xyz)(?C)p|(?C1)xyzabc)/I 3630Capturing subpattern count = 3 3631First code unit = 'X' 3632Last code unit = 'x' 3633Subject length lower bound = 5 3634 Xxyzabc\=callout_capture 3635Callout 0: last capture = 3 3636 0: <unset> 3637 1: X 3638 2: <unset> 3639 3: xyz 3640--->Xxyzabc 3641 ^ ^ p 3642Callout 1: last capture = 1 3643 0: <unset> 3644 1: X 3645--->Xxyzabc 3646 ^^ x 3647 0: Xxyzabc 3648 1: X 3649 2: xyzabc 3650 3651/(?=(abc))(?C)abcdef/I 3652Capturing subpattern count = 1 3653First code unit = 'a' 3654Last code unit = 'f' 3655Subject length lower bound = 6 3656 abcdef\=callout_capture 3657Callout 0: last capture = 1 3658 0: <unset> 3659 1: abc 3660--->abcdef 3661 ^ a 3662 0: abcdef 3663 1: abc 3664 3665/(?!(abc)(?C1)d)(?C2)abcxyz/I 3666Capturing subpattern count = 1 3667First code unit = 'a' 3668Last code unit = 'z' 3669Subject length lower bound = 6 3670 abcxyz\=callout_capture 3671Callout 1: last capture = 1 3672 0: <unset> 3673 1: abc 3674--->abcxyz 3675 ^ ^ d 3676Callout 2: last capture = 0 3677 0: <unset> 3678--->abcxyz 3679 ^ a 3680 0: abcxyz 3681 3682/(?<=(abc)(?C))xyz/I 3683Capturing subpattern count = 1 3684Max lookbehind = 3 3685First code unit = 'x' 3686Last code unit = 'z' 3687Subject length lower bound = 3 3688 abcxyz\=callout_capture 3689Callout 0: last capture = 1 3690 0: <unset> 3691 1: abc 3692--->abcxyz 3693 ^ ) 3694 0: xyz 3695 1: abc 3696 3697/a(b+)(c*)(?C1)/I 3698Capturing subpattern count = 2 3699First code unit = 'a' 3700Last code unit = 'b' 3701Subject length lower bound = 2 3702\= Expect no match 3703 abbbbbccc\=callout_data=1 3704--->abbbbbccc 3705 1 ^ ^ 3706Callout data = 1 3707No match 3708 3709/a(b+?)(c*?)(?C1)/I 3710Capturing subpattern count = 2 3711First code unit = 'a' 3712Last code unit = 'b' 3713Subject length lower bound = 2 3714\= Expect no match 3715 abbbbbccc\=callout_data=1 3716--->abbbbbccc 3717 1 ^ ^ 3718Callout data = 1 3719 1 ^ ^ 3720Callout data = 1 3721 1 ^ ^ 3722Callout data = 1 3723 1 ^ ^ 3724Callout data = 1 3725 1 ^ ^ 3726Callout data = 1 3727 1 ^ ^ 3728Callout data = 1 3729 1 ^ ^ 3730Callout data = 1 3731 1 ^ ^ 3732Callout data = 1 3733No match 3734 3735/(?C)abc/I 3736Capturing subpattern count = 0 3737First code unit = 'a' 3738Last code unit = 'c' 3739Subject length lower bound = 3 3740 3741/(?C)^abc/I 3742Capturing subpattern count = 0 3743Compile options: <none> 3744Overall options: anchored 3745Subject length lower bound = 3 3746 3747/(?C)a|b/I 3748Capturing subpattern count = 0 3749Starting code units: a b 3750Subject length lower bound = 1 3751 3752/x(ab|(bc|(de|(?R))))/I 3753Capturing subpattern count = 3 3754First code unit = 'x' 3755Subject length lower bound = 3 3756 xab 3757 0: xab 3758 1: ab 3759 xbc 3760 0: xbc 3761 1: bc 3762 2: bc 3763 xde 3764 0: xde 3765 1: de 3766 2: de 3767 3: de 3768 xxab 3769 0: xxab 3770 1: xab 3771 2: xab 3772 3: xab 3773 xxxab 3774 0: xxxab 3775 1: xxab 3776 2: xxab 3777 3: xxab 3778\= Expect no match 3779 xyab 3780No match 3781 3782/^([^()]|\((?1)*\))*$/I 3783Capturing subpattern count = 1 3784May match empty string 3785Compile options: <none> 3786Overall options: anchored 3787Subject length lower bound = 0 3788 abc 3789 0: abc 3790 1: c 3791 a(b)c 3792 0: a(b)c 3793 1: c 3794 a(b(c))d 3795 0: a(b(c))d 3796 1: d 3797\= Expect no match) 3798 a(b(c)d 3799No match 3800 3801/^>abc>([^()]|\((?1)*\))*<xyz<$/I 3802Capturing subpattern count = 1 3803Compile options: <none> 3804Overall options: anchored 3805Last code unit = '<' 3806Subject length lower bound = 10 3807 >abc>123<xyz< 3808 0: >abc>123<xyz< 3809 1: 3 3810 >abc>1(2)3<xyz< 3811 0: >abc>1(2)3<xyz< 3812 1: 3 3813 >abc>(1(2)3)<xyz< 3814 0: >abc>(1(2)3)<xyz< 3815 1: (1(2)3) 3816 3817/(a(?1)b)/IB 3818------------------------------------------------------------------ 3819 Bra 3820 CBra 1 3821 a 3822 Recurse 3823 b 3824 Ket 3825 Ket 3826 End 3827------------------------------------------------------------------ 3828Capturing subpattern count = 1 3829First code unit = 'a' 3830Last code unit = 'b' 3831Subject length lower bound = 2 3832 3833/(a(?1)+b)/IB 3834------------------------------------------------------------------ 3835 Bra 3836 CBra 1 3837 a 3838 Once 3839 Recurse 3840 KetRmax 3841 b 3842 Ket 3843 Ket 3844 End 3845------------------------------------------------------------------ 3846Capturing subpattern count = 1 3847First code unit = 'a' 3848Last code unit = 'b' 3849Subject length lower bound = 2 3850 3851/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I 3852Capturing subpattern count = 2 3853Compile options: <none> 3854Overall options: anchored 3855Subject length lower bound = 1 3856 12 3857 0: 12 3858 1: 12 3859 (((2+2)*-3)-7) 3860 0: (((2+2)*-3)-7) 3861 1: (((2+2)*-3)-7) 3862 2: - 3863 -12 3864 0: -12 3865 1: -12 3866\= Expect no match 3867 ((2+2)*-3)-7) 3868No match 3869 3870/^(x(y|(?1){2})z)/I 3871Capturing subpattern count = 2 3872Compile options: <none> 3873Overall options: anchored 3874Subject length lower bound = 3 3875 xyz 3876 0: xyz 3877 1: xyz 3878 2: y 3879 xxyzxyzz 3880 0: xxyzxyzz 3881 1: xxyzxyzz 3882 2: xyzxyz 3883\= Expect no match 3884 xxyzz 3885No match 3886 xxyzxyzxyzz 3887No match 3888 3889/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix 3890Capturing subpattern count = 2 3891Options: extended 3892First code unit = '<' 3893Last code unit = '>' 3894Subject length lower bound = 2 3895 <> 3896 0: <> 3897 1: <> 3898 2: <> 3899 <abcd> 3900 0: <abcd> 3901 1: <abcd> 3902 2: <abcd> 3903 <abc <123> hij> 3904 0: <abc <123> hij> 3905 1: <abc <123> hij> 3906 2: <abc <123> hij> 3907 <abc <def> hij> 3908 0: <def> 3909 1: <def> 3910 2: <def> 3911 <abc<>def> 3912 0: <abc<>def> 3913 1: <abc<>def> 3914 2: <abc<>def> 3915 <abc<> 3916 0: <> 3917 1: <> 3918 2: <> 3919\= Expect no match 3920 <abc 3921No match 3922 3923/(?1)/I 3924Failed: error 115 at offset 3: reference to non-existent subpattern 3925 3926/((?2)(abc)/I 3927Failed: error 114 at offset 10: missing closing parenthesis 3928 3929/^(abc)def(?1)/I 3930Capturing subpattern count = 1 3931Compile options: <none> 3932Overall options: anchored 3933Subject length lower bound = 9 3934 abcdefabc 3935 0: abcdefabc 3936 1: abc 3937 3938/^(a|b|c)=(?1)+/I 3939Capturing subpattern count = 1 3940Compile options: <none> 3941Overall options: anchored 3942Subject length lower bound = 3 3943 a=a 3944 0: a=a 3945 1: a 3946 a=b 3947 0: a=b 3948 1: a 3949 a=bc 3950 0: a=bc 3951 1: a 3952 3953/^(a|b|c)=((?1))+/I 3954Capturing subpattern count = 2 3955Compile options: <none> 3956Overall options: anchored 3957Subject length lower bound = 2 3958 a=a 3959 0: a=a 3960 1: a 3961 2: a 3962 a=b 3963 0: a=b 3964 1: a 3965 2: b 3966 a=bc 3967 0: a=bc 3968 1: a 3969 2: c 3970 3971/a(?P<name1>b|c)d(?P<longername2>e)/IB 3972------------------------------------------------------------------ 3973 Bra 3974 a 3975 CBra 1 3976 b 3977 Alt 3978 c 3979 Ket 3980 d 3981 CBra 2 3982 e 3983 Ket 3984 Ket 3985 End 3986------------------------------------------------------------------ 3987Capturing subpattern count = 2 3988Named capturing subpatterns: 3989 longername2 2 3990 name1 1 3991First code unit = 'a' 3992Last code unit = 'e' 3993Subject length lower bound = 4 3994 abde 3995 0: abde 3996 1: b 3997 2: e 3998 acde 3999 0: acde 4000 1: c 4001 2: e 4002 4003/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/IB 4004------------------------------------------------------------------ 4005 Bra 4006 Bra 4007 a 4008 CBra 1 4009 c 4010 CBra 2 4011 d 4012 Ket 4013 Ket 4014 Ket 4015 CBra 3 4016 a 4017 Ket 4018 Ket 4019 End 4020------------------------------------------------------------------ 4021Capturing subpattern count = 3 4022Named capturing subpatterns: 4023 a 3 4024 c 1 4025 d 2 4026First code unit = 'a' 4027Last code unit = 'a' 4028Subject length lower bound = 4 4029 4030/(?P<a>a)...(?P=a)bbb(?P>a)d/IB 4031------------------------------------------------------------------ 4032 Bra 4033 CBra 1 4034 a 4035 Ket 4036 Any 4037 Any 4038 Any 4039 \1 4040 bbb 4041 Recurse 4042 d 4043 Ket 4044 End 4045------------------------------------------------------------------ 4046Capturing subpattern count = 1 4047Max back reference = 1 4048Named capturing subpatterns: 4049 a 1 4050First code unit = 'a' 4051Last code unit = 'd' 4052Subject length lower bound = 10 4053 4054/^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/Ii 4055Capturing subpattern count = 4 4056Max back reference = 4 4057Named capturing subpatterns: 4058 four 4 4059 one 1 4060 three 3 4061 two 2 4062May match empty string 4063Compile options: caseless 4064Overall options: anchored caseless 4065Subject length lower bound = 0 4066 1221 4067 0: 1221 4068 1: 1221 4069 2: 1 4070 Satan, oscillate my metallic sonatas! 4071 0: Satan, oscillate my metallic sonatas! 4072 1: <unset> 4073 2: <unset> 4074 3: Satan, oscillate my metallic sonatas 4075 4: S 4076 A man, a plan, a canal: Panama! 4077 0: A man, a plan, a canal: Panama! 4078 1: <unset> 4079 2: <unset> 4080 3: A man, a plan, a canal: Panama 4081 4: A 4082 Able was I ere I saw Elba. 4083 0: Able was I ere I saw Elba. 4084 1: <unset> 4085 2: <unset> 4086 3: Able was I ere I saw Elba 4087 4: A 4088\= Expect no match 4089 The quick brown fox 4090No match 4091 4092/((?(R)a|b))\1(?1)?/I 4093Capturing subpattern count = 1 4094Max back reference = 1 4095Subject length lower bound = 2 4096 bb 4097 0: bb 4098 1: b 4099 bbaa 4100 0: bba 4101 1: b 4102 4103/(.*)a/Is 4104Capturing subpattern count = 1 4105Compile options: dotall 4106Overall options: anchored dotall 4107Last code unit = 'a' 4108Subject length lower bound = 1 4109 4110/(.*)a\1/Is 4111Capturing subpattern count = 1 4112Max back reference = 1 4113Options: dotall 4114Last code unit = 'a' 4115Subject length lower bound = 1 4116 4117/(.*)a(b)\2/Is 4118Capturing subpattern count = 2 4119Max back reference = 2 4120Compile options: dotall 4121Overall options: anchored dotall 4122Last code unit = 'b' 4123Subject length lower bound = 3 4124 4125/((.*)a|(.*)b)z/Is 4126Capturing subpattern count = 3 4127Compile options: dotall 4128Overall options: anchored dotall 4129Last code unit = 'z' 4130Subject length lower bound = 2 4131 4132/((.*)a|(.*)b)z\1/Is 4133Capturing subpattern count = 3 4134Max back reference = 1 4135Options: dotall 4136Last code unit = 'z' 4137Subject length lower bound = 3 4138 4139/((.*)a|(.*)b)z\2/Is 4140Capturing subpattern count = 3 4141Max back reference = 2 4142Options: dotall 4143Last code unit = 'z' 4144Subject length lower bound = 2 4145 4146/((.*)a|(.*)b)z\3/Is 4147Capturing subpattern count = 3 4148Max back reference = 3 4149Options: dotall 4150Last code unit = 'z' 4151Subject length lower bound = 2 4152 4153/((.*)a|^(.*)b)z\3/Is 4154Capturing subpattern count = 3 4155Max back reference = 3 4156Compile options: dotall 4157Overall options: anchored dotall 4158Last code unit = 'z' 4159Subject length lower bound = 2 4160 4161/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is 4162Capturing subpattern count = 31 4163May match empty string 4164Compile options: dotall 4165Overall options: anchored dotall 4166Subject length lower bound = 0 4167 4168/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is 4169Capturing subpattern count = 31 4170Max back reference = 31 4171May match empty string 4172Options: dotall 4173Subject length lower bound = 0 4174 4175/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is 4176Capturing subpattern count = 32 4177Max back reference = 32 4178May match empty string 4179Options: dotall 4180Subject length lower bound = 0 4181 4182/(a)(bc)/IB,no_auto_capture 4183------------------------------------------------------------------ 4184 Bra 4185 Bra 4186 a 4187 Ket 4188 Bra 4189 bc 4190 Ket 4191 Ket 4192 End 4193------------------------------------------------------------------ 4194Capturing subpattern count = 0 4195Options: no_auto_capture 4196First code unit = 'a' 4197Last code unit = 'c' 4198Subject length lower bound = 3 4199 abc 4200 0: abc 4201 4202/(?P<one>a)(bc)/IB,no_auto_capture 4203------------------------------------------------------------------ 4204 Bra 4205 CBra 1 4206 a 4207 Ket 4208 Bra 4209 bc 4210 Ket 4211 Ket 4212 End 4213------------------------------------------------------------------ 4214Capturing subpattern count = 1 4215Named capturing subpatterns: 4216 one 1 4217Options: no_auto_capture 4218First code unit = 'a' 4219Last code unit = 'c' 4220Subject length lower bound = 3 4221 abc 4222 0: abc 4223 1: a 4224 4225/(a)(?P<named>bc)/IB,no_auto_capture 4226------------------------------------------------------------------ 4227 Bra 4228 Bra 4229 a 4230 Ket 4231 CBra 1 4232 bc 4233 Ket 4234 Ket 4235 End 4236------------------------------------------------------------------ 4237Capturing subpattern count = 1 4238Named capturing subpatterns: 4239 named 1 4240Options: no_auto_capture 4241First code unit = 'a' 4242Last code unit = 'c' 4243Subject length lower bound = 3 4244 4245/(aaa(?C1)bbb|ab)/I 4246Capturing subpattern count = 1 4247First code unit = 'a' 4248Last code unit = 'b' 4249Subject length lower bound = 2 4250 aaabbb 4251--->aaabbb 4252 1 ^ ^ b 4253 0: aaabbb 4254 1: aaabbb 4255 aaabbb\=callout_data=0 4256--->aaabbb 4257 1 ^ ^ b 4258 0: aaabbb 4259 1: aaabbb 4260 aaabbb\=callout_data=1 4261--->aaabbb 4262 1 ^ ^ b 4263Callout data = 1 4264 0: ab 4265 1: ab 4266\= Expect no match 4267 aaabbb\=callout_data=-1 4268--->aaabbb 4269 1 ^ ^ b 4270Callout data = -1 4271No match 4272 4273/ab(?P<one>cd)ef(?P<two>gh)/I 4274Capturing subpattern count = 2 4275Named capturing subpatterns: 4276 one 1 4277 two 2 4278First code unit = 'a' 4279Last code unit = 'h' 4280Subject length lower bound = 8 4281 abcdefgh 4282 0: abcdefgh 4283 1: cd 4284 2: gh 4285 abcdefgh\=copy=1,get=two 4286 0: abcdefgh 4287 1: cd 4288 2: gh 4289 1C cd (2) 4290 G gh (2) two (group 2) 4291 abcdefgh\=copy=one,copy=two 4292 0: abcdefgh 4293 1: cd 4294 2: gh 4295 C cd (2) one (group 1) 4296 C gh (2) two (group 2) 4297 abcdefgh\=copy=three 4298 0: abcdefgh 4299 1: cd 4300 2: gh 4301Number not found for group 'three' 4302Copy substring 'three' failed (-49): unknown substring 4303 4304/(?P<Tes>)(?P<Test>)/IB 4305------------------------------------------------------------------ 4306 Bra 4307 CBra 1 4308 Ket 4309 CBra 2 4310 Ket 4311 Ket 4312 End 4313------------------------------------------------------------------ 4314Capturing subpattern count = 2 4315Named capturing subpatterns: 4316 Tes 1 4317 Test 2 4318May match empty string 4319Subject length lower bound = 0 4320 4321/(?P<Test>)(?P<Tes>)/IB 4322------------------------------------------------------------------ 4323 Bra 4324 CBra 1 4325 Ket 4326 CBra 2 4327 Ket 4328 Ket 4329 End 4330------------------------------------------------------------------ 4331Capturing subpattern count = 2 4332Named capturing subpatterns: 4333 Tes 2 4334 Test 1 4335May match empty string 4336Subject length lower bound = 0 4337 4338/(?P<Z>zz)(?P<A>aa)/I 4339Capturing subpattern count = 2 4340Named capturing subpatterns: 4341 A 2 4342 Z 1 4343First code unit = 'z' 4344Last code unit = 'a' 4345Subject length lower bound = 4 4346 zzaa\=copy=Z 4347 0: zzaa 4348 1: zz 4349 2: aa 4350 C zz (2) Z (group 1) 4351 zzaa\=copy=A 4352 0: zzaa 4353 1: zz 4354 2: aa 4355 C aa (2) A (group 2) 4356 4357/(?P<x>eks)(?P<x>eccs)/I 4358Failed: error 143 at offset 15: two named subpatterns have the same name (PCRE2_DUPNAMES not set) 4359 4360/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I 4361Failed: error 143 at offset 30: two named subpatterns have the same name (PCRE2_DUPNAMES not set) 4362 4363"\[((?P<elem>\d+)(,(?P>elem))*)\]"I 4364Capturing subpattern count = 3 4365Named capturing subpatterns: 4366 elem 2 4367First code unit = '[' 4368Last code unit = ']' 4369Subject length lower bound = 3 4370 [10,20,30,5,5,4,4,2,43,23,4234] 4371 0: [10,20,30,5,5,4,4,2,43,23,4234] 4372 1: 10,20,30,5,5,4,4,2,43,23,4234 4373 2: 10 4374 3: ,4234 4375\= Expect no match 4376 [] 4377No match 4378 4379"\[((?P<elem>\d+)(,(?P>elem))*)?\]"I 4380Capturing subpattern count = 3 4381Named capturing subpatterns: 4382 elem 2 4383First code unit = '[' 4384Last code unit = ']' 4385Subject length lower bound = 2 4386 [10,20,30,5,5,4,4,2,43,23,4234] 4387 0: [10,20,30,5,5,4,4,2,43,23,4234] 4388 1: 10,20,30,5,5,4,4,2,43,23,4234 4389 2: 10 4390 3: ,4234 4391 [] 4392 0: [] 4393 4394/(a(b(?2)c))?/IB 4395------------------------------------------------------------------ 4396 Bra 4397 Brazero 4398 CBra 1 4399 a 4400 CBra 2 4401 b 4402 Recurse 4403 c 4404 Ket 4405 Ket 4406 Ket 4407 End 4408------------------------------------------------------------------ 4409Capturing subpattern count = 2 4410May match empty string 4411Subject length lower bound = 0 4412 4413/(a(b(?2)c))*/IB 4414------------------------------------------------------------------ 4415 Bra 4416 Brazero 4417 CBra 1 4418 a 4419 CBra 2 4420 b 4421 Recurse 4422 c 4423 Ket 4424 KetRmax 4425 Ket 4426 End 4427------------------------------------------------------------------ 4428Capturing subpattern count = 2 4429May match empty string 4430Subject length lower bound = 0 4431 4432/(a(b(?2)c)){0,2}/IB 4433------------------------------------------------------------------ 4434 Bra 4435 Brazero 4436 Bra 4437 CBra 1 4438 a 4439 CBra 2 4440 b 4441 Recurse 4442 c 4443 Ket 4444 Ket 4445 Brazero 4446 CBra 1 4447 a 4448 CBra 2 4449 b 4450 Recurse 4451 c 4452 Ket 4453 Ket 4454 Ket 4455 Ket 4456 End 4457------------------------------------------------------------------ 4458Capturing subpattern count = 2 4459May match empty string 4460Subject length lower bound = 0 4461 4462/[ab]{1}+/B 4463------------------------------------------------------------------ 4464 Bra 4465 [ab] 4466 Ket 4467 End 4468------------------------------------------------------------------ 4469 4470/()(?1){1}/B 4471------------------------------------------------------------------ 4472 Bra 4473 CBra 1 4474 Ket 4475 Recurse 4476 Ket 4477 End 4478------------------------------------------------------------------ 4479 4480/()(?1)/B 4481------------------------------------------------------------------ 4482 Bra 4483 CBra 1 4484 Ket 4485 Recurse 4486 Ket 4487 End 4488------------------------------------------------------------------ 4489 4490/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii 4491Capturing subpattern count = 3 4492Options: caseless 4493Last code unit = 'g' (caseless) 4494Subject length lower bound = 8 4495 Baby Bjorn Active Carrier - With free SHIPPING!! 4496 0: Baby Bjorn Active Carrier - With free SHIPPING!! 4497 1: Baby Bjorn Active Carrier - With free SHIPPING!! 4498 4499/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii 4500Capturing subpattern count = 3 4501Options: caseless 4502Last code unit = 'g' (caseless) 4503Subject length lower bound = 8 4504 Baby Bjorn Active Carrier - With free SHIPPING!! 4505 0: Baby Bjorn Active Carrier - With free SHIPPING!! 4506 1: Baby Bjorn Active Carrier - With free SHIPPING!! 4507 4508/a*.*b/IB 4509------------------------------------------------------------------ 4510 Bra 4511 a* 4512 Any* 4513 b 4514 Ket 4515 End 4516------------------------------------------------------------------ 4517Capturing subpattern count = 0 4518Last code unit = 'b' 4519Subject length lower bound = 1 4520 4521/(a|b)*.?c/IB 4522------------------------------------------------------------------ 4523 Bra 4524 Brazero 4525 CBra 1 4526 a 4527 Alt 4528 b 4529 KetRmax 4530 Any? 4531 c 4532 Ket 4533 End 4534------------------------------------------------------------------ 4535Capturing subpattern count = 1 4536Last code unit = 'c' 4537Subject length lower bound = 1 4538 4539/abc(?C255)de(?C)f/IB 4540------------------------------------------------------------------ 4541 Bra 4542 abc 4543 Callout 255 10 1 4544 de 4545 Callout 0 16 1 4546 f 4547 Ket 4548 End 4549------------------------------------------------------------------ 4550Capturing subpattern count = 0 4551First code unit = 'a' 4552Last code unit = 'f' 4553Subject length lower bound = 6 4554 4555/abcde/IB,auto_callout 4556------------------------------------------------------------------ 4557 Bra 4558 Callout 255 0 1 4559 a 4560 Callout 255 1 1 4561 b 4562 Callout 255 2 1 4563 c 4564 Callout 255 3 1 4565 d 4566 Callout 255 4 1 4567 e 4568 Callout 255 5 0 4569 Ket 4570 End 4571------------------------------------------------------------------ 4572Capturing subpattern count = 0 4573Options: auto_callout 4574First code unit = 'a' 4575Last code unit = 'e' 4576Subject length lower bound = 5 4577 abcde 4578--->abcde 4579 +0 ^ a 4580 +1 ^^ b 4581 +2 ^ ^ c 4582 +3 ^ ^ d 4583 +4 ^ ^ e 4584 +5 ^ ^ 4585 0: abcde 4586\= Expect no match 4587 abcdfe 4588--->abcdfe 4589 +0 ^ a 4590 +1 ^^ b 4591 +2 ^ ^ c 4592 +3 ^ ^ d 4593 +4 ^ ^ e 4594No match 4595 4596/a*b/IB,auto_callout 4597------------------------------------------------------------------ 4598 Bra 4599 Callout 255 0 2 4600 a*+ 4601 Callout 255 2 1 4602 b 4603 Callout 255 3 0 4604 Ket 4605 End 4606------------------------------------------------------------------ 4607Capturing subpattern count = 0 4608Options: auto_callout 4609Starting code units: a b 4610Last code unit = 'b' 4611Subject length lower bound = 1 4612 ab 4613--->ab 4614 +0 ^ a* 4615 +2 ^^ b 4616 +3 ^ ^ 4617 0: ab 4618 aaaab 4619--->aaaab 4620 +0 ^ a* 4621 +2 ^ ^ b 4622 +3 ^ ^ 4623 0: aaaab 4624 aaaacb 4625--->aaaacb 4626 +0 ^ a* 4627 +2 ^ ^ b 4628 +0 ^ a* 4629 +2 ^ ^ b 4630 +0 ^ a* 4631 +2 ^ ^ b 4632 +0 ^ a* 4633 +2 ^^ b 4634 +0 ^ a* 4635 +2 ^ b 4636 +3 ^^ 4637 0: b 4638 4639/a*b/IB,auto_callout 4640------------------------------------------------------------------ 4641 Bra 4642 Callout 255 0 2 4643 a*+ 4644 Callout 255 2 1 4645 b 4646 Callout 255 3 0 4647 Ket 4648 End 4649------------------------------------------------------------------ 4650Capturing subpattern count = 0 4651Options: auto_callout 4652Starting code units: a b 4653Last code unit = 'b' 4654Subject length lower bound = 1 4655 ab 4656--->ab 4657 +0 ^ a* 4658 +2 ^^ b 4659 +3 ^ ^ 4660 0: ab 4661 aaaab 4662--->aaaab 4663 +0 ^ a* 4664 +2 ^ ^ b 4665 +3 ^ ^ 4666 0: aaaab 4667 aaaacb 4668--->aaaacb 4669 +0 ^ a* 4670 +2 ^ ^ b 4671 +0 ^ a* 4672 +2 ^ ^ b 4673 +0 ^ a* 4674 +2 ^ ^ b 4675 +0 ^ a* 4676 +2 ^^ b 4677 +0 ^ a* 4678 +2 ^ b 4679 +3 ^^ 4680 0: b 4681 4682/a+b/IB,auto_callout 4683------------------------------------------------------------------ 4684 Bra 4685 Callout 255 0 2 4686 a++ 4687 Callout 255 2 1 4688 b 4689 Callout 255 3 0 4690 Ket 4691 End 4692------------------------------------------------------------------ 4693Capturing subpattern count = 0 4694Options: auto_callout 4695First code unit = 'a' 4696Last code unit = 'b' 4697Subject length lower bound = 2 4698 ab 4699--->ab 4700 +0 ^ a+ 4701 +2 ^^ b 4702 +3 ^ ^ 4703 0: ab 4704 aaaab 4705--->aaaab 4706 +0 ^ a+ 4707 +2 ^ ^ b 4708 +3 ^ ^ 4709 0: aaaab 4710\= Expect no match 4711 aaaacb 4712--->aaaacb 4713 +0 ^ a+ 4714 +2 ^ ^ b 4715 +0 ^ a+ 4716 +2 ^ ^ b 4717 +0 ^ a+ 4718 +2 ^ ^ b 4719 +0 ^ a+ 4720 +2 ^^ b 4721No match 4722 4723/(abc|def)x/IB,auto_callout 4724------------------------------------------------------------------ 4725 Bra 4726 Callout 255 0 9 4727 CBra 1 4728 Callout 255 1 1 4729 a 4730 Callout 255 2 1 4731 b 4732 Callout 255 3 1 4733 c 4734 Callout 255 4 0 4735 Alt 4736 Callout 255 5 1 4737 d 4738 Callout 255 6 1 4739 e 4740 Callout 255 7 1 4741 f 4742 Callout 255 8 0 4743 Ket 4744 Callout 255 9 1 4745 x 4746 Callout 255 10 0 4747 Ket 4748 End 4749------------------------------------------------------------------ 4750Capturing subpattern count = 1 4751Options: auto_callout 4752Starting code units: a d 4753Last code unit = 'x' 4754Subject length lower bound = 4 4755 abcx 4756--->abcx 4757 +0 ^ (abc|def) 4758 +1 ^ a 4759 +2 ^^ b 4760 +3 ^ ^ c 4761 +4 ^ ^ | 4762 +9 ^ ^ x 4763+10 ^ ^ 4764 0: abcx 4765 1: abc 4766 defx 4767--->defx 4768 +0 ^ (abc|def) 4769 +1 ^ a 4770 +5 ^ d 4771 +6 ^^ e 4772 +7 ^ ^ f 4773 +8 ^ ^ ) 4774 +9 ^ ^ x 4775+10 ^ ^ 4776 0: defx 4777 1: def 4778\= Expect no match 4779 abcdefzx 4780--->abcdefzx 4781 +0 ^ (abc|def) 4782 +1 ^ a 4783 +2 ^^ b 4784 +3 ^ ^ c 4785 +4 ^ ^ | 4786 +9 ^ ^ x 4787 +5 ^ d 4788 +0 ^ (abc|def) 4789 +1 ^ a 4790 +5 ^ d 4791 +6 ^^ e 4792 +7 ^ ^ f 4793 +8 ^ ^ ) 4794 +9 ^ ^ x 4795No match 4796 4797/(abc|def)x/IB,auto_callout 4798------------------------------------------------------------------ 4799 Bra 4800 Callout 255 0 9 4801 CBra 1 4802 Callout 255 1 1 4803 a 4804 Callout 255 2 1 4805 b 4806 Callout 255 3 1 4807 c 4808 Callout 255 4 0 4809 Alt 4810 Callout 255 5 1 4811 d 4812 Callout 255 6 1 4813 e 4814 Callout 255 7 1 4815 f 4816 Callout 255 8 0 4817 Ket 4818 Callout 255 9 1 4819 x 4820 Callout 255 10 0 4821 Ket 4822 End 4823------------------------------------------------------------------ 4824Capturing subpattern count = 1 4825Options: auto_callout 4826Starting code units: a d 4827Last code unit = 'x' 4828Subject length lower bound = 4 4829 abcx 4830--->abcx 4831 +0 ^ (abc|def) 4832 +1 ^ a 4833 +2 ^^ b 4834 +3 ^ ^ c 4835 +4 ^ ^ | 4836 +9 ^ ^ x 4837+10 ^ ^ 4838 0: abcx 4839 1: abc 4840 defx 4841--->defx 4842 +0 ^ (abc|def) 4843 +1 ^ a 4844 +5 ^ d 4845 +6 ^^ e 4846 +7 ^ ^ f 4847 +8 ^ ^ ) 4848 +9 ^ ^ x 4849+10 ^ ^ 4850 0: defx 4851 1: def 4852\= Expect no match 4853 abcdefzx 4854--->abcdefzx 4855 +0 ^ (abc|def) 4856 +1 ^ a 4857 +2 ^^ b 4858 +3 ^ ^ c 4859 +4 ^ ^ | 4860 +9 ^ ^ x 4861 +5 ^ d 4862 +0 ^ (abc|def) 4863 +1 ^ a 4864 +5 ^ d 4865 +6 ^^ e 4866 +7 ^ ^ f 4867 +8 ^ ^ ) 4868 +9 ^ ^ x 4869No match 4870 4871/(ab|cd){3,4}/I,auto_callout 4872Capturing subpattern count = 1 4873Options: auto_callout 4874Starting code units: a c 4875Subject length lower bound = 6 4876 ababab 4877--->ababab 4878 +0 ^ (ab|cd){3,4} 4879 +1 ^ a 4880 +2 ^^ b 4881 +3 ^ ^ | 4882 +1 ^ ^ a 4883 +2 ^ ^ b 4884 +3 ^ ^ | 4885 +1 ^ ^ a 4886 +2 ^ ^ b 4887 +3 ^ ^ | 4888 +1 ^ ^ a 4889 +4 ^ ^ c 4890+12 ^ ^ 4891 0: ababab 4892 1: ab 4893 abcdabcd 4894--->abcdabcd 4895 +0 ^ (ab|cd){3,4} 4896 +1 ^ a 4897 +2 ^^ b 4898 +3 ^ ^ | 4899 +1 ^ ^ a 4900 +4 ^ ^ c 4901 +5 ^ ^ d 4902 +6 ^ ^ ) 4903 +1 ^ ^ a 4904 +2 ^ ^ b 4905 +3 ^ ^ | 4906 +1 ^ ^ a 4907 +4 ^ ^ c 4908 +5 ^ ^ d 4909 +6 ^ ^ ) 4910+12 ^ ^ 4911 0: abcdabcd 4912 1: cd 4913 abcdcdcdcdcd 4914--->abcdcdcdcdcd 4915 +0 ^ (ab|cd){3,4} 4916 +1 ^ a 4917 +2 ^^ b 4918 +3 ^ ^ | 4919 +1 ^ ^ a 4920 +4 ^ ^ c 4921 +5 ^ ^ d 4922 +6 ^ ^ ) 4923 +1 ^ ^ a 4924 +4 ^ ^ c 4925 +5 ^ ^ d 4926 +6 ^ ^ ) 4927 +1 ^ ^ a 4928 +4 ^ ^ c 4929 +5 ^ ^ d 4930 +6 ^ ^ ) 4931+12 ^ ^ 4932 0: abcdcdcd 4933 1: cd 4934 4935/([ab]{,4}c|xy)/IB,auto_callout 4936------------------------------------------------------------------ 4937 Bra 4938 Callout 255 0 14 4939 CBra 1 4940 Callout 255 1 4 4941 [ab] 4942 Callout 255 5 1 4943 { 4944 Callout 255 6 1 4945 , 4946 Callout 255 7 1 4947 4 4948 Callout 255 8 1 4949 } 4950 Callout 255 9 1 4951 c 4952 Callout 255 10 0 4953 Alt 4954 Callout 255 11 1 4955 x 4956 Callout 255 12 1 4957 y 4958 Callout 255 13 0 4959 Ket 4960 Callout 255 14 0 4961 Ket 4962 End 4963------------------------------------------------------------------ 4964Capturing subpattern count = 1 4965Options: auto_callout 4966Starting code units: a b x 4967Subject length lower bound = 2 4968\= Expect no match 4969 Note: that { does NOT introduce a quantifier 4970--->Note: that { does NOT introduce a quantifier 4971 +0 ^ ([ab]{,4}c|xy) 4972 +1 ^ [ab] 4973 +5 ^^ { 4974+11 ^ x 4975 +0 ^ ([ab]{,4}c|xy) 4976 +1 ^ [ab] 4977 +5 ^^ { 4978+11 ^ x 4979 +0 ^ ([ab]{,4}c|xy) 4980 +1 ^ [ab] 4981 +5 ^^ { 4982+11 ^ x 4983No match 4984 4985/([ab]{,4}c|xy)/IB,auto_callout 4986------------------------------------------------------------------ 4987 Bra 4988 Callout 255 0 14 4989 CBra 1 4990 Callout 255 1 4 4991 [ab] 4992 Callout 255 5 1 4993 { 4994 Callout 255 6 1 4995 , 4996 Callout 255 7 1 4997 4 4998 Callout 255 8 1 4999 } 5000 Callout 255 9 1 5001 c 5002 Callout 255 10 0 5003 Alt 5004 Callout 255 11 1 5005 x 5006 Callout 255 12 1 5007 y 5008 Callout 255 13 0 5009 Ket 5010 Callout 255 14 0 5011 Ket 5012 End 5013------------------------------------------------------------------ 5014Capturing subpattern count = 1 5015Options: auto_callout 5016Starting code units: a b x 5017Subject length lower bound = 2 5018\= Expect no match 5019 Note: that { does NOT introduce a quantifier 5020--->Note: that { does NOT introduce a quantifier 5021 +0 ^ ([ab]{,4}c|xy) 5022 +1 ^ [ab] 5023 +5 ^^ { 5024+11 ^ x 5025 +0 ^ ([ab]{,4}c|xy) 5026 +1 ^ [ab] 5027 +5 ^^ { 5028+11 ^ x 5029 +0 ^ ([ab]{,4}c|xy) 5030 +1 ^ [ab] 5031 +5 ^^ { 5032+11 ^ x 5033No match 5034 5035/([ab]{1,4}c|xy){4,5}?123/IB,auto_callout 5036------------------------------------------------------------------ 5037 Bra 5038 Callout 255 0 21 5039 CBra 1 5040 Callout 255 1 9 5041 [ab]{1,4}+ 5042 Callout 255 10 1 5043 c 5044 Callout 255 11 0 5045 Alt 5046 Callout 255 12 1 5047 x 5048 Callout 255 13 1 5049 y 5050 Callout 255 14 0 5051 Ket 5052 CBra 1 5053 Callout 255 1 9 5054 [ab]{1,4}+ 5055 Callout 255 10 1 5056 c 5057 Callout 255 11 0 5058 Alt 5059 Callout 255 12 1 5060 x 5061 Callout 255 13 1 5062 y 5063 Callout 255 14 0 5064 Ket 5065 CBra 1 5066 Callout 255 1 9 5067 [ab]{1,4}+ 5068 Callout 255 10 1 5069 c 5070 Callout 255 11 0 5071 Alt 5072 Callout 255 12 1 5073 x 5074 Callout 255 13 1 5075 y 5076 Callout 255 14 0 5077 Ket 5078 CBra 1 5079 Callout 255 1 9 5080 [ab]{1,4}+ 5081 Callout 255 10 1 5082 c 5083 Callout 255 11 0 5084 Alt 5085 Callout 255 12 1 5086 x 5087 Callout 255 13 1 5088 y 5089 Callout 255 14 0 5090 Ket 5091 Braminzero 5092 CBra 1 5093 Callout 255 1 9 5094 [ab]{1,4}+ 5095 Callout 255 10 1 5096 c 5097 Callout 255 11 0 5098 Alt 5099 Callout 255 12 1 5100 x 5101 Callout 255 13 1 5102 y 5103 Callout 255 14 0 5104 Ket 5105 Callout 255 21 1 5106 1 5107 Callout 255 22 1 5108 2 5109 Callout 255 23 1 5110 3 5111 Callout 255 24 0 5112 Ket 5113 End 5114------------------------------------------------------------------ 5115Capturing subpattern count = 1 5116Options: auto_callout 5117Starting code units: a b x 5118Last code unit = '3' 5119Subject length lower bound = 11 5120 aacaacaacaacaac123 5121--->aacaacaacaacaac123 5122 +0 ^ ([ab]{1,4}c|xy){4,5}? 5123 +1 ^ [ab]{1,4} 5124+10 ^ ^ c 5125+11 ^ ^ | 5126 +1 ^ ^ [ab]{1,4} 5127+10 ^ ^ c 5128+11 ^ ^ | 5129 +1 ^ ^ [ab]{1,4} 5130+10 ^ ^ c 5131+11 ^ ^ | 5132 +1 ^ ^ [ab]{1,4} 5133+10 ^ ^ c 5134+11 ^ ^ | 5135+21 ^ ^ 1 5136 +1 ^ ^ [ab]{1,4} 5137+10 ^ ^ c 5138+11 ^ ^ | 5139+21 ^ ^ 1 5140+22 ^ ^ 2 5141+23 ^ ^ 3 5142+24 ^ ^ 5143 0: aacaacaacaacaac123 5144 1: aac 5145 5146/\b.*/I 5147Capturing subpattern count = 0 5148Max lookbehind = 1 5149May match empty string 5150Subject length lower bound = 0 5151 ab cd\=offset=1 5152 0: cd 5153 5154/\b.*/Is 5155Capturing subpattern count = 0 5156Max lookbehind = 1 5157May match empty string 5158Options: dotall 5159Subject length lower bound = 0 5160 ab cd\=startoffset=1 5161 0: cd 5162 5163/(?!.bcd).*/I 5164Capturing subpattern count = 0 5165May match empty string 5166Subject length lower bound = 0 5167 Xbcd12345 5168 0: bcd12345 5169 5170/abcde/I 5171Capturing subpattern count = 0 5172First code unit = 'a' 5173Last code unit = 'e' 5174Subject length lower bound = 5 5175 ab\=ps 5176Partial match: ab 5177 abc\=ps 5178Partial match: abc 5179 abcd\=ps 5180Partial match: abcd 5181 abcde\=ps 5182 0: abcde 5183 the quick brown abc\=ps 5184Partial match: abc 5185\= Expect no match\=ps 5186 the quick brown abxyz fox\=ps 5187No match 5188 5189"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I 5190Capturing subpattern count = 3 5191Compile options: <none> 5192Overall options: anchored 5193Last code unit = '/' 5194Subject length lower bound = 6 5195 13/05/04\=ps 5196 0: 13/05/04 5197 1: 13 5198 2: 05 5199 13/5/2004\=ps 5200 0: 13/5/2004 5201 1: 13 5202 2: 5 5203 3: 20 5204 02/05/09\=ps 5205 0: 02/05/09 5206 1: 02 5207 2: 05 5208 1\=ps 5209Partial match: 1 5210 1/2\=ps 5211Partial match: 1/2 5212 1/2/0\=ps 5213Partial match: 1/2/0 5214 1/2/04\=ps 5215 0: 1/2/04 5216 1: 1 5217 2: 2 5218 0\=ps 5219Partial match: 0 5220 02/\=ps 5221Partial match: 02/ 5222 02/0\=ps 5223Partial match: 02/0 5224 02/1\=ps 5225Partial match: 02/1 5226\= Expect no match\=ps 5227 \=ps 5228No match 5229 123\=ps 5230No match 5231 33/4/04\=ps 5232No match 5233 3/13/04\=ps 5234No match 5235 0/1/2003\=ps 5236No match 5237 0/\=ps 5238No match 5239 02/0/\=ps 5240No match 5241 02/13\=ps 5242No match 5243 5244/0{0,2}ABC/I 5245Capturing subpattern count = 0 5246Starting code units: 0 A 5247Last code unit = 'C' 5248Subject length lower bound = 3 5249 5250/\d{3,}ABC/I 5251Capturing subpattern count = 0 5252Starting code units: 0 1 2 3 4 5 6 7 8 9 5253Last code unit = 'C' 5254Subject length lower bound = 6 5255 5256/\d*ABC/I 5257Capturing subpattern count = 0 5258Starting code units: 0 1 2 3 4 5 6 7 8 9 A 5259Last code unit = 'C' 5260Subject length lower bound = 3 5261 5262/[abc]+DE/I 5263Capturing subpattern count = 0 5264Starting code units: a b c 5265Last code unit = 'E' 5266Subject length lower bound = 3 5267 5268/[abc]?123/I 5269Capturing subpattern count = 0 5270Starting code units: 1 a b c 5271Last code unit = '3' 5272Subject length lower bound = 3 5273 123\=ps 5274 0: 123 5275 a\=ps 5276Partial match: a 5277 b\=ps 5278Partial match: b 5279 c\=ps 5280Partial match: c 5281 c12\=ps 5282Partial match: c12 5283 c123\=ps 5284 0: c123 5285 5286/^(?:\d){3,5}X/I 5287Capturing subpattern count = 0 5288Compile options: <none> 5289Overall options: anchored 5290Last code unit = 'X' 5291Subject length lower bound = 4 5292 1\=ps 5293Partial match: 1 5294 123\=ps 5295Partial match: 123 5296 123X 5297 0: 123X 5298 1234\=ps 5299Partial match: 1234 5300 1234X 5301 0: 1234X 5302 12345\=ps 5303Partial match: 12345 5304 12345X 5305 0: 12345X 5306\= Expect no match 5307 1X 5308No match 5309 123456\=ps 5310No match 5311 5312"<(\w+)/?>(.)*</(\1)>"Igms 5313Capturing subpattern count = 3 5314Max back reference = 1 5315Options: dotall multiline 5316First code unit = '<' 5317Last code unit = '>' 5318Subject length lower bound = 7 5319 <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>\=jitstack=1024 5320 0: <seite>\x0a<dokumenteninformation>\x0a<seitentitel>Partner der LCO</seitentitel>\x0a<sprache>de</sprache>\x0a<seitenbeschreibung>Partner der LINEAS Consulting\x0aGmbH</seitenbeschreibung>\x0a<schluesselworte>LINEAS Consulting GmbH Hamburg\x0aPartnerfirmen</schluesselworte>\x0a<revisit>30 days</revisit>\x0a<robots>index,follow</robots>\x0a<menueinformation>\x0a<aktiv>ja</aktiv>\x0a<menueposition>3</menueposition>\x0a<menuetext>Partner</menuetext>\x0a</menueinformation>\x0a<lastedited>\x0a<autor>LCO</autor>\x0a<firma>LINEAS Consulting</firma>\x0a<datum>15.10.2003</datum>\x0a</lastedited>\x0a</dokumenteninformation>\x0a<inhalt>\x0a\x0a<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\x0aGmbH</absatzueberschrift>\x0a\x0a<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\x0a<bild name="logo_ca.gif" rahmen="no"/></link> <link\x0aziel="http://www.ey.com/" zielfenster="_blank"><bild\x0aname="logo_euy.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\x0a<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.atelion.de/"\x0azielfenster="_blank"><bild\x0aname="logo_atelion.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.line-information.de/"\x0azielfenster="_blank">\x0a<bild name="logo_line_information.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\x0a\x0a<absatz><link ziel="http://www.incognis.de/"\x0azielfenster="_blank"><bild\x0aname="logo_incognis.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.addcraft.com/"\x0azielfenster="_blank"><bild\x0aname="logo_addcraft.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.comendo.com/"\x0azielfenster="_blank"><bild\x0aname="logo_comendo.gif" rahmen="no"/></link></absatz>\x0a\x0a</inhalt>\x0a</seite> 5321 1: seite 5322 2: \x0a 5323 3: seite 5324 5325/line\nbreak/I 5326Capturing subpattern count = 0 5327Contains explicit CR or LF match 5328First code unit = 'l' 5329Last code unit = 'k' 5330Subject length lower bound = 10 5331 this is a line\nbreak 5332 0: line\x0abreak 5333 line one\nthis is a line\nbreak in the second line 5334 0: line\x0abreak 5335 5336/line\nbreak/I,firstline 5337Capturing subpattern count = 0 5338Contains explicit CR or LF match 5339Options: firstline 5340First code unit = 'l' 5341Last code unit = 'k' 5342Subject length lower bound = 10 5343 this is a line\nbreak 5344 0: line\x0abreak 5345\= Expect no match 5346 line one\nthis is a line\nbreak in the second line 5347No match 5348 5349/line\nbreak/Im,firstline 5350Capturing subpattern count = 0 5351Contains explicit CR or LF match 5352Options: firstline multiline 5353First code unit = 'l' 5354Last code unit = 'k' 5355Subject length lower bound = 10 5356 this is a line\nbreak 5357 0: line\x0abreak 5358\= Expect no match 5359 line one\nthis is a line\nbreak in the second line 5360No match 5361 5362/(?i)(?-i)AbCd/I 5363Capturing subpattern count = 0 5364First code unit = 'A' 5365Last code unit = 'd' 5366Subject length lower bound = 4 5367 AbCd 5368 0: AbCd 5369\= Expect no match 5370 abcd 5371No match 5372 5373/a{11111111111111111111}/I 5374Failed: error 105 at offset 8: number too big in {} quantifier 5375 5376/(){64294967295}/I 5377Failed: error 105 at offset 9: number too big in {} quantifier 5378 5379/(){2,4294967295}/I 5380Failed: error 105 at offset 11: number too big in {} quantifier 5381 5382"(?i:a)(?i:b)(?i:c)(?i:d)(?i:e)(?i:f)(?i:g)(?i:h)(?i:i)(?i:j)(k)(?i:l)A\1B"I 5383Capturing subpattern count = 1 5384Max back reference = 1 5385First code unit = 'a' (caseless) 5386Last code unit = 'B' 5387Subject length lower bound = 15 5388 abcdefghijklAkB 5389 0: abcdefghijklAkB 5390 1: k 5391 5392"(?P<n0>a)(?P<n1>b)(?P<n2>c)(?P<n3>d)(?P<n4>e)(?P<n5>f)(?P<n6>g)(?P<n7>h)(?P<n8>i)(?P<n9>j)(?P<n10>k)(?P<n11>l)A\11B"I 5393Capturing subpattern count = 12 5394Max back reference = 11 5395Named capturing subpatterns: 5396 n0 1 5397 n1 2 5398 n10 11 5399 n11 12 5400 n2 3 5401 n3 4 5402 n4 5 5403 n5 6 5404 n6 7 5405 n7 8 5406 n8 9 5407 n9 10 5408First code unit = 'a' 5409Last code unit = 'B' 5410Subject length lower bound = 15 5411 abcdefghijklAkB 5412 0: abcdefghijklAkB 5413 1: a 5414 2: b 5415 3: c 5416 4: d 5417 5: e 5418 6: f 5419 7: g 5420 8: h 5421 9: i 542210: j 542311: k 542412: l 5425 5426"(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I 5427Capturing subpattern count = 12 5428Max back reference = 11 5429First code unit = 'a' 5430Last code unit = 'B' 5431Subject length lower bound = 15 5432 abcdefghijklAkB 5433 0: abcdefghijklAkB 5434 1: a 5435 2: b 5436 3: c 5437 4: d 5438 5: e 5439 6: f 5440 7: g 5441 8: h 5442 9: i 544310: j 544411: k 544512: l 5446 5447"(?P<name0>a)(?P<name1>a)(?P<name2>a)(?P<name3>a)(?P<name4>a)(?P<name5>a)(?P<name6>a)(?P<name7>a)(?P<name8>a)(?P<name9>a)(?P<name10>a)(?P<name11>a)(?P<name12>a)(?P<name13>a)(?P<name14>a)(?P<name15>a)(?P<name16>a)(?P<name17>a)(?P<name18>a)(?P<name19>a)(?P<name20>a)(?P<name21>a)(?P<name22>a)(?P<name23>a)(?P<name24>a)(?P<name25>a)(?P<name26>a)(?P<name27>a)(?P<name28>a)(?P<name29>a)(?P<name30>a)(?P<name31>a)(?P<name32>a)(?P<name33>a)(?P<name34>a)(?P<name35>a)(?P<name36>a)(?P<name37>a)(?P<name38>a)(?P<name39>a)(?P<name40>a)(?P<name41>a)(?P<name42>a)(?P<name43>a)(?P<name44>a)(?P<name45>a)(?P<name46>a)(?P<name47>a)(?P<name48>a)(?P<name49>a)(?P<name50>a)(?P<name51>a)(?P<name52>a)(?P<name53>a)(?P<name54>a)(?P<name55>a)(?P<name56>a)(?P<name57>a)(?P<name58>a)(?P<name59>a)(?P<name60>a)(?P<name61>a)(?P<name62>a)(?P<name63>a)(?P<name64>a)(?P<name65>a)(?P<name66>a)(?P<name67>a)(?P<name68>a)(?P<name69>a)(?P<name70>a)(?P<name71>a)(?P<name72>a)(?P<name73>a)(?P<name74>a)(?P<name75>a)(?P<name76>a)(?P<name77>a)(?P<name78>a)(?P<name79>a)(?P<name80>a)(?P<name81>a)(?P<name82>a)(?P<name83>a)(?P<name84>a)(?P<name85>a)(?P<name86>a)(?P<name87>a)(?P<name88>a)(?P<name89>a)(?P<name90>a)(?P<name91>a)(?P<name92>a)(?P<name93>a)(?P<name94>a)(?P<name95>a)(?P<name96>a)(?P<name97>a)(?P<name98>a)(?P<name99>a)(?P<name100>a)"I 5448Capturing subpattern count = 101 5449Named capturing subpatterns: 5450 name0 1 5451 name1 2 5452 name10 11 5453 name100 101 5454 name11 12 5455 name12 13 5456 name13 14 5457 name14 15 5458 name15 16 5459 name16 17 5460 name17 18 5461 name18 19 5462 name19 20 5463 name2 3 5464 name20 21 5465 name21 22 5466 name22 23 5467 name23 24 5468 name24 25 5469 name25 26 5470 name26 27 5471 name27 28 5472 name28 29 5473 name29 30 5474 name3 4 5475 name30 31 5476 name31 32 5477 name32 33 5478 name33 34 5479 name34 35 5480 name35 36 5481 name36 37 5482 name37 38 5483 name38 39 5484 name39 40 5485 name4 5 5486 name40 41 5487 name41 42 5488 name42 43 5489 name43 44 5490 name44 45 5491 name45 46 5492 name46 47 5493 name47 48 5494 name48 49 5495 name49 50 5496 name5 6 5497 name50 51 5498 name51 52 5499 name52 53 5500 name53 54 5501 name54 55 5502 name55 56 5503 name56 57 5504 name57 58 5505 name58 59 5506 name59 60 5507 name6 7 5508 name60 61 5509 name61 62 5510 name62 63 5511 name63 64 5512 name64 65 5513 name65 66 5514 name66 67 5515 name67 68 5516 name68 69 5517 name69 70 5518 name7 8 5519 name70 71 5520 name71 72 5521 name72 73 5522 name73 74 5523 name74 75 5524 name75 76 5525 name76 77 5526 name77 78 5527 name78 79 5528 name79 80 5529 name8 9 5530 name80 81 5531 name81 82 5532 name82 83 5533 name83 84 5534 name84 85 5535 name85 86 5536 name86 87 5537 name87 88 5538 name88 89 5539 name89 90 5540 name9 10 5541 name90 91 5542 name91 92 5543 name92 93 5544 name93 94 5545 name94 95 5546 name95 96 5547 name96 97 5548 name97 98 5549 name98 99 5550 name99 100 5551First code unit = 'a' 5552Last code unit = 'a' 5553Subject length lower bound = 101 5554 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5555Matched, but too many substrings 5556 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5557 1: a 5558 2: a 5559 3: a 5560 4: a 5561 5: a 5562 6: a 5563 7: a 5564 8: a 5565 9: a 556610: a 556711: a 556812: a 556913: a 557014: a 5571 5572"(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)"I 5573Capturing subpattern count = 101 5574First code unit = 'a' 5575Last code unit = 'a' 5576Subject length lower bound = 101 5577 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5578Matched, but too many substrings 5579 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5580 1: a 5581 2: a 5582 3: a 5583 4: a 5584 5: a 5585 6: a 5586 7: a 5587 8: a 5588 9: a 558910: a 559011: a 559112: a 559213: a 559314: a 5594 5595/[^()]*(?:\((?R)\)[^()]*)*/I 5596Capturing subpattern count = 0 5597May match empty string 5598Subject length lower bound = 0 5599 (this(and)that 5600 0: 5601 (this(and)that) 5602 0: (this(and)that) 5603 (this(and)that)stuff 5604 0: (this(and)that)stuff 5605 5606/[^()]*(?:\((?>(?R))\)[^()]*)*/I 5607Capturing subpattern count = 0 5608May match empty string 5609Subject length lower bound = 0 5610 (this(and)that 5611 0: 5612 (this(and)that) 5613 0: (this(and)that) 5614 5615/[^()]*(?:\((?R)\))*[^()]*/I 5616Capturing subpattern count = 0 5617May match empty string 5618Subject length lower bound = 0 5619 (this(and)that 5620 0: 5621 (this(and)that) 5622 0: (this(and)that) 5623 5624/(?:\((?R)\))*[^()]*/I 5625Capturing subpattern count = 0 5626May match empty string 5627Subject length lower bound = 0 5628 (this(and)that 5629 0: 5630 (this(and)that) 5631 0: 5632 ((this)) 5633 0: ((this)) 5634 5635/(?:\((?R)\))|[^()]*/I 5636Capturing subpattern count = 0 5637May match empty string 5638Subject length lower bound = 0 5639 (this(and)that 5640 0: 5641 (this(and)that) 5642 0: 5643 (this) 5644 0: (this) 5645 ((this)) 5646 0: ((this)) 5647 5648/\x{0000ff}/I 5649Capturing subpattern count = 0 5650First code unit = \xff 5651Subject length lower bound = 1 5652 5653/^((?P<A>a1)|(?P<A>a2)b)/I 5654Failed: error 143 at offset 17: two named subpatterns have the same name (PCRE2_DUPNAMES not set) 5655 5656/^((?P<A>a1)|(?P<A>a2)b)/I,dupnames 5657Capturing subpattern count = 3 5658Named capturing subpatterns: 5659 A 2 5660 A 3 5661Compile options: dupnames 5662Overall options: anchored dupnames 5663Subject length lower bound = 2 5664 a1b\=copy=A 5665 0: a1 5666 1: a1 5667 2: a1 5668 C a1 (2) A (non-unique) 5669 a2b\=copy=A 5670 0: a2b 5671 1: a2b 5672 2: <unset> 5673 3: a2 5674 C a2 (2) A (non-unique) 5675 a1b\=copy=Z,copy=A 5676 0: a1 5677 1: a1 5678 2: a1 5679Number not found for group 'Z' 5680Copy substring 'Z' failed (-49): unknown substring 5681 C a1 (2) A (non-unique) 5682 5683/(?|(?<a>)(?<b>)(?<a>)|(?<a>)(?<b>)(?<a>))/I,dupnames 5684Capturing subpattern count = 3 5685Named capturing subpatterns: 5686 a 1 5687 a 3 5688 b 2 5689May match empty string 5690Options: dupnames 5691Subject length lower bound = 0 5692 5693/^(?P<A>a)(?P<A>b)/I,dupnames 5694Capturing subpattern count = 2 5695Named capturing subpatterns: 5696 A 1 5697 A 2 5698Compile options: dupnames 5699Overall options: anchored dupnames 5700Subject length lower bound = 2 5701 ab\=copy=A 5702 0: ab 5703 1: a 5704 2: b 5705 C a (1) A (non-unique) 5706 5707/^(?P<A>a)(?P<A>b)|cd/I,dupnames 5708Capturing subpattern count = 2 5709Named capturing subpatterns: 5710 A 1 5711 A 2 5712Options: dupnames 5713Subject length lower bound = 2 5714 ab\=copy=A 5715 0: ab 5716 1: a 5717 2: b 5718 C a (1) A (non-unique) 5719 cd\=copy=A 5720 0: cd 5721Copy substring 'A' failed (-55): requested value is not set 5722 5723/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/I,dupnames 5724Capturing subpattern count = 4 5725Named capturing subpatterns: 5726 A 1 5727 A 2 5728 A 3 5729 A 4 5730Options: dupnames 5731Subject length lower bound = 2 5732 cdefgh\=copy=A 5733 0: cdefgh 5734 1: <unset> 5735 2: <unset> 5736 3: ef 5737 4: gh 5738 C ef (2) A (non-unique) 5739 5740/^((?P<A>a1)|(?P<A>a2)b)/I,dupnames 5741Capturing subpattern count = 3 5742Named capturing subpatterns: 5743 A 2 5744 A 3 5745Compile options: dupnames 5746Overall options: anchored dupnames 5747Subject length lower bound = 2 5748 a1b\=get=A 5749 0: a1 5750 1: a1 5751 2: a1 5752 G a1 (2) A (non-unique) 5753 a2b\=get=A 5754 0: a2b 5755 1: a2b 5756 2: <unset> 5757 3: a2 5758 G a2 (2) A (non-unique) 5759 a1b\=get=Z,get=A 5760 0: a1 5761 1: a1 5762 2: a1 5763Number not found for group 'Z' 5764Get substring 'Z' failed (-49): unknown substring 5765 G a1 (2) A (non-unique) 5766 5767/^(?P<A>a)(?P<A>b)/I,dupnames 5768Capturing subpattern count = 2 5769Named capturing subpatterns: 5770 A 1 5771 A 2 5772Compile options: dupnames 5773Overall options: anchored dupnames 5774Subject length lower bound = 2 5775 ab\=get=A 5776 0: ab 5777 1: a 5778 2: b 5779 G a (1) A (non-unique) 5780 5781/^(?P<A>a)(?P<A>b)|cd/I,dupnames 5782Capturing subpattern count = 2 5783Named capturing subpatterns: 5784 A 1 5785 A 2 5786Options: dupnames 5787Subject length lower bound = 2 5788 ab\=get=A 5789 0: ab 5790 1: a 5791 2: b 5792 G a (1) A (non-unique) 5793 cd\=get=A 5794 0: cd 5795Get substring 'A' failed (-55): requested value is not set 5796 5797/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/I,dupnames 5798Capturing subpattern count = 4 5799Named capturing subpatterns: 5800 A 1 5801 A 2 5802 A 3 5803 A 4 5804Options: dupnames 5805Subject length lower bound = 2 5806 cdefgh\=get=A 5807 0: cdefgh 5808 1: <unset> 5809 2: <unset> 5810 3: ef 5811 4: gh 5812 G ef (2) A (non-unique) 5813 5814/(?J)^((?P<A>a1)|(?P<A>a2)b)/I 5815Capturing subpattern count = 3 5816Named capturing subpatterns: 5817 A 2 5818 A 3 5819Compile options: <none> 5820Overall options: anchored 5821Duplicate name status changes 5822Subject length lower bound = 2 5823 a1b\=copy=A 5824 0: a1 5825 1: a1 5826 2: a1 5827 C a1 (2) A (non-unique) 5828 a2b\=copy=A 5829 0: a2b 5830 1: a2b 5831 2: <unset> 5832 3: a2 5833 C a2 (2) A (non-unique) 5834 5835/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I 5836Failed: error 143 at offset 37: two named subpatterns have the same name (PCRE2_DUPNAMES not set) 5837 5838# In this next test, J is not set at the outer level; consequently it isn't set 5839# in the pattern's options; consequently pcre2_substring_get_byname() produces 5840# a random value. 5841 5842/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I 5843Capturing subpattern count = 4 5844Named capturing subpatterns: 5845 A 1 5846 B 2 5847 B 3 5848 C 4 5849Compile options: <none> 5850Overall options: anchored 5851Duplicate name status changes 5852Subject length lower bound = 6 5853 a bc d\=copy=A,copy=B,copy=C 5854 0: a bc d 5855 1: a 5856 2: b 5857 3: c 5858 4: d 5859 C a (1) A (group 1) 5860 C b (1) B (non-unique) 5861 C d (1) C (group 4) 5862 5863/^(?P<A>a)?(?(A)a|b)/I 5864Capturing subpattern count = 1 5865Max back reference = 1 5866Named capturing subpatterns: 5867 A 1 5868Compile options: <none> 5869Overall options: anchored 5870Subject length lower bound = 1 5871 aabc 5872 0: aa 5873 1: a 5874 bc 5875 0: b 5876\= Expect no match 5877 abc 5878No match 5879 5880/(?:(?(ZZ)a|b)(?P<ZZ>X))+/I 5881Capturing subpattern count = 1 5882Max back reference = 1 5883Named capturing subpatterns: 5884 ZZ 1 5885Last code unit = 'X' 5886Subject length lower bound = 2 5887 bXaX 5888 0: bXaX 5889 1: X 5890 5891/(?:(?(2y)a|b)(X))+/I 5892Failed: error 126 at offset 7: malformed number or name after (?( 5893 5894/(?:(?(ZA)a|b)(?P<ZZ>X))+/I 5895Failed: error 115 at offset 9: reference to non-existent subpattern 5896 5897/(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I 5898Capturing subpattern count = 1 5899Max back reference = 1 5900Named capturing subpatterns: 5901 ZZ 1 5902Last code unit = 'X' 5903Subject length lower bound = 3 5904 bbXaaX 5905 0: bbXaaX 5906 1: X 5907 5908/(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I 5909Capturing subpattern count = 1 5910Max back reference = 1 5911Named capturing subpatterns: 5912 ZZ 1 5913Last code unit = 'X' 5914Subject length lower bound = 3 5915 (b)\\Xa\\X 5916 0: (b)\Xa\X 5917 1: X 5918 5919/(?P<ABC/I 5920Failed: error 142 at offset 7: syntax error in subpattern name (missing terminator) 5921 5922/(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I 5923Capturing subpattern count = 1 5924Max back reference = 1 5925Named capturing subpatterns: 5926 A 1 5927Subject length lower bound = 2 5928 bXXaYYaY 5929 0: bXXaYYaY 5930 1: Y 5931 bXYaXXaX 5932 0: bX 5933 1: X 5934 5935/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I 5936Capturing subpattern count = 10 5937Max back reference = 10 5938Named capturing subpatterns: 5939 A 10 5940Subject length lower bound = 2 5941 bXXaYYaY 5942 0: bXXaYYaY 5943 1: 5944 2: 5945 3: 5946 4: 5947 5: 5948 6: 5949 7: 5950 8: 5951 9: 595210: Y 5953 5954/\s*,\s*/I 5955Capturing subpattern count = 0 5956Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 , 5957Last code unit = ',' 5958Subject length lower bound = 1 5959 \x0b,\x0b 5960 0: \x0b,\x0b 5961 \x0c,\x0d 5962 0: \x0c,\x0d 5963 5964/^abc/Im,newline=lf 5965Capturing subpattern count = 0 5966Options: multiline 5967Forced newline is LF 5968First code unit at start or follows newline 5969Last code unit = 'c' 5970Subject length lower bound = 3 5971 xyz\nabc 5972 0: abc 5973 xyz\r\nabc 5974 0: abc 5975\= Expect no match 5976 xyz\rabc 5977No match 5978 xyzabc\r 5979No match 5980 xyzabc\rpqr 5981No match 5982 xyzabc\r\n 5983No match 5984 xyzabc\r\npqr 5985No match 5986 5987/^abc/Im,newline=crlf 5988Capturing subpattern count = 0 5989Options: multiline 5990Forced newline is CRLF 5991First code unit at start or follows newline 5992Last code unit = 'c' 5993Subject length lower bound = 3 5994 xyz\r\nabclf> 5995 0: abc 5996\= Expect no match 5997 xyz\nabclf 5998No match 5999 xyz\rabclf 6000No match 6001 6002/^abc/Im,newline=cr 6003Capturing subpattern count = 0 6004Options: multiline 6005Forced newline is CR 6006First code unit at start or follows newline 6007Last code unit = 'c' 6008Subject length lower bound = 3 6009 xyz\rabc 6010 0: abc 6011\= Expect no match 6012 xyz\nabc 6013No match 6014 xyz\r\nabc 6015No match 6016 6017/^abc/Im,newline=bad 6018** Invalid value in 'newline=bad' 6019 6020/.*/I,newline=lf 6021Capturing subpattern count = 0 6022May match empty string 6023Forced newline is LF 6024First code unit at start or follows newline 6025Subject length lower bound = 0 6026 abc\ndef 6027 0: abc 6028 abc\rdef 6029 0: abc\x0ddef 6030 abc\r\ndef 6031 0: abc\x0d 6032 6033/.*/I,newline=cr 6034Capturing subpattern count = 0 6035May match empty string 6036Forced newline is CR 6037First code unit at start or follows newline 6038Subject length lower bound = 0 6039 abc\ndef 6040 0: abc\x0adef 6041 abc\rdef 6042 0: abc 6043 abc\r\ndef 6044 0: abc 6045 6046/.*/I,newline=crlf 6047Capturing subpattern count = 0 6048May match empty string 6049Forced newline is CRLF 6050First code unit at start or follows newline 6051Subject length lower bound = 0 6052 abc\ndef 6053 0: abc\x0adef 6054 abc\rdef 6055 0: abc\x0ddef 6056 abc\r\ndef 6057 0: abc 6058 6059/\w+(.)(.)?def/Is 6060Capturing subpattern count = 2 6061Options: dotall 6062Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P 6063 Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z 6064Last code unit = 'f' 6065Subject length lower bound = 5 6066 abc\ndef 6067 0: abc\x0adef 6068 1: \x0a 6069 abc\rdef 6070 0: abc\x0ddef 6071 1: \x0d 6072 abc\r\ndef 6073 0: abc\x0d\x0adef 6074 1: \x0d 6075 2: \x0a 6076 6077/(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I 6078Capturing subpattern count = 1 6079Named capturing subpatterns: 6080 B 1 6081Starting code units: 0 1 2 3 4 5 6 7 8 9 6082Last code unit = '.' 6083Subject length lower bound = 7 6084 6085/()()()()()()()()()()()()()()()()()()()() 6086 ()()()()()()()()()()()()()()()()()()()() 6087 ()()()()()()()()()()()()()()()()()()()() 6088 ()()()()()()()()()()()()()()()()()()()() 6089 ()()()()()()()()()()()()()()()()()()()() 6090 (.(.))/Ix 6091Capturing subpattern count = 102 6092Options: extended 6093Subject length lower bound = 2 6094 XY\=ovector=133 6095 0: XY 6096 1: 6097 2: 6098 3: 6099 4: 6100 5: 6101 6: 6102 7: 6103 8: 6104 9: 610510: 610611: 610712: 610813: 610914: 611015: 611116: 611217: 611318: 611419: 611520: 611621: 611722: 611823: 611924: 612025: 612126: 612227: 612328: 612429: 612530: 612631: 612732: 612833: 612934: 613035: 613136: 613237: 613338: 613439: 613540: 613641: 613742: 613843: 613944: 614045: 614146: 614247: 614348: 614449: 614550: 614651: 614752: 614853: 614954: 615055: 615156: 615257: 615358: 615459: 615560: 615661: 615762: 615863: 615964: 616065: 616166: 616267: 616368: 616469: 616570: 616671: 616772: 616873: 616974: 617075: 617176: 617277: 617378: 617479: 617580: 617681: 617782: 617883: 617984: 618085: 618186: 618287: 618388: 618489: 618590: 618691: 618792: 618893: 618994: 619095: 619196: 619297: 619398: 619499: 6195100: 6196101: XY 6197102: Y 6198 6199/(a*b|(?i:c*(?-i)d))/I 6200Capturing subpattern count = 1 6201Starting code units: C a b c d 6202Subject length lower bound = 1 6203 6204/()[ab]xyz/I 6205Capturing subpattern count = 1 6206Starting code units: a b 6207Last code unit = 'z' 6208Subject length lower bound = 4 6209 6210/(|)[ab]xyz/I 6211Capturing subpattern count = 1 6212Starting code units: a b 6213Last code unit = 'z' 6214Subject length lower bound = 4 6215 6216/(|c)[ab]xyz/I 6217Capturing subpattern count = 1 6218Starting code units: a b c 6219Last code unit = 'z' 6220Subject length lower bound = 4 6221 6222/(|c?)[ab]xyz/I 6223Capturing subpattern count = 1 6224Starting code units: a b c 6225Last code unit = 'z' 6226Subject length lower bound = 4 6227 6228/(d?|c?)[ab]xyz/I 6229Capturing subpattern count = 1 6230Starting code units: a b c d 6231Last code unit = 'z' 6232Subject length lower bound = 4 6233 6234/(d?|c)[ab]xyz/I 6235Capturing subpattern count = 1 6236Starting code units: a b c d 6237Last code unit = 'z' 6238Subject length lower bound = 4 6239 6240/^a*b\d/IB 6241------------------------------------------------------------------ 6242 Bra 6243 ^ 6244 a*+ 6245 b 6246 \d 6247 Ket 6248 End 6249------------------------------------------------------------------ 6250Capturing subpattern count = 0 6251Compile options: <none> 6252Overall options: anchored 6253Last code unit = 'b' 6254Subject length lower bound = 2 6255 6256/^a*+b\d/IB 6257------------------------------------------------------------------ 6258 Bra 6259 ^ 6260 a*+ 6261 b 6262 \d 6263 Ket 6264 End 6265------------------------------------------------------------------ 6266Capturing subpattern count = 0 6267Compile options: <none> 6268Overall options: anchored 6269Last code unit = 'b' 6270Subject length lower bound = 2 6271 6272/^a*?b\d/IB 6273------------------------------------------------------------------ 6274 Bra 6275 ^ 6276 a*+ 6277 b 6278 \d 6279 Ket 6280 End 6281------------------------------------------------------------------ 6282Capturing subpattern count = 0 6283Compile options: <none> 6284Overall options: anchored 6285Last code unit = 'b' 6286Subject length lower bound = 2 6287 6288/^a+A\d/IB 6289------------------------------------------------------------------ 6290 Bra 6291 ^ 6292 a++ 6293 A 6294 \d 6295 Ket 6296 End 6297------------------------------------------------------------------ 6298Capturing subpattern count = 0 6299Compile options: <none> 6300Overall options: anchored 6301Last code unit = 'A' 6302Subject length lower bound = 3 6303 aaaA5 6304 0: aaaA5 6305\= Expect no match 6306 aaaa5 6307No match 6308 6309/^a*A\d/IBi 6310------------------------------------------------------------------ 6311 Bra 6312 ^ 6313 /i a* 6314 /i A 6315 \d 6316 Ket 6317 End 6318------------------------------------------------------------------ 6319Capturing subpattern count = 0 6320Compile options: caseless 6321Overall options: anchored caseless 6322Last code unit = 'A' (caseless) 6323Subject length lower bound = 2 6324 aaaA5 6325 0: aaaA5 6326 aaaa5 6327 0: aaaa5 6328 6329/(a*|b*)[cd]/I 6330Capturing subpattern count = 1 6331Starting code units: a b c d 6332Subject length lower bound = 1 6333 6334/(a+|b*)[cd]/I 6335Capturing subpattern count = 1 6336Starting code units: a b c d 6337Subject length lower bound = 1 6338 6339/(a*|b+)[cd]/I 6340Capturing subpattern count = 1 6341Starting code units: a b c d 6342Subject length lower bound = 1 6343 6344/(a+|b+)[cd]/I 6345Capturing subpattern count = 1 6346Starting code units: a b 6347Subject length lower bound = 2 6348 6349/(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 6350 (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 6351 ((( 6352 a 6353 )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) 6354 )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) 6355 ))) 6356/Ix 6357Capturing subpattern count = 203 6358Options: extended 6359First code unit = 'a' 6360Subject length lower bound = 1 6361 large nest 6362Matched, but too many substrings 6363 0: a 6364 1: a 6365 2: a 6366 3: a 6367 4: a 6368 5: a 6369 6: a 6370 7: a 6371 8: a 6372 9: a 637310: a 637411: a 637512: a 637613: a 637714: a 6378 6379/a*\d/B 6380------------------------------------------------------------------ 6381 Bra 6382 a*+ 6383 \d 6384 Ket 6385 End 6386------------------------------------------------------------------ 6387 6388/a*\D/B 6389------------------------------------------------------------------ 6390 Bra 6391 a* 6392 \D 6393 Ket 6394 End 6395------------------------------------------------------------------ 6396 6397/0*\d/B 6398------------------------------------------------------------------ 6399 Bra 6400 0* 6401 \d 6402 Ket 6403 End 6404------------------------------------------------------------------ 6405 6406/0*\D/B 6407------------------------------------------------------------------ 6408 Bra 6409 0*+ 6410 \D 6411 Ket 6412 End 6413------------------------------------------------------------------ 6414 6415/a*\s/B 6416------------------------------------------------------------------ 6417 Bra 6418 a*+ 6419 \s 6420 Ket 6421 End 6422------------------------------------------------------------------ 6423 6424/a*\S/B 6425------------------------------------------------------------------ 6426 Bra 6427 a* 6428 \S 6429 Ket 6430 End 6431------------------------------------------------------------------ 6432 6433/ *\s/B 6434------------------------------------------------------------------ 6435 Bra 6436 * 6437 \s 6438 Ket 6439 End 6440------------------------------------------------------------------ 6441 6442/ *\S/B 6443------------------------------------------------------------------ 6444 Bra 6445 *+ 6446 \S 6447 Ket 6448 End 6449------------------------------------------------------------------ 6450 6451/a*\w/B 6452------------------------------------------------------------------ 6453 Bra 6454 a* 6455 \w 6456 Ket 6457 End 6458------------------------------------------------------------------ 6459 6460/a*\W/B 6461------------------------------------------------------------------ 6462 Bra 6463 a*+ 6464 \W 6465 Ket 6466 End 6467------------------------------------------------------------------ 6468 6469/=*\w/B 6470------------------------------------------------------------------ 6471 Bra 6472 =*+ 6473 \w 6474 Ket 6475 End 6476------------------------------------------------------------------ 6477 6478/=*\W/B 6479------------------------------------------------------------------ 6480 Bra 6481 =* 6482 \W 6483 Ket 6484 End 6485------------------------------------------------------------------ 6486 6487/\d*a/B 6488------------------------------------------------------------------ 6489 Bra 6490 \d*+ 6491 a 6492 Ket 6493 End 6494------------------------------------------------------------------ 6495 6496/\d*2/B 6497------------------------------------------------------------------ 6498 Bra 6499 \d* 6500 2 6501 Ket 6502 End 6503------------------------------------------------------------------ 6504 6505/\d*\d/B 6506------------------------------------------------------------------ 6507 Bra 6508 \d* 6509 \d 6510 Ket 6511 End 6512------------------------------------------------------------------ 6513 6514/\d*\D/B 6515------------------------------------------------------------------ 6516 Bra 6517 \d*+ 6518 \D 6519 Ket 6520 End 6521------------------------------------------------------------------ 6522 6523/\d*\s/B 6524------------------------------------------------------------------ 6525 Bra 6526 \d*+ 6527 \s 6528 Ket 6529 End 6530------------------------------------------------------------------ 6531 6532/\d*\S/B 6533------------------------------------------------------------------ 6534 Bra 6535 \d* 6536 \S 6537 Ket 6538 End 6539------------------------------------------------------------------ 6540 6541/\d*\w/B 6542------------------------------------------------------------------ 6543 Bra 6544 \d* 6545 \w 6546 Ket 6547 End 6548------------------------------------------------------------------ 6549 6550/\d*\W/B 6551------------------------------------------------------------------ 6552 Bra 6553 \d*+ 6554 \W 6555 Ket 6556 End 6557------------------------------------------------------------------ 6558 6559/\D*a/B 6560------------------------------------------------------------------ 6561 Bra 6562 \D* 6563 a 6564 Ket 6565 End 6566------------------------------------------------------------------ 6567 6568/\D*2/B 6569------------------------------------------------------------------ 6570 Bra 6571 \D*+ 6572 2 6573 Ket 6574 End 6575------------------------------------------------------------------ 6576 6577/\D*\d/B 6578------------------------------------------------------------------ 6579 Bra 6580 \D*+ 6581 \d 6582 Ket 6583 End 6584------------------------------------------------------------------ 6585 6586/\D*\D/B 6587------------------------------------------------------------------ 6588 Bra 6589 \D* 6590 \D 6591 Ket 6592 End 6593------------------------------------------------------------------ 6594 6595/\D*\s/B 6596------------------------------------------------------------------ 6597 Bra 6598 \D* 6599 \s 6600 Ket 6601 End 6602------------------------------------------------------------------ 6603 6604/\D*\S/B 6605------------------------------------------------------------------ 6606 Bra 6607 \D* 6608 \S 6609 Ket 6610 End 6611------------------------------------------------------------------ 6612 6613/\D*\w/B 6614------------------------------------------------------------------ 6615 Bra 6616 \D* 6617 \w 6618 Ket 6619 End 6620------------------------------------------------------------------ 6621 6622/\D*\W/B 6623------------------------------------------------------------------ 6624 Bra 6625 \D* 6626 \W 6627 Ket 6628 End 6629------------------------------------------------------------------ 6630 6631/\s*a/B 6632------------------------------------------------------------------ 6633 Bra 6634 \s*+ 6635 a 6636 Ket 6637 End 6638------------------------------------------------------------------ 6639 6640/\s*2/B 6641------------------------------------------------------------------ 6642 Bra 6643 \s*+ 6644 2 6645 Ket 6646 End 6647------------------------------------------------------------------ 6648 6649/\s*\d/B 6650------------------------------------------------------------------ 6651 Bra 6652 \s*+ 6653 \d 6654 Ket 6655 End 6656------------------------------------------------------------------ 6657 6658/\s*\D/B 6659------------------------------------------------------------------ 6660 Bra 6661 \s* 6662 \D 6663 Ket 6664 End 6665------------------------------------------------------------------ 6666 6667/\s*\s/B 6668------------------------------------------------------------------ 6669 Bra 6670 \s* 6671 \s 6672 Ket 6673 End 6674------------------------------------------------------------------ 6675 6676/\s*\S/B 6677------------------------------------------------------------------ 6678 Bra 6679 \s*+ 6680 \S 6681 Ket 6682 End 6683------------------------------------------------------------------ 6684 6685/\s*\w/B 6686------------------------------------------------------------------ 6687 Bra 6688 \s*+ 6689 \w 6690 Ket 6691 End 6692------------------------------------------------------------------ 6693 6694/\s*\W/B 6695------------------------------------------------------------------ 6696 Bra 6697 \s* 6698 \W 6699 Ket 6700 End 6701------------------------------------------------------------------ 6702 6703/\S*a/B 6704------------------------------------------------------------------ 6705 Bra 6706 \S* 6707 a 6708 Ket 6709 End 6710------------------------------------------------------------------ 6711 6712/\S*2/B 6713------------------------------------------------------------------ 6714 Bra 6715 \S* 6716 2 6717 Ket 6718 End 6719------------------------------------------------------------------ 6720 6721/\S*\d/B 6722------------------------------------------------------------------ 6723 Bra 6724 \S* 6725 \d 6726 Ket 6727 End 6728------------------------------------------------------------------ 6729 6730/\S*\D/B 6731------------------------------------------------------------------ 6732 Bra 6733 \S* 6734 \D 6735 Ket 6736 End 6737------------------------------------------------------------------ 6738 6739/\S*\s/B 6740------------------------------------------------------------------ 6741 Bra 6742 \S*+ 6743 \s 6744 Ket 6745 End 6746------------------------------------------------------------------ 6747 6748/\S*\S/B 6749------------------------------------------------------------------ 6750 Bra 6751 \S* 6752 \S 6753 Ket 6754 End 6755------------------------------------------------------------------ 6756 6757/\S*\w/B 6758------------------------------------------------------------------ 6759 Bra 6760 \S* 6761 \w 6762 Ket 6763 End 6764------------------------------------------------------------------ 6765 6766/\S*\W/B 6767------------------------------------------------------------------ 6768 Bra 6769 \S* 6770 \W 6771 Ket 6772 End 6773------------------------------------------------------------------ 6774 6775/\w*a/B 6776------------------------------------------------------------------ 6777 Bra 6778 \w* 6779 a 6780 Ket 6781 End 6782------------------------------------------------------------------ 6783 6784/\w*2/B 6785------------------------------------------------------------------ 6786 Bra 6787 \w* 6788 2 6789 Ket 6790 End 6791------------------------------------------------------------------ 6792 6793/\w*\d/B 6794------------------------------------------------------------------ 6795 Bra 6796 \w* 6797 \d 6798 Ket 6799 End 6800------------------------------------------------------------------ 6801 6802/\w*\D/B 6803------------------------------------------------------------------ 6804 Bra 6805 \w* 6806 \D 6807 Ket 6808 End 6809------------------------------------------------------------------ 6810 6811/\w*\s/B 6812------------------------------------------------------------------ 6813 Bra 6814 \w*+ 6815 \s 6816 Ket 6817 End 6818------------------------------------------------------------------ 6819 6820/\w*\S/B 6821------------------------------------------------------------------ 6822 Bra 6823 \w* 6824 \S 6825 Ket 6826 End 6827------------------------------------------------------------------ 6828 6829/\w*\w/B 6830------------------------------------------------------------------ 6831 Bra 6832 \w* 6833 \w 6834 Ket 6835 End 6836------------------------------------------------------------------ 6837 6838/\w*\W/B 6839------------------------------------------------------------------ 6840 Bra 6841 \w*+ 6842 \W 6843 Ket 6844 End 6845------------------------------------------------------------------ 6846 6847/\W*a/B 6848------------------------------------------------------------------ 6849 Bra 6850 \W*+ 6851 a 6852 Ket 6853 End 6854------------------------------------------------------------------ 6855 6856/\W*2/B 6857------------------------------------------------------------------ 6858 Bra 6859 \W*+ 6860 2 6861 Ket 6862 End 6863------------------------------------------------------------------ 6864 6865/\W*\d/B 6866------------------------------------------------------------------ 6867 Bra 6868 \W*+ 6869 \d 6870 Ket 6871 End 6872------------------------------------------------------------------ 6873 6874/\W*\D/B 6875------------------------------------------------------------------ 6876 Bra 6877 \W* 6878 \D 6879 Ket 6880 End 6881------------------------------------------------------------------ 6882 6883/\W*\s/B 6884------------------------------------------------------------------ 6885 Bra 6886 \W* 6887 \s 6888 Ket 6889 End 6890------------------------------------------------------------------ 6891 6892/\W*\S/B 6893------------------------------------------------------------------ 6894 Bra 6895 \W* 6896 \S 6897 Ket 6898 End 6899------------------------------------------------------------------ 6900 6901/\W*\w/B 6902------------------------------------------------------------------ 6903 Bra 6904 \W*+ 6905 \w 6906 Ket 6907 End 6908------------------------------------------------------------------ 6909 6910/\W*\W/B 6911------------------------------------------------------------------ 6912 Bra 6913 \W* 6914 \W 6915 Ket 6916 End 6917------------------------------------------------------------------ 6918 6919/[^a]+a/B 6920------------------------------------------------------------------ 6921 Bra 6922 [^a]++ 6923 a 6924 Ket 6925 End 6926------------------------------------------------------------------ 6927 6928/[^a]+a/Bi 6929------------------------------------------------------------------ 6930 Bra 6931 /i [^a]++ 6932 /i a 6933 Ket 6934 End 6935------------------------------------------------------------------ 6936 6937/[^a]+A/Bi 6938------------------------------------------------------------------ 6939 Bra 6940 /i [^a]++ 6941 /i A 6942 Ket 6943 End 6944------------------------------------------------------------------ 6945 6946/[^a]+b/B 6947------------------------------------------------------------------ 6948 Bra 6949 [^a]+ 6950 b 6951 Ket 6952 End 6953------------------------------------------------------------------ 6954 6955/[^a]+\d/B 6956------------------------------------------------------------------ 6957 Bra 6958 [^a]+ 6959 \d 6960 Ket 6961 End 6962------------------------------------------------------------------ 6963 6964/a*[^a]/B 6965------------------------------------------------------------------ 6966 Bra 6967 a*+ 6968 [^a] 6969 Ket 6970 End 6971------------------------------------------------------------------ 6972 6973/(?P<abc>x)(?P<xyz>y)/I 6974Capturing subpattern count = 2 6975Named capturing subpatterns: 6976 abc 1 6977 xyz 2 6978First code unit = 'x' 6979Last code unit = 'y' 6980Subject length lower bound = 2 6981 xy\=copy=abc,copy=xyz 6982 0: xy 6983 1: x 6984 2: y 6985 C x (1) abc (group 1) 6986 C y (1) xyz (group 2) 6987 6988/(?<abc>x)(?'xyz'y)/I 6989Capturing subpattern count = 2 6990Named capturing subpatterns: 6991 abc 1 6992 xyz 2 6993First code unit = 'x' 6994Last code unit = 'y' 6995Subject length lower bound = 2 6996 xy\=copy=abc,copy=xyz 6997 0: xy 6998 1: x 6999 2: y 7000 C x (1) abc (group 1) 7001 C y (1) xyz (group 2) 7002 7003/(?<abc'x)(?'xyz'y)/I 7004Failed: error 142 at offset 6: syntax error in subpattern name (missing terminator) 7005 7006/(?<abc>x)(?'xyz>y)/I 7007Failed: error 142 at offset 15: syntax error in subpattern name (missing terminator) 7008 7009/(?P'abc'x)(?P<xyz>y)/I 7010Failed: error 141 at offset 3: unrecognized character after (?P 7011 7012/^(?:(?(ZZ)a|b)(?<ZZ>X))+/ 7013 bXaX 7014 0: bXaX 7015 1: X 7016 bXbX 7017 0: bX 7018 1: X 7019\= Expect no match 7020 aXaX 7021No match 7022 aXbX 7023No match 7024 7025/^(?P>abc)(?<abcd>xxx)/ 7026Failed: error 115 at offset 8: reference to non-existent subpattern 7027 7028/^(?P>abc)(?<abc>x|y)/ 7029 xx 7030 0: xx 7031 1: x 7032 xy 7033 0: xy 7034 1: y 7035 yy 7036 0: yy 7037 1: y 7038 yx 7039 0: yx 7040 1: x 7041 7042/^(?P>abc)(?P<abc>x|y)/ 7043 xx 7044 0: xx 7045 1: x 7046 xy 7047 0: xy 7048 1: y 7049 yy 7050 0: yy 7051 1: y 7052 yx 7053 0: yx 7054 1: x 7055 7056/^((?(abc)a|b)(?<abc>x|y))+/ 7057 bxay 7058 0: bxay 7059 1: ay 7060 2: y 7061 bxby 7062 0: bx 7063 1: bx 7064 2: x 7065\= Expect no match 7066 axby 7067No match 7068 7069/^(((?P=abc)|X)(?<abc>x|y))+/ 7070 XxXxxx 7071 0: XxXxxx 7072 1: xx 7073 2: x 7074 3: x 7075 XxXyyx 7076 0: XxXyyx 7077 1: yx 7078 2: y 7079 3: x 7080 XxXyxx 7081 0: XxXy 7082 1: Xy 7083 2: X 7084 3: y 7085\= Expect no match 7086 x 7087No match 7088 7089/^(?1)(abc)/ 7090 abcabc 7091 0: abcabc 7092 1: abc 7093 7094/^(?:(?:\1|X)(a|b))+/ 7095 Xaaa 7096 0: Xaaa 7097 1: a 7098 Xaba 7099 0: Xa 7100 1: a 7101 7102/^[\E\Qa\E-\Qz\E]+/B 7103------------------------------------------------------------------ 7104 Bra 7105 ^ 7106 [a-z]++ 7107 Ket 7108 End 7109------------------------------------------------------------------ 7110 7111/^[a\Q]bc\E]/B 7112------------------------------------------------------------------ 7113 Bra 7114 ^ 7115 [\]a-c] 7116 Ket 7117 End 7118------------------------------------------------------------------ 7119 7120/^[a-\Q\E]/B 7121------------------------------------------------------------------ 7122 Bra 7123 ^ 7124 [\-a] 7125 Ket 7126 End 7127------------------------------------------------------------------ 7128 7129/^(?P>abc)[()](?<abc>)/B 7130------------------------------------------------------------------ 7131 Bra 7132 ^ 7133 Recurse 7134 [()] 7135 CBra 1 7136 Ket 7137 Ket 7138 End 7139------------------------------------------------------------------ 7140 7141/^((?(abc)y)[()](?P<abc>x))+/B 7142------------------------------------------------------------------ 7143 Bra 7144 ^ 7145 CBra 1 7146 Cond 7147 2 Cond ref 7148 y 7149 Ket 7150 [()] 7151 CBra 2 7152 x 7153 Ket 7154 KetRmax 7155 Ket 7156 End 7157------------------------------------------------------------------ 7158 (xy)x 7159 0: (xy)x 7160 1: y)x 7161 2: x 7162 7163/^(?P>abc)\Q()\E(?<abc>)/B 7164------------------------------------------------------------------ 7165 Bra 7166 ^ 7167 Recurse 7168 () 7169 CBra 1 7170 Ket 7171 Ket 7172 End 7173------------------------------------------------------------------ 7174 7175/^(?P>abc)[a\Q(]\E(](?<abc>)/B 7176------------------------------------------------------------------ 7177 Bra 7178 ^ 7179 Recurse 7180 [(\]a] 7181 CBra 1 7182 Ket 7183 Ket 7184 End 7185------------------------------------------------------------------ 7186 7187/^(?P>abc) # this is (a comment) 7188 (?<abc>)/Bx 7189------------------------------------------------------------------ 7190 Bra 7191 ^ 7192 Recurse 7193 CBra 1 7194 Ket 7195 Ket 7196 End 7197------------------------------------------------------------------ 7198 7199/^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii 7200Capturing subpattern count = 4 7201Max back reference = 4 7202Named capturing subpatterns: 7203 four 4 7204 one 1 7205 three 3 7206 two 2 7207May match empty string 7208Compile options: caseless 7209Overall options: anchored caseless 7210Subject length lower bound = 0 7211 1221 7212 0: 1221 7213 1: 1221 7214 2: 1 7215 Satan, oscillate my metallic sonatas! 7216 0: Satan, oscillate my metallic sonatas! 7217 1: <unset> 7218 2: <unset> 7219 3: Satan, oscillate my metallic sonatas 7220 4: S 7221 A man, a plan, a canal: Panama! 7222 0: A man, a plan, a canal: Panama! 7223 1: <unset> 7224 2: <unset> 7225 3: A man, a plan, a canal: Panama 7226 4: A 7227 Able was I ere I saw Elba. 7228 0: Able was I ere I saw Elba. 7229 1: <unset> 7230 2: <unset> 7231 3: Able was I ere I saw Elba 7232 4: A 7233\= Expect no match 7234 The quick brown fox 7235No match 7236 7237/(?=(\w+))\1:/I 7238Capturing subpattern count = 1 7239Max back reference = 1 7240Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P 7241 Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z 7242Last code unit = ':' 7243Subject length lower bound = 2 7244 abcd: 7245 0: abcd: 7246 1: abcd 7247 7248/(?=(?'abc'\w+))\k<abc>:/I 7249Capturing subpattern count = 1 7250Max back reference = 1 7251Named capturing subpatterns: 7252 abc 1 7253Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P 7254 Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z 7255Last code unit = ':' 7256Subject length lower bound = 2 7257 abcd: 7258 0: abcd: 7259 1: abcd 7260 7261/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/dupnames 7262 adaa 7263 0: adaa 7264 1: a 7265 2: d 7266\= Expect no match 7267 addd 7268No match 7269 adbb 7270No match 7271 7272/(?'abc'a|b)(?<abc>d|e)(?&abc){2}/dupnames 7273 bdaa 7274 0: bdaa 7275 1: b 7276 2: d 7277 bdab 7278 0: bdab 7279 1: b 7280 2: d 7281\= Expect no match 7282 bddd 7283No match 7284 7285/(?(<bc))/ 7286Failed: error 126 at offset 6: malformed number or name after (?( 7287 7288/(?(''))/ 7289Failed: error 128 at offset 4: assertion expected after (?( or (?(?C) 7290 7291/(?('R')stuff)/ 7292Failed: error 115 at offset 7: reference to non-existent subpattern 7293 7294/((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) /x 7295 abcabc1Xabc2XabcXabcabc 7296 0: abcabc1Xabc2XabcX 7297 1: abcabc1Xabc2XabcX 7298 2: abcabc1Xabc2XabcX 7299 7300/(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x 7301 abcabc1Xabc2XabcXabcabc 7302 0: abcabc1Xabc2XabcX 7303 1: abcabc1Xabc2XabcX 7304 2: abcabc1Xabc2XabcX 7305 7306/(?<A> (?'B' abc (?(R) (?(R&C)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x 7307Failed: error 115 at offset 29: reference to non-existent subpattern 7308 7309/^(?(DEFINE) abc | xyz ) /x 7310Failed: error 154 at offset 22: DEFINE group contains more than one branch 7311 7312/(?(DEFINE) abc) xyz/Ix 7313Capturing subpattern count = 0 7314Options: extended 7315First code unit = 'x' 7316Last code unit = 'z' 7317Subject length lower bound = 3 7318 7319/(a|)*\d/ 7320 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4\=ovector=0 7321 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 7322 1: 7323\= Expect no match 7324 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\=ovector=0 7325No match 7326 7327/^a.b/newline=lf 7328 a\rb 7329 0: a\x0db 7330\= Expect no match 7331 a\nb 7332No match 7333 7334/^a.b/newline=cr 7335 a\nb 7336 0: a\x0ab 7337\= Expect no match 7338 a\rb 7339No match 7340 7341/^a.b/newline=anycrlf 7342 a\x85b 7343 0: a\x85b 7344\= Expect no match 7345 a\rb 7346No match 7347 7348/^a.b/newline=any 7349\= Expect no match 7350 a\nb 7351No match 7352 a\rb 7353No match 7354 a\x85b 7355No match 7356 7357/^abc./gmx,newline=any 7358 abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK 7359 0: abc1 7360 0: abc2 7361 0: abc3 7362 0: abc4 7363 0: abc5 7364 0: abc6 7365 0: abc7 7366 7367/abc.$/gmx,newline=any 7368 abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9 7369 0: abc1 7370 0: abc2 7371 0: abc3 7372 0: abc4 7373 0: abc5 7374 0: abc6 7375 0: abc9 7376 7377/^a\Rb/bsr=unicode 7378 a\nb 7379 0: a\x0ab 7380 a\rb 7381 0: a\x0db 7382 a\r\nb 7383 0: a\x0d\x0ab 7384 a\x0bb 7385 0: a\x0bb 7386 a\x0cb 7387 0: a\x0cb 7388 a\x85b 7389 0: a\x85b 7390\= Expect no match 7391 a\n\rb 7392No match 7393 7394/^a\R*b/bsr=unicode 7395 ab 7396 0: ab 7397 a\nb 7398 0: a\x0ab 7399 a\rb 7400 0: a\x0db 7401 a\r\nb 7402 0: a\x0d\x0ab 7403 a\x0bb 7404 0: a\x0bb 7405 a\x0cb 7406 0: a\x0cb 7407 a\x85b 7408 0: a\x85b 7409 a\n\rb 7410 0: a\x0a\x0db 7411 a\n\r\x85\x0cb 7412 0: a\x0a\x0d\x85\x0cb 7413 7414/^a\R+b/bsr=unicode 7415 a\nb 7416 0: a\x0ab 7417 a\rb 7418 0: a\x0db 7419 a\r\nb 7420 0: a\x0d\x0ab 7421 a\x0bb 7422 0: a\x0bb 7423 a\x0cb 7424 0: a\x0cb 7425 a\x85b 7426 0: a\x85b 7427 a\n\rb 7428 0: a\x0a\x0db 7429 a\n\r\x85\x0cb 7430 0: a\x0a\x0d\x85\x0cb 7431\= Expect no match 7432 ab 7433No match 7434 7435/^a\R{1,3}b/bsr=unicode 7436 a\nb 7437 0: a\x0ab 7438 a\n\rb 7439 0: a\x0a\x0db 7440 a\n\r\x85b 7441 0: a\x0a\x0d\x85b 7442 a\r\n\r\nb 7443 0: a\x0d\x0a\x0d\x0ab 7444 a\r\n\r\n\r\nb 7445 0: a\x0d\x0a\x0d\x0a\x0d\x0ab 7446 a\n\r\n\rb 7447 0: a\x0a\x0d\x0a\x0db 7448 a\n\n\r\nb 7449 0: a\x0a\x0a\x0d\x0ab 7450\= Expect no match 7451 a\n\n\n\rb 7452No match 7453 a\r 7454No match 7455 7456/(?&abc)X(?<abc>P)/I 7457Capturing subpattern count = 1 7458Named capturing subpatterns: 7459 abc 1 7460Last code unit = 'P' 7461Subject length lower bound = 3 7462 abcPXP123 7463 0: PXP 7464 1: P 7465 7466/(?1)X(?<abc>P)/I 7467Capturing subpattern count = 1 7468Named capturing subpatterns: 7469 abc 1 7470Last code unit = 'P' 7471Subject length lower bound = 3 7472 abcPXP123 7473 0: PXP 7474 1: P 7475 7476/(?:a(?&abc)b)*(?<abc>x)/ 7477 123axbaxbaxbx456 7478 0: axbaxbaxbx 7479 1: x 7480 123axbaxbaxb456 7481 0: x 7482 1: x 7483 7484/(?:a(?&abc)b){1,5}(?<abc>x)/ 7485 123axbaxbaxbx456 7486 0: axbaxbaxbx 7487 1: x 7488 7489/(?:a(?&abc)b){2,5}(?<abc>x)/ 7490 123axbaxbaxbx456 7491 0: axbaxbaxbx 7492 1: x 7493 7494/(?:a(?&abc)b){2,}(?<abc>x)/ 7495 123axbaxbaxbx456 7496 0: axbaxbaxbx 7497 1: x 7498 7499/(abc)(?i:(?1))/ 7500 defabcabcxyz 7501 0: abcabc 7502 1: abc 7503\= Expect no match 7504 DEFabcABCXYZ 7505No match 7506 7507/(abc)(?:(?i)(?1))/ 7508 defabcabcxyz 7509 0: abcabc 7510 1: abc 7511\= Expect no match 7512 DEFabcABCXYZ 7513No match 7514 7515/^(a)\g-2/ 7516Failed: error 115 at offset 7: reference to non-existent subpattern 7517 7518/^(a)\g/ 7519Failed: error 158 at offset 5: a numbered reference must not be zero 7520 7521/^(a)\g{0}/ 7522Failed: error 158 at offset 8: a numbered reference must not be zero 7523 7524/^(a)\g{3/ 7525Failed: error 157 at offset 8: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 7526 7527/^(a)\g{aa}/ 7528Failed: error 115 at offset 9: reference to non-existent subpattern 7529 7530/^a.b/newline=lf 7531 a\rb 7532 0: a\x0db 7533\= Expect no match 7534 a\nb 7535No match 7536 7537/.+foo/ 7538 afoo 7539 0: afoo 7540\= Expect no match 7541 \r\nfoo 7542No match 7543 \nfoo 7544No match 7545 7546/.+foo/newline=crlf 7547 afoo 7548 0: afoo 7549 \nfoo 7550 0: \x0afoo 7551\= Expect no match 7552 \r\nfoo 7553No match 7554 7555/.+foo/newline=any 7556 afoo 7557 0: afoo 7558\= Expect no match 7559 \nfoo 7560No match 7561 \r\nfoo 7562No match 7563 7564/.+foo/s 7565 afoo 7566 0: afoo 7567 \r\nfoo 7568 0: \x0d\x0afoo 7569 \nfoo 7570 0: \x0afoo 7571 7572/^$/gm,newline=any 7573 abc\r\rxyz 7574 0: 7575 abc\n\rxyz 7576 0: 7577\= Expect no match 7578 abc\r\nxyz 7579No match 7580 7581/(?m)^$/g,newline=any,aftertext 7582 abc\r\n\r\n 7583 0: 7584 0+ \x0d\x0a 7585 7586/(?m)^$|^\r\n/g,newline=any,aftertext 7587 abc\r\n\r\n 7588 0: 7589 0+ \x0d\x0a 7590 0: \x0d\x0a 7591 0+ 7592 7593/(?m)$/g,newline=any,aftertext 7594 abc\r\n\r\n 7595 0: 7596 0+ \x0d\x0a\x0d\x0a 7597 0: 7598 0+ \x0d\x0a 7599 0: 7600 0+ 7601 7602/abc.$/gmx,newline=anycrlf 7603 abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9 7604 0: abc1 7605 0: abc4 7606 0: abc5 7607 0: abc9 7608 7609/^X/m 7610 XABC 7611 0: X 7612\= Expect no match 7613 XABC\=notbol 7614No match 7615 7616/(ab|c)(?-1)/B 7617------------------------------------------------------------------ 7618 Bra 7619 CBra 1 7620 ab 7621 Alt 7622 c 7623 Ket 7624 Recurse 7625 Ket 7626 End 7627------------------------------------------------------------------ 7628 abc 7629 0: abc 7630 1: ab 7631 7632/xy(?+1)(abc)/B 7633------------------------------------------------------------------ 7634 Bra 7635 xy 7636 Recurse 7637 CBra 1 7638 abc 7639 Ket 7640 Ket 7641 End 7642------------------------------------------------------------------ 7643 xyabcabc 7644 0: xyabcabc 7645 1: abc 7646\= Expect no match 7647 xyabc 7648No match 7649 7650/x(?-0)y/ 7651Failed: error 158 at offset 5: a numbered reference must not be zero 7652 7653/x(?-1)y/ 7654Failed: error 115 at offset 5: reference to non-existent subpattern 7655 7656/x(?+0)y/ 7657Failed: error 158 at offset 5: a numbered reference must not be zero 7658 7659/x(?+1)y/ 7660Failed: error 115 at offset 5: reference to non-existent subpattern 7661 7662/^(abc)?(?(-1)X|Y)/B 7663------------------------------------------------------------------ 7664 Bra 7665 ^ 7666 Brazero 7667 CBra 1 7668 abc 7669 Ket 7670 Cond 7671 1 Cond ref 7672 X 7673 Alt 7674 Y 7675 Ket 7676 Ket 7677 End 7678------------------------------------------------------------------ 7679 abcX 7680 0: abcX 7681 1: abc 7682 Y 7683 0: Y 7684\= Expect no match 7685 abcY 7686No match 7687 7688/^((?(+1)X|Y)(abc))+/B 7689------------------------------------------------------------------ 7690 Bra 7691 ^ 7692 CBra 1 7693 Cond 7694 2 Cond ref 7695 X 7696 Alt 7697 Y 7698 Ket 7699 CBra 2 7700 abc 7701 Ket 7702 KetRmax 7703 Ket 7704 End 7705------------------------------------------------------------------ 7706 YabcXabc 7707 0: YabcXabc 7708 1: Xabc 7709 2: abc 7710 YabcXabcXabc 7711 0: YabcXabcXabc 7712 1: Xabc 7713 2: abc 7714\= Expect no match 7715 XabcXabc 7716No match 7717 7718/(?(-1)a)/B 7719Failed: error 115 at offset 6: reference to non-existent subpattern 7720 7721/((?(-1)a))/B 7722------------------------------------------------------------------ 7723 Bra 7724 CBra 1 7725 Cond 7726 1 Cond ref 7727 a 7728 Ket 7729 Ket 7730 Ket 7731 End 7732------------------------------------------------------------------ 7733 7734/((?(-2)a))/B 7735Failed: error 115 at offset 7: reference to non-existent subpattern 7736 7737/^(?(+1)X|Y)(.)/B 7738------------------------------------------------------------------ 7739 Bra 7740 ^ 7741 Cond 7742 1 Cond ref 7743 X 7744 Alt 7745 Y 7746 Ket 7747 CBra 1 7748 Any 7749 Ket 7750 Ket 7751 End 7752------------------------------------------------------------------ 7753 Y! 7754 0: Y! 7755 1: ! 7756 7757/(?<A>tom|bon)-\k{A}/ 7758 tom-tom 7759 0: tom-tom 7760 1: tom 7761 bon-bon 7762 0: bon-bon 7763 1: bon 7764\= Expect no match 7765 tom-bon 7766No match 7767 7768/\g{A/ 7769Failed: error 142 at offset 4: syntax error in subpattern name (missing terminator) 7770 7771/(?|(abc)|(xyz))/B 7772------------------------------------------------------------------ 7773 Bra 7774 Bra 7775 CBra 1 7776 abc 7777 Ket 7778 Alt 7779 CBra 1 7780 xyz 7781 Ket 7782 Ket 7783 Ket 7784 End 7785------------------------------------------------------------------ 7786 >abc< 7787 0: abc 7788 1: abc 7789 >xyz< 7790 0: xyz 7791 1: xyz 7792 7793/(x)(?|(abc)|(xyz))(x)/B 7794------------------------------------------------------------------ 7795 Bra 7796 CBra 1 7797 x 7798 Ket 7799 Bra 7800 CBra 2 7801 abc 7802 Ket 7803 Alt 7804 CBra 2 7805 xyz 7806 Ket 7807 Ket 7808 CBra 3 7809 x 7810 Ket 7811 Ket 7812 End 7813------------------------------------------------------------------ 7814 xabcx 7815 0: xabcx 7816 1: x 7817 2: abc 7818 3: x 7819 xxyzx 7820 0: xxyzx 7821 1: x 7822 2: xyz 7823 3: x 7824 7825/(x)(?|(abc)(pqr)|(xyz))(x)/B 7826------------------------------------------------------------------ 7827 Bra 7828 CBra 1 7829 x 7830 Ket 7831 Bra 7832 CBra 2 7833 abc 7834 Ket 7835 CBra 3 7836 pqr 7837 Ket 7838 Alt 7839 CBra 2 7840 xyz 7841 Ket 7842 Ket 7843 CBra 4 7844 x 7845 Ket 7846 Ket 7847 End 7848------------------------------------------------------------------ 7849 xabcpqrx 7850 0: xabcpqrx 7851 1: x 7852 2: abc 7853 3: pqr 7854 4: x 7855 xxyzx 7856 0: xxyzx 7857 1: x 7858 2: xyz 7859 3: <unset> 7860 4: x 7861 7862/\H++X/B 7863------------------------------------------------------------------ 7864 Bra 7865 \H++ 7866 X 7867 Ket 7868 End 7869------------------------------------------------------------------ 7870\= Expect no match 7871 XXXX 7872No match 7873 7874/\H+\hY/B 7875------------------------------------------------------------------ 7876 Bra 7877 \H++ 7878 \h 7879 Y 7880 Ket 7881 End 7882------------------------------------------------------------------ 7883 XXXX Y 7884 0: XXXX Y 7885 7886/\H+ Y/B 7887------------------------------------------------------------------ 7888 Bra 7889 \H++ 7890 Y 7891 Ket 7892 End 7893------------------------------------------------------------------ 7894 7895/\h+A/B 7896------------------------------------------------------------------ 7897 Bra 7898 \h++ 7899 A 7900 Ket 7901 End 7902------------------------------------------------------------------ 7903 7904/\v*B/B 7905------------------------------------------------------------------ 7906 Bra 7907 \v*+ 7908 B 7909 Ket 7910 End 7911------------------------------------------------------------------ 7912 7913/\V+\x0a/B 7914------------------------------------------------------------------ 7915 Bra 7916 \V++ 7917 \x0a 7918 Ket 7919 End 7920------------------------------------------------------------------ 7921 7922/A+\h/B 7923------------------------------------------------------------------ 7924 Bra 7925 A++ 7926 \h 7927 Ket 7928 End 7929------------------------------------------------------------------ 7930 7931/ *\H/B 7932------------------------------------------------------------------ 7933 Bra 7934 *+ 7935 \H 7936 Ket 7937 End 7938------------------------------------------------------------------ 7939 7940/A*\v/B 7941------------------------------------------------------------------ 7942 Bra 7943 A*+ 7944 \v 7945 Ket 7946 End 7947------------------------------------------------------------------ 7948 7949/\x0b*\V/B 7950------------------------------------------------------------------ 7951 Bra 7952 \x0b*+ 7953 \V 7954 Ket 7955 End 7956------------------------------------------------------------------ 7957 7958/\d+\h/B 7959------------------------------------------------------------------ 7960 Bra 7961 \d++ 7962 \h 7963 Ket 7964 End 7965------------------------------------------------------------------ 7966 7967/\d*\v/B 7968------------------------------------------------------------------ 7969 Bra 7970 \d*+ 7971 \v 7972 Ket 7973 End 7974------------------------------------------------------------------ 7975 7976/S+\h\S+\v/B 7977------------------------------------------------------------------ 7978 Bra 7979 S++ 7980 \h 7981 \S++ 7982 \v 7983 Ket 7984 End 7985------------------------------------------------------------------ 7986 7987/\w{3,}\h\w+\v/B 7988------------------------------------------------------------------ 7989 Bra 7990 \w{3} 7991 \w*+ 7992 \h 7993 \w++ 7994 \v 7995 Ket 7996 End 7997------------------------------------------------------------------ 7998 7999/\h+\d\h+\w\h+\S\h+\H/B 8000------------------------------------------------------------------ 8001 Bra 8002 \h++ 8003 \d 8004 \h++ 8005 \w 8006 \h++ 8007 \S 8008 \h++ 8009 \H 8010 Ket 8011 End 8012------------------------------------------------------------------ 8013 8014/\v+\d\v+\w\v+\S\v+\V/B 8015------------------------------------------------------------------ 8016 Bra 8017 \v++ 8018 \d 8019 \v++ 8020 \w 8021 \v++ 8022 \S 8023 \v++ 8024 \V 8025 Ket 8026 End 8027------------------------------------------------------------------ 8028 8029/\H+\h\H+\d/B 8030------------------------------------------------------------------ 8031 Bra 8032 \H++ 8033 \h 8034 \H+ 8035 \d 8036 Ket 8037 End 8038------------------------------------------------------------------ 8039 8040/\V+\v\V+\w/B 8041------------------------------------------------------------------ 8042 Bra 8043 \V++ 8044 \v 8045 \V+ 8046 \w 8047 Ket 8048 End 8049------------------------------------------------------------------ 8050 8051/\( (?: [^()]* | (?R) )* \)/x 8052(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)\=jitstack=1024 8053 0: (0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0) 8054 8055/[\E]AAA/ 8056Failed: error 106 at offset 7: missing terminating ] for character class 8057 8058/[\Q\E]AAA/ 8059Failed: error 106 at offset 9: missing terminating ] for character class 8060 8061/[^\E]AAA/ 8062Failed: error 106 at offset 8: missing terminating ] for character class 8063 8064/[^\Q\E]AAA/ 8065Failed: error 106 at offset 10: missing terminating ] for character class 8066 8067/[\E^]AAA/ 8068Failed: error 106 at offset 8: missing terminating ] for character class 8069 8070/[\Q\E^]AAA/ 8071Failed: error 106 at offset 10: missing terminating ] for character class 8072 8073/A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/B 8074------------------------------------------------------------------ 8075 Bra 8076 A 8077 *PRUNE 8078 B 8079 *SKIP 8080 C 8081 *THEN 8082 D 8083 *COMMIT 8084 E 8085 *FAIL 8086 F 8087 *FAIL 8088 G 8089 *FAIL 8090 H 8091 *ACCEPT 8092 I 8093 Ket 8094 End 8095------------------------------------------------------------------ 8096 8097/^a+(*FAIL)/auto_callout 8098\= Expect no match 8099 aaaaaa 8100--->aaaaaa 8101 +0 ^ ^ 8102 +1 ^ a+ 8103 +3 ^ ^ (*FAIL) 8104 +3 ^ ^ (*FAIL) 8105 +3 ^ ^ (*FAIL) 8106 +3 ^ ^ (*FAIL) 8107 +3 ^ ^ (*FAIL) 8108 +3 ^^ (*FAIL) 8109No match 8110 8111/a+b?c+(*FAIL)/auto_callout 8112\= Expect no match 8113 aaabccc 8114--->aaabccc 8115 +0 ^ a+ 8116 +2 ^ ^ b? 8117 +4 ^ ^ c+ 8118 +6 ^ ^ (*FAIL) 8119 +6 ^ ^ (*FAIL) 8120 +6 ^ ^ (*FAIL) 8121 +0 ^ a+ 8122 +2 ^ ^ b? 8123 +4 ^ ^ c+ 8124 +6 ^ ^ (*FAIL) 8125 +6 ^ ^ (*FAIL) 8126 +6 ^ ^ (*FAIL) 8127 +0 ^ a+ 8128 +2 ^^ b? 8129 +4 ^ ^ c+ 8130 +6 ^ ^ (*FAIL) 8131 +6 ^ ^ (*FAIL) 8132 +6 ^ ^ (*FAIL) 8133No match 8134 8135/a+b?(*PRUNE)c+(*FAIL)/auto_callout 8136\= Expect no match 8137 aaabccc 8138--->aaabccc 8139 +0 ^ a+ 8140 +2 ^ ^ b? 8141 +4 ^ ^ (*PRUNE) 8142+12 ^ ^ c+ 8143+14 ^ ^ (*FAIL) 8144+14 ^ ^ (*FAIL) 8145+14 ^ ^ (*FAIL) 8146 +0 ^ a+ 8147 +2 ^ ^ b? 8148 +4 ^ ^ (*PRUNE) 8149+12 ^ ^ c+ 8150+14 ^ ^ (*FAIL) 8151+14 ^ ^ (*FAIL) 8152+14 ^ ^ (*FAIL) 8153 +0 ^ a+ 8154 +2 ^^ b? 8155 +4 ^ ^ (*PRUNE) 8156+12 ^ ^ c+ 8157+14 ^ ^ (*FAIL) 8158+14 ^ ^ (*FAIL) 8159+14 ^ ^ (*FAIL) 8160No match 8161 8162/a+b?(*COMMIT)c+(*FAIL)/auto_callout 8163\= Expect no match 8164 aaabccc 8165--->aaabccc 8166 +0 ^ a+ 8167 +2 ^ ^ b? 8168 +4 ^ ^ (*COMMIT) 8169+13 ^ ^ c+ 8170+15 ^ ^ (*FAIL) 8171+15 ^ ^ (*FAIL) 8172+15 ^ ^ (*FAIL) 8173No match 8174 8175/a+b?(*SKIP)c+(*FAIL)/auto_callout 8176\= Expect no match 8177 aaabcccaaabccc 8178--->aaabcccaaabccc 8179 +0 ^ a+ 8180 +2 ^ ^ b? 8181 +4 ^ ^ (*SKIP) 8182+11 ^ ^ c+ 8183+13 ^ ^ (*FAIL) 8184+13 ^ ^ (*FAIL) 8185+13 ^ ^ (*FAIL) 8186 +0 ^ a+ 8187 +2 ^ ^ b? 8188 +4 ^ ^ (*SKIP) 8189+11 ^ ^ c+ 8190+13 ^ ^ (*FAIL) 8191+13 ^ ^ (*FAIL) 8192+13 ^ ^ (*FAIL) 8193No match 8194 8195/a+b?(*THEN)c+(*FAIL)/auto_callout 8196\= Expect no match 8197 aaabccc 8198--->aaabccc 8199 +0 ^ a+ 8200 +2 ^ ^ b? 8201 +4 ^ ^ (*THEN) 8202+11 ^ ^ c+ 8203+13 ^ ^ (*FAIL) 8204+13 ^ ^ (*FAIL) 8205+13 ^ ^ (*FAIL) 8206 +0 ^ a+ 8207 +2 ^ ^ b? 8208 +4 ^ ^ (*THEN) 8209+11 ^ ^ c+ 8210+13 ^ ^ (*FAIL) 8211+13 ^ ^ (*FAIL) 8212+13 ^ ^ (*FAIL) 8213 +0 ^ a+ 8214 +2 ^^ b? 8215 +4 ^ ^ (*THEN) 8216+11 ^ ^ c+ 8217+13 ^ ^ (*FAIL) 8218+13 ^ ^ (*FAIL) 8219+13 ^ ^ (*FAIL) 8220No match 8221 8222/a(*MARK)b/ 8223Failed: error 166 at offset 7: (*MARK) must have an argument 8224 8225/(?i:A{1,}\6666666666)/ 8226Failed: error 161 at offset 19: number is too big 8227 8228/\g6666666666/ 8229Failed: error 161 at offset 11: number is too big 8230 8231/[\g6666666666]/B 8232------------------------------------------------------------------ 8233 Bra 8234 [6g] 8235 Ket 8236 End 8237------------------------------------------------------------------ 8238 8239/(?1)\c[/ 8240Failed: error 115 at offset 3: reference to non-existent subpattern 8241 8242/.+A/newline=crlf 8243\= Expect no match 8244 \r\nA 8245No match 8246 8247/\nA/newline=crlf 8248 \r\nA 8249 0: \x0aA 8250 8251/[\r\n]A/newline=crlf 8252 \r\nA 8253 0: \x0aA 8254 8255/(\r|\n)A/newline=crlf 8256 \r\nA 8257 0: \x0aA 8258 1: \x0a 8259 8260/a(*CR)b/ 8261Failed: error 160 at offset 5: (*VERB) not recognized or malformed 8262 8263/(*CR)a.b/ 8264 a\nb 8265 0: a\x0ab 8266\= Expect no match 8267 a\rb 8268No match 8269 8270/(*CR)a.b/newline=lf 8271 a\nb 8272 0: a\x0ab 8273\= Expect no match 8274 a\rb 8275No match 8276 8277/(*LF)a.b/newline=CRLF 8278 a\rb 8279 0: a\x0db 8280\= Expect no match 8281 a\nb 8282No match 8283 8284/(*CRLF)a.b/ 8285 a\rb 8286 0: a\x0db 8287 a\nb 8288 0: a\x0ab 8289\= Expect no match 8290 a\r\nb 8291No match 8292 8293/(*ANYCRLF)a.b/newline=CR 8294\= Expect no match 8295 a\rb 8296No match 8297 a\nb 8298No match 8299 a\r\nb 8300No match 8301 8302/(*ANY)a.b/newline=cr 8303\= Expect no match 8304 a\rb 8305No match 8306 a\nb 8307No match 8308 a\r\nb 8309No match 8310 a\x85b 8311No match 8312 8313/(*ANY).*/g 8314 abc\r\ndef 8315 0: abc 8316 0: 8317 0: def 8318 0: 8319 8320/(*ANYCRLF).*/g 8321 abc\r\ndef 8322 0: abc 8323 0: 8324 0: def 8325 0: 8326 8327/(*CRLF).*/g 8328 abc\r\ndef 8329 0: abc 8330 0: 8331 0: def 8332 0: 8333 8334/a\Rb/I,bsr=anycrlf 8335Capturing subpattern count = 0 8336\R matches CR, LF, or CRLF 8337First code unit = 'a' 8338Last code unit = 'b' 8339Subject length lower bound = 3 8340 a\rb 8341 0: a\x0db 8342 a\nb 8343 0: a\x0ab 8344 a\r\nb 8345 0: a\x0d\x0ab 8346\= Expect no match 8347 a\x85b 8348No match 8349 a\x0bb 8350No match 8351 8352/a\Rb/I,bsr=unicode 8353Capturing subpattern count = 0 8354\R matches any Unicode newline 8355First code unit = 'a' 8356Last code unit = 'b' 8357Subject length lower bound = 3 8358 a\rb 8359 0: a\x0db 8360 a\nb 8361 0: a\x0ab 8362 a\r\nb 8363 0: a\x0d\x0ab 8364 a\x85b 8365 0: a\x85b 8366 a\x0bb 8367 0: a\x0bb 8368 8369/a\R?b/I,bsr=anycrlf 8370Capturing subpattern count = 0 8371\R matches CR, LF, or CRLF 8372First code unit = 'a' 8373Last code unit = 'b' 8374Subject length lower bound = 2 8375 a\rb 8376 0: a\x0db 8377 a\nb 8378 0: a\x0ab 8379 a\r\nb 8380 0: a\x0d\x0ab 8381\= Expect no match 8382 a\x85b 8383No match 8384 a\x0bb 8385No match 8386 8387/a\R?b/I,bsr=unicode 8388Capturing subpattern count = 0 8389\R matches any Unicode newline 8390First code unit = 'a' 8391Last code unit = 'b' 8392Subject length lower bound = 2 8393 a\rb 8394 0: a\x0db 8395 a\nb 8396 0: a\x0ab 8397 a\r\nb 8398 0: a\x0d\x0ab 8399 a\x85b 8400 0: a\x85b 8401 a\x0bb 8402 0: a\x0bb 8403 8404/a\R{2,4}b/I,bsr=anycrlf 8405Capturing subpattern count = 0 8406\R matches CR, LF, or CRLF 8407First code unit = 'a' 8408Last code unit = 'b' 8409Subject length lower bound = 4 8410 a\r\n\nb 8411 0: a\x0d\x0a\x0ab 8412 a\n\r\rb 8413 0: a\x0a\x0d\x0db 8414 a\r\n\r\n\r\n\r\nb 8415 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab 8416\= Expect no match 8417 a\x85\x85b 8418No match 8419 a\x0b\x0bb 8420No match 8421 8422/a\R{2,4}b/I,bsr=unicode 8423Capturing subpattern count = 0 8424\R matches any Unicode newline 8425First code unit = 'a' 8426Last code unit = 'b' 8427Subject length lower bound = 4 8428 a\r\rb 8429 0: a\x0d\x0db 8430 a\n\n\nb 8431 0: a\x0a\x0a\x0ab 8432 a\r\n\n\r\rb 8433 0: a\x0d\x0a\x0a\x0d\x0db 8434 a\x85\x85b 8435 0: a\x85\x85b 8436 a\x0b\x0bb 8437 0: a\x0b\x0bb 8438\= Expect no match 8439 a\r\r\r\r\rb 8440No match 8441 8442/(*BSR_ANYCRLF)a\Rb/I 8443Capturing subpattern count = 0 8444\R matches CR, LF, or CRLF 8445First code unit = 'a' 8446Last code unit = 'b' 8447Subject length lower bound = 3 8448 a\nb 8449 0: a\x0ab 8450 a\rb 8451 0: a\x0db 8452 8453/(*BSR_UNICODE)a\Rb/I 8454Capturing subpattern count = 0 8455\R matches any Unicode newline 8456First code unit = 'a' 8457Last code unit = 'b' 8458Subject length lower bound = 3 8459 a\x85b 8460 0: a\x85b 8461 8462/(*BSR_ANYCRLF)(*CRLF)a\Rb/I 8463Capturing subpattern count = 0 8464\R matches CR, LF, or CRLF 8465Forced newline is CRLF 8466First code unit = 'a' 8467Last code unit = 'b' 8468Subject length lower bound = 3 8469 a\nb 8470 0: a\x0ab 8471 a\rb 8472 0: a\x0db 8473 8474/(*CRLF)(*BSR_UNICODE)a\Rb/I 8475Capturing subpattern count = 0 8476\R matches any Unicode newline 8477Forced newline is CRLF 8478First code unit = 'a' 8479Last code unit = 'b' 8480Subject length lower bound = 3 8481 a\x85b 8482 0: a\x85b 8483 8484/(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I 8485Capturing subpattern count = 0 8486\R matches CR, LF, or CRLF 8487Forced newline is CR 8488First code unit = 'a' 8489Last code unit = 'b' 8490Subject length lower bound = 2 8491 8492/(?<a>)(?&)/ 8493Failed: error 162 at offset 9: subpattern name expected 8494 8495/(?<abc>)(?&a)/ 8496Failed: error 115 at offset 12: reference to non-existent subpattern 8497 8498/(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/ 8499Failed: error 115 at offset 32: reference to non-existent subpattern 8500 8501/(?+-a)/ 8502Failed: error 163 at offset 3: digit expected after (?+ 8503 8504/(?-+a)/ 8505Failed: error 111 at offset 3: unrecognized character after (? or (?- 8506 8507/(?(-1))/ 8508Failed: error 115 at offset 6: reference to non-existent subpattern 8509 8510/(?(+10))/ 8511Failed: error 115 at offset 7: reference to non-existent subpattern 8512 8513/(?(10))/ 8514Failed: error 115 at offset 6: reference to non-existent subpattern 8515 8516/(?(+2))()()/ 8517 8518/(?(2))()()/ 8519 8520/\k''/ 8521Failed: error 162 at offset 3: subpattern name expected 8522 8523/\k<>/ 8524Failed: error 162 at offset 3: subpattern name expected 8525 8526/\k{}/ 8527Failed: error 162 at offset 3: subpattern name expected 8528 8529/\k/ 8530Failed: error 169 at offset 1: \k is not followed by a braced, angle-bracketed, or quoted name 8531 8532/\kabc/ 8533Failed: error 169 at offset 1: \k is not followed by a braced, angle-bracketed, or quoted name 8534 8535/(?P=)/ 8536Failed: error 162 at offset 4: subpattern name expected 8537 8538/(?P>)/ 8539Failed: error 162 at offset 4: subpattern name expected 8540 8541/[[:foo:]]/ 8542Failed: error 130 at offset 3: unknown POSIX class name 8543 8544/[[:1234:]]/ 8545Failed: error 130 at offset 3: unknown POSIX class name 8546 8547/[[:f\oo:]]/ 8548Failed: error 130 at offset 3: unknown POSIX class name 8549 8550/[[: :]]/ 8551Failed: error 130 at offset 3: unknown POSIX class name 8552 8553/[[:...:]]/ 8554Failed: error 130 at offset 3: unknown POSIX class name 8555 8556/[[:l\ower:]]/ 8557Failed: error 130 at offset 3: unknown POSIX class name 8558 8559/[[:abc\:]]/ 8560Failed: error 130 at offset 3: unknown POSIX class name 8561 8562/[abc[:x\]pqr:]]/ 8563Failed: error 130 at offset 6: unknown POSIX class name 8564 8565/[[:a\dz:]]/ 8566Failed: error 130 at offset 3: unknown POSIX class name 8567 8568/(^(a|b\g<-1'c))/ 8569Failed: error 157 at offset 8: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 8570 8571/^(?+1)(?<a>x|y){0}z/ 8572 xzxx 8573 0: xz 8574 yzyy 8575 0: yz 8576\= Expect no match 8577 xxz 8578No match 8579 8580/(\3)(\1)(a)/ 8581\= Expect no match 8582 cat 8583No match 8584 8585/(\3)(\1)(a)/alt_bsux,allow_empty_class,match_unset_backref,dupnames 8586 cat 8587 0: a 8588 1: 8589 2: 8590 3: a 8591 8592/TA]/ 8593 The ACTA] comes 8594 0: TA] 8595 8596/TA]/alt_bsux,allow_empty_class,match_unset_backref,dupnames 8597 The ACTA] comes 8598 0: TA] 8599 8600/(?2)[]a()b](abc)/ 8601Failed: error 115 at offset 3: reference to non-existent subpattern 8602 abcbabc 8603 8604/(?2)[^]a()b](abc)/ 8605Failed: error 115 at offset 3: reference to non-existent subpattern 8606 abcbabc 8607 8608/(?1)[]a()b](abc)/ 8609 abcbabc 8610 0: abcbabc 8611 1: abc 8612\= Expect no match 8613 abcXabc 8614No match 8615 8616/(?1)[^]a()b](abc)/ 8617 abcXabc 8618 0: abcXabc 8619 1: abc 8620\= Expect no match 8621 abcbabc 8622No match 8623 8624/(?2)[]a()b](abc)(xyz)/ 8625 xyzbabcxyz 8626 0: xyzbabcxyz 8627 1: abc 8628 2: xyz 8629 8630/(?&N)[]a(?<N>)](?<M>abc)/ 8631Failed: error 115 at offset 4: reference to non-existent subpattern 8632 abc<abc 8633 8634/(?&N)[]a(?<N>)](abc)/ 8635Failed: error 115 at offset 4: reference to non-existent subpattern 8636 abc<abc 8637 8638/a[]b/ 8639Failed: error 106 at offset 4: missing terminating ] for character class 8640 8641/a[^]b/ 8642Failed: error 106 at offset 5: missing terminating ] for character class 8643 8644/a[]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames 8645\= Expect no match 8646 ab 8647No match 8648 8649/a[]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames 8650\= Expect no match 8651 ab 8652No match 8653 8654/a[]*+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames 8655\= Expect no match 8656 ab 8657No match 8658 8659/a[^]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames 8660 aXb 8661 0: aXb 8662 a\nb 8663 0: a\x0ab 8664\= Expect no match 8665 ab 8666No match 8667 8668/a[^]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames 8669 aXb 8670 0: aXb 8671 a\nX\nXb 8672 0: a\x0aX\x0aXb 8673\= Expect no match 8674 ab 8675No match 8676 8677/a(?!)b/B 8678------------------------------------------------------------------ 8679 Bra 8680 a 8681 *FAIL 8682 b 8683 Ket 8684 End 8685------------------------------------------------------------------ 8686 8687/(?!)?a/B 8688------------------------------------------------------------------ 8689 Bra 8690 Brazero 8691 Assert not 8692 Ket 8693 a 8694 Ket 8695 End 8696------------------------------------------------------------------ 8697 ab 8698 0: a 8699 8700/a(*FAIL)+b/ 8701Failed: error 109 at offset 8: quantifier does not follow a repeatable item 8702 8703/(abc|pqr|123){0}[xyz]/I 8704Capturing subpattern count = 1 8705Starting code units: x y z 8706Subject length lower bound = 1 8707 8708/(?(?=.*b)b|^)/I,auto_callout 8709Capturing subpattern count = 0 8710May match empty string 8711Options: auto_callout 8712Subject length lower bound = 0 8713 adc 8714--->adc 8715 +0 ^ (?(?=.*b)b|^) 8716 +2 ^ (?=.*b) 8717 +5 ^ .* 8718 +7 ^ ^ b 8719 +7 ^ ^ b 8720 +7 ^^ b 8721 +7 ^ b 8722+11 ^ ^ 8723+12 ^ ) 8724+13 ^ 8725 0: 8726 abc 8727--->abc 8728 +0 ^ (?(?=.*b)b|^) 8729 +2 ^ (?=.*b) 8730 +5 ^ .* 8731 +7 ^ ^ b 8732 +7 ^ ^ b 8733 +7 ^^ b 8734 +8 ^ ^ ) 8735 +9 ^ b 8736 +0 ^ (?(?=.*b)b|^) 8737 +2 ^ (?=.*b) 8738 +5 ^ .* 8739 +7 ^ ^ b 8740 +7 ^^ b 8741 +7 ^ b 8742 +8 ^^ ) 8743 +9 ^ b 8744+10 ^^ | 8745+13 ^^ 8746 0: b 8747 8748/(?(?=b).*b|^d)/I 8749Capturing subpattern count = 0 8750Subject length lower bound = 1 8751 8752/(?(?=.*b).*b|^d)/I 8753Capturing subpattern count = 0 8754First code unit at start or follows newline 8755Subject length lower bound = 1 8756 8757/xyz/auto_callout 8758 xyz 8759--->xyz 8760 +0 ^ x 8761 +1 ^^ y 8762 +2 ^ ^ z 8763 +3 ^ ^ 8764 0: xyz 8765 abcxyz 8766--->abcxyz 8767 +0 ^ x 8768 +1 ^^ y 8769 +2 ^ ^ z 8770 +3 ^ ^ 8771 0: xyz 8772\= Expect no match 8773 abc 8774No match 8775 abcxypqr 8776No match 8777 8778/xyz/auto_callout,no_start_optimize 8779 abcxyz 8780--->abcxyz 8781 +0 ^ x 8782 +0 ^ x 8783 +0 ^ x 8784 +0 ^ x 8785 +1 ^^ y 8786 +2 ^ ^ z 8787 +3 ^ ^ 8788 0: xyz 8789\= Expect no match 8790 abc 8791--->abc 8792 +0 ^ x 8793 +0 ^ x 8794 +0 ^ x 8795 +0 ^ x 8796No match 8797 abcxypqr 8798--->abcxypqr 8799 +0 ^ x 8800 +0 ^ x 8801 +0 ^ x 8802 +0 ^ x 8803 +1 ^^ y 8804 +2 ^ ^ z 8805 +0 ^ x 8806 +0 ^ x 8807 +0 ^ x 8808 +0 ^ x 8809 +0 ^ x 8810No match 8811 8812/(*NO_START_OPT)xyz/auto_callout 8813 abcxyz 8814--->abcxyz 8815+15 ^ x 8816+15 ^ x 8817+15 ^ x 8818+15 ^ x 8819+16 ^^ y 8820+17 ^ ^ z 8821+18 ^ ^ 8822 0: xyz 8823 8824/(*NO_AUTO_POSSESS)a+b/B 8825------------------------------------------------------------------ 8826 Bra 8827 a+ 8828 b 8829 Ket 8830 End 8831------------------------------------------------------------------ 8832 8833/xyz/auto_callout,no_start_optimize 8834 abcxyz 8835--->abcxyz 8836 +0 ^ x 8837 +0 ^ x 8838 +0 ^ x 8839 +0 ^ x 8840 +1 ^^ y 8841 +2 ^ ^ z 8842 +3 ^ ^ 8843 0: xyz 8844 8845/^"((?(?=[a])[^"])|b)*"$/auto_callout 8846 "ab" 8847--->"ab" 8848 +0 ^ ^ 8849 +1 ^ " 8850 +2 ^^ ((?(?=[a])[^"])|b)* 8851 +3 ^^ (?(?=[a])[^"]) 8852 +5 ^^ (?=[a]) 8853 +8 ^^ [a] 8854+11 ^ ^ ) 8855+12 ^^ [^"] 8856+16 ^ ^ ) 8857+17 ^ ^ | 8858 +3 ^ ^ (?(?=[a])[^"]) 8859 +5 ^ ^ (?=[a]) 8860 +8 ^ ^ [a] 8861+17 ^ ^ | 8862+21 ^ ^ " 8863+18 ^ ^ b 8864+19 ^ ^ ) 8865 +3 ^ ^ (?(?=[a])[^"]) 8866 +5 ^ ^ (?=[a]) 8867 +8 ^ ^ [a] 8868+17 ^ ^ | 8869+21 ^ ^ " 8870+22 ^ ^ $ 8871+23 ^ ^ 8872 0: "ab" 8873 1: 8874 8875/^"((?(?=[a])[^"])|b)*"$/ 8876 "ab" 8877 0: "ab" 8878 1: 8879 8880/^X(?5)(a)(?|(b)|(q))(c)(d)Y/ 8881Failed: error 115 at offset 5: reference to non-existent subpattern 8882 XYabcdY 8883 8884/^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/ 8885 XYabcdY 8886 0: XYabcdY 8887 1: a 8888 2: b 8889 3: c 8890 4: d 8891 5: Y 8892 8893/Xa{2,4}b/ 8894 X\=ps 8895Partial match: X 8896 Xa\=ps 8897Partial match: Xa 8898 Xaa\=ps 8899Partial match: Xaa 8900 Xaaa\=ps 8901Partial match: Xaaa 8902 Xaaaa\=ps 8903Partial match: Xaaaa 8904 8905/Xa{2,4}?b/ 8906 X\=ps 8907Partial match: X 8908 Xa\=ps 8909Partial match: Xa 8910 Xaa\=ps 8911Partial match: Xaa 8912 Xaaa\=ps 8913Partial match: Xaaa 8914 Xaaaa\=ps 8915Partial match: Xaaaa 8916 8917/Xa{2,4}+b/ 8918 X\=ps 8919Partial match: X 8920 Xa\=ps 8921Partial match: Xa 8922 Xaa\=ps 8923Partial match: Xaa 8924 Xaaa\=ps 8925Partial match: Xaaa 8926 Xaaaa\=ps 8927Partial match: Xaaaa 8928 8929/X\d{2,4}b/ 8930 X\=ps 8931Partial match: X 8932 X3\=ps 8933Partial match: X3 8934 X33\=ps 8935Partial match: X33 8936 X333\=ps 8937Partial match: X333 8938 X3333\=ps 8939Partial match: X3333 8940 8941/X\d{2,4}?b/ 8942 X\=ps 8943Partial match: X 8944 X3\=ps 8945Partial match: X3 8946 X33\=ps 8947Partial match: X33 8948 X333\=ps 8949Partial match: X333 8950 X3333\=ps 8951Partial match: X3333 8952 8953/X\d{2,4}+b/ 8954 X\=ps 8955Partial match: X 8956 X3\=ps 8957Partial match: X3 8958 X33\=ps 8959Partial match: X33 8960 X333\=ps 8961Partial match: X333 8962 X3333\=ps 8963Partial match: X3333 8964 8965/X\D{2,4}b/ 8966 X\=ps 8967Partial match: X 8968 Xa\=ps 8969Partial match: Xa 8970 Xaa\=ps 8971Partial match: Xaa 8972 Xaaa\=ps 8973Partial match: Xaaa 8974 Xaaaa\=ps 8975Partial match: Xaaaa 8976 8977/X\D{2,4}?b/ 8978 X\=ps 8979Partial match: X 8980 Xa\=ps 8981Partial match: Xa 8982 Xaa\=ps 8983Partial match: Xaa 8984 Xaaa\=ps 8985Partial match: Xaaa 8986 Xaaaa\=ps 8987Partial match: Xaaaa 8988 8989/X\D{2,4}+b/ 8990 X\=ps 8991Partial match: X 8992 Xa\=ps 8993Partial match: Xa 8994 Xaa\=ps 8995Partial match: Xaa 8996 Xaaa\=ps 8997Partial match: Xaaa 8998 Xaaaa\=ps 8999Partial match: Xaaaa 9000 9001/X[abc]{2,4}b/ 9002 X\=ps 9003Partial match: X 9004 Xa\=ps 9005Partial match: Xa 9006 Xaa\=ps 9007Partial match: Xaa 9008 Xaaa\=ps 9009Partial match: Xaaa 9010 Xaaaa\=ps 9011Partial match: Xaaaa 9012 9013/X[abc]{2,4}?b/ 9014 X\=ps 9015Partial match: X 9016 Xa\=ps 9017Partial match: Xa 9018 Xaa\=ps 9019Partial match: Xaa 9020 Xaaa\=ps 9021Partial match: Xaaa 9022 Xaaaa\=ps 9023Partial match: Xaaaa 9024 9025/X[abc]{2,4}+b/ 9026 X\=ps 9027Partial match: X 9028 Xa\=ps 9029Partial match: Xa 9030 Xaa\=ps 9031Partial match: Xaa 9032 Xaaa\=ps 9033Partial match: Xaaa 9034 Xaaaa\=ps 9035Partial match: Xaaaa 9036 9037/X[^a]{2,4}b/ 9038 X\=ps 9039Partial match: X 9040 Xz\=ps 9041Partial match: Xz 9042 Xzz\=ps 9043Partial match: Xzz 9044 Xzzz\=ps 9045Partial match: Xzzz 9046 Xzzzz\=ps 9047Partial match: Xzzzz 9048 9049/X[^a]{2,4}?b/ 9050 X\=ps 9051Partial match: X 9052 Xz\=ps 9053Partial match: Xz 9054 Xzz\=ps 9055Partial match: Xzz 9056 Xzzz\=ps 9057Partial match: Xzzz 9058 Xzzzz\=ps 9059Partial match: Xzzzz 9060 9061/X[^a]{2,4}+b/ 9062 X\=ps 9063Partial match: X 9064 Xz\=ps 9065Partial match: Xz 9066 Xzz\=ps 9067Partial match: Xzz 9068 Xzzz\=ps 9069Partial match: Xzzz 9070 Xzzzz\=ps 9071Partial match: Xzzzz 9072 9073/(Y)X\1{2,4}b/ 9074 YX\=ps 9075Partial match: YX 9076 YXY\=ps 9077Partial match: YXY 9078 YXYY\=ps 9079Partial match: YXYY 9080 YXYYY\=ps 9081Partial match: YXYYY 9082 YXYYYY\=ps 9083Partial match: YXYYYY 9084 9085/(Y)X\1{2,4}?b/ 9086 YX\=ps 9087Partial match: YX 9088 YXY\=ps 9089Partial match: YXY 9090 YXYY\=ps 9091Partial match: YXYY 9092 YXYYY\=ps 9093Partial match: YXYYY 9094 YXYYYY\=ps 9095Partial match: YXYYYY 9096 9097/(Y)X\1{2,4}+b/ 9098 YX\=ps 9099Partial match: YX 9100 YXY\=ps 9101Partial match: YXY 9102 YXYY\=ps 9103Partial match: YXYY 9104 YXYYY\=ps 9105Partial match: YXYYY 9106 YXYYYY\=ps 9107Partial match: YXYYYY 9108 9109/\++\KZ|\d+X|9+Y/startchar 9110 ++++123999\=ps 9111Partial match: 123999 9112 ++++123999Y\=ps 9113 0: 999Y 9114 ++++Z1234\=ps 9115 0: ++++Z 9116 ^^^^ 9117 9118/Z(*F)/ 9119\= Expect no match 9120 Z\=ps 9121No match 9122 ZA\=ps 9123No match 9124 9125/Z(?!)/ 9126\= Expect no match 9127 Z\=ps 9128No match 9129 ZA\=ps 9130No match 9131 9132/dog(sbody)?/ 9133 dogs\=ps 9134 0: dog 9135 dogs\=ph 9136Partial match: dogs 9137 9138/dog(sbody)??/ 9139 dogs\=ps 9140 0: dog 9141 dogs\=ph 9142 0: dog 9143 9144/dog|dogsbody/ 9145 dogs\=ps 9146 0: dog 9147 dogs\=ph 9148 0: dog 9149 9150/dogsbody|dog/ 9151 dogs\=ps 9152 0: dog 9153 dogs\=ph 9154Partial match: dogs 9155 9156/\bthe cat\b/ 9157 the cat\=ps 9158 0: the cat 9159 the cat\=ph 9160Partial match: the cat 9161 9162/abc/ 9163 abc\=ps 9164 0: abc 9165 abc\=ph 9166 0: abc 9167 9168/abc\K123/startchar 9169 xyzabc123pqr 9170 0: abc123 9171 ^^^ 9172 xyzabc12\=ps 9173Partial match: abc12 9174 xyzabc12\=ph 9175Partial match: abc12 9176 9177/(?<=abc)123/ 9178 xyzabc123pqr 9179 0: 123 9180 xyzabc12\=ps 9181Partial match: abc12 9182 <<< 9183 xyzabc12\=ph 9184Partial match: abc12 9185 <<< 9186 9187/\babc\b/ 9188 +++abc+++ 9189 0: abc 9190 +++ab\=ps 9191Partial match: +ab 9192 < 9193 +++ab\=ph 9194Partial match: +ab 9195 < 9196 9197/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/B 9198------------------------------------------------------------------ 9199 Bra 9200 Recurse 9201 Recurse 9202 Cond 9203 Cond false 9204 CBra 1 9205 < 9206 [^m] 9207 [^>] 9208 > 9209 [^<] 9210 Ket 9211 CBra 2 9212 \w*+ 9213 Ket 9214 Ket 9215 Ket 9216 End 9217------------------------------------------------------------------ 9218 9219/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/B 9220------------------------------------------------------------------ 9221 Bra 9222 Recurse 9223 Recurse 9224 Cond 9225 Cond false 9226 CBra 1 9227 < 9228 [\x00-/:-\xff] (neg) 9229 [^>] 9230 > 9231 [^<] 9232 Ket 9233 CBra 2 9234 \w*+ 9235 Ket 9236 Ket 9237 Ket 9238 End 9239------------------------------------------------------------------ 9240 9241/(ab)(x(y)z(cd(*ACCEPT)))pq/B 9242------------------------------------------------------------------ 9243 Bra 9244 CBra 1 9245 ab 9246 Ket 9247 CBra 2 9248 x 9249 CBra 3 9250 y 9251 Ket 9252 z 9253 CBra 4 9254 cd 9255 Close 4 9256 Close 2 9257 *ACCEPT 9258 Ket 9259 Ket 9260 pq 9261 Ket 9262 End 9263------------------------------------------------------------------ 9264 9265/abc\K/aftertext,startchar 9266 abcdef 9267 0: abc 9268 ^^^ 9269 0+ def 9270 abcdef\=notempty_atstart 9271 0: abc 9272 ^^^ 9273 0+ def 9274 xyzabcdef\=notempty_atstart 9275 0: abc 9276 ^^^ 9277 0+ def 9278\= Expect no match 9279 abcdef\=notempty 9280No match 9281 xyzabcdef\=notempty 9282No match 9283 9284/^(?:(?=abc)|abc\K)/aftertext,startchar 9285 abcdef 9286 0: 9287 0+ abcdef 9288 abcdef\=notempty_atstart 9289 0: abc 9290 ^^^ 9291 0+ def 9292\= Expect no match 9293 abcdef\=notempty 9294No match 9295 9296/a?b?/aftertext 9297 xyz 9298 0: 9299 0+ xyz 9300 xyzabc 9301 0: 9302 0+ xyzabc 9303 xyzabc\=notempty 9304 0: ab 9305 0+ c 9306 xyzabc\=notempty_atstart 9307 0: 9308 0+ yzabc 9309 xyz\=notempty_atstart 9310 0: 9311 0+ yz 9312\= Expect no match 9313 xyz\=notempty 9314No match 9315 9316/^a?b?/aftertext 9317 xyz 9318 0: 9319 0+ xyz 9320 xyzabc 9321 0: 9322 0+ xyzabc 9323\= Expect no match 9324 xyzabc\=notempty 9325No match 9326 xyzabc\=notempty_atstart 9327No match 9328 xyz\=notempty_atstart 9329No match 9330 xyz\=notempty 9331No match 9332 9333/^(?<name>a|b\g<name>c)/ 9334 aaaa 9335 0: a 9336 1: a 9337 bacxxx 9338 0: bac 9339 1: bac 9340 bbaccxxx 9341 0: bbacc 9342 1: bbacc 9343 bbbacccxx 9344 0: bbbaccc 9345 1: bbbaccc 9346 9347/^(?<name>a|b\g'name'c)/ 9348 aaaa 9349 0: a 9350 1: a 9351 bacxxx 9352 0: bac 9353 1: bac 9354 bbaccxxx 9355 0: bbacc 9356 1: bbacc 9357 bbbacccxx 9358 0: bbbaccc 9359 1: bbbaccc 9360 9361/^(a|b\g<1>c)/ 9362 aaaa 9363 0: a 9364 1: a 9365 bacxxx 9366 0: bac 9367 1: bac 9368 bbaccxxx 9369 0: bbacc 9370 1: bbacc 9371 bbbacccxx 9372 0: bbbaccc 9373 1: bbbaccc 9374 9375/^(a|b\g'1'c)/ 9376 aaaa 9377 0: a 9378 1: a 9379 bacxxx 9380 0: bac 9381 1: bac 9382 bbaccxxx 9383 0: bbacc 9384 1: bbacc 9385 bbbacccxx 9386 0: bbbaccc 9387 1: bbbaccc 9388 9389/^(a|b\g'-1'c)/ 9390 aaaa 9391 0: a 9392 1: a 9393 bacxxx 9394 0: bac 9395 1: bac 9396 bbaccxxx 9397 0: bbacc 9398 1: bbacc 9399 bbbacccxx 9400 0: bbbaccc 9401 1: bbbaccc 9402 9403/(^(a|b\g<-1>c))/ 9404 aaaa 9405 0: a 9406 1: a 9407 2: a 9408 bacxxx 9409 0: bac 9410 1: bac 9411 2: bac 9412 bbaccxxx 9413 0: bbacc 9414 1: bbacc 9415 2: bbacc 9416 bbbacccxx 9417 0: bbbaccc 9418 1: bbbaccc 9419 2: bbbaccc 9420 9421/(?-i:\g<name>)(?i:(?<name>a))/ 9422 XaaX 9423 0: aa 9424 1: a 9425 XAAX 9426 0: AA 9427 1: A 9428 9429/(?i:\g<name>)(?-i:(?<name>a))/ 9430 XaaX 9431 0: aa 9432 1: a 9433\= Expect no match 9434 XAAX 9435No match 9436 9437/(?-i:\g<+1>)(?i:(a))/ 9438 XaaX 9439 0: aa 9440 1: a 9441 XAAX 9442 0: AA 9443 1: A 9444 9445/(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/ 9446 9447/(?<n>a|b|c)\g<n>*/ 9448 abc 9449 0: abc 9450 1: a 9451 accccbbb 9452 0: accccbbb 9453 1: a 9454 9455/^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/ 9456 XYabcdY 9457 0: XYabcdY 9458 1: a 9459 2: b 9460 3: <unset> 9461 4: <unset> 9462 5: c 9463 6: d 9464 7: Y 9465 9466/(?<=b(?1)|zzz)(a)/ 9467 xbaax 9468 0: a 9469 1: a 9470 xzzzax 9471 0: a 9472 1: a 9473 9474/(a)(?<=b\1)/ 9475Failed: error 125 at offset 10: lookbehind assertion is not fixed length 9476 9477/(a)(?<=b+(?1))/ 9478Failed: error 125 at offset 13: lookbehind assertion is not fixed length 9479 9480/(a+)(?<=b(?1))/ 9481Failed: error 125 at offset 14: lookbehind assertion is not fixed length 9482 9483/(a(?<=b(?1)))/ 9484Failed: error 125 at offset 13: lookbehind assertion is not fixed length 9485 9486/(?<=b(?1))xyz/ 9487Failed: error 115 at offset 8: reference to non-existent subpattern 9488 9489/(?<=b(?1))xyz(b+)pqrstuvew/ 9490Failed: error 125 at offset 26: lookbehind assertion is not fixed length 9491 9492/(a|bc)\1/I 9493Capturing subpattern count = 1 9494Max back reference = 1 9495Starting code units: a b 9496Subject length lower bound = 2 9497 9498/(a|bc)\1{2,3}/I 9499Capturing subpattern count = 1 9500Max back reference = 1 9501Starting code units: a b 9502Subject length lower bound = 3 9503 9504/(a|bc)(?1)/I 9505Capturing subpattern count = 1 9506Starting code units: a b 9507Subject length lower bound = 2 9508 9509/(a|b\1)(a|b\1)/I 9510Capturing subpattern count = 2 9511Max back reference = 1 9512Starting code units: a b 9513Subject length lower bound = 2 9514 9515/(a|b\1){2}/I 9516Capturing subpattern count = 1 9517Max back reference = 1 9518Starting code units: a b 9519Subject length lower bound = 2 9520 9521/(a|bbbb\1)(a|bbbb\1)/I 9522Capturing subpattern count = 2 9523Max back reference = 1 9524Starting code units: a b 9525Subject length lower bound = 2 9526 9527/(a|bbbb\1){2}/I 9528Capturing subpattern count = 1 9529Max back reference = 1 9530Starting code units: a b 9531Subject length lower bound = 2 9532 9533/^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]/I 9534Capturing subpattern count = 1 9535Compile options: <none> 9536Overall options: anchored 9537Last code unit = ':' 9538Subject length lower bound = 22 9539 9540/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/Iis 9541Capturing subpattern count = 11 9542Options: caseless dotall 9543First code unit = '<' 9544Last code unit = '>' 9545Subject length lower bound = 47 9546 9547"(?>.*/)foo"I 9548Capturing subpattern count = 0 9549Last code unit = 'o' 9550Subject length lower bound = 4 9551 9552/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /Ix 9553Capturing subpattern count = 0 9554Options: extended 9555Last code unit = '-' 9556Subject length lower bound = 8 9557 9558/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/Ii 9559Capturing subpattern count = 1 9560Options: caseless 9561Starting code units: A B C a b c 9562Subject length lower bound = 1 9563 9564/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/I 9565Capturing subpattern count = 0 9566Starting code units: c d 9567Last code unit = 'b' 9568Subject length lower bound = 41 9569 9570/<a[\s]+href[\s]*=[\s]* # find <a href= 9571 ([\"\'])? # find single or double quote 9572 (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching 9573 # quote, otherwise match up to next space 9574/Iisx 9575Capturing subpattern count = 3 9576Max back reference = 1 9577Options: caseless dotall extended 9578First code unit = '<' 9579Last code unit = '=' 9580Subject length lower bound = 9 9581 9582/^(?!:) # colon disallowed at start 9583 (?: # start of item 9584 (?: [0-9a-f]{1,4} | # 1-4 hex digits or 9585 (?(1)0 | () ) ) # if null previously matched, fail; else null 9586 : # followed by colon 9587 ){1,7} # end item; 1-7 of them required 9588 [0-9a-f]{1,4} $ # final hex number at end of string 9589 (?(1)|.) # check that there was an empty component 9590 /Iix 9591Capturing subpattern count = 1 9592Max back reference = 1 9593Compile options: caseless extended 9594Overall options: anchored caseless extended 9595Last code unit = ':' 9596Subject length lower bound = 2 9597 9598/(?|(?<a>A)|(?<a>B))/I 9599Capturing subpattern count = 1 9600Named capturing subpatterns: 9601 a 1 9602Starting code units: A B 9603Subject length lower bound = 1 9604 AB\=copy=a 9605 0: A 9606 1: A 9607 C A (1) a (group 1) 9608 BA\=copy=a 9609 0: B 9610 1: B 9611 C B (1) a (group 1) 9612 9613/(?|(?<a>A)|(?<b>B))/ 9614Failed: error 165 at offset 15: different names for subpatterns of the same number are not allowed 9615 9616/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) | 9617 b(?<quote> (?<apostrophe>')|(?<realquote>")) ) 9618 (?('quote')[a-z]+|[0-9]+)/Ix,dupnames 9619Capturing subpattern count = 6 9620Max back reference = 4 9621Named capturing subpatterns: 9622 apostrophe 2 9623 apostrophe 5 9624 quote 1 9625 quote 4 9626 realquote 3 9627 realquote 6 9628Options: dupnames extended 9629Starting code units: a b 9630Subject length lower bound = 3 9631 a"aaaaa 9632 0: a"aaaaa 9633 1: " 9634 2: <unset> 9635 3: " 9636 b"aaaaa 9637 0: b"aaaaa 9638 1: <unset> 9639 2: <unset> 9640 3: <unset> 9641 4: " 9642 5: <unset> 9643 6: " 9644\= Expect no match 9645 b"11111 9646No match 9647 a"11111 9648No match 9649 9650/^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/IBx,dupnames 9651------------------------------------------------------------------ 9652 Bra 9653 ^ 9654 Bra 9655 CBra 1 9656 a 9657 Ket 9658 CBra 2 9659 b 9660 Ket 9661 CBra 3 9662 c 9663 Ket 9664 CBra 4 9665 d 9666 Ket 9667 Alt 9668 CBra 1 9669 e 9670 Ket 9671 Ket 9672 Cond 9673 Cond ref <D>2 9674 X 9675 Alt 9676 Y 9677 Ket 9678 Ket 9679 End 9680------------------------------------------------------------------ 9681Capturing subpattern count = 4 9682Max back reference = 4 9683Named capturing subpatterns: 9684 D 4 9685 D 1 9686Compile options: dupnames extended 9687Overall options: anchored dupnames extended 9688Subject length lower bound = 2 9689 abcdX 9690 0: abcdX 9691 1: a 9692 2: b 9693 3: c 9694 4: d 9695 eX 9696 0: eX 9697 1: e 9698\= Expect no match 9699 abcdY 9700No match 9701 ey 9702No match 9703 9704/(?<A>a) (b)(c) (?<A>d (?(R&A)$ | (?4)) )/IBx,dupnames 9705------------------------------------------------------------------ 9706 Bra 9707 CBra 1 9708 a 9709 Ket 9710 CBra 2 9711 b 9712 Ket 9713 CBra 3 9714 c 9715 Ket 9716 CBra 4 9717 d 9718 Cond 9719 Cond recurse <A>2 9720 $ 9721 Alt 9722 Recurse 9723 Ket 9724 Ket 9725 Ket 9726 End 9727------------------------------------------------------------------ 9728Capturing subpattern count = 4 9729Max back reference = 4 9730Named capturing subpatterns: 9731 A 1 9732 A 4 9733Options: dupnames extended 9734First code unit = 'a' 9735Last code unit = 'd' 9736Subject length lower bound = 4 9737 abcdd 9738 0: abcdd 9739 1: a 9740 2: b 9741 3: c 9742 4: dd 9743\= Expect no match 9744 abcdde 9745No match 9746 9747/abcd*/ 9748 xxxxabcd\=ps 9749 0: abcd 9750 xxxxabcd\=ph 9751Partial match: abcd 9752 9753/abcd*/i 9754 xxxxabcd\=ps 9755 0: abcd 9756 xxxxabcd\=ph 9757Partial match: abcd 9758 XXXXABCD\=ps 9759 0: ABCD 9760 XXXXABCD\=ph 9761Partial match: ABCD 9762 9763/abc\d*/ 9764 xxxxabc1\=ps 9765 0: abc1 9766 xxxxabc1\=ph 9767Partial match: abc1 9768 9769/(a)bc\1*/ 9770 xxxxabca\=ps 9771 0: abca 9772 1: a 9773 xxxxabca\=ph 9774Partial match: abca 9775 9776/abc[de]*/ 9777 xxxxabcde\=ps 9778 0: abcde 9779 xxxxabcde\=ph 9780Partial match: abcde 9781 9782# This is not in the Perl-compatible test because Perl seems currently to be 9783# broken and not behaving as specified in that it *does* bumpalong after 9784# hitting (*COMMIT). 9785 9786/(?1)(A(*COMMIT)|B)D/ 9787 ABD 9788 0: ABD 9789 1: B 9790 XABD 9791 0: ABD 9792 1: B 9793 BAD 9794 0: BAD 9795 1: A 9796 ABXABD 9797 0: ABD 9798 1: B 9799\= Expect no match 9800 ABX 9801No match 9802 BAXBAD 9803No match 9804 9805/(\3)(\1)(a)/alt_bsux,allow_empty_class,match_unset_backref,dupnames 9806 cat 9807 0: a 9808 1: 9809 2: 9810 3: a 9811 9812/(\3)(\1)(a)/I,alt_bsux,allow_empty_class,match_unset_backref,dupnames 9813Capturing subpattern count = 3 9814Max back reference = 3 9815Options: alt_bsux allow_empty_class dupnames match_unset_backref 9816Last code unit = 'a' 9817Subject length lower bound = 1 9818 cat 9819 0: a 9820 1: 9821 2: 9822 3: a 9823 9824/(\3)(\1)(a)/I 9825Capturing subpattern count = 3 9826Max back reference = 3 9827Last code unit = 'a' 9828Subject length lower bound = 3 9829\= Expect no match 9830 cat 9831No match 9832 9833/i(?(DEFINE)(?<s>a))/I 9834Capturing subpattern count = 1 9835Named capturing subpatterns: 9836 s 1 9837First code unit = 'i' 9838Subject length lower bound = 1 9839 i 9840 0: i 9841 9842/()i(?(1)a)/I 9843Capturing subpattern count = 1 9844Max back reference = 1 9845First code unit = 'i' 9846Subject length lower bound = 1 9847 ia 9848 0: ia 9849 1: 9850 9851/(?i)a(?-i)b|c/B 9852------------------------------------------------------------------ 9853 Bra 9854 /i a 9855 b 9856 Alt 9857 c 9858 Ket 9859 End 9860------------------------------------------------------------------ 9861 XabX 9862 0: ab 9863 XAbX 9864 0: Ab 9865 CcC 9866 0: c 9867\= Expect no match 9868 XABX 9869No match 9870 9871/(?i)a(?s)b|c/B 9872------------------------------------------------------------------ 9873 Bra 9874 /i ab 9875 Alt 9876 /i c 9877 Ket 9878 End 9879------------------------------------------------------------------ 9880 9881/(?i)a(?s-i)b|c/B 9882------------------------------------------------------------------ 9883 Bra 9884 /i a 9885 b 9886 Alt 9887 c 9888 Ket 9889 End 9890------------------------------------------------------------------ 9891 9892/^(ab(c\1)d|x){2}$/B 9893------------------------------------------------------------------ 9894 Bra 9895 ^ 9896 Once 9897 CBra 1 9898 ab 9899 CBra 2 9900 c 9901 \1 9902 Ket 9903 d 9904 Alt 9905 x 9906 Ket 9907 Ket 9908 Once 9909 CBra 1 9910 ab 9911 CBra 2 9912 c 9913 \1 9914 Ket 9915 d 9916 Alt 9917 x 9918 Ket 9919 Ket 9920 $ 9921 Ket 9922 End 9923------------------------------------------------------------------ 9924 xabcxd 9925 0: xabcxd 9926 1: abcxd 9927 2: cx 9928 9929/^(?&t)*+(?(DEFINE)(?<t>.))$/B 9930------------------------------------------------------------------ 9931 Bra 9932 ^ 9933 Braposzero 9934 SBraPos 9935 Recurse 9936 KetRpos 9937 Cond 9938 Cond false 9939 CBra 1 9940 Any 9941 Ket 9942 Ket 9943 $ 9944 Ket 9945 End 9946------------------------------------------------------------------ 9947 9948/^(?&t)*(?(DEFINE)(?<t>.))$/B 9949------------------------------------------------------------------ 9950 Bra 9951 ^ 9952 Brazero 9953 Once 9954 Recurse 9955 KetRmax 9956 Cond 9957 Cond false 9958 CBra 1 9959 Any 9960 Ket 9961 Ket 9962 $ 9963 Ket 9964 End 9965------------------------------------------------------------------ 9966 9967# This one is here because Perl gives the match as "b" rather than "ab". I 9968# believe this to be a Perl bug. 9969 9970/(?>a\Kb)z|(ab)/ 9971 ab\=startchar 9972 0: ab 9973 1: ab 9974 9975/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/ 9976 abcd 9977 0: 9978 1: 9979 2: 9980 0abc 9981 0: 0 9982 1: 0 9983 2: 0 9984 9985/abc(*MARK:)pqr/ 9986Failed: error 166 at offset 10: (*MARK) must have an argument 9987 9988/abc(*:)pqr/ 9989Failed: error 166 at offset 6: (*MARK) must have an argument 9990 9991/abc(*FAIL:123)xyz/ 9992Failed: error 159 at offset 13: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) 9993 9994# This should, and does, fail. In Perl, it does not, which I think is a 9995# bug because replacing the B in the pattern by (B|D) does make it fail. 9996 9997/A(*COMMIT)B/aftertext,mark 9998\= Expect no match 9999 ACABX 10000No match 10001 10002# These should be different, but in Perl they are not, which I think 10003# is a bug in Perl. 10004 10005/A(*THEN)B|A(*THEN)C/mark 10006 AC 10007 0: AC 10008 10009/A(*PRUNE)B|A(*PRUNE)C/mark 10010\= Expect no match 10011 AC 10012No match 10013 10014# Mark names can be duplicated. Perl doesn't give a mark for this one, 10015# though PCRE2 does. 10016 10017/^A(*:A)B|^X(*:A)Y/mark 10018\= Expect no match 10019 XAQQ 10020No match, mark = A 10021 10022# COMMIT at the start of a pattern should be the same as an anchor. Perl 10023# optimizations defeat this. So does the PCRE2 optimization unless we disable 10024# it. 10025 10026/(*COMMIT)ABC/ 10027 ABCDEFG 10028 0: ABC 10029 10030/(*COMMIT)ABC/no_start_optimize 10031\= Expect no match 10032 DEFGABC 10033No match 10034 10035/^(ab (c+(*THEN)cd) | xyz)/x 10036\= Expect no match 10037 abcccd 10038No match 10039 10040/^(ab (c+(*PRUNE)cd) | xyz)/x 10041\= Expect no match 10042 abcccd 10043No match 10044 10045/^(ab (c+(*FAIL)cd) | xyz)/x 10046\= Expect no match 10047 abcccd 10048No match 10049 10050# Perl gets some of these wrong 10051 10052/(?>.(*ACCEPT))*?5/ 10053 abcde 10054 0: a 10055 10056/(.(*ACCEPT))*?5/ 10057 abcde 10058 0: a 10059 1: a 10060 10061/(.(*ACCEPT))5/ 10062 abcde 10063 0: a 10064 1: a 10065 10066/(.(*ACCEPT))*5/ 10067 abcde 10068 0: a 10069 1: a 10070 10071/A\NB./B 10072------------------------------------------------------------------ 10073 Bra 10074 A 10075 Any 10076 B 10077 Any 10078 Ket 10079 End 10080------------------------------------------------------------------ 10081 ACBD 10082 0: ACBD 10083\= Expect no match 10084 A\nB 10085No match 10086 ACB\n 10087No match 10088 10089/A\NB./Bs 10090------------------------------------------------------------------ 10091 Bra 10092 A 10093 Any 10094 B 10095 AllAny 10096 Ket 10097 End 10098------------------------------------------------------------------ 10099 ACBD 10100 0: ACBD 10101 ACB\n 10102 0: ACB\x0a 10103\= Expect no match 10104 A\nB 10105No match 10106 10107/A\NB/newline=crlf 10108 A\nB 10109 0: A\x0aB 10110 A\rB 10111 0: A\x0dB 10112\= Expect no match 10113 A\r\nB 10114No match 10115 10116/\R+b/B 10117------------------------------------------------------------------ 10118 Bra 10119 \R++ 10120 b 10121 Ket 10122 End 10123------------------------------------------------------------------ 10124 10125/\R+\n/B 10126------------------------------------------------------------------ 10127 Bra 10128 \R+ 10129 \x0a 10130 Ket 10131 End 10132------------------------------------------------------------------ 10133 10134/\R+\d/B 10135------------------------------------------------------------------ 10136 Bra 10137 \R++ 10138 \d 10139 Ket 10140 End 10141------------------------------------------------------------------ 10142 10143/\d*\R/B 10144------------------------------------------------------------------ 10145 Bra 10146 \d*+ 10147 \R 10148 Ket 10149 End 10150------------------------------------------------------------------ 10151 10152/\s*\R/B 10153------------------------------------------------------------------ 10154 Bra 10155 \s* 10156 \R 10157 Ket 10158 End 10159------------------------------------------------------------------ 10160 \x20\x0a 10161 0: \x0a 10162 \x20\x0d 10163 0: \x0d 10164 \x20\x0d\x0a 10165 0: \x0d\x0a 10166 10167/\S*\R/B 10168------------------------------------------------------------------ 10169 Bra 10170 \S*+ 10171 \R 10172 Ket 10173 End 10174------------------------------------------------------------------ 10175 a\x0a 10176 0: a\x0a 10177 10178/X\h*\R/B 10179------------------------------------------------------------------ 10180 Bra 10181 X 10182 \h*+ 10183 \R 10184 Ket 10185 End 10186------------------------------------------------------------------ 10187 X\x20\x0a 10188 0: X \x0a 10189 10190/X\H*\R/B 10191------------------------------------------------------------------ 10192 Bra 10193 X 10194 \H* 10195 \R 10196 Ket 10197 End 10198------------------------------------------------------------------ 10199 X\x0d\x0a 10200 0: X\x0d\x0a 10201 10202/X\H+\R/B 10203------------------------------------------------------------------ 10204 Bra 10205 X 10206 \H+ 10207 \R 10208 Ket 10209 End 10210------------------------------------------------------------------ 10211 X\x0d\x0a 10212 0: X\x0d\x0a 10213 10214/X\H++\R/B 10215------------------------------------------------------------------ 10216 Bra 10217 X 10218 \H++ 10219 \R 10220 Ket 10221 End 10222------------------------------------------------------------------ 10223\= Expect no match 10224 X\x0d\x0a 10225No match 10226 10227/(?<=abc)def/ 10228 abc\=ph 10229Partial match: abc 10230 <<< 10231 10232/abc$/ 10233 abc 10234 0: abc 10235 abc\=ps 10236 0: abc 10237 abc\=ph 10238Partial match: abc 10239 10240/abc$/m 10241 abc 10242 0: abc 10243 abc\n 10244 0: abc 10245 abc\=ph 10246Partial match: abc 10247 abc\n\=ph 10248 0: abc 10249 abc\=ps 10250 0: abc 10251 abc\n\=ps 10252 0: abc 10253 10254/abc\z/ 10255 abc 10256 0: abc 10257 abc\=ps 10258 0: abc 10259 abc\=ph 10260Partial match: abc 10261 10262/abc\Z/ 10263 abc 10264 0: abc 10265 abc\=ps 10266 0: abc 10267 abc\=ph 10268Partial match: abc 10269 10270/abc\b/ 10271 abc 10272 0: abc 10273 abc\=ps 10274 0: abc 10275 abc\=ph 10276Partial match: abc 10277 10278/abc\B/ 10279 abc\=ps 10280Partial match: abc 10281 abc\=ph 10282Partial match: abc 10283\= Expect no match 10284 abc 10285No match 10286 10287/.+/ 10288\= Bad offsets 10289 abc\=offset=4 10290Failed: error -33: bad offset value 10291 abc\=offset=-4 10292** Invalid value in 'offset=-4' 10293\= Valid data 10294 abc\=offset=0 10295 0: abc 10296 abc\=offset=1 10297 0: bc 10298 abc\=offset=2 10299 0: c 10300\= Expect no match 10301 abc\=offset=3 10302No match 10303 10304/^\cģ/ 10305Failed: error 168 at offset 3: \c must be followed by a printable ASCII character 10306 10307/(?P<abn>(?P=abn)xxx)/B 10308------------------------------------------------------------------ 10309 Bra 10310 Once 10311 CBra 1 10312 \1 10313 xxx 10314 Ket 10315 Ket 10316 Ket 10317 End 10318------------------------------------------------------------------ 10319 10320/(a\1z)/B 10321------------------------------------------------------------------ 10322 Bra 10323 Once 10324 CBra 1 10325 a 10326 \1 10327 z 10328 Ket 10329 Ket 10330 Ket 10331 End 10332------------------------------------------------------------------ 10333 10334/(?P<abn>(?P=abn)(?<badstufxxx)/B 10335Failed: error 142 at offset 29: syntax error in subpattern name (missing terminator) 10336 10337/(?P<abn>(?P=axn)xxx)/B 10338Failed: error 115 at offset 15: reference to non-existent subpattern 10339 10340/(?P<abn>(?P=axn)xxx)(?<axn>yy)/B 10341------------------------------------------------------------------ 10342 Bra 10343 CBra 1 10344 \2 10345 xxx 10346 Ket 10347 CBra 2 10348 yy 10349 Ket 10350 Ket 10351 End 10352------------------------------------------------------------------ 10353 10354# These tests are here because Perl gets the first one wrong. 10355 10356/(\R*)(.)/s 10357 \r\n 10358 0: \x0d 10359 1: 10360 2: \x0d 10361 \r\r\n\n\r 10362 0: \x0d\x0d\x0a\x0a\x0d 10363 1: \x0d\x0d\x0a\x0a 10364 2: \x0d 10365 \r\r\n\n\r\n 10366 0: \x0d\x0d\x0a\x0a\x0d 10367 1: \x0d\x0d\x0a\x0a 10368 2: \x0d 10369 10370/(\R)*(.)/s 10371 \r\n 10372 0: \x0d 10373 1: <unset> 10374 2: \x0d 10375 \r\r\n\n\r 10376 0: \x0d\x0d\x0a\x0a\x0d 10377 1: \x0a 10378 2: \x0d 10379 \r\r\n\n\r\n 10380 0: \x0d\x0d\x0a\x0a\x0d 10381 1: \x0a 10382 2: \x0d 10383 10384/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s 10385 \r\n 10386 0: \x0d 10387 1: 10388 2: \x0d 10389 \r\r\n\n\r 10390 0: \x0d\x0d\x0a\x0a\x0d 10391 1: \x0d\x0d\x0a\x0a 10392 2: \x0d 10393 \r\r\n\n\r\n 10394 0: \x0d\x0d\x0a\x0a\x0d 10395 1: \x0d\x0d\x0a\x0a 10396 2: \x0d 10397 10398# ------------- 10399 10400/^abc$/B 10401------------------------------------------------------------------ 10402 Bra 10403 ^ 10404 abc 10405 $ 10406 Ket 10407 End 10408------------------------------------------------------------------ 10409 10410/^abc$/Bm 10411------------------------------------------------------------------ 10412 Bra 10413 /m ^ 10414 abc 10415 /m $ 10416 Ket 10417 End 10418------------------------------------------------------------------ 10419 10420/^(a)*+(\w)/ 10421 aaaaX 10422 0: aaaaX 10423 1: a 10424 2: X 10425\= Expect no match 10426 aaaa 10427No match 10428 10429/^(?:a)*+(\w)/ 10430 aaaaX 10431 0: aaaaX 10432 1: X 10433\= Expect no match 10434 aaaa 10435No match 10436 10437/(a)++1234/IB 10438------------------------------------------------------------------ 10439 Bra 10440 CBraPos 1 10441 a 10442 KetRpos 10443 1234 10444 Ket 10445 End 10446------------------------------------------------------------------ 10447Capturing subpattern count = 1 10448First code unit = 'a' 10449Last code unit = '4' 10450Subject length lower bound = 5 10451 10452/([abc])++1234/I 10453Capturing subpattern count = 1 10454Starting code units: a b c 10455Last code unit = '4' 10456Subject length lower bound = 5 10457 10458/(?<=(abc)+)X/ 10459Failed: error 125 at offset 10: lookbehind assertion is not fixed length 10460 10461/(^ab)/I 10462Capturing subpattern count = 1 10463Compile options: <none> 10464Overall options: anchored 10465Subject length lower bound = 2 10466 10467/(^ab)++/I 10468Capturing subpattern count = 1 10469Compile options: <none> 10470Overall options: anchored 10471Subject length lower bound = 2 10472 10473/(^ab|^)+/I 10474Capturing subpattern count = 1 10475May match empty string 10476Compile options: <none> 10477Overall options: anchored 10478Subject length lower bound = 0 10479 10480/(^ab|^)++/I 10481Capturing subpattern count = 1 10482May match empty string 10483Compile options: <none> 10484Overall options: anchored 10485Subject length lower bound = 0 10486 10487/(?:^ab)/I 10488Capturing subpattern count = 0 10489Compile options: <none> 10490Overall options: anchored 10491Subject length lower bound = 2 10492 10493/(?:^ab)++/I 10494Capturing subpattern count = 0 10495Compile options: <none> 10496Overall options: anchored 10497Subject length lower bound = 2 10498 10499/(?:^ab|^)+/I 10500Capturing subpattern count = 0 10501May match empty string 10502Compile options: <none> 10503Overall options: anchored 10504Subject length lower bound = 0 10505 10506/(?:^ab|^)++/I 10507Capturing subpattern count = 0 10508May match empty string 10509Compile options: <none> 10510Overall options: anchored 10511Subject length lower bound = 0 10512 10513/(.*ab)/I 10514Capturing subpattern count = 1 10515First code unit at start or follows newline 10516Last code unit = 'b' 10517Subject length lower bound = 2 10518 10519/(.*ab)++/I 10520Capturing subpattern count = 1 10521First code unit at start or follows newline 10522Last code unit = 'b' 10523Subject length lower bound = 2 10524 10525/(.*ab|.*)+/I 10526Capturing subpattern count = 1 10527May match empty string 10528First code unit at start or follows newline 10529Subject length lower bound = 0 10530 10531/(.*ab|.*)++/I 10532Capturing subpattern count = 1 10533May match empty string 10534First code unit at start or follows newline 10535Subject length lower bound = 0 10536 10537/(?:.*ab)/I 10538Capturing subpattern count = 0 10539First code unit at start or follows newline 10540Last code unit = 'b' 10541Subject length lower bound = 2 10542 10543/(?:.*ab)++/I 10544Capturing subpattern count = 0 10545First code unit at start or follows newline 10546Last code unit = 'b' 10547Subject length lower bound = 2 10548 10549/(?:.*ab|.*)+/I 10550Capturing subpattern count = 0 10551May match empty string 10552First code unit at start or follows newline 10553Subject length lower bound = 0 10554 10555/(?:.*ab|.*)++/I 10556Capturing subpattern count = 0 10557May match empty string 10558First code unit at start or follows newline 10559Subject length lower bound = 0 10560 10561/(?=a)[bcd]/I 10562Capturing subpattern count = 0 10563First code unit = 'a' 10564Subject length lower bound = 1 10565 10566/((?=a))[bcd]/I 10567Capturing subpattern count = 1 10568First code unit = 'a' 10569Subject length lower bound = 1 10570 10571/((?=a))+[bcd]/I 10572Capturing subpattern count = 1 10573First code unit = 'a' 10574Subject length lower bound = 1 10575 10576/((?=a))++[bcd]/I 10577Capturing subpattern count = 1 10578First code unit = 'a' 10579Subject length lower bound = 1 10580 10581/(?=a+)[bcd]/Ii 10582Capturing subpattern count = 0 10583Options: caseless 10584First code unit = 'a' (caseless) 10585Subject length lower bound = 1 10586 10587/(?=a+?)[bcd]/Ii 10588Capturing subpattern count = 0 10589Options: caseless 10590First code unit = 'a' (caseless) 10591Subject length lower bound = 1 10592 10593/(?=a++)[bcd]/Ii 10594Capturing subpattern count = 0 10595Options: caseless 10596First code unit = 'a' (caseless) 10597Subject length lower bound = 1 10598 10599/(?=a{3})[bcd]/Ii 10600Capturing subpattern count = 0 10601Options: caseless 10602First code unit = 'a' (caseless) 10603Last code unit = 'a' (caseless) 10604Subject length lower bound = 1 10605 10606/(abc)\1+/ 10607 10608# Perl doesn't get these right IMO (the 3rd is PCRE2-specific) 10609 10610/(?1)(?:(b(*ACCEPT))){0}/ 10611 b 10612 0: b 10613 10614/(?1)(?:(b(*ACCEPT))){0}c/ 10615 bc 10616 0: bc 10617\= Expect no match 10618 b 10619No match 10620 10621/(?1)(?:((*ACCEPT))){0}c/ 10622 c 10623 0: c 10624 c\=notempty 10625 0: c 10626 10627/^.*?(?(?=a)a|b(*THEN)c)/ 10628\= Expect no match 10629 ba 10630No match 10631 10632/^.*?(?(?=a)a|bc)/ 10633 ba 10634 0: ba 10635 10636/^.*?(?(?=a)a(*THEN)b|c)/ 10637\= Expect no match 10638 ac 10639No match 10640 10641/^.*?(?(?=a)a(*THEN)b)c/ 10642\= Expect no match 10643 ac 10644No match 10645 10646/^.*?(a(*THEN)b)c/ 10647\= Expect no match 10648 aabc 10649No match 10650 10651/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x 10652 aabc 10653 0: aabc 10654 10655/^.*?(a(*THEN)b|z)c/ 10656 aabc 10657 0: aabc 10658 1: ab 10659 10660/^.*?(z|a(*THEN)b)c/ 10661 aabc 10662 0: aabc 10663 1: ab 10664 10665# These are here because they are not Perl-compatible; the studying means the 10666# mark is not seen. 10667 10668/(*MARK:A)(*SKIP:B)(C|X)/mark 10669 C 10670 0: C 10671 1: C 10672MK: A 10673\= Expect no match 10674 D 10675No match, mark = A 10676 10677/(*:A)A+(*SKIP:A)(B|Z)/mark 10678\= Expect no match 10679 AAAC 10680No match, mark = A 10681 10682# ---------------------------- 10683 10684"(?=a*(*ACCEPT)b)c" 10685 c 10686 0: c 10687 c\=notempty 10688 0: c 10689 10690/(?1)c(?(DEFINE)((*ACCEPT)b))/ 10691 c 10692 0: c 10693 c\=notempty 10694 0: c 10695 10696/(?>(*ACCEPT)b)c/ 10697 c 10698 0: 10699\= Expect no match 10700 c\=notempty 10701No match 10702 10703/(?:(?>(a)))+a%/allaftertext 10704 %aa% 10705 0: aa% 10706 0+ 10707 1: a 10708 1+ a% 10709 10710/(a)b|ac/allaftertext 10711 ac\=ovector=1 10712 0: ac 10713 0+ 10714 10715/(a)(b)x|abc/allaftertext 10716 abc\=ovector=2 10717 0: abc 10718 0+ 10719 10720/(a)bc|(a)(b)\2/ 10721 abc\=ovector=1 10722Matched, but too many substrings 10723 0: abc 10724 abc\=ovector=2 10725 0: abc 10726 1: a 10727 aba\=ovector=1 10728Matched, but too many substrings 10729 0: aba 10730 aba\=ovector=2 10731Matched, but too many substrings 10732 0: aba 10733 1: <unset> 10734 aba\=ovector=3 10735Matched, but too many substrings 10736 0: aba 10737 1: <unset> 10738 2: a 10739 aba\=ovector=4 10740 0: aba 10741 1: <unset> 10742 2: a 10743 3: b 10744 10745/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/I 10746Capturing subpattern count = 2 10747Subject length lower bound = 1 10748 10749/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/I 10750Capturing subpattern count = 2 10751Starting code units: a b 10752Subject length lower bound = 3 10753 10754/(a(?2)|b)(b(?1)|a)(?1)(?2)/I 10755Capturing subpattern count = 2 10756Starting code units: a b 10757Subject length lower bound = 4 10758 10759/(abc)(?1)/I 10760Capturing subpattern count = 1 10761First code unit = 'a' 10762Last code unit = 'c' 10763Subject length lower bound = 6 10764 10765/(?:(foo)|(bar)|(baz))X/allcaptures 10766 bazfooX 10767 0: fooX 10768 1: foo 10769 2: <unset> 10770 3: <unset> 10771 foobazbarX 10772 0: barX 10773 1: <unset> 10774 2: bar 10775 3: <unset> 10776 barfooX 10777 0: fooX 10778 1: foo 10779 2: <unset> 10780 3: <unset> 10781 bazX 10782 0: bazX 10783 1: <unset> 10784 2: <unset> 10785 3: baz 10786 foobarbazX 10787 0: bazX 10788 1: <unset> 10789 2: <unset> 10790 3: baz 10791 bazfooX\=ovector=0 10792 0: fooX 10793 1: foo 10794 2: <unset> 10795 3: <unset> 10796 bazfooX\=ovector=1 10797Matched, but too many substrings 10798 0: fooX 10799 bazfooX\=ovector=2 10800 0: fooX 10801 1: foo 10802 bazfooX\=ovector=3 10803 0: fooX 10804 1: foo 10805 2: <unset> 10806 10807/(?=abc){3}abc/B 10808------------------------------------------------------------------ 10809 Bra 10810 Assert 10811 abc 10812 Ket 10813 abc 10814 Ket 10815 End 10816------------------------------------------------------------------ 10817 10818/(?=abc)+abc/B 10819------------------------------------------------------------------ 10820 Bra 10821 Assert 10822 abc 10823 Ket 10824 abc 10825 Ket 10826 End 10827------------------------------------------------------------------ 10828 10829/(?=abc)++abc/B 10830------------------------------------------------------------------ 10831 Bra 10832 Assert 10833 abc 10834 Ket 10835 abc 10836 Ket 10837 End 10838------------------------------------------------------------------ 10839 10840/(?=abc){0}xyz/B 10841------------------------------------------------------------------ 10842 Bra 10843 Skip zero 10844 Assert 10845 abc 10846 Ket 10847 xyz 10848 Ket 10849 End 10850------------------------------------------------------------------ 10851 10852/(?=(a))?./B 10853------------------------------------------------------------------ 10854 Bra 10855 Brazero 10856 Assert 10857 CBra 1 10858 a 10859 Ket 10860 Ket 10861 Any 10862 Ket 10863 End 10864------------------------------------------------------------------ 10865 10866/(?=(a))??./B 10867------------------------------------------------------------------ 10868 Bra 10869 Braminzero 10870 Assert 10871 CBra 1 10872 a 10873 Ket 10874 Ket 10875 Any 10876 Ket 10877 End 10878------------------------------------------------------------------ 10879 10880/^(?=(a)){0}b(?1)/B 10881------------------------------------------------------------------ 10882 Bra 10883 ^ 10884 Skip zero 10885 Assert 10886 CBra 1 10887 a 10888 Ket 10889 Ket 10890 b 10891 Recurse 10892 Ket 10893 End 10894------------------------------------------------------------------ 10895 10896/(?(DEFINE)(a))?b(?1)/B 10897------------------------------------------------------------------ 10898 Bra 10899 Cond 10900 Cond false 10901 CBra 1 10902 a 10903 Ket 10904 Ket 10905 b 10906 Recurse 10907 Ket 10908 End 10909------------------------------------------------------------------ 10910 10911/^(?=(?1))?[az]([abc])d/B 10912------------------------------------------------------------------ 10913 Bra 10914 ^ 10915 Brazero 10916 Assert 10917 Recurse 10918 Ket 10919 [az] 10920 CBra 1 10921 [a-c] 10922 Ket 10923 d 10924 Ket 10925 End 10926------------------------------------------------------------------ 10927 10928/^(?!a){0}\w+/B 10929------------------------------------------------------------------ 10930 Bra 10931 ^ 10932 Skip zero 10933 Assert not 10934 a 10935 Ket 10936 \w++ 10937 Ket 10938 End 10939------------------------------------------------------------------ 10940 10941/(?<=(abc))?xyz/B 10942------------------------------------------------------------------ 10943 Bra 10944 Brazero 10945 AssertB 10946 Reverse 10947 CBra 1 10948 abc 10949 Ket 10950 Ket 10951 xyz 10952 Ket 10953 End 10954------------------------------------------------------------------ 10955 10956/[:a[:abc]b:]/B 10957------------------------------------------------------------------ 10958 Bra 10959 [:[a-c] 10960 b:] 10961 Ket 10962 End 10963------------------------------------------------------------------ 10964 10965/^(a(*:A)(d|e(*:B))z|aeq)/auto_callout 10966 adz 10967--->adz 10968 +0 ^ ^ 10969 +1 ^ (a(*:A)(d|e(*:B))z|aeq) 10970 +2 ^ a 10971 +3 ^^ (*:A) 10972 +8 ^^ (d|e(*:B)) 10973Latest Mark: A 10974 +9 ^^ d 10975+10 ^ ^ | 10976+18 ^ ^ z 10977+19 ^ ^ | 10978+24 ^ ^ 10979 0: adz 10980 1: adz 10981 2: d 10982 aez 10983--->aez 10984 +0 ^ ^ 10985 +1 ^ (a(*:A)(d|e(*:B))z|aeq) 10986 +2 ^ a 10987 +3 ^^ (*:A) 10988 +8 ^^ (d|e(*:B)) 10989Latest Mark: A 10990 +9 ^^ d 10991+11 ^^ e 10992+12 ^ ^ (*:B) 10993+17 ^ ^ ) 10994Latest Mark: B 10995+18 ^ ^ z 10996+19 ^ ^ | 10997+24 ^ ^ 10998 0: aez 10999 1: aez 11000 2: e 11001 aeqwerty 11002--->aeqwerty 11003 +0 ^ ^ 11004 +1 ^ (a(*:A)(d|e(*:B))z|aeq) 11005 +2 ^ a 11006 +3 ^^ (*:A) 11007 +8 ^^ (d|e(*:B)) 11008Latest Mark: A 11009 +9 ^^ d 11010+11 ^^ e 11011+12 ^ ^ (*:B) 11012+17 ^ ^ ) 11013Latest Mark: B 11014+18 ^ ^ z 11015+20 ^ a 11016+21 ^^ e 11017+22 ^ ^ q 11018+23 ^ ^ ) 11019+24 ^ ^ 11020 0: aeq 11021 1: aeq 11022 11023/.(*F)/ 11024\= Expect no match 11025 abc\=ph 11026No match 11027 11028/\btype\b\W*?\btext\b\W*?\bjavascript\b/I 11029Capturing subpattern count = 0 11030Max lookbehind = 1 11031First code unit = 't' 11032Last code unit = 't' 11033Subject length lower bound = 18 11034 11035/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/I 11036Capturing subpattern count = 0 11037Max lookbehind = 1 11038Starting code units: < o t u 11039Subject length lower bound = 8 11040 11041/a(*SKIP)c|b(*ACCEPT)|/I,aftertext 11042Capturing subpattern count = 0 11043May match empty string 11044Subject length lower bound = 0 11045 a 11046 0: 11047 0+ 11048 11049/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/I 11050Capturing subpattern count = 0 11051Starting code units: a b x 11052Subject length lower bound = 0 11053 ax 11054 0: x 11055 11056'a*(*ACCEPT)b'aftertext 11057 abc\=notempty_atstart 11058 0: a 11059 0+ bc 11060 bbb\=notempty_atstart 11061 0: 11062 0+ bb 11063\= Expect no match 11064 \=notempty_atstart 11065No match 11066 11067/(*ACCEPT)a/I,aftertext 11068Capturing subpattern count = 0 11069Subject length lower bound = 0 11070 bax 11071 0: 11072 0+ bax 11073 11074/z(*ACCEPT)a/I,aftertext 11075Capturing subpattern count = 0 11076First code unit = 'z' 11077Subject length lower bound = 0 11078 baxzbx 11079 0: z 11080 0+ bx 11081 11082/^(?>a+)(?>(z+))\w/B 11083------------------------------------------------------------------ 11084 Bra 11085 ^ 11086 Once_NC 11087 a++ 11088 Ket 11089 Once 11090 CBra 1 11091 z++ 11092 Ket 11093 Ket 11094 \w 11095 Ket 11096 End 11097------------------------------------------------------------------ 11098 aaaazzzzb 11099 0: aaaazzzzb 11100 1: zzzz 11101\= Expect no match 11102 aazz 11103No match 11104 11105/(.)(\1|a(?2))/ 11106 bab 11107 0: bab 11108 1: b 11109 2: ab 11110 11111/\1|(.)(?R)\1/ 11112 cbbbc 11113 0: cbbbc 11114 1: c 11115 11116/(.)((?(1)c|a)|a(?2))/ 11117\= Expect no match 11118 baa 11119No match 11120 11121/(?P<abn>(?P=abn)xxx)/B 11122------------------------------------------------------------------ 11123 Bra 11124 Once 11125 CBra 1 11126 \1 11127 xxx 11128 Ket 11129 Ket 11130 Ket 11131 End 11132------------------------------------------------------------------ 11133 11134/(a\1z)/B 11135------------------------------------------------------------------ 11136 Bra 11137 Once 11138 CBra 1 11139 a 11140 \1 11141 z 11142 Ket 11143 Ket 11144 Ket 11145 End 11146------------------------------------------------------------------ 11147 11148/^a\x41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11149 aAz 11150 0: aAz 11151\= Expect no match 11152 ax41z 11153No match 11154 11155/^a[m\x41]z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11156 aAz 11157 0: aAz 11158 11159/^a\x1z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11160 ax1z 11161 0: ax1z 11162 11163/^a\u0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11164 aAz 11165 0: aAz 11166\= Expect no match 11167 au0041z 11168No match 11169 11170/^a[m\u0041]z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11171 aAz 11172 0: aAz 11173 11174/^a\u041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11175 au041z 11176 0: au041z 11177\= Expect no match 11178 aAz 11179No match 11180 11181/^a\U0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11182 aU0041z 11183 0: aU0041z 11184\= Expect no match 11185 aAz 11186No match 11187 11188/(?(?=c)c|d)++Y/B 11189------------------------------------------------------------------ 11190 Bra 11191 BraPos 11192 Cond 11193 Assert 11194 c 11195 Ket 11196 c 11197 Alt 11198 d 11199 Ket 11200 KetRpos 11201 Y 11202 Ket 11203 End 11204------------------------------------------------------------------ 11205 11206/(?(?=c)c|d)*+Y/B 11207------------------------------------------------------------------ 11208 Bra 11209 Braposzero 11210 BraPos 11211 Cond 11212 Assert 11213 c 11214 Ket 11215 c 11216 Alt 11217 d 11218 Ket 11219 KetRpos 11220 Y 11221 Ket 11222 End 11223------------------------------------------------------------------ 11224 11225/a[\NB]c/ 11226Failed: error 171 at offset 3: \N is not supported in a class 11227 aNc 11228 11229/a[B-\Nc]/ 11230Failed: error 150 at offset 5: invalid range in character class 11231 11232/a[B\Nc]/ 11233Failed: error 171 at offset 4: \N is not supported in a class 11234 11235/(a)(?2){0,1999}?(b)/ 11236 11237/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/ 11238 11239# This test, with something more complicated than individual letters, causes 11240# different behaviour in Perl. Perhaps it disables some optimization; no tag is 11241# passed back for the failures, whereas in PCRE2 there is a tag. 11242 11243/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/x,mark 11244 AABC 11245 0: AB 11246 1: A 11247 2: B 11248MK: A 11249 XXYZ 11250 0: XXY 11251 1: <unset> 11252 2: <unset> 11253 3: X 11254 4: X 11255 5: Y 11256MK: B 11257\= Expect no match 11258 XAQQ 11259No match, mark = A 11260 XAQQXZZ 11261No match, mark = A 11262 AXQQQ 11263No match, mark = A 11264 AXXQQQ 11265No match, mark = B 11266 11267# Perl doesn't give marks for these, though it does if the alternatives are 11268# replaced by single letters. 11269 11270/(b|q)(*:m)f|a(*:n)w/mark 11271 aw 11272 0: aw 11273MK: n 11274\= Expect no match 11275 abc 11276No match, mark = m 11277 11278/(q|b)(*:m)f|a(*:n)w/mark 11279 aw 11280 0: aw 11281MK: n 11282\= Expect no match 11283 abc 11284No match, mark = m 11285 11286# After a partial match, the behaviour is as for a failure. 11287 11288/^a(*:X)bcde/mark 11289 abc\=ps 11290Partial match, mark=X: abc 11291 11292# These are here because Perl doesn't return a mark, except for the first. 11293 11294/(?=(*:x))(q|)/aftertext,mark 11295 abc 11296 0: 11297 0+ abc 11298 1: 11299MK: x 11300 11301/(?=(*:x))((*:y)q|)/aftertext,mark 11302 abc 11303 0: 11304 0+ abc 11305 1: 11306MK: x 11307 11308/(?=(*:x))(?:(*:y)q|)/aftertext,mark 11309 abc 11310 0: 11311 0+ abc 11312MK: x 11313 11314/(?=(*:x))(?>(*:y)q|)/aftertext,mark 11315 abc 11316 0: 11317 0+ abc 11318MK: x 11319 11320/(?=a(*:x))(?!a(*:y)c)/aftertext,mark 11321 ab 11322 0: 11323 0+ ab 11324MK: x 11325 11326/(?=a(*:x))(?=a(*:y)c|)/aftertext,mark 11327 ab 11328 0: 11329 0+ ab 11330MK: x 11331 11332/(..)\1/ 11333 ab\=ps 11334Partial match: ab 11335 aba\=ps 11336Partial match: aba 11337 abab\=ps 11338 0: abab 11339 1: ab 11340 11341/(..)\1/i 11342 ab\=ps 11343Partial match: ab 11344 abA\=ps 11345Partial match: abA 11346 aBAb\=ps 11347 0: aBAb 11348 1: aB 11349 11350/(..)\1{2,}/ 11351 ab\=ps 11352Partial match: ab 11353 aba\=ps 11354Partial match: aba 11355 abab\=ps 11356Partial match: abab 11357 ababa\=ps 11358Partial match: ababa 11359 ababab\=ps 11360 0: ababab 11361 1: ab 11362 ababab\=ph 11363Partial match: ababab 11364 abababa\=ps 11365 0: ababab 11366 1: ab 11367 abababa\=ph 11368Partial match: abababa 11369 11370/(..)\1{2,}/i 11371 ab\=ps 11372Partial match: ab 11373 aBa\=ps 11374Partial match: aBa 11375 aBAb\=ps 11376Partial match: aBAb 11377 AbaBA\=ps 11378Partial match: AbaBA 11379 abABAb\=ps 11380 0: abABAb 11381 1: ab 11382 aBAbaB\=ph 11383Partial match: aBAbaB 11384 abABabA\=ps 11385 0: abABab 11386 1: ab 11387 abaBABa\=ph 11388Partial match: abaBABa 11389 11390/(..)\1{2,}?x/i 11391 ab\=ps 11392Partial match: ab 11393 abA\=ps 11394Partial match: abA 11395 aBAb\=ps 11396Partial match: aBAb 11397 abaBA\=ps 11398Partial match: abaBA 11399 abAbaB\=ps 11400Partial match: abAbaB 11401 abaBabA\=ps 11402Partial match: abaBabA 11403 abAbABaBx\=ps 11404 0: abAbABaBx 11405 1: ab 11406 11407/^(..)\1/ 11408 aba\=ps 11409Partial match: aba 11410 11411/^(..)\1{2,3}x/ 11412 aba\=ps 11413Partial match: aba 11414 ababa\=ps 11415Partial match: ababa 11416 ababa\=ph 11417Partial match: ababa 11418 abababx 11419 0: abababx 11420 1: ab 11421 ababababx 11422 0: ababababx 11423 1: ab 11424 11425/^(..)\1{2,3}?x/ 11426 aba\=ps 11427Partial match: aba 11428 ababa\=ps 11429Partial match: ababa 11430 ababa\=ph 11431Partial match: ababa 11432 abababx 11433 0: abababx 11434 1: ab 11435 ababababx 11436 0: ababababx 11437 1: ab 11438 11439/^(..)(\1{2,3})ab/ 11440 abababab 11441 0: abababab 11442 1: ab 11443 2: abab 11444 11445/^\R/ 11446 \r\=ps 11447 0: \x0d 11448 \r\=ph 11449Partial match: \x0d 11450 11451/^\R{2,3}x/ 11452 \r\=ps 11453Partial match: \x0d 11454 \r\=ph 11455Partial match: \x0d 11456 \r\r\=ps 11457Partial match: \x0d\x0d 11458 \r\r\=ph 11459Partial match: \x0d\x0d 11460 \r\r\r\=ps 11461Partial match: \x0d\x0d\x0d 11462 \r\r\r\=ph 11463Partial match: \x0d\x0d\x0d 11464 \r\rx 11465 0: \x0d\x0dx 11466 \r\r\rx 11467 0: \x0d\x0d\x0dx 11468 11469/^\R{2,3}?x/ 11470 \r\=ps 11471Partial match: \x0d 11472 \r\=ph 11473Partial match: \x0d 11474 \r\r\=ps 11475Partial match: \x0d\x0d 11476 \r\r\=ph 11477Partial match: \x0d\x0d 11478 \r\r\r\=ps 11479Partial match: \x0d\x0d\x0d 11480 \r\r\r\=ph 11481Partial match: \x0d\x0d\x0d 11482 \r\rx 11483 0: \x0d\x0dx 11484 \r\r\rx 11485 0: \x0d\x0d\x0dx 11486 11487/^\R?x/ 11488 \r\=ps 11489Partial match: \x0d 11490 \r\=ph 11491Partial match: \x0d 11492 x 11493 0: x 11494 \rx 11495 0: \x0dx 11496 11497/^\R+x/ 11498 \r\=ps 11499Partial match: \x0d 11500 \r\=ph 11501Partial match: \x0d 11502 \r\n\=ps 11503Partial match: \x0d\x0a 11504 \r\n\=ph 11505Partial match: \x0d\x0a 11506 \rx 11507 0: \x0dx 11508 11509/^a$/newline=crlf 11510 a\r\=ps 11511Partial match: a\x0d 11512 a\r\=ph 11513Partial match: a\x0d 11514 11515/^a$/m,newline=crlf 11516 a\r\=ps 11517Partial match: a\x0d 11518 a\r\=ph 11519Partial match: a\x0d 11520 11521/^(a$|a\r)/newline=crlf 11522 a\r\=ps 11523 0: a\x0d 11524 1: a\x0d 11525 a\r\=ph 11526Partial match: a\x0d 11527 11528/^(a$|a\r)/m,newline=crlf 11529 a\r\=ps 11530 0: a\x0d 11531 1: a\x0d 11532 a\r\=ph 11533Partial match: a\x0d 11534 11535/./newline=crlf 11536 \r\=ps 11537 0: \x0d 11538 \r\=ph 11539Partial match: \x0d 11540 11541/.{2,3}/newline=crlf 11542 \r\=ps 11543Partial match: \x0d 11544 \r\=ph 11545Partial match: \x0d 11546 \r\r\=ps 11547 0: \x0d\x0d 11548 \r\r\=ph 11549Partial match: \x0d\x0d 11550 \r\r\r\=ps 11551 0: \x0d\x0d\x0d 11552 \r\r\r\=ph 11553Partial match: \x0d\x0d\x0d 11554 11555/.{2,3}?/newline=crlf 11556 \r\=ps 11557Partial match: \x0d 11558 \r\=ph 11559Partial match: \x0d 11560 \r\r\=ps 11561 0: \x0d\x0d 11562 \r\r\=ph 11563Partial match: \x0d\x0d 11564 \r\r\r\=ps 11565 0: \x0d\x0d 11566 \r\r\r\=ph 11567 0: \x0d\x0d 11568 11569"AB(C(D))(E(F))?(?(?=\2)(?=\4))" 11570 ABCDGHI\=ovector=01 11571Matched, but too many substrings 11572 0: ABCD 11573 11574# These are all run as real matches in test 1; here we are just checking the 11575# settings of the anchored and startline bits. 11576 11577/(?>.*?a)(?<=ba)/I 11578Capturing subpattern count = 0 11579Max lookbehind = 2 11580Last code unit = 'a' 11581Subject length lower bound = 1 11582 11583/(?:.*?a)(?<=ba)/I 11584Capturing subpattern count = 0 11585Max lookbehind = 2 11586First code unit at start or follows newline 11587Last code unit = 'a' 11588Subject length lower bound = 1 11589 11590/.*?a(*PRUNE)b/I 11591Capturing subpattern count = 0 11592Last code unit = 'b' 11593Subject length lower bound = 2 11594 11595/.*?a(*PRUNE)b/Is 11596Capturing subpattern count = 0 11597Options: dotall 11598Last code unit = 'b' 11599Subject length lower bound = 2 11600 11601/^a(*PRUNE)b/Is 11602Capturing subpattern count = 0 11603Compile options: dotall 11604Overall options: anchored dotall 11605Subject length lower bound = 2 11606 11607/.*?a(*SKIP)b/I 11608Capturing subpattern count = 0 11609Last code unit = 'b' 11610Subject length lower bound = 2 11611 11612/(?>.*?a)b/Is 11613Capturing subpattern count = 0 11614Options: dotall 11615Last code unit = 'b' 11616Subject length lower bound = 2 11617 11618/(?>.*?a)b/I 11619Capturing subpattern count = 0 11620Last code unit = 'b' 11621Subject length lower bound = 2 11622 11623/(?>^a)b/Is 11624Capturing subpattern count = 0 11625Compile options: dotall 11626Overall options: anchored dotall 11627Subject length lower bound = 2 11628 11629/(?>.*?)(?<=(abcd)|(wxyz))/I 11630Capturing subpattern count = 2 11631Max lookbehind = 4 11632May match empty string 11633Subject length lower bound = 0 11634 11635/(?>.*)(?<=(abcd)|(wxyz))/I 11636Capturing subpattern count = 2 11637Max lookbehind = 4 11638May match empty string 11639Subject length lower bound = 0 11640 11641"(?>.*)foo"I 11642Capturing subpattern count = 0 11643Last code unit = 'o' 11644Subject length lower bound = 3 11645 11646"(?>.*?)foo"I 11647Capturing subpattern count = 0 11648Last code unit = 'o' 11649Subject length lower bound = 3 11650 11651/(?>^abc)/Im 11652Capturing subpattern count = 0 11653Options: multiline 11654First code unit at start or follows newline 11655Last code unit = 'c' 11656Subject length lower bound = 3 11657 11658/(?>.*abc)/Im 11659Capturing subpattern count = 0 11660Options: multiline 11661Last code unit = 'c' 11662Subject length lower bound = 3 11663 11664/(?:.*abc)/Im 11665Capturing subpattern count = 0 11666Options: multiline 11667First code unit at start or follows newline 11668Last code unit = 'c' 11669Subject length lower bound = 3 11670 11671/(?:(a)+(?C1)bb|aa(?C2)b)/ 11672 aab\=callout_capture 11673Callout 1: last capture = 1 11674 0: <unset> 11675 1: a 11676--->aab 11677 ^ ^ b 11678Callout 1: last capture = 1 11679 0: <unset> 11680 1: a 11681--->aab 11682 ^^ b 11683Callout 2: last capture = 0 11684 0: <unset> 11685--->aab 11686 ^ ^ b 11687 0: aab 11688 11689/(?:(a)++(?C1)bb|aa(?C2)b)/ 11690 aab\=callout_capture 11691Callout 1: last capture = 1 11692 0: <unset> 11693 1: a 11694--->aab 11695 ^ ^ b 11696Callout 2: last capture = 0 11697 0: <unset> 11698--->aab 11699 ^ ^ b 11700 0: aab 11701 11702/(?:(?>(a))(?C1)bb|aa(?C2)b)/ 11703 aab\=callout_capture 11704Callout 1: last capture = 1 11705 0: <unset> 11706 1: a 11707--->aab 11708 ^^ b 11709Callout 2: last capture = 0 11710 0: <unset> 11711--->aab 11712 ^ ^ b 11713 0: aab 11714 11715/(?:(?1)(?C1)x|ab(?C2))((a)){0}/ 11716 aab\=callout_capture 11717Callout 1: last capture = 0 11718 0: <unset> 11719--->aab 11720 ^^ x 11721Callout 1: last capture = 0 11722 0: <unset> 11723--->aab 11724 ^^ x 11725Callout 2: last capture = 0 11726 0: <unset> 11727--->aab 11728 ^ ^ ) 11729 0: ab 11730 11731/(?1)(?C1)((a)(?C2)){0}/ 11732 aab\=callout_capture 11733Callout 2: last capture = 2 11734 0: <unset> 11735 1: <unset> 11736 2: a 11737--->aab 11738 ^^ ) 11739Callout 1: last capture = 0 11740 0: <unset> 11741--->aab 11742 ^^ ((a)(?C2)){0} 11743 0: a 11744 11745/(?:(a)+(?C1)bb|aa(?C2)b)++/ 11746 aab\=callout_capture 11747Callout 1: last capture = 1 11748 0: <unset> 11749 1: a 11750--->aab 11751 ^ ^ b 11752Callout 1: last capture = 1 11753 0: <unset> 11754 1: a 11755--->aab 11756 ^^ b 11757Callout 2: last capture = 0 11758 0: <unset> 11759--->aab 11760 ^ ^ b 11761 0: aab 11762 aab\=callout_capture,ovector=1 11763Callout 1: last capture = 1 11764 0: <unset> 11765--->aab 11766 ^ ^ b 11767Callout 1: last capture = 1 11768 0: <unset> 11769--->aab 11770 ^^ b 11771Callout 2: last capture = 0 11772 0: <unset> 11773--->aab 11774 ^ ^ b 11775 0: aab 11776 11777/(ab)x|ab/ 11778 ab\=ovector=0 11779 0: ab 11780 ab\=ovector=1 11781 0: ab 11782 11783/(?<=123)(*MARK:xx)abc/mark 11784 xxxx123a\=ph 11785Partial match, mark=xx: 123a 11786 <<< 11787 xxxx123a\=ps 11788Partial match, mark=xx: 123a 11789 <<< 11790 11791/123\Kabc/startchar 11792 xxxx123a\=ph 11793Partial match: 123a 11794 xxxx123a\=ps 11795Partial match: 123a 11796 11797/^(?(?=a)aa|bb)/auto_callout 11798 bb 11799--->bb 11800 +0 ^ ^ 11801 +1 ^ (?(?=a)aa|bb) 11802 +3 ^ (?=a) 11803 +6 ^ a 11804+11 ^ b 11805+12 ^^ b 11806+13 ^ ^ ) 11807+14 ^ ^ 11808 0: bb 11809 11810/(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/ 11811 bb 11812--->bb 11813 1 ^ ^ 11814 2 ^ (?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10)) 11815 99 ^ (?=(?C3)a(?C4)) 11816 3 ^ a 11817 8 ^ b 11818 9 ^^ b 11819 10 ^ ^ ) 11820 11 ^ ^ 11821 0: bb 11822 11823# Perl seems to have a bug with this one. 11824 11825/aaaaa(*COMMIT)(*PRUNE)b|a+c/ 11826 aaaaaac 11827 0: aaaac 11828 11829# Here are some that Perl treats differently because of the way it handles 11830# backtracking verbs. 11831 11832/(?!a(*COMMIT)b)ac|ad/ 11833 ac 11834 0: ac 11835 ad 11836 0: ad 11837 11838/^(?!a(*THEN)b|ac)../ 11839 ad 11840 0: ad 11841\= Expect no match 11842 ac 11843No match 11844 11845/^(?=a(*THEN)b|ac)/ 11846 ac 11847 0: 11848 11849/\A.*?(?:a|b(*THEN)c)/ 11850 ba 11851 0: ba 11852 11853/\A.*?(?:a|b(*THEN)c)++/ 11854 ba 11855 0: ba 11856 11857/\A.*?(?:a|b(*THEN)c|d)/ 11858 ba 11859 0: ba 11860 11861/(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/ 11862 aac 11863 0: aac 11864 11865/\A.*?(a|b(*THEN)c)/ 11866 ba 11867 0: ba 11868 1: a 11869 11870/^(A(*THEN)B|A(*THEN)D)/ 11871 AD 11872 0: AD 11873 1: AD 11874 11875/(?!b(*THEN)a)bn|bnn/ 11876 bnn 11877 0: bn 11878 11879/(?(?=b(*SKIP)a)bn|bnn)/ 11880\= Expect no match 11881 bnn 11882No match 11883 11884/(?=b(*THEN)a|)bn|bnn/ 11885 bnn 11886 0: bn 11887 11888# This test causes a segfault with Perl 5.18.0 11889 11890/^(?=(a)){0}b(?1)/ 11891 backgammon 11892 0: ba 11893 11894/(?|(?<n>f)|(?<n>b))/I,dupnames 11895Capturing subpattern count = 1 11896Named capturing subpatterns: 11897 n 1 11898Options: dupnames 11899Starting code units: b f 11900Subject length lower bound = 1 11901 11902/(?<a>abc)(?<a>z)\k<a>()/IB,dupnames 11903------------------------------------------------------------------ 11904 Bra 11905 CBra 1 11906 abc 11907 Ket 11908 CBra 2 11909 z 11910 Ket 11911 \k<a>2 11912 CBra 3 11913 Ket 11914 Ket 11915 End 11916------------------------------------------------------------------ 11917Capturing subpattern count = 3 11918Max back reference = 2 11919Named capturing subpatterns: 11920 a 1 11921 a 2 11922Options: dupnames 11923First code unit = 'a' 11924Last code unit = 'z' 11925Subject length lower bound = 5 11926 11927/a*[bcd]/B 11928------------------------------------------------------------------ 11929 Bra 11930 a*+ 11931 [b-d] 11932 Ket 11933 End 11934------------------------------------------------------------------ 11935 11936/[bcd]*a/B 11937------------------------------------------------------------------ 11938 Bra 11939 [b-d]*+ 11940 a 11941 Ket 11942 End 11943------------------------------------------------------------------ 11944 11945# A complete set of tests for auto-possessification of character types, but 11946# omitting \C because it might be disabled (it has its own tests). 11947 11948/\D+\D \D+\d \D+\S \D+\s \D+\W \D+\w \D+. \D+\R \D+\H \D+\h \D+\V \D+\v \D+\Z \D+\z \D+$/Bx 11949------------------------------------------------------------------ 11950 Bra 11951 \D+ 11952 \D 11953 \D++ 11954 \d 11955 \D+ 11956 \S 11957 \D+ 11958 \s 11959 \D+ 11960 \W 11961 \D+ 11962 \w 11963 \D+ 11964 Any 11965 \D+ 11966 \R 11967 \D+ 11968 \H 11969 \D+ 11970 \h 11971 \D+ 11972 \V 11973 \D+ 11974 \v 11975 \D+ 11976 \Z 11977 \D++ 11978 \z 11979 \D+ 11980 $ 11981 Ket 11982 End 11983------------------------------------------------------------------ 11984 11985/\d+\D \d+\d \d+\S \d+\s \d+\W \d+\w \d+. \d+\R \d+\H \d+\h \d+\V \d+\v \d+\Z \d+\z \d+$/Bx 11986------------------------------------------------------------------ 11987 Bra 11988 \d++ 11989 \D 11990 \d+ 11991 \d 11992 \d+ 11993 \S 11994 \d++ 11995 \s 11996 \d++ 11997 \W 11998 \d+ 11999 \w 12000 \d+ 12001 Any 12002 \d++ 12003 \R 12004 \d+ 12005 \H 12006 \d++ 12007 \h 12008 \d+ 12009 \V 12010 \d++ 12011 \v 12012 \d++ 12013 \Z 12014 \d++ 12015 \z 12016 \d++ 12017 $ 12018 Ket 12019 End 12020------------------------------------------------------------------ 12021 12022/\S+\D \S+\d \S+\S \S+\s \S+\W \S+\w \S+. \S+\R \S+\H \S+\h \S+\V \S+\v \S+\Z \S+\z \S+$/Bx 12023------------------------------------------------------------------ 12024 Bra 12025 \S+ 12026 \D 12027 \S+ 12028 \d 12029 \S+ 12030 \S 12031 \S++ 12032 \s 12033 \S+ 12034 \W 12035 \S+ 12036 \w 12037 \S+ 12038 Any 12039 \S++ 12040 \R 12041 \S+ 12042 \H 12043 \S++ 12044 \h 12045 \S+ 12046 \V 12047 \S++ 12048 \v 12049 \S++ 12050 \Z 12051 \S++ 12052 \z 12053 \S++ 12054 $ 12055 Ket 12056 End 12057------------------------------------------------------------------ 12058 12059/\s+\D \s+\d \s+\S \s+\s \s+\W \s+\w \s+. \s+\R \s+\H \s+\h \s+\V \s+\v \s+\Z \s+\z \s+$/Bx 12060------------------------------------------------------------------ 12061 Bra 12062 \s+ 12063 \D 12064 \s++ 12065 \d 12066 \s++ 12067 \S 12068 \s+ 12069 \s 12070 \s+ 12071 \W 12072 \s++ 12073 \w 12074 \s+ 12075 Any 12076 \s+ 12077 \R 12078 \s+ 12079 \H 12080 \s+ 12081 \h 12082 \s+ 12083 \V 12084 \s+ 12085 \v 12086 \s+ 12087 \Z 12088 \s++ 12089 \z 12090 \s+ 12091 $ 12092 Ket 12093 End 12094------------------------------------------------------------------ 12095 12096/\W+\D \W+\d \W+\S \W+\s \W+\W \W+\w \W+. \W+\R \W+\H \W+\h \W+\V \W+\v \W+\Z \W+\z \W+$/Bx 12097------------------------------------------------------------------ 12098 Bra 12099 \W+ 12100 \D 12101 \W++ 12102 \d 12103 \W+ 12104 \S 12105 \W+ 12106 \s 12107 \W+ 12108 \W 12109 \W++ 12110 \w 12111 \W+ 12112 Any 12113 \W+ 12114 \R 12115 \W+ 12116 \H 12117 \W+ 12118 \h 12119 \W+ 12120 \V 12121 \W+ 12122 \v 12123 \W+ 12124 \Z 12125 \W++ 12126 \z 12127 \W+ 12128 $ 12129 Ket 12130 End 12131------------------------------------------------------------------ 12132 12133/\w+\D \w+\d \w+\S \w+\s \w+\W \w+\w \w+. \w+\R \w+\H \w+\h \w+\V \w+\v \w+\Z \w+\z \w+$/Bx 12134------------------------------------------------------------------ 12135 Bra 12136 \w+ 12137 \D 12138 \w+ 12139 \d 12140 \w+ 12141 \S 12142 \w++ 12143 \s 12144 \w++ 12145 \W 12146 \w+ 12147 \w 12148 \w+ 12149 Any 12150 \w++ 12151 \R 12152 \w+ 12153 \H 12154 \w++ 12155 \h 12156 \w+ 12157 \V 12158 \w++ 12159 \v 12160 \w++ 12161 \Z 12162 \w++ 12163 \z 12164 \w++ 12165 $ 12166 Ket 12167 End 12168------------------------------------------------------------------ 12169 12170/\R+\D \R+\d \R+\S \R+\s \R+\W \R+\w \R+. \R+\R \R+\H \R+\h \R+\V \R+\v \R+\Z \R+\z \R+$/Bx 12171------------------------------------------------------------------ 12172 Bra 12173 \R+ 12174 \D 12175 \R++ 12176 \d 12177 \R+ 12178 \S 12179 \R++ 12180 \s 12181 \R+ 12182 \W 12183 \R++ 12184 \w 12185 \R++ 12186 Any 12187 \R+ 12188 \R 12189 \R+ 12190 \H 12191 \R++ 12192 \h 12193 \R+ 12194 \V 12195 \R+ 12196 \v 12197 \R+ 12198 \Z 12199 \R++ 12200 \z 12201 \R+ 12202 $ 12203 Ket 12204 End 12205------------------------------------------------------------------ 12206 12207/\H+\D \H+\d \H+\S \H+\s \H+\W \H+\w \H+. \H+\R \H+\H \H+\h \H+\V \H+\v \H+\Z \H+\z \H+$/Bx 12208------------------------------------------------------------------ 12209 Bra 12210 \H+ 12211 \D 12212 \H+ 12213 \d 12214 \H+ 12215 \S 12216 \H+ 12217 \s 12218 \H+ 12219 \W 12220 \H+ 12221 \w 12222 \H+ 12223 Any 12224 \H+ 12225 \R 12226 \H+ 12227 \H 12228 \H++ 12229 \h 12230 \H+ 12231 \V 12232 \H+ 12233 \v 12234 \H+ 12235 \Z 12236 \H++ 12237 \z 12238 \H+ 12239 $ 12240 Ket 12241 End 12242------------------------------------------------------------------ 12243 12244/\h+\D \h+\d \h+\S \h+\s \h+\W \h+\w \h+. \h+\R \h+\H \h+\h \h+\V \h+\v \h+\Z \h+\z \h+$/Bx 12245------------------------------------------------------------------ 12246 Bra 12247 \h+ 12248 \D 12249 \h++ 12250 \d 12251 \h++ 12252 \S 12253 \h+ 12254 \s 12255 \h+ 12256 \W 12257 \h++ 12258 \w 12259 \h+ 12260 Any 12261 \h++ 12262 \R 12263 \h++ 12264 \H 12265 \h+ 12266 \h 12267 \h+ 12268 \V 12269 \h++ 12270 \v 12271 \h+ 12272 \Z 12273 \h++ 12274 \z 12275 \h+ 12276 $ 12277 Ket 12278 End 12279------------------------------------------------------------------ 12280 12281/\V+\D \V+\d \V+\S \V+\s \V+\W \V+\w \V+. \V+\R \V+\H \V+\h \V+\V \V+\v \V+\Z \V+\z \V+$/Bx 12282------------------------------------------------------------------ 12283 Bra 12284 \V+ 12285 \D 12286 \V+ 12287 \d 12288 \V+ 12289 \S 12290 \V+ 12291 \s 12292 \V+ 12293 \W 12294 \V+ 12295 \w 12296 \V+ 12297 Any 12298 \V++ 12299 \R 12300 \V+ 12301 \H 12302 \V+ 12303 \h 12304 \V+ 12305 \V 12306 \V++ 12307 \v 12308 \V+ 12309 \Z 12310 \V++ 12311 \z 12312 \V+ 12313 $ 12314 Ket 12315 End 12316------------------------------------------------------------------ 12317 12318/\v+\D \v+\d \v+\S \v+\s \v+\W \v+\w \v+. \v+\R \v+\H \v+\h \v+\V \v+\v \v+\Z \v+\z \v+$/Bx 12319------------------------------------------------------------------ 12320 Bra 12321 \v+ 12322 \D 12323 \v++ 12324 \d 12325 \v++ 12326 \S 12327 \v+ 12328 \s 12329 \v+ 12330 \W 12331 \v++ 12332 \w 12333 \v+ 12334 Any 12335 \v+ 12336 \R 12337 \v+ 12338 \H 12339 \v++ 12340 \h 12341 \v++ 12342 \V 12343 \v+ 12344 \v 12345 \v+ 12346 \Z 12347 \v++ 12348 \z 12349 \v+ 12350 $ 12351 Ket 12352 End 12353------------------------------------------------------------------ 12354 12355/ a+\D a+\d a+\S a+\s a+\W a+\w a+. a+\R a+\H a+\h a+\V a+\v a+\Z a+\z a+$/Bx 12356------------------------------------------------------------------ 12357 Bra 12358 a+ 12359 \D 12360 a++ 12361 \d 12362 a+ 12363 \S 12364 a++ 12365 \s 12366 a++ 12367 \W 12368 a+ 12369 \w 12370 a+ 12371 Any 12372 a++ 12373 \R 12374 a+ 12375 \H 12376 a++ 12377 \h 12378 a+ 12379 \V 12380 a++ 12381 \v 12382 a++ 12383 \Z 12384 a++ 12385 \z 12386 a++ 12387 $ 12388 Ket 12389 End 12390------------------------------------------------------------------ 12391 12392/\n+\D \n+\d \n+\S \n+\s \n+\W \n+\w \n+. \n+\R \n+\H \n+\h \n+\V \n+\v \n+\Z \n+\z \n+$/Bx 12393------------------------------------------------------------------ 12394 Bra 12395 \x0a+ 12396 \D 12397 \x0a++ 12398 \d 12399 \x0a++ 12400 \S 12401 \x0a+ 12402 \s 12403 \x0a+ 12404 \W 12405 \x0a++ 12406 \w 12407 \x0a+ 12408 Any 12409 \x0a+ 12410 \R 12411 \x0a+ 12412 \H 12413 \x0a++ 12414 \h 12415 \x0a++ 12416 \V 12417 \x0a+ 12418 \v 12419 \x0a+ 12420 \Z 12421 \x0a++ 12422 \z 12423 \x0a+ 12424 $ 12425 Ket 12426 End 12427------------------------------------------------------------------ 12428 12429/ .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/Bx 12430------------------------------------------------------------------ 12431 Bra 12432 Any+ 12433 \D 12434 Any+ 12435 \d 12436 Any+ 12437 \S 12438 Any+ 12439 \s 12440 Any+ 12441 \W 12442 Any+ 12443 \w 12444 Any+ 12445 Any 12446 Any++ 12447 \R 12448 Any+ 12449 \H 12450 Any+ 12451 \h 12452 Any+ 12453 \V 12454 Any+ 12455 \v 12456 Any+ 12457 \Z 12458 Any++ 12459 \z 12460 Any+ 12461 $ 12462 Ket 12463 End 12464------------------------------------------------------------------ 12465 12466/ .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/Bsx 12467------------------------------------------------------------------ 12468 Bra 12469 AllAny+ 12470 \D 12471 AllAny+ 12472 \d 12473 AllAny+ 12474 \S 12475 AllAny+ 12476 \s 12477 AllAny+ 12478 \W 12479 AllAny+ 12480 \w 12481 AllAny+ 12482 AllAny 12483 AllAny+ 12484 \R 12485 AllAny+ 12486 \H 12487 AllAny+ 12488 \h 12489 AllAny+ 12490 \V 12491 AllAny+ 12492 \v 12493 AllAny+ 12494 \Z 12495 AllAny++ 12496 \z 12497 AllAny+ 12498 $ 12499 Ket 12500 End 12501------------------------------------------------------------------ 12502 12503/ \D+$ \d+$ \S+$ \s+$ \W+$ \w+$ \R+$ \H+$ \h+$ \V+$ \v+$ a+$ \n+$ .+$ .+$/Bmx 12504------------------------------------------------------------------ 12505 Bra 12506 \D+ 12507 /m $ 12508 \d++ 12509 /m $ 12510 \S++ 12511 /m $ 12512 \s+ 12513 /m $ 12514 \W+ 12515 /m $ 12516 \w++ 12517 /m $ 12518 \R+ 12519 /m $ 12520 \H+ 12521 /m $ 12522 \h+ 12523 /m $ 12524 \V+ 12525 /m $ 12526 \v+ 12527 /m $ 12528 a+ 12529 /m $ 12530 \x0a+ 12531 /m $ 12532 Any+ 12533 /m $ 12534 Any+ 12535 /m $ 12536 Ket 12537 End 12538------------------------------------------------------------------ 12539 12540/(?=a+)a(a+)++a/B 12541------------------------------------------------------------------ 12542 Bra 12543 Assert 12544 a++ 12545 Ket 12546 a 12547 CBraPos 1 12548 a++ 12549 KetRpos 12550 a 12551 Ket 12552 End 12553------------------------------------------------------------------ 12554 12555/a+(bb|cc)a+(?:bb|cc)a+(?>bb|cc)a+(?:bb|cc)+a+(aa)a+(?:bb|aa)/B 12556------------------------------------------------------------------ 12557 Bra 12558 a++ 12559 CBra 1 12560 bb 12561 Alt 12562 cc 12563 Ket 12564 a++ 12565 Bra 12566 bb 12567 Alt 12568 cc 12569 Ket 12570 a++ 12571 Once_NC 12572 bb 12573 Alt 12574 cc 12575 Ket 12576 a++ 12577 Bra 12578 bb 12579 Alt 12580 cc 12581 KetRmax 12582 a+ 12583 CBra 2 12584 aa 12585 Ket 12586 a+ 12587 Bra 12588 bb 12589 Alt 12590 aa 12591 Ket 12592 Ket 12593 End 12594------------------------------------------------------------------ 12595 12596/a+(bb|cc)?#a+(?:bb|cc)??#a+(?:bb|cc)?+#a+(?:bb|cc)*#a+(bb|cc)?a#a+(?:aa)?/B 12597------------------------------------------------------------------ 12598 Bra 12599 a++ 12600 Brazero 12601 CBra 1 12602 bb 12603 Alt 12604 cc 12605 Ket 12606 # 12607 a++ 12608 Braminzero 12609 Bra 12610 bb 12611 Alt 12612 cc 12613 Ket 12614 # 12615 a++ 12616 Once 12617 Brazero 12618 Bra 12619 bb 12620 Alt 12621 cc 12622 Ket 12623 Ket 12624 # 12625 a++ 12626 Brazero 12627 Bra 12628 bb 12629 Alt 12630 cc 12631 KetRmax 12632 # 12633 a+ 12634 Brazero 12635 CBra 2 12636 bb 12637 Alt 12638 cc 12639 Ket 12640 a# 12641 a+ 12642 Brazero 12643 Bra 12644 aa 12645 Ket 12646 Ket 12647 End 12648------------------------------------------------------------------ 12649 12650/a+(?:bb)?a#a+(?:|||)#a+(?:|b)a#a+(?:|||)?a/B 12651------------------------------------------------------------------ 12652 Bra 12653 a+ 12654 Brazero 12655 Bra 12656 bb 12657 Ket 12658 a# 12659 a++ 12660 Bra 12661 Alt 12662 Alt 12663 Alt 12664 Ket 12665 # 12666 a+ 12667 Bra 12668 Alt 12669 b 12670 Ket 12671 a# 12672 a+ 12673 Brazero 12674 Bra 12675 Alt 12676 Alt 12677 Alt 12678 Ket 12679 a 12680 Ket 12681 End 12682------------------------------------------------------------------ 12683 12684/[ab]*/B 12685------------------------------------------------------------------ 12686 Bra 12687 [ab]*+ 12688 Ket 12689 End 12690------------------------------------------------------------------ 12691 aaaa 12692 0: aaaa 12693 12694/[ab]*?/B 12695------------------------------------------------------------------ 12696 Bra 12697 [ab]*? 12698 Ket 12699 End 12700------------------------------------------------------------------ 12701 aaaa 12702 0: 12703 12704/[ab]?/B 12705------------------------------------------------------------------ 12706 Bra 12707 [ab]?+ 12708 Ket 12709 End 12710------------------------------------------------------------------ 12711 aaaa 12712 0: a 12713 12714/[ab]??/B 12715------------------------------------------------------------------ 12716 Bra 12717 [ab]?? 12718 Ket 12719 End 12720------------------------------------------------------------------ 12721 aaaa 12722 0: 12723 12724/[ab]+/B 12725------------------------------------------------------------------ 12726 Bra 12727 [ab]++ 12728 Ket 12729 End 12730------------------------------------------------------------------ 12731 aaaa 12732 0: aaaa 12733 12734/[ab]+?/B 12735------------------------------------------------------------------ 12736 Bra 12737 [ab]+? 12738 Ket 12739 End 12740------------------------------------------------------------------ 12741 aaaa 12742 0: a 12743 12744/[ab]{2,3}/B 12745------------------------------------------------------------------ 12746 Bra 12747 [ab]{2,3}+ 12748 Ket 12749 End 12750------------------------------------------------------------------ 12751 aaaa 12752 0: aaa 12753 12754/[ab]{2,3}?/B 12755------------------------------------------------------------------ 12756 Bra 12757 [ab]{2,3}? 12758 Ket 12759 End 12760------------------------------------------------------------------ 12761 aaaa 12762 0: aa 12763 12764/[ab]{2,}/B 12765------------------------------------------------------------------ 12766 Bra 12767 [ab]{2,}+ 12768 Ket 12769 End 12770------------------------------------------------------------------ 12771 aaaa 12772 0: aaaa 12773 12774/[ab]{2,}?/B 12775------------------------------------------------------------------ 12776 Bra 12777 [ab]{2,}? 12778 Ket 12779 End 12780------------------------------------------------------------------ 12781 aaaa 12782 0: aa 12783 12784/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/B 12785------------------------------------------------------------------ 12786 Bra 12787 \d++ 12788 \s{0,5}+ 12789 = 12790 \s*+ 12791 \S? 12792 = 12793 \w{0,4}+ 12794 \W*+ 12795 Ket 12796 End 12797------------------------------------------------------------------ 12798 12799/[a-d]{5,12}[e-z0-9]*#[^a-z]+[b-y]*a[2-7]?[^0-9a-z]+/B 12800------------------------------------------------------------------ 12801 Bra 12802 [a-d]{5,12}+ 12803 [0-9e-z]*+ 12804 # 12805 [\x00-`{-\xff] (neg)++ 12806 [b-y]*+ 12807 a 12808 [2-7]?+ 12809 [\x00-/:-`{-\xff] (neg)++ 12810 Ket 12811 End 12812------------------------------------------------------------------ 12813 12814/[a-z]*\s#[ \t]?\S#[a-c]*\S#[C-G]+?\d#[4-8]*\D#[4-9,]*\D#[!$]{0,5}\w#[M-Xf-l]+\W#[a-c,]?\W/B 12815------------------------------------------------------------------ 12816 Bra 12817 [a-z]*+ 12818 \s 12819 # 12820 [\x09 ]?+ 12821 \S 12822 # 12823 [a-c]* 12824 \S 12825 # 12826 [C-G]++ 12827 \d 12828 # 12829 [4-8]*+ 12830 \D 12831 # 12832 [,4-9]* 12833 \D 12834 # 12835 [!$]{0,5}+ 12836 \w 12837 # 12838 [M-Xf-l]++ 12839 \W 12840 # 12841 [,a-c]? 12842 \W 12843 Ket 12844 End 12845------------------------------------------------------------------ 12846 12847/a+(aa|bb)*c#a*(bb|cc)*a#a?(bb|cc)*d#[a-f]*(g|hh)*f/B 12848------------------------------------------------------------------ 12849 Bra 12850 a+ 12851 Brazero 12852 CBra 1 12853 aa 12854 Alt 12855 bb 12856 KetRmax 12857 c# 12858 a* 12859 Brazero 12860 CBra 2 12861 bb 12862 Alt 12863 cc 12864 KetRmax 12865 a# 12866 a?+ 12867 Brazero 12868 CBra 3 12869 bb 12870 Alt 12871 cc 12872 KetRmax 12873 d# 12874 [a-f]* 12875 Brazero 12876 CBra 4 12877 g 12878 Alt 12879 hh 12880 KetRmax 12881 f 12882 Ket 12883 End 12884------------------------------------------------------------------ 12885 12886/[a-f]*(g|hh|i)*i#[a-x]{4,}(y{0,6})*y#[a-k]+(ll|mm)+n/B 12887------------------------------------------------------------------ 12888 Bra 12889 [a-f]*+ 12890 Brazero 12891 CBra 1 12892 g 12893 Alt 12894 hh 12895 Alt 12896 i 12897 KetRmax 12898 i# 12899 [a-x]{4,} 12900 Brazero 12901 SCBra 2 12902 y{0,6} 12903 KetRmax 12904 y# 12905 [a-k]++ 12906 CBra 3 12907 ll 12908 Alt 12909 mm 12910 KetRmax 12911 n 12912 Ket 12913 End 12914------------------------------------------------------------------ 12915 12916/[a-f]*(?>gg|hh)+#[a-f]*(?>gg|hh)?#[a-f]*(?>gg|hh)*a#[a-f]*(?>gg|hh)*h/B 12917------------------------------------------------------------------ 12918 Bra 12919 [a-f]*+ 12920 Once_NC 12921 gg 12922 Alt 12923 hh 12924 KetRmax 12925 # 12926 [a-f]*+ 12927 Brazero 12928 Once_NC 12929 gg 12930 Alt 12931 hh 12932 Ket 12933 # 12934 [a-f]* 12935 Brazero 12936 Once_NC 12937 gg 12938 Alt 12939 hh 12940 KetRmax 12941 a# 12942 [a-f]*+ 12943 Brazero 12944 Once_NC 12945 gg 12946 Alt 12947 hh 12948 KetRmax 12949 h 12950 Ket 12951 End 12952------------------------------------------------------------------ 12953 12954/[a-c]*d/IB 12955------------------------------------------------------------------ 12956 Bra 12957 [a-c]*+ 12958 d 12959 Ket 12960 End 12961------------------------------------------------------------------ 12962Capturing subpattern count = 0 12963Starting code units: a b c d 12964Last code unit = 'd' 12965Subject length lower bound = 1 12966 12967/[a-c]+d/IB 12968------------------------------------------------------------------ 12969 Bra 12970 [a-c]++ 12971 d 12972 Ket 12973 End 12974------------------------------------------------------------------ 12975Capturing subpattern count = 0 12976Starting code units: a b c 12977Last code unit = 'd' 12978Subject length lower bound = 2 12979 12980/[a-c]?d/IB 12981------------------------------------------------------------------ 12982 Bra 12983 [a-c]?+ 12984 d 12985 Ket 12986 End 12987------------------------------------------------------------------ 12988Capturing subpattern count = 0 12989Starting code units: a b c d 12990Last code unit = 'd' 12991Subject length lower bound = 1 12992 12993/[a-c]{4,6}d/IB 12994------------------------------------------------------------------ 12995 Bra 12996 [a-c]{4,6}+ 12997 d 12998 Ket 12999 End 13000------------------------------------------------------------------ 13001Capturing subpattern count = 0 13002Starting code units: a b c 13003Last code unit = 'd' 13004Subject length lower bound = 5 13005 13006/[a-c]{0,6}d/IB 13007------------------------------------------------------------------ 13008 Bra 13009 [a-c]{0,6}+ 13010 d 13011 Ket 13012 End 13013------------------------------------------------------------------ 13014Capturing subpattern count = 0 13015Starting code units: a b c d 13016Last code unit = 'd' 13017Subject length lower bound = 1 13018 13019# End of special auto-possessive tests 13020 13021/^A\o{1239}B/ 13022Failed: error 164 at offset 8: non-octal character in \o{} (closing brace missing?) 13023 A\123B 13024 13025/^A\oB/ 13026Failed: error 155 at offset 3: missing opening brace after \o 13027 13028/^A\x{zz}B/ 13029Failed: error 167 at offset 5: non-hex character in \x{} (closing brace missing?) 13030 13031/^A\x{12Z/ 13032Failed: error 167 at offset 7: non-hex character in \x{} (closing brace missing?) 13033 13034/^A\x{/ 13035Failed: error 167 at offset 5: non-hex character in \x{} (closing brace missing?) 13036 13037/[ab]++/B,no_auto_possess 13038------------------------------------------------------------------ 13039 Bra 13040 [ab]++ 13041 Ket 13042 End 13043------------------------------------------------------------------ 13044 13045/[^ab]*+/B,no_auto_possess 13046------------------------------------------------------------------ 13047 Bra 13048 [\x00-`c-\xff] (neg)*+ 13049 Ket 13050 End 13051------------------------------------------------------------------ 13052 13053/a{4}+/B,no_auto_possess 13054------------------------------------------------------------------ 13055 Bra 13056 a{4} 13057 Ket 13058 End 13059------------------------------------------------------------------ 13060 13061/a{4}+/Bi,no_auto_possess 13062------------------------------------------------------------------ 13063 Bra 13064 /i a{4} 13065 Ket 13066 End 13067------------------------------------------------------------------ 13068 13069/[a-[:digit:]]+/ 13070Failed: error 150 at offset 3: invalid range in character class 13071 13072/[A-[:digit:]]+/ 13073Failed: error 150 at offset 3: invalid range in character class 13074 13075/[a-[.xxx.]]+/ 13076Failed: error 150 at offset 3: invalid range in character class 13077 13078/[a-[=xxx=]]+/ 13079Failed: error 150 at offset 3: invalid range in character class 13080 13081/[a-[!xxx!]]+/ 13082Failed: error 108 at offset 3: range out of order in character class 13083 13084/[A-[!xxx!]]+/ 13085 A]]] 13086 0: A]]] 13087 13088/[a-\d]+/ 13089Failed: error 150 at offset 4: invalid range in character class 13090 13091/(?<0abc>xx)/ 13092Failed: error 144 at offset 3: group name must start with a non-digit 13093 13094/(?&1abc)xx(?<1abc>y)/ 13095Failed: error 144 at offset 13: group name must start with a non-digit 13096 13097/(?<ab-cd>xx)/ 13098Failed: error 142 at offset 5: syntax error in subpattern name (missing terminator) 13099 13100/(?'0abc'xx)/ 13101Failed: error 144 at offset 3: group name must start with a non-digit 13102 13103/(?P<0abc>xx)/ 13104Failed: error 144 at offset 4: group name must start with a non-digit 13105 13106/\k<5ghj>/ 13107Failed: error 144 at offset 3: group name must start with a non-digit 13108 13109/\k'5ghj'/ 13110Failed: error 144 at offset 3: group name must start with a non-digit 13111 13112/\k{2fgh}/ 13113Failed: error 144 at offset 3: group name must start with a non-digit 13114 13115/(?P=8yuki)/ 13116Failed: error 144 at offset 4: group name must start with a non-digit 13117 13118/\g{4df}/ 13119Failed: error 144 at offset 3: group name must start with a non-digit 13120 13121/(?&1abc)xx(?<1abc>y)/ 13122Failed: error 144 at offset 13: group name must start with a non-digit 13123 13124/(?P>1abc)xx(?<1abc>y)/ 13125Failed: error 144 at offset 14: group name must start with a non-digit 13126 13127/\g'3gh'/ 13128Failed: error 157 at offset 2: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 13129 13130/\g<5fg>/ 13131Failed: error 157 at offset 2: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 13132 13133/(?(<4gh>)abc)/ 13134Failed: error 144 at offset 4: group name must start with a non-digit 13135 13136/(?('4gh')abc)/ 13137Failed: error 144 at offset 4: group name must start with a non-digit 13138 13139/(?(4gh)abc)/ 13140Failed: error 126 at offset 4: malformed number or name after (?( 13141 13142/(?(R&6yh)abc)/ 13143Failed: error 144 at offset 5: group name must start with a non-digit 13144 13145/(((a\2)|(a*)\g<-1>))*a?/B 13146------------------------------------------------------------------ 13147 Bra 13148 Brazero 13149 SCBra 1 13150 Once 13151 CBra 2 13152 CBra 3 13153 a 13154 \2 13155 Ket 13156 Alt 13157 CBra 4 13158 a* 13159 Ket 13160 Recurse 13161 Ket 13162 Ket 13163 KetRmax 13164 a?+ 13165 Ket 13166 End 13167------------------------------------------------------------------ 13168 13169# Test the ugly "start or end of word" compatibility syntax. 13170 13171/[[:<:]]red[[:>:]]/B 13172------------------------------------------------------------------ 13173 Bra 13174 \b 13175 Assert 13176 \w 13177 Ket 13178 red 13179 \b 13180 AssertB 13181 Reverse 13182 \w 13183 Ket 13184 Ket 13185 End 13186------------------------------------------------------------------ 13187 little red riding hood 13188 0: red 13189 a /red/ thing 13190 0: red 13191 red is a colour 13192 0: red 13193 put it all on red 13194 0: red 13195\= Expect no match 13196 no reduction 13197No match 13198 Alfred Winifred 13199No match 13200 13201/[a[:<:]] should give error/ 13202Failed: error 130 at offset 4: unknown POSIX class name 13203 13204/(?=ab\K)/aftertext 13205 abcd\=startchar 13206Start of matched string is beyond its end - displaying from end to start. 13207 0: ab 13208 0+ abcd 13209 13210/abcd/newline=lf,firstline 13211\= Expect no match 13212 xx\nxabcd 13213No match 13214 13215# Test stack guard external calls. 13216 13217/(((a)))/stackguard=1 13218Failed: error 133 at offset 2: parentheses are too deeply nested (stack check) 13219 13220/(((a)))/stackguard=2 13221Failed: error 133 at offset 3: parentheses are too deeply nested (stack check) 13222 13223/(((a)))/stackguard=3 13224 13225/(((((a)))))/ 13226 13227# End stack guard tests 13228 13229/^\w+(?>\s*)(?<=\w)/B 13230------------------------------------------------------------------ 13231 Bra 13232 ^ 13233 \w+ 13234 Once_NC 13235 \s*+ 13236 Ket 13237 AssertB 13238 Reverse 13239 \w 13240 Ket 13241 Ket 13242 End 13243------------------------------------------------------------------ 13244 13245/\othing/ 13246Failed: error 155 at offset 1: missing opening brace after \o 13247 13248/\o{}/ 13249Failed: error 178 at offset 1: digits missing in \x{} or \o{} 13250 13251/\o{whatever}/ 13252Failed: error 164 at offset 3: non-octal character in \o{} (closing brace missing?) 13253 13254/\xthing/ 13255 13256/\x{}/ 13257Failed: error 178 at offset 3: digits missing in \x{} or \o{} 13258 13259/\x{whatever}/ 13260Failed: error 167 at offset 3: non-hex character in \x{} (closing brace missing?) 13261 13262/A\8B/ 13263Failed: error 115 at offset 2: reference to non-existent subpattern 13264 13265/A\9B/ 13266Failed: error 115 at offset 2: reference to non-existent subpattern 13267 13268# This one is here because Perl fails to match "12" for this pattern when the $ 13269# is present. 13270 13271/^(?(?=abc)\w{3}:|\d\d)$/ 13272 abc: 13273 0: abc: 13274 12 13275 0: 12 13276\= Expect no match 13277 123 13278No match 13279 xyz 13280No match 13281 13282# Perl gets this one wrong, giving "a" as the after text for ca and failing to 13283# match for cd. 13284 13285/(?(?=ab)ab)/aftertext 13286 abxxx 13287 0: ab 13288 0+ xxx 13289 ca 13290 0: 13291 0+ ca 13292 cd 13293 0: 13294 0+ cd 13295 13296# This should test both paths for processing OP_RECURSE. 13297 13298/(?(R)a+|(?R)b)/ 13299 aaaabcde 13300 0: aaaab 13301 aaaabcde\=ovector=100 13302 0: aaaab 13303 13304/a*?b*?/ 13305 ab 13306 0: 13307 13308/(*NOTEMPTY)a*?b*?/ 13309 ab 13310 0: a 13311 ba 13312 0: b 13313 cb 13314 0: b 13315 13316/(*NOTEMPTY_ATSTART)a*?b*?/aftertext 13317 ab 13318 0: a 13319 0+ b 13320 cdab 13321 0: 13322 0+ dab 13323 13324/(?(VERSION>=10.0)yes|no)/I 13325Capturing subpattern count = 0 13326Subject length lower bound = 2 13327 yesno 13328 0: yes 13329 13330/(?(VERSION=8)yes){3}/BI,aftertext 13331------------------------------------------------------------------ 13332 Bra 13333 Cond 13334 Cond false 13335 yes 13336 Ket 13337 Ket 13338 End 13339------------------------------------------------------------------ 13340Capturing subpattern count = 0 13341May match empty string 13342Subject length lower bound = 0 13343 yesno 13344 0: 13345 0+ yesno 13346 13347/(?(VERSION=8)yes|no){3}/I 13348Capturing subpattern count = 0 13349Subject length lower bound = 6 13350 yesnononoyes 13351 0: nonono 13352\= Expect no match 13353 yesno 13354No match 13355 13356/(?:(?<VERSION>abc)|xyz)(?(VERSION)yes|no)/I 13357Capturing subpattern count = 1 13358Max back reference = 1 13359Named capturing subpatterns: 13360 VERSION 1 13361Starting code units: a x 13362Subject length lower bound = 5 13363 abcyes 13364 0: abcyes 13365 1: abc 13366 xyzno 13367 0: xyzno 13368\= Expect no match 13369 abcno 13370No match 13371 xyzyes 13372No match 13373 13374/(?(VERSION<10)yes|no)/ 13375Failed: error 179 at offset 10: syntax error in (?(VERSION condition 13376 13377/(?(VERSION>10)yes|no)/ 13378Failed: error 179 at offset 11: syntax error in (?(VERSION condition 13379 13380/(?(VERSION>=10.0.0)yes|no)/ 13381Failed: error 179 at offset 16: syntax error in (?(VERSION condition 13382 13383/(?(VERSION=10.101)yes|no)/ 13384Failed: error 179 at offset 17: syntax error in (?(VERSION condition 13385 13386/abcd/I 13387Capturing subpattern count = 0 13388First code unit = 'a' 13389Last code unit = 'd' 13390Subject length lower bound = 4 13391 13392/abcd/I,no_start_optimize 13393Capturing subpattern count = 0 13394Options: no_start_optimize 13395Subject length lower bound = 0 13396 13397/(|ab)*?d/I 13398Capturing subpattern count = 1 13399Starting code units: a d 13400Last code unit = 'd' 13401Subject length lower bound = 1 13402 abd 13403 0: abd 13404 1: ab 13405 xyd 13406 0: d 13407 13408/(|ab)*?d/I,no_start_optimize 13409Capturing subpattern count = 1 13410Options: no_start_optimize 13411Last code unit = 'd' 13412Subject length lower bound = 0 13413 abd 13414 0: abd 13415 1: ab 13416 xyd 13417 0: d 13418 13419/\k<A>*(?<A>aa)(?<A>bb)/match_unset_backref,dupnames 13420 aabb 13421 0: aabb 13422 1: aa 13423 2: bb 13424 13425/(((((a)))))/parens_nest_limit=2 13426Failed: error 119 at offset 3: parentheses are too deeply nested 13427 13428/abc/replace=XYZ 13429 123123 13430 0: 123123 13431 123abc123 13432 1: 123XYZ123 13433 123abc123abc123 13434 1: 123XYZ123abc123 13435 123123\=zero_terminate 13436 0: 123123 13437 123abc123\=zero_terminate 13438 1: 123XYZ123 13439 123abc123abc123\=zero_terminate 13440 1: 123XYZ123abc123 13441 13442/abc/g,replace=XYZ 13443 123abc123 13444 1: 123XYZ123 13445 123abc123abc123 13446 2: 123XYZ123XYZ123 13447 13448/abc/replace=X$$Z 13449 123abc123 13450 1: 123X$Z123 13451 13452/abc/g,replace=X$$Z 13453 123abc123abc123 13454 2: 123X$Z123X$Z123 13455 13456/a(b)c(d)e/replace=X$1Y${2}Z 13457 "abcde" 13458 1: "XbYdZ" 13459 13460/a(b)c(d)e/replace=X$1Y${2}Z,global 13461 "abcde-abcde" 13462 2: "XbYdZ-XbYdZ" 13463 13464/a(?<ONE>b)c(?<TWO>d)e/replace=X$ONE+${TWO}Z 13465 "abcde" 13466 1: "Xb+dZ" 13467 13468/a(?<ONE>b)c(?<TWO>d)e/g,replace=X$ONE+${TWO}Z 13469 "abcde-abcde-" 13470 2: "Xb+dZ-Xb+dZ-" 13471 13472/abc/replace=a$++ 13473 123abc 13474Failed: error -35 at offset 2 in replacement: invalid replacement string 13475 13476/abc/replace=a$bad 13477 123abc 13478Failed: error -49 at offset 5 in replacement: unknown substring 13479 13480/abc/replace=a${A234567890123456789_123456789012}z 13481 123abc 13482Failed: error -49 at offset 36 in replacement: unknown substring 13483 13484/abc/replace=a${A23456789012345678901234567890123}z 13485 123abc 13486Failed: error -35 at offset 35 in replacement: invalid replacement string 13487 13488/abc/replace=a${bcd 13489 123abc 13490Failed: error -58 at offset 6 in replacement: expected closing curly bracket in replacement string 13491 13492/abc/replace=a${b+d}z 13493 123abc 13494Failed: error -58 at offset 4 in replacement: expected closing curly bracket in replacement string 13495 13496/abc/replace=[10]XYZ 13497 123abc123 13498 1: 123XYZ123 13499 13500/abc/replace=[9]XYZ 13501 123abc123 13502Failed: error -48: no more memory 13503 13504/abc/replace=xyz 13505 1abc2\=partial_hard 13506Failed: error -34: bad option value 13507 13508/abc/replace=xyz 13509 123abc456 13510 1: 123xyz456 13511 123abc456\=replace=pqr 13512 1: 123pqr456 13513 123abc456abc789 13514 1: 123xyz456abc789 13515 123abc456abc789\=g 13516 2: 123xyz456xyz789 13517 13518/(?<=abc)(|def)/g,replace=<$0> 13519 123abcxyzabcdef789abcpqr 13520 4: 123abc<>xyzabc<><def>789abc<>pqr 13521 13522/./replace=$0 13523 a 13524 1: a 13525 13526/(.)(.)/replace=$2+$1 13527 abc 13528 1: b+ac 13529 13530/(?<A>.)(?<B>.)/replace=$B+$A 13531 abc 13532 1: b+ac 13533 13534/(.)(.)/g,replace=$2$1 13535 abcdefgh 13536 4: badcfehg 13537 13538/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=${*MARK} 13539 apple lemon blackberry 13540 3: pear orange strawberry 13541 apple strudel 13542 1: pear strudel 13543 fruitless 13544 0: fruitless 13545 13546/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/replace=${*MARK} sauce, 13547 apple lemon blackberry 13548 1: pear sauce lemon blackberry 13549 13550/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=<$*MARK> 13551 apple lemon blackberry 13552 3: <pear> <orange> <strawberry> 13553 apple strudel 13554 1: <pear> strudel 13555 fruitless 13556 0: fruitless 13557 13558/(*:pear)apple/g,replace=${*MARKING} 13559 apple lemon blackberry 13560Failed: error -35 at offset 11 in replacement: invalid replacement string 13561 13562/(*:pear)apple/g,replace=${*MARK-time 13563 apple lemon blackberry 13564Failed: error -58 at offset 7 in replacement: expected closing curly bracket in replacement string 13565 13566/(*:pear)apple/g,replace=${*mark} 13567 apple lemon blackberry 13568Failed: error -35 at offset 8 in replacement: invalid replacement string 13569 13570/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=<$*MARKET> 13571 apple lemon blackberry 13572Failed: error -35 at offset 9 in replacement: invalid replacement string 13573 13574/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=[22]${*MARK} 13575 apple lemon blackberry 13576Failed: error -48: no more memory 13577 apple lemon blackberry\=substitute_overflow_length 13578Failed: error -48: no more memory: 23 code units are needed 13579 13580/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=[23]${*MARK} 13581 apple lemon blackberry 13582 3: pear orange strawberry 13583 13584/abc/ 13585 123abc123\=replace=[9]XYZ 13586Failed: error -48: no more memory 13587 123abc123\=substitute_overflow_length,replace=[9]XYZ 13588Failed: error -48: no more memory: 10 code units are needed 13589 123abc123\=substitute_overflow_length,replace=[6]XYZ 13590Failed: error -48: no more memory: 10 code units are needed 13591 123abc123\=substitute_overflow_length,replace=[1]XYZ 13592Failed: error -48: no more memory: 10 code units are needed 13593 123abc123\=substitute_overflow_length,replace=[0]XYZ 13594Failed: error -48: no more memory: 10 code units are needed 13595 13596/a(b)c/ 13597 123abc123\=replace=[9]x$1z 13598Failed: error -48: no more memory 13599 123abc123\=substitute_overflow_length,replace=[9]x$1z 13600Failed: error -48: no more memory: 10 code units are needed 13601 123abc123\=substitute_overflow_length,replace=[6]x$1z 13602Failed: error -48: no more memory: 10 code units are needed 13603 123abc123\=substitute_overflow_length,replace=[1]x$1z 13604Failed: error -48: no more memory: 10 code units are needed 13605 123abc123\=substitute_overflow_length,replace=[0]x$1z 13606Failed: error -48: no more memory: 10 code units are needed 13607 13608"((?=(?(?=(?(?=(?(?=()))))))))" 13609 a 13610 0: 13611 1: 13612 2: 13613 13614"(?(?=)==)(((((((((?=)))))))))" 13615\= Expect no match 13616 a 13617No match 13618 13619/(a)(b)|(c)/ 13620 XcX\=ovector=2,get=1,get=2,get=3,get=4,getall 13621Matched, but too many substrings 13622 0: c 13623 1: <unset> 13624Get substring 1 failed (-55): requested value is not set 13625Get substring 2 failed (-54): requested value is not available 13626Get substring 3 failed (-54): requested value is not available 13627Get substring 4 failed (-49): unknown substring 13628 0L c 13629 1L 13630 13631/x(?=ab\K)/ 13632 xab\=get=0 13633Start of matched string is beyond its end - displaying from end to start. 13634 0: ab 13635 0G (0) 13636 xab\=copy=0 13637Start of matched string is beyond its end - displaying from end to start. 13638 0: ab 13639 0C (0) 13640 xab\=getall 13641Start of matched string is beyond its end - displaying from end to start. 13642 0: ab 13643 0L 13644 13645/(?<A>a)|(?<A>b)/dupnames 13646 a\=ovector=1,copy=A,get=A,get=2 13647Matched, but too many substrings 13648 0: a 13649Copy substring 'A' failed (-54): requested value is not available 13650Get substring 2 failed (-54): requested value is not available 13651Get substring 'A' failed (-54): requested value is not available 13652 a\=ovector=2,copy=A,get=A,get=2 13653 0: a 13654 1: a 13655 C a (1) A (non-unique) 13656Get substring 2 failed (-54): requested value is not available 13657 G a (1) A (non-unique) 13658 b\=ovector=2,copy=A,get=A,get=2 13659Matched, but too many substrings 13660 0: b 13661 1: <unset> 13662Copy substring 'A' failed (-55): requested value is not set 13663Get substring 2 failed (-54): requested value is not available 13664Get substring 'A' failed (-55): requested value is not set 13665 13666/a(b)c(d)/ 13667 abc\=ph,copy=0,copy=1,getall 13668Partial match: abc 13669 0C abc (3) 13670Copy substring 1 failed (-2): partial match 13671get substring list failed (-2): partial match 13672 13673/^abc/info 13674Capturing subpattern count = 0 13675Compile options: <none> 13676Overall options: anchored 13677Subject length lower bound = 3 13678 13679/^abc/info,no_dotstar_anchor 13680Capturing subpattern count = 0 13681Compile options: no_dotstar_anchor 13682Overall options: anchored no_dotstar_anchor 13683Subject length lower bound = 3 13684 13685/.*\d/info,auto_callout 13686Capturing subpattern count = 0 13687Options: auto_callout 13688First code unit at start or follows newline 13689Subject length lower bound = 1 13690\= Expect no match 13691 aaa 13692--->aaa 13693 +0 ^ .* 13694 +2 ^ ^ \d 13695 +2 ^ ^ \d 13696 +2 ^^ \d 13697 +2 ^ \d 13698No match 13699 13700/.*\d/info,no_dotstar_anchor,auto_callout 13701Capturing subpattern count = 0 13702Options: auto_callout no_dotstar_anchor 13703Subject length lower bound = 1 13704\= Expect no match 13705 aaa 13706--->aaa 13707 +0 ^ .* 13708 +2 ^ ^ \d 13709 +2 ^ ^ \d 13710 +2 ^^ \d 13711 +2 ^ \d 13712 +0 ^ .* 13713 +2 ^ ^ \d 13714 +2 ^^ \d 13715 +2 ^ \d 13716 +0 ^ .* 13717 +2 ^^ \d 13718 +2 ^ \d 13719No match 13720 13721/.*\d/dotall,info 13722Capturing subpattern count = 0 13723Compile options: dotall 13724Overall options: anchored dotall 13725Subject length lower bound = 1 13726 13727/.*\d/dotall,no_dotstar_anchor,info 13728Capturing subpattern count = 0 13729Options: dotall no_dotstar_anchor 13730Subject length lower bound = 1 13731 13732/(*NO_DOTSTAR_ANCHOR)(?s).*\d/info 13733Capturing subpattern count = 0 13734Compile options: <none> 13735Overall options: no_dotstar_anchor 13736Subject length lower bound = 1 13737 13738'^(?:(a)|b)(?(1)A|B)' 13739 aA123\=ovector=1 13740Matched, but too many substrings 13741 0: aA 13742 aA123\=ovector=2 13743 0: aA 13744 1: a 13745 13746'^(?:(?<AA>a)|b)(?(<AA>)A|B)' 13747 aA123\=ovector=1 13748Matched, but too many substrings 13749 0: aA 13750 aA123\=ovector=2 13751 0: aA 13752 1: a 13753 13754'^(?<AA>)(?:(?<AA>a)|b)(?(<AA>)A|B)'dupnames 13755 aA123\=ovector=1 13756Matched, but too many substrings 13757 0: aA 13758 aA123\=ovector=2 13759Matched, but too many substrings 13760 0: aA 13761 1: 13762 aA123\=ovector=3 13763 0: aA 13764 1: 13765 2: a 13766 13767'^(?:(?<AA>X)|)(?:(?<AA>a)|b)\k{AA}'dupnames 13768 aa123\=ovector=1 13769Matched, but too many substrings 13770 0: aa 13771 aa123\=ovector=2 13772Matched, but too many substrings 13773 0: aa 13774 1: <unset> 13775 aa123\=ovector=3 13776 0: aa 13777 1: <unset> 13778 2: a 13779 13780/(?<N111>(?J)(?<N111>1(111111)11|)1|1|)(?(<N111>)1)/ 13781 13782/(?<N>(?J)(?<N>))(?-J)\k<N>/ 13783 13784# Quantifiers are not allowed on condition assertions, but are otherwise 13785# OK in conditions. 13786 13787/(?(?=0)?)+/ 13788Failed: error 109 at offset 7: quantifier does not follow a repeatable item 13789 13790/(?(?=0)(?=00)?00765)/ 13791 00765 13792 0: 00765 13793 13794/(?(?=0)(?=00)?00765|(?!3).56)/ 13795 00765 13796 0: 00765 13797 456 13798 0: 456 13799\= Expect no match 13800 356 13801No match 13802 13803'^(a)*+(\w)' 13804 g 13805 0: g 13806 1: <unset> 13807 2: g 13808 g\=ovector=1 13809Matched, but too many substrings 13810 0: g 13811 13812'^(?:a)*+(\w)' 13813 g 13814 0: g 13815 1: g 13816 g\=ovector=1 13817Matched, but too many substrings 13818 0: g 13819 13820# These two pattern showeds up compile-time bugs 13821 13822"((?2){0,1999}())?" 13823 13824/((?+1)(\1))/B 13825------------------------------------------------------------------ 13826 Bra 13827 Once 13828 CBra 1 13829 Recurse 13830 CBra 2 13831 \1 13832 Ket 13833 Ket 13834 Ket 13835 Ket 13836 End 13837------------------------------------------------------------------ 13838 13839# Callouts with string arguments 13840 13841/a(?C"/ 13842Failed: error 181 at offset 4: missing terminating delimiter for callout with string argument 13843 13844/a(?C"a/ 13845Failed: error 181 at offset 4: missing terminating delimiter for callout with string argument 13846 13847/a(?C"a"/ 13848Failed: error 139 at offset 7: closing parenthesis for (?C expected 13849 13850/a(?C"a"bcde(?C"b")xyz/ 13851Failed: error 139 at offset 7: closing parenthesis for (?C expected 13852 13853/a(?C"a)b""c")/B 13854------------------------------------------------------------------ 13855 Bra 13856 a 13857 CalloutStr "a)b"c" 5 13 0 13858 Ket 13859 End 13860------------------------------------------------------------------ 13861 13862/ab(?C" any text with spaces ")cde/B 13863------------------------------------------------------------------ 13864 Bra 13865 ab 13866 CalloutStr " any text with spaces " 6 30 1 13867 cde 13868 Ket 13869 End 13870------------------------------------------------------------------ 13871 abcde 13872Callout (6): " any text with spaces " 13873--->abcde 13874 ^ ^ c 13875 0: abcde 13876 12abcde 13877Callout (6): " any text with spaces " 13878--->12abcde 13879 ^ ^ c 13880 0: abcde 13881 13882/^a(b)c(?C1)def/ 13883 abcdef 13884--->abcdef 13885 1 ^ ^ d 13886 0: abcdef 13887 1: b 13888 13889/^a(b)c(?C"AB")def/ 13890 abcdef 13891Callout (10): "AB" 13892--->abcdef 13893 ^ ^ d 13894 0: abcdef 13895 1: b 13896 13897/^a(b)c(?C1)def/ 13898 abcdef\=callout_capture 13899Callout 1: last capture = 1 13900 0: <unset> 13901 1: b 13902--->abcdef 13903 ^ ^ d 13904 0: abcdef 13905 1: b 13906 13907/^a(b)c(?C{AB})def/B 13908------------------------------------------------------------------ 13909 Bra 13910 ^ 13911 a 13912 CBra 1 13913 b 13914 Ket 13915 c 13916 CalloutStr {AB} 10 14 1 13917 def 13918 Ket 13919 End 13920------------------------------------------------------------------ 13921 abcdef\=callout_capture 13922Callout (10): {AB} last capture = 1 13923 0: <unset> 13924 1: b 13925--->abcdef 13926 ^ ^ d 13927 0: abcdef 13928 1: b 13929 13930/(?C`a``b`)(?C'a''b')(?C"a""b")(?C^a^^b^)(?C%a%%b%)(?C#a##b#)(?C$a$$b$)(?C{a}}b})/B,callout_info 13931------------------------------------------------------------------ 13932 Bra 13933 CalloutStr `a`b` 4 10 0 13934 CalloutStr 'a'b' 14 20 0 13935 CalloutStr "a"b" 24 30 0 13936 CalloutStr ^a^b^ 34 40 0 13937 CalloutStr %a%b% 44 50 0 13938 CalloutStr #a#b# 54 60 0 13939 CalloutStr $a$b$ 64 70 0 13940 CalloutStr {a}b} 74 80 0 13941 Ket 13942 End 13943------------------------------------------------------------------ 13944Callout `a`b` ( 13945Callout 'a'b' ( 13946Callout "a"b" ( 13947Callout ^a^b^ ( 13948Callout %a%b% ( 13949Callout #a#b# ( 13950Callout $a$b$ ( 13951Callout {a}b} 13952 13953/(?:a(?C`code`)){3}/B 13954------------------------------------------------------------------ 13955 Bra 13956 Bra 13957 a 13958 CalloutStr `code` 8 14 0 13959 Ket 13960 Bra 13961 a 13962 CalloutStr `code` 8 14 0 13963 Ket 13964 Bra 13965 a 13966 CalloutStr `code` 8 14 0 13967 Ket 13968 Ket 13969 End 13970------------------------------------------------------------------ 13971 13972/^(?(?C25)(?=abc)abcd|xyz)/B,callout_info 13973------------------------------------------------------------------ 13974 Bra 13975 ^ 13976 Cond 13977 Callout 25 9 7 13978 Assert 13979 abc 13980 Ket 13981 abcd 13982 Alt 13983 xyz 13984 Ket 13985 Ket 13986 End 13987------------------------------------------------------------------ 13988Callout 25 (?=abc) 13989 abcdefg 13990--->abcdefg 13991 25 ^ (?=abc) 13992 0: abcd 13993 xyz123 13994--->xyz123 13995 25 ^ (?=abc) 13996 0: xyz 13997 13998/^(?(?C$abc$)(?=abc)abcd|xyz)/B 13999------------------------------------------------------------------ 14000 Bra 14001 ^ 14002 Cond 14003 CalloutStr $abc$ 7 12 7 14004 Assert 14005 abc 14006 Ket 14007 abcd 14008 Alt 14009 xyz 14010 Ket 14011 Ket 14012 End 14013------------------------------------------------------------------ 14014 abcdefg 14015Callout (7): $abc$ 14016--->abcdefg 14017 ^ (?=abc) 14018 0: abcd 14019 xyz123 14020Callout (7): $abc$ 14021--->xyz123 14022 ^ (?=abc) 14023 0: xyz 14024 14025/^ab(?C'first')cd(?C"second")ef/ 14026 abcdefg 14027Callout (7): 'first' 14028--->abcdefg 14029 ^ ^ c 14030Callout (20): "second" 14031--->abcdefg 14032 ^ ^ e 14033 0: abcdef 14034 14035/(?:a(?C`code`)){3}X/ 14036 aaaXY 14037Callout (8): `code` 14038--->aaaXY 14039 ^^ ) 14040Callout (8): `code` 14041--->aaaXY 14042 ^ ^ ) 14043Callout (8): `code` 14044--->aaaXY 14045 ^ ^ ) 14046 0: aaaX 14047 14048# Binary zero in callout string 14049# a ( ? C ' x z ' ) b 14050/ 61 28 3f 43 27 78 00 7a 27 29 62/hex,callout_info 14051Callout 'x\x00z' b 14052 abcdefgh 14053Callout (5): 'x\x00z' 14054--->abcdefgh 14055 ^^ b 14056 0: ab 14057 14058/(?(?!)^)/ 14059 14060/(?(?!)a|b)/ 14061 bbb 14062 0: b 14063\= Expect no match 14064 aaa 14065No match 14066 14067# JIT gives a different error message for the infinite recursion 14068 14069"(*NO_JIT)((?2)+)((?1)){" 14070 abcd{ 14071Failed: error -52: nested recursion at the same subject position 14072 14073# Perl fails to diagnose the absence of an assertion 14074 14075"(?(?<E>.*!.*)?)" 14076Failed: error 128 at offset 3: assertion expected after (?( or (?(?C) 14077 14078"X((?2)()*+){2}+"B 14079------------------------------------------------------------------ 14080 Bra 14081 X 14082 Once 14083 CBra 1 14084 Recurse 14085 Braposzero 14086 SCBraPos 2 14087 KetRpos 14088 Ket 14089 CBra 1 14090 Recurse 14091 Braposzero 14092 SCBraPos 2 14093 KetRpos 14094 Ket 14095 Ket 14096 Ket 14097 End 14098------------------------------------------------------------------ 14099 14100"X((?2)()*+){2}"B 14101------------------------------------------------------------------ 14102 Bra 14103 X 14104 CBra 1 14105 Recurse 14106 Braposzero 14107 SCBraPos 2 14108 KetRpos 14109 Ket 14110 CBra 1 14111 Recurse 14112 Braposzero 14113 SCBraPos 2 14114 KetRpos 14115 Ket 14116 Ket 14117 End 14118------------------------------------------------------------------ 14119 14120/(?<=\bABQ(3(?-7)))/ 14121Failed: error 115 at offset 15: reference to non-existent subpattern 14122 14123/(?<=\bABQ(3(?+7)))/ 14124Failed: error 115 at offset 15: reference to non-existent subpattern 14125 14126";(?<=()((?3))((?2)))" 14127Failed: error 125 at offset 20: lookbehind assertion is not fixed length 14128 14129# Perl loops on this (PCRE2 used to!) 14130 14131/(?<=\Ka)/g,aftertext 14132 aaaaa 14133 0: a 14134 0+ aaaa 14135 0: a 14136 0+ aaa 14137 0: a 14138 0+ aa 14139 0: a 14140 0+ a 14141 0: a 14142 0+ 14143 14144/(?<=\Ka)/altglobal,aftertext 14145 aaaaa 14146 0: a 14147 0+ aaaa 14148 0: a 14149 0+ aaa 14150 0: a 14151 0+ aa 14152 0: a 14153 0+ a 14154 0: a 14155 0+ 14156 14157/((?2){73}(?2))((?1))/info 14158Capturing subpattern count = 2 14159May match empty string 14160Subject length lower bound = 0 14161 14162/abc/ 14163\= Expect no match 14164 \[9x!xxx(]{9999} 14165No match 14166 14167/(abc)*/ 14168 \[abc]{5} 14169 0: abcabcabcabcabc 14170 1: abc 14171 14172/^/gm 14173 \n\n\n 14174 0: 14175 0: 14176 0: 14177 14178/^/gm,alt_circumflex 14179 \n\n\n 14180 0: 14181 0: 14182 0: 14183 0: 14184 14185/((((((((x))))))))\81/ 14186Failed: error 115 at offset 19: reference to non-existent subpattern 14187 xx1 14188 14189/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\80/ 14190 xx 14191Matched, but too many substrings 14192 0: xx 14193 1: x 14194 2: x 14195 3: x 14196 4: x 14197 5: x 14198 6: x 14199 7: x 14200 8: x 14201 9: x 1420210: x 1420311: x 1420412: x 1420513: x 1420614: x 14207 14208/\80/ 14209Failed: error 115 at offset 2: reference to non-existent subpattern 14210 14211/A\8B\9C/ 14212Failed: error 115 at offset 2: reference to non-existent subpattern 14213 A8B9C 14214 14215/(?x:((?'a')) # comment (with parentheses) and | vertical 14216(?-x:#not a comment (?'b')) # this is a comment () 14217(?'c')) # not a comment (?'d')/info 14218Capturing subpattern count = 5 14219Named capturing subpatterns: 14220 a 2 14221 b 3 14222 c 4 14223 d 5 14224First code unit = '#' 14225Last code unit = ' ' 14226Subject length lower bound = 32 14227 14228/(?|(?'a')(2)(?'b')|(?'a')(?'a')(3))/I,dupnames 14229Capturing subpattern count = 3 14230Named capturing subpatterns: 14231 a 1 14232 a 2 14233 b 3 14234Options: dupnames 14235Starting code units: 2 3 14236Subject length lower bound = 1 14237 A23B 14238 0: 2 14239 1: 14240 2: 2 14241 3: 14242 B32A 14243 0: 3 14244 1: 14245 2: 14246 3: 3 14247 14248# These are some patterns that used to cause buffer overflows or other errors 14249# while compiling. 14250 14251/.((?2)(?R)|\1|$)()/B 14252------------------------------------------------------------------ 14253 Bra 14254 Any 14255 Once 14256 CBra 1 14257 Recurse 14258 Recurse 14259 Alt 14260 \1 14261 Alt 14262 $ 14263 Ket 14264 Ket 14265 CBra 2 14266 Ket 14267 Ket 14268 End 14269------------------------------------------------------------------ 14270 14271/.((?3)(?R)()(?2)|\1|$)()/B 14272------------------------------------------------------------------ 14273 Bra 14274 Any 14275 Once 14276 CBra 1 14277 Recurse 14278 Recurse 14279 CBra 2 14280 Ket 14281 Recurse 14282 Alt 14283 \1 14284 Alt 14285 $ 14286 Ket 14287 Ket 14288 CBra 3 14289 Ket 14290 Ket 14291 End 14292------------------------------------------------------------------ 14293 14294/(\9*+(?2);\3++()2|)++{/ 14295Failed: error 115 at offset 2: reference to non-existent subpattern 14296 14297/\V\x85\9*+((?2)\3++()2)*:2/ 14298Failed: error 115 at offset 7: reference to non-existent subpattern 14299 14300/(((?(R)){0,2}) (?'x'((?'R')((?'R')))))/dupnames 14301 14302/(((?(X)){0,2}) (?'x'((?'X')((?'X')))))/dupnames 14303 14304/(((?(R)){0,2}) (?'x'((?'X')((?'R')))))/ 14305 14306"(?J)(?'d'(?'d'\g{d}))" 14307 14308"(?=!((?2)(?))({8(?<=(?1){29}8bbbb\x16\xd\xc6^($(\xa9H4){4}h}?1)B))\x15')" 14309Failed: error 125 at offset 72: lookbehind assertion is not fixed length 14310 14311/A(?'')Z/ 14312Failed: error 162 at offset 4: subpattern name expected 14313 14314"(?J:(?|(?'R')(\k'R')|((?'R'))))" 14315 14316/(?<=|(\,\$(?73591620449005828816)\xa8.{7}){6}\x09)/ 14317Failed: error 161 at offset 32: number is too big 14318 14319/^(?:(?(1)x|)+)+$()/B 14320------------------------------------------------------------------ 14321 Bra 14322 ^ 14323 SBra 14324 SCond 14325 1 Cond ref 14326 x 14327 Alt 14328 KetRmax 14329 KetRmax 14330 $ 14331 CBra 1 14332 Ket 14333 Ket 14334 End 14335------------------------------------------------------------------ 14336 14337/[[:>:]](?<)/ 14338Failed: error 124 at offset 10: letter or underscore expected after (?< or (?' 14339 14340/((?x)(*:0))#(?'/ 14341Failed: error 124 at offset 15: letter or underscore expected after (?< or (?' 14342 14343/(?C$[$)(?<]/ 14344Failed: error 124 at offset 10: letter or underscore expected after (?< or (?' 14345 14346/(?C$)$)(?<]/ 14347Failed: error 124 at offset 10: letter or underscore expected after (?< or (?' 14348 14349/(?(R))*+/B 14350------------------------------------------------------------------ 14351 Bra 14352 Braposzero 14353 SBraPos 14354 SCond 14355 Cond recurse any 14356 Ket 14357 KetRpos 14358 Ket 14359 End 14360------------------------------------------------------------------ 14361 abcd 14362 0: 14363 14364/((?x)(?#))#(?'/ 14365Failed: error 124 at offset 14: letter or underscore expected after (?< or (?' 14366 14367/((?x)(?#))#(?'abc')/I 14368Capturing subpattern count = 2 14369Named capturing subpatterns: 14370 abc 2 14371First code unit = '#' 14372Subject length lower bound = 1 14373 14374/[[:\\](?<[::]/ 14375Failed: error 124 at offset 9: letter or underscore expected after (?< or (?' 14376 14377/[[:\\](?'abc')[a:]/I 14378Capturing subpattern count = 1 14379Named capturing subpatterns: 14380 abc 1 14381Starting code units: : [ \ 14382Subject length lower bound = 2 14383 14384"[[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[:::::::::::::::::[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[[[:::E[[[:[:[[:[:::[[:::E[[[:[:[[:'[:::::E[[[:[::::::[[[:[[[[[[[::E[[[:[::::::[[[:[[[[[[[[:[[::[::::[[:::::::[[:[[[[[[[:[[::[:[[:[~" 14385Failed: error 106 at offset 353: missing terminating ] for character class 14386 14387/()(?(R)0)*+/B 14388------------------------------------------------------------------ 14389 Bra 14390 CBra 1 14391 Ket 14392 Braposzero 14393 SBraPos 14394 SCond 14395 Cond recurse any 14396 0 14397 Ket 14398 KetRpos 14399 Ket 14400 End 14401------------------------------------------------------------------ 14402 14403/(?R-:(?</ 14404Failed: error 114 at offset 8: missing closing parenthesis 14405 14406/(?R-:(?<)/ 14407Failed: error 129 at offset 3: (?R or (?[+-]digits must be followed by ) 14408 14409/(?(?C{\Q})(?!(?'/ 14410Failed: error 124 at offset 16: letter or underscore expected after (?< or (?' 14411 14412/(?(?C{\Q})(?!(?'abc')))/I 14413Capturing subpattern count = 1 14414Named capturing subpatterns: 14415 abc 1 14416May match empty string 14417Subject length lower bound = 0 14418 14419/(?1){3918}(((((0(\k'R'))))(?J)(?'R'(?'R'\3){99})))/I 14420Capturing subpattern count = 8 14421Max back reference = 8 14422Named capturing subpatterns: 14423 R 7 14424 R 8 14425Duplicate name status changes 14426Last code unit = '0' 14427Subject length lower bound = 65535 14428 14429/(?|(aaa)|(b))\g{1}/I 14430Capturing subpattern count = 1 14431Max back reference = 1 14432Starting code units: a b 14433Subject length lower bound = 0 14434 14435/(?|(aaa)|(b))(?1)/I 14436Capturing subpattern count = 1 14437Starting code units: a b 14438Subject length lower bound = 4 14439 14440/(?|(aaa)|(b))/I 14441Capturing subpattern count = 1 14442Starting code units: a b 14443Subject length lower bound = 1 14444 14445/(?|(?'a'aaa)|(?'a'b))\k'a'/I 14446Capturing subpattern count = 1 14447Max back reference = 1 14448Named capturing subpatterns: 14449 a 1 14450Starting code units: a b 14451Subject length lower bound = 0 14452 14453/(?|(?'a'aaa)|(?'a'b))(?'a'cccc)\k'a'/I,dupnames 14454Capturing subpattern count = 2 14455Max back reference = 2 14456Named capturing subpatterns: 14457 a 1 14458 a 2 14459Options: dupnames 14460Starting code units: a b 14461Last code unit = 'c' 14462Subject length lower bound = 0 14463 14464/ab{3cd/ 14465 ab{3cd 14466 0: ab{3cd 14467 14468/ab{3,cd/ 14469 ab{3,cd 14470 0: ab{3,cd 14471 14472/ab{3,4a}cd/ 14473 ab{3,4a}cd 14474 0: ab{3,4a}cd 14475 14476/{4,5a}bc/ 14477 {4,5a}bc 14478 0: {4,5a}bc 14479 14480/\x0{ab}/ 14481 \0{ab} 14482 0: \x00{ab} 14483 14484/^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/ 14485 ababababbbabZXXXX 14486 0: ababababbbabZ 14487 1: ab 14488 2: b 14489 14490/.*?a(*PRUNE)b/ 14491 aab 14492 0: ab 14493 14494/.*?a(*PRUNE)b/s 14495 aab 14496 0: ab 14497 14498/^a(*PRUNE)b/s 14499\= Expect no match 14500 aab 14501No match 14502 14503/.*?a(*SKIP)b/ 14504 aab 14505 0: ab 14506 14507/(?(8000000000/ 14508Failed: error 114 at offset 13: missing closing parenthesis 14509 14510/((?(R8000000000)))/ 14511Failed: error 161 at offset 16: number is too big 14512 14513/0(?0)|(1)(*THEN)(*SKIP:0)(*FAIL)/ 14514\= Expect no match 14515 01 14516No match 14517 14518/(?(1)()\983040\2)/ 14519Failed: error 115 at offset 13: reference to non-existent subpattern 14520 14521/(*LIMIT_MATCH=)abc/ 14522Failed: error 160 at offset 14: (*VERB) not recognized or malformed 14523 14524/(*CRLF)(*LIMIT_MATCH=)abc/ 14525Failed: error 160 at offset 21: (*VERB) not recognized or malformed 14526 14527/(?:ab)?(?:ab)(?:ab)/ 14528 abab 14529 0: abab 14530 ababab 14531 0: ababab 14532\= Expect no match 14533 aba 14534No match 14535 14536/((*MARK:A))++a(*SKIP:B)b/ 14537\= Expect no match 14538 aacb 14539No match 14540 14541/(*MARK:a\zb)z/alt_verbnames 14542Failed: error 140 at offset 9: invalid escape sequence in (*VERB) name 14543 14544/(*:ab\t(d\)c)xxx/ 14545Failed: error 122 at offset 12: unmatched closing parenthesis 14546 14547/(*:ab\t(d\)c)xxx/alt_verbnames,mark 14548 cxxxz 14549 0: xxx 14550MK: ab\x09(d)c 14551 14552/(*:A\Qxx)x\EB)x/alt_verbnames,mark 14553 x 14554 0: x 14555MK: Axx)xB 14556 14557/(*:A\ExxxB)x/alt_verbnames,mark 14558 x 14559 0: x 14560MK: AxxxB 14561 14562/(*: A \ and #comment 14563 \ B)x/x,alt_verbnames,mark 14564 x 14565 0: x 14566MK: A and B 14567 14568/(*:A 14569B)x/alt_verbnames,mark 14570 x 14571 0: x 14572MK: A\x0aB 14573 14574/(*:abc\Qpqr)/alt_verbnames 14575Failed: error 160 at offset 12: (*VERB) not recognized or malformed 14576 14577/abc/use_offset_limit 14578 1234abcde\=offset_limit=100 14579 0: abc 14580 1234abcde\=offset_limit=9 14581 0: abc 14582 1234abcde\=offset_limit=4 14583 0: abc 14584 1234abcde\=offset_limit=4,offset=4 14585 0: abc 14586\= Expect no match 14587 1234abcde\=offset_limit=4,offset=5 14588No match 14589 1234abcde\=offset_limit=3 14590No match 14591 14592/(?<=abc)/use_offset_limit 14593 1234abc\=offset_limit=7 14594 0: 14595\= Expect no match 14596 1234abc\=offset_limit=6 14597No match 14598 14599/A/g,replace=-,use_offset_limit 14600 XAXAXAXAXA\=offset_limit=4 14601 2: X-X-XAXAXA 14602 14603/abc/ 14604\= Expect error 14605 1234abcde\=offset_limit=4 14606Failed: error -56: offset limit set without PCRE2_USE_OFFSET_LIMIT 14607 14608/^\w/m,use_offset_limit 14609 \n..\naa\=offset_limit=3 14610No match 14611 \n..\naa\=offset_limit=4 14612 0: a 14613 14614/abcd/null_context 14615 abcd\=null_context 14616 0: abcd 14617\= Expect error 14618 abcd\=null_context,find_limits 14619** Not allowed together: find_limits null_context 14620 abcd\=allusedtext,startchar 14621** Not allowed together: allusedtext startchar 14622 14623/abcd/replace=w\rx\x82y\o{333}z(\Q12\$34$$\x34\E5$$),substitute_extended 14624 abcd 14625 1: w\x0dx\x82y\xdbz(12\$34$$\x345$) 14626 14627/a(bc)(DE)/replace=a\u$1\U$1\E$1\l$2\L$2\Eab\Uab\LYZ\EDone,substitute_extended 14628 abcDE 14629 1: aBcBCbcdEdeabAByzDone 14630 14631/abcd/replace=xy\kz,substitute_extended 14632 abcd 14633Failed: error -57 at offset 4 in replacement: bad escape sequence in replacement string 14634 14635/a(?:(b)|(c))/substitute_extended,replace=X${1:+1:-1}X${2:+2:-2} 14636 ab 14637 1: X1X-2 14638 ac 14639 1: X-1X2 14640 ab\=replace=${1:+$1\:$1:$2} 14641 1: b:b 14642 ac\=replace=${1:+$1\:$1:$2} 14643 1: c 14644 14645/a(?:(b)|(c))/substitute_extended,replace=X${1:-1:-1}X${2:-2:-2} 14646 ab 14647 1: XbX2:-2 14648 ac 14649 1: X1:-1Xc 14650 14651/(a)/substitute_extended,replace=>${1:+\Q$1:{}$$\E+\U$1}< 14652 a 14653 1: >$1:{}$$+A< 14654 14655/X(b)Y/substitute_extended 14656 XbY\=replace=x${1:+$1\U$1}y 14657 1: xbBY 14658 XbY\=replace=\Ux${1:+$1$1}y 14659 1: XBBY 14660 14661/a/substitute_extended,replace=${*MARK:+a:b} 14662 a 14663Failed: error -58 at offset 7 in replacement: expected closing curly bracket in replacement string 14664 14665/(abcd)/replace=${1:+xy\kz},substitute_extended 14666 abcd 14667Failed: error -57 at offset 8 in replacement: bad escape sequence in replacement string 14668 14669/(abcd)/ 14670 abcd\=replace=${1:+xy\kz},substitute_extended 14671Failed: error -57 at offset 8 in replacement: bad escape sequence in replacement string 14672 14673/abcd/substitute_extended,replace=>$1< 14674 abcd 14675Failed: error -49 at offset 3 in replacement: unknown substring 14676 14677/abcd/substitute_extended,replace=>xxx${xyz}<<< 14678 abcd 14679Failed: error -49 at offset 10 in replacement: unknown substring 14680 14681/(?J)(?:(?<A>a)|(?<A>b))/replace=<$A> 14682 [a] 14683 1: [<a>] 14684 [b] 14685 1: [<b>] 14686\= Expect error 14687 (a)\=ovector=1 14688Failed: error -54 at offset 3 in replacement: requested value is not available 14689 14690/(a)|(b)/replace=<$1> 14691\= Expect error 14692 b 14693Failed: error -55 at offset 3 in replacement: requested value is not set 14694 14695/(aa)(BB)/substitute_extended,replace=\U$1\L$2\E$1..\U$1\l$2$1 14696 aaBB 14697 1: AAbbaa..AAbBaa 14698 14699/^(o(\1{72}{\"{\\{00000059079}\d*){74}}){19}/I 14700Capturing subpattern count = 2 14701Max back reference = 1 14702Compile options: <none> 14703Overall options: anchored 14704Last code unit = '}' 14705Subject length lower bound = 65535 14706 14707/((p(?'K/ 14708Failed: error 142 at offset 7: syntax error in subpattern name (missing terminator) 14709 14710/((p(?'K/no_auto_capture 14711Failed: error 142 at offset 7: syntax error in subpattern name (missing terminator) 14712 14713/abc/replace=A$3123456789Z 14714 abc 14715Failed: error -49 at offset 3 in replacement: unknown substring 14716 14717/(?<!a{65535}a{5})x/I 14718Failed: error 187 at offset 16: lookbehind assertion is too long 14719 14720/(?<!a{65535})x/I 14721Capturing subpattern count = 0 14722Max lookbehind = 65535 14723First code unit = 'x' 14724Subject length lower bound = 1 14725 14726/(?=a\K)/replace=z 14727 BaCaD 14728Failed: error -60: match with end before start is not supported 14729 14730/(?'abcdefghijklmnopqrstuvwxyzABCDEFG'toolong)/ 14731Failed: error 148 at offset 36: subpattern name is too long (maximum 32 characters) 14732 14733/(?'abcdefghijklmnopqrstuvwxyzABCDEF'justright)/ 14734 14735# These two use zero-termination 14736/abcd/max_pattern_length=3 14737Failed: error 188 at offset 0: pattern string is longer than the limit set by the application 14738 14739/abc/max_pattern_length=3 14740 14741# These two, being hex, pass the length 14742/abcdefab/hex,max_pattern_length=3 14743Failed: error 188 at offset 0: pattern string is longer than the limit set by the application 14744 14745/abcdef/hex,max_pattern_length=3 14746 14747# These two patterns used to take a long time to compile 14748 14749"(.*) 14750((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14751((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14752((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))"xI 14753Capturing subpattern count = 12 14754May match empty string 14755Options: extended 14756First code unit at start or follows newline 14757Subject length lower bound = 0 14758 14759"(?<=a() 14760((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14761((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14762((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14763a)"xI 14764Capturing subpattern count = 12 14765Max lookbehind = 2 14766May match empty string 14767Options: extended 14768Subject length lower bound = 0 14769 14770# When (?| is used and groups of the same number may be different, 14771# we have to rely on a count to catch overly complicated patterns. 14772 14773"(?|()|())(.*) 14774((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14775((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14776((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))"xI 14777Failed: error 186 at offset 148: regular expression is too complicated 14778 14779"(?|()|())(?<=a() 14780((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14781((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14782((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14783a)"xI 14784Failed: error 186 at offset 154: regular expression is too complicated 14785 14786# Test the use of malloc for caching group information when there are more 14787# groups than fit into the on-stack workspace. 14788 14789/\[()]{1024}/I,expand 14790Expanded: ()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()() 14791Capturing subpattern count = 1024 14792May match empty string 14793Subject length lower bound = 0 14794 14795# Test minlength capped at 65535 14796 14797/(A{65000})\1{65000}/I 14798Capturing subpattern count = 1 14799Max back reference = 1 14800First code unit = 'A' 14801Last code unit = 'A' 14802Subject length lower bound = 65535 14803 14804# Test group scans when numbers are not unique 14805 14806/(?|()+|(a)+)/BI 14807------------------------------------------------------------------ 14808 Bra 14809 Bra 14810 SCBra 1 14811 KetRmax 14812 Alt 14813 CBra 1 14814 a 14815 KetRmax 14816 Ket 14817 Ket 14818 End 14819------------------------------------------------------------------ 14820Capturing subpattern count = 1 14821May match empty string 14822Subject length lower bound = 0 14823 14824/(?|(a)+|()+)/BI 14825------------------------------------------------------------------ 14826 Bra 14827 Bra 14828 CBra 1 14829 a 14830 KetRmax 14831 Alt 14832 SCBra 1 14833 KetRmax 14834 Ket 14835 Ket 14836 End 14837------------------------------------------------------------------ 14838Capturing subpattern count = 1 14839May match empty string 14840Subject length lower bound = 0 14841 14842/(?|()|(a))/BI 14843------------------------------------------------------------------ 14844 Bra 14845 Bra 14846 CBra 1 14847 Ket 14848 Alt 14849 CBra 1 14850 a 14851 Ket 14852 Ket 14853 Ket 14854 End 14855------------------------------------------------------------------ 14856Capturing subpattern count = 1 14857May match empty string 14858Subject length lower bound = 0 14859 14860/(?|(a)|())/BI 14861------------------------------------------------------------------ 14862 Bra 14863 Bra 14864 CBra 1 14865 a 14866 Ket 14867 Alt 14868 CBra 1 14869 Ket 14870 Ket 14871 Ket 14872 End 14873------------------------------------------------------------------ 14874Capturing subpattern count = 1 14875May match empty string 14876Subject length lower bound = 0 14877 14878# Test CRLF handling in empty string substitutions 14879 14880/^$/gm,newline=anycrlf,replace=- 14881 X\r\n\r\nY 14882 1: X\x0d\x0a-\x0d\x0aY 14883 14884/^$/gm,newline=crlf,replace=- 14885 X\r\n\r\nY 14886 1: X\x0d\x0a-\x0d\x0aY 14887 14888/^$/gm,newline=any,replace=- 14889 X\r\n\r\nY 14890 1: X\x0d\x0a-\x0d\x0aY 14891 14892"(*ANYCRLF)(?m)^(.*[^0-9\r\n].*|)$"g,replace=NaN 14893 15\r\nfoo\r\n20\r\nbar\r\nbaz\r\n\r\n20 14894 4: 15\x0d\x0aNaN\x0d\x0a20\x0d\x0aNaN\x0d\x0aNaN\x0d\x0aNaN\x0d\x0a20 14895 14896/a[[:punct:]b]/bincode 14897------------------------------------------------------------------ 14898 Bra 14899 a 14900 [!-/:-@[-`b{-~] 14901 Ket 14902 End 14903------------------------------------------------------------------ 14904 14905/a[b[:punct:]]/bincode 14906------------------------------------------------------------------ 14907 Bra 14908 a 14909 [!-/:-@[-`b{-~] 14910 Ket 14911 End 14912------------------------------------------------------------------ 14913 14914/L(?#(|++<!(2)?/B 14915------------------------------------------------------------------ 14916 Bra 14917 L?+ 14918 Ket 14919 End 14920------------------------------------------------------------------ 14921 14922/L(?#(|++<!(2)?/B,no_auto_possess 14923------------------------------------------------------------------ 14924 Bra 14925 L? 14926 Ket 14927 End 14928------------------------------------------------------------------ 14929 14930/L(?#(|++<!(2)?/B,auto_callout 14931------------------------------------------------------------------ 14932 Bra 14933 Callout 255 0 14 14934 L?+ 14935 Callout 255 14 0 14936 Ket 14937 End 14938------------------------------------------------------------------ 14939 14940/L(?#(|++<!(2)?/B,no_auto_possess,auto_callout 14941------------------------------------------------------------------ 14942 Bra 14943 Callout 255 0 14 14944 L? 14945 Callout 255 14 0 14946 Ket 14947 End 14948------------------------------------------------------------------ 14949 14950/(A*)\E+/B,auto_callout 14951------------------------------------------------------------------ 14952 Bra 14953 Callout 255 0 7 14954 SCBra 1 14955 Callout 255 1 2 14956 A* 14957 Callout 255 3 0 14958 KetRmax 14959 Callout 255 7 0 14960 Ket 14961 End 14962------------------------------------------------------------------ 14963 14964/()\Q\E*]/B,auto_callout 14965------------------------------------------------------------------ 14966 Bra 14967 Callout 255 0 7 14968 Brazero 14969 SCBra 1 14970 Callout 255 1 0 14971 KetRmax 14972 Callout 255 7 1 14973 ] 14974 Callout 255 8 0 14975 Ket 14976 End 14977------------------------------------------------------------------ 14978 a[bc]d 14979--->a[bc]d 14980 +0 ^ ()\Q\E* 14981 +1 ^ ) 14982 +7 ^ ] 14983 +8 ^^ 14984 0: ] 14985 1: 14986 14987/\x8a+f|;T?(*:;.'?`(\xeap ){![^()!y*''C*(?';]{1;(\x08)/B,alt_verbnames,dupnames,extended 14988------------------------------------------------------------------ 14989 Bra 14990 \x{8a}++ 14991 f 14992 Alt 14993 ; 14994 T? 14995 *MARK ;.'?`(\x{ea}p 14996 {! 14997 [\x00- "-&+-:<->@-BD-xz-\xff] (neg) 14998 {1; 14999 CBra 1 15000 \x08 15001 Ket 15002 Ket 15003 End 15004------------------------------------------------------------------ 15005 15006# Tests for NULL characters in comments and verb "names" and callouts 15007 15008# /A#B\x00C\x0aZ/ 15009/41 23 42 00 43 0a 5a/Bx,hex 15010------------------------------------------------------------------ 15011 Bra 15012 AZ 15013 Ket 15014 End 15015------------------------------------------------------------------ 15016 15017# /A+#B\x00C\x0a+/ 15018/41 2b 23 42 00 43 0a 2b/Bx,hex 15019------------------------------------------------------------------ 15020 Bra 15021 A++ 15022 Ket 15023 End 15024------------------------------------------------------------------ 15025 15026# /A(*:B\x00W#X\00Y\x0aC)Z/ 15027/41 28 2a 3a 42 00 57 23 58 00 59 0a 43 29 5a/Bx,hex,alt_verbnames 15028------------------------------------------------------------------ 15029 Bra 15030 A 15031 *MARK B\x{0}WC 15032 Z 15033 Ket 15034 End 15035------------------------------------------------------------------ 15036 15037# /A(*:B\x00W#X\00Y\x0aC)Z/ 15038/41 28 2a 3a 42 00 57 23 58 00 59 0a 43 29 5a/Bx,hex 15039------------------------------------------------------------------ 15040 Bra 15041 A 15042 *MARK B\x{0}W#X\x{0}Y\x{a}C 15043 Z 15044 Ket 15045 End 15046------------------------------------------------------------------ 15047 15048# /A(?C{X\x00Y})B/ 15049/41 28 3f 43 7b 58 00 59 7d 29 42/B,hex 15050------------------------------------------------------------------ 15051 Bra 15052 A 15053 CalloutStr {X\x{0}Y} 5 10 1 15054 B 15055 Ket 15056 End 15057------------------------------------------------------------------ 15058 15059# /A(?#X\x00Y)B/ 15060/41 28 3f 23 7b 00 7d 29 42/B,hex 15061------------------------------------------------------------------ 15062 Bra 15063 AB 15064 Ket 15065 End 15066------------------------------------------------------------------ 15067 15068# Tests for leading comment in extended patterns 15069 15070/ (?-x):?/extended 15071 15072/(?-x):?/extended 15073 15074/0b 28 3f 2d 78 29 3a/hex,extended 15075 15076/#comment 15077(?-x):?/extended 15078 15079/(8(*:6^\x09x\xa6l\)6!|\xd0:[^:|)\x09d\Z\d{85*m(?'(?<1!)*\W[*\xff]!!h\w]*\xbe;/alt_bsux,alt_verbnames,allow_empty_class,dollar_endonly,extended,multiline,never_utf,no_dotstar_anchor,no_start_optimize 15080Failed: error 124 at offset 49: letter or underscore expected after (?< or (?' 15081 15082/a|(b)c/replace=>$1<,substitute_unset_empty 15083 cat 15084 1: c><t 15085 xbcom 15086 1: x>b<om 15087 15088/a|(b)c/ 15089 cat\=replace=>$1< 15090Failed: error -55 at offset 3 in replacement: requested value is not set 15091 cat\=replace=>$1<,substitute_unset_empty 15092 1: c><t 15093 xbcom\=replace=>$1<,substitute_unset_empty 15094 1: x>b<om 15095 15096/a|(b)c/substitute_extended 15097 cat\=replace=>${2:-xx}< 15098Failed: error -49 at offset 9 in replacement: unknown substring 15099 cat\=replace=>${2:-xx}<,substitute_unknown_unset 15100 1: c>xx<t 15101 cat\=replace=>${X:-xx}<,substitute_unknown_unset 15102 1: c>xx<t 15103 15104/a|(?'X'b)c/replace=>$X<,substitute_unset_empty 15105 cat 15106 1: c><t 15107 xbcom 15108 1: x>b<om 15109 15110/a|(?'X'b)c/replace=>$Y<,substitute_unset_empty 15111 cat 15112Failed: error -49 at offset 3 in replacement: unknown substring 15113 cat\=substitute_unknown_unset 15114 1: c><t 15115 cat\=substitute_unknown_unset,-substitute_unset_empty 15116Failed: error -55 at offset 3 in replacement: requested value is not set 15117 15118/a|(b)c/replace=>$2<,substitute_unset_empty 15119 cat 15120Failed: error -49 at offset 3 in replacement: unknown substring 15121 cat\=substitute_unknown_unset 15122 1: c><t 15123 cat\=substitute_unknown_unset,-substitute_unset_empty 15124Failed: error -55 at offset 3 in replacement: requested value is not set 15125 15126/()()()/use_offset_limit 15127 \=ovector=11000000000 15128** Invalid value in 'ovector=11000000000' 15129 \=callout_fail=11000000000 15130** Invalid value in 'callout_fail=11000000000' 15131 \=callout_fail=1:11000000000 15132** Invalid value in 'callout_fail=1:11000000000' 15133 \=callout_data=11000000000 15134** Invalid value in 'callout_data=11000000000' 15135 \=callout_data=-11000000000 15136** Invalid value in 'callout_data=-11000000000' 15137 \=offset_limit=1100000000000000000000 15138** Invalid value in 'offset_limit=1100000000000000000000' 15139 \=copy=11000000000 15140** Invalid value in 'copy=11000000000' 15141 15142/(*MARK:A\x00b)/mark 15143 abc 15144 0: 15145MK: A\x00b 15146 15147/(*MARK:A\x00b)/mark,alt_verbnames 15148 abc 15149 0: 15150MK: A\x00b 15151 15152/"(*MARK:A" 00 "b)"/mark,hex 15153 abc 15154 0: 15155MK: A\x00b 15156 15157/"(*MARK:A" 00 "b)"/mark,hex,alt_verbnames 15158 abc 15159 0: 15160MK: A\x00b 15161 15162/efg/hex 15163** Unexpected non-hex-digit 'g' in hex pattern: quote missing? 15164 15165/eff/hex 15166** Odd number of digits in hex pattern 15167 15168/effg/hex 15169** Unexpected non-hex-digit 'g' in hex pattern: quote missing? 15170 15171/(?J)(?'a'))(?'a')/ 15172Failed: error 122 at offset 10: unmatched closing parenthesis 15173 15174/(?<=((?C)0))/ 15175 9010 15176--->9010 15177 0 ^ 0 15178 0 ^ 0 15179 0: 15180 1: 0 15181\= Expect no match 15182 abc 15183--->abc 15184 0 ^ 0 15185 0 ^ 0 15186 0 ^ 0 15187No match 15188 15189/aaa/ 15190\[abc]{10000000000000000000000000000} 15191** Repeat count too large 15192\[a]{3} 15193 0: aaa 15194 15195/\[AB]{6000000000000000000000}/expand 15196** Pattern repeat count too large 15197 15198# End of testinput2 15199Error -63: PCRE2_ERROR_BADDATA (unknown error number) 15200Error -62: bad serialized data 15201Error -2: partial match 15202Error -1: no match 15203Error 0: PCRE2_ERROR_BADDATA (unknown error number) 15204Error 100: no error 15205Error 188: pattern string is longer than the limit set by the application 15206Error 189: PCRE2_ERROR_BADDATA (unknown error number) 15207