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 50Capture group count = 1 51May match empty string 52Subject length lower bound = 0 53 54/abc/I 55Capture group 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 72Capture group count = 0 73Compile options: <none> 74Overall options: anchored 75First code unit = 'a' 76Subject length lower bound = 3 77 abc 78 0: abc 79 abc\=anchored 80 0: abc 81\= Expect no match 82 defabc 83No match 84 defabc\=anchored 85No match 86 87/a+bc/I 88Capture group count = 0 89First code unit = 'a' 90Last code unit = 'c' 91Subject length lower bound = 3 92 93/a*bc/I 94Capture group count = 0 95Starting code units: a b 96Last code unit = 'c' 97Subject length lower bound = 2 98 99/a{3}bc/I 100Capture group count = 0 101First code unit = 'a' 102Last code unit = 'c' 103Subject length lower bound = 5 104 105/(abc|a+z)/I 106Capture group count = 1 107First code unit = 'a' 108Subject length lower bound = 2 109 110/^abc$/I 111Capture group count = 0 112Compile options: <none> 113Overall options: anchored 114First code unit = 'a' 115Subject length lower bound = 3 116 abc 117 0: abc 118\= Expect no match 119 def\nabc 120No match 121 122/ab\idef/ 123Failed: error 103 at offset 3: unrecognized character follows \ 124 125/(?X)ab\idef/ 126Failed: error 111 at offset 2: unrecognized character after (? or (?- 127 128/x{5,4}/ 129Failed: error 104 at offset 5: numbers out of order in {} quantifier 130 131/z{65536}/ 132Failed: error 105 at offset 7: number too big in {} quantifier 133 134/[abcd/ 135Failed: error 106 at offset 5: missing terminating ] for character class 136 137/[\B]/B 138Failed: error 107 at offset 2: escape sequence is invalid in character class 139 140/[\R]/B 141Failed: error 107 at offset 2: escape sequence is invalid in character class 142 143/[\X]/B 144Failed: error 107 at offset 2: escape sequence is invalid in character class 145 146/[z-a]/ 147Failed: error 108 at offset 3: range out of order in character class 148 149/^*/ 150Failed: error 109 at offset 1: quantifier does not follow a repeatable item 151 152/(abc/ 153Failed: error 114 at offset 4: missing closing parenthesis 154 155/(?# abc/ 156Failed: error 118 at offset 7: missing ) after (?# comment 157 158/(?z)abc/ 159Failed: error 111 at offset 2: unrecognized character after (? or (?- 160 161/.*b/I 162Capture group count = 0 163First code unit at start or follows newline 164Last code unit = 'b' 165Subject length lower bound = 1 166 167/.*?b/I 168Capture group count = 0 169First code unit at start or follows newline 170Last code unit = 'b' 171Subject length lower bound = 1 172 173/cat|dog|elephant/I 174Capture group count = 0 175Starting code units: c d e 176Subject length lower bound = 3 177 this sentence eventually mentions a cat 178 0: cat 179 this sentences rambles on and on for a while and then reaches elephant 180 0: elephant 181 182/cat|dog|elephant/I 183Capture group count = 0 184Starting code units: c d e 185Subject length lower bound = 3 186 this sentence eventually mentions a cat 187 0: cat 188 this sentences rambles on and on for a while and then reaches elephant 189 0: elephant 190 191/cat|dog|elephant/Ii 192Capture group count = 0 193Options: caseless 194Starting code units: C D E c d e 195Subject length lower bound = 3 196 this sentence eventually mentions a CAT cat 197 0: CAT 198 this sentences rambles on and on for a while to elephant ElePhant 199 0: elephant 200 201/a|[bcd]/I 202Capture group count = 0 203Starting code units: a b c d 204Subject length lower bound = 1 205 206/(a|[^\dZ])/I 207Capture group count = 1 208Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 209 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 210 \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = > 211 ? @ 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 212 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 213 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92 214 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1 215 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0 216 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf 217 \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce 218 \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd 219 \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec 220 \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb 221 \xfc \xfd \xfe \xff 222Subject length lower bound = 1 223 224/(a|b)*[\s]/I 225Capture group count = 1 226Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 a b 227Subject length lower bound = 1 228 229/(ab\2)/ 230Failed: error 115 at offset 4: reference to non-existent subpattern 231 232/{4,5}abc/ 233Failed: error 109 at offset 4: quantifier does not follow a repeatable item 234 235/(a)(b)(c)\2/I 236Capture group count = 3 237Max back reference = 2 238First code unit = 'a' 239Last code unit = 'c' 240Subject length lower bound = 4 241 abcb 242 0: abcb 243 1: a 244 2: b 245 3: c 246 abcb\=ovector=0 247 0: abcb 248 1: a 249 2: b 250 3: c 251 abcb\=ovector=1 252Matched, but too many substrings 253 0: abcb 254 abcb\=ovector=2 255Matched, but too many substrings 256 0: abcb 257 1: a 258 abcb\=ovector=3 259Matched, but too many substrings 260 0: abcb 261 1: a 262 2: b 263 abcb\=ovector=4 264 0: abcb 265 1: a 266 2: b 267 3: c 268 269/(a)bc|(a)(b)\2/I 270Capture group count = 3 271Max back reference = 2 272First code unit = 'a' 273Subject length lower bound = 3 274 abc 275 0: abc 276 1: a 277 abc\=ovector=0 278 0: abc 279 1: a 280 abc\=ovector=1 281Matched, but too many substrings 282 0: abc 283 abc\=ovector=2 284 0: abc 285 1: a 286 aba 287 0: aba 288 1: <unset> 289 2: a 290 3: b 291 aba\=ovector=0 292 0: aba 293 1: <unset> 294 2: a 295 3: b 296 aba\=ovector=1 297Matched, but too many substrings 298 0: aba 299 aba\=ovector=2 300Matched, but too many substrings 301 0: aba 302 1: <unset> 303 aba\=ovector=3 304Matched, but too many substrings 305 0: aba 306 1: <unset> 307 2: a 308 aba\=ovector=4 309 0: aba 310 1: <unset> 311 2: a 312 3: b 313 314/abc$/I,dollar_endonly 315Capture group count = 0 316Options: dollar_endonly 317First code unit = 'a' 318Last code unit = 'c' 319Subject length lower bound = 3 320 abc 321 0: abc 322\= Expect no match 323 abc\n 324No match 325 abc\ndef 326No match 327 328/(a)(b)(c)(d)(e)\6/ 329Failed: error 115 at offset 16: reference to non-existent subpattern 330 331/the quick brown fox/I 332Capture group count = 0 333First code unit = 't' 334Last code unit = 'x' 335Subject length lower bound = 19 336 the quick brown fox 337 0: the quick brown fox 338 this is a line with the quick brown fox 339 0: the quick brown fox 340 341/the quick brown fox/I,anchored 342Capture group count = 0 343Options: anchored 344First code unit = 't' 345Subject length lower bound = 19 346 the quick brown fox 347 0: the quick brown fox 348\= Expect no match 349 this is a line with the quick brown fox 350No match 351 352/ab(?z)cd/ 353Failed: error 111 at offset 4: unrecognized character after (? or (?- 354 355/^abc|def/I 356Capture group count = 0 357Starting code units: a d 358Subject length lower bound = 3 359 abcdef 360 0: abc 361 abcdef\=notbol 362 0: def 363 364/.*((abc)$|(def))/I 365Capture group count = 3 366First code unit at start or follows newline 367Subject length lower bound = 3 368 defabc 369 0: defabc 370 1: abc 371 2: abc 372 defabc\=noteol 373 0: def 374 1: def 375 2: <unset> 376 3: def 377 378/)/ 379Failed: error 122 at offset 0: unmatched closing parenthesis 380 381/a[]b/ 382Failed: error 106 at offset 4: missing terminating ] for character class 383 384/[^aeiou ]{3,}/I 385Capture group count = 0 386Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 387 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 388 \x1a \x1b \x1c \x1d \x1e \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 389 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 [ 390 \ ] ^ _ ` b c d f g h j k l m n p q r s t v w x y z { | } ~ \x7f \x80 \x81 391 \x82 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 392 \x91 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f 393 \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae 394 \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd 395 \xbe \xbf \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc 396 \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb 397 \xdc \xdd \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea 398 \xeb \xec \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 399 \xfa \xfb \xfc \xfd \xfe \xff 400Subject length lower bound = 3 401 co-processors, and for 402 0: -pr 403 404/<.*>/I 405Capture group count = 0 406First code unit = '<' 407Last code unit = '>' 408Subject length lower bound = 2 409 abc<def>ghi<klm>nop 410 0: <def>ghi<klm> 411 412/<.*?>/I 413Capture group count = 0 414First code unit = '<' 415Last code unit = '>' 416Subject length lower bound = 2 417 abc<def>ghi<klm>nop 418 0: <def> 419 420/<.*>/I,ungreedy 421Capture group count = 0 422Options: ungreedy 423First code unit = '<' 424Last code unit = '>' 425Subject length lower bound = 2 426 abc<def>ghi<klm>nop 427 0: <def> 428 429/(?U)<.*>/I 430Capture group count = 0 431First code unit = '<' 432Last code unit = '>' 433Subject length lower bound = 2 434 abc<def>ghi<klm>nop 435 0: <def> 436 437/<.*?>/I,ungreedy 438Capture group count = 0 439Options: ungreedy 440First code unit = '<' 441Last code unit = '>' 442Subject length lower bound = 2 443 abc<def>ghi<klm>nop 444 0: <def>ghi<klm> 445 446/={3,}/I,ungreedy 447Capture group count = 0 448Options: ungreedy 449First code unit = '=' 450Last code unit = '=' 451Subject length lower bound = 3 452 abc========def 453 0: === 454 455/(?U)={3,}?/I 456Capture group count = 0 457First code unit = '=' 458Last code unit = '=' 459Subject length lower bound = 3 460 abc========def 461 0: ======== 462 463/(?<!bar|cattle)foo/I 464Capture group count = 0 465Max lookbehind = 6 466First code unit = 'f' 467Last code unit = 'o' 468Subject length lower bound = 3 469 foo 470 0: foo 471 catfoo 472 0: foo 473\= Expect no match 474 the barfoo 475No match 476 and cattlefoo 477No match 478 479/abc(?<=a+)b/ 480Failed: error 125 at offset 3: length of lookbehind assertion is not limited 481 482/(?<!(foo)a\1)bar/ 483 484/(?i)abc/I 485Capture group count = 0 486First code unit = 'a' (caseless) 487Last code unit = 'c' (caseless) 488Subject length lower bound = 3 489 490/(a|(?m)a)/I 491Capture group count = 1 492First code unit = 'a' 493Subject length lower bound = 1 494 495/(?i)^1234/I 496Capture group count = 0 497Compile options: <none> 498Overall options: anchored 499First code unit = '1' 500Subject length lower bound = 4 501 502/(^b|(?i)^d)/I 503Capture group count = 1 504Compile options: <none> 505Overall options: anchored 506Starting code units: D b d 507Subject length lower bound = 1 508 509/(?s).*/I 510Capture group count = 0 511May match empty string 512Compile options: <none> 513Overall options: anchored 514Subject length lower bound = 0 515 516/[abcd]/I 517Capture group count = 0 518Starting code units: a b c d 519Subject length lower bound = 1 520 521/(?i)[abcd]/I 522Capture group count = 0 523Starting code units: A B C D a b c d 524Subject length lower bound = 1 525 526/(?m)[xy]|(b|c)/I 527Capture group count = 1 528Starting code units: b c x y 529Subject length lower bound = 1 530 531/(^a|^b)/Im 532Capture group count = 1 533Options: multiline 534First code unit at start or follows newline 535Subject length lower bound = 1 536 537/(?i)(^a|^b)/Im 538Capture group count = 1 539Options: multiline 540First code unit at start or follows newline 541Subject length lower bound = 1 542 543/(a)(?(1)a|b|c)/ 544Failed: error 127 at offset 3: conditional subpattern contains more than two branches 545 546/(?(?=a)a|b|c)/ 547Failed: error 127 at offset 0: conditional subpattern contains more than two branches 548 549/(?(1a)/ 550Failed: error 124 at offset 4: missing closing parenthesis for condition 551 552/(?(1a))/ 553Failed: error 124 at offset 4: missing closing parenthesis for condition 554 555/(?(?i))/ 556Failed: error 128 at offset 2: assertion expected after (?( or (?(?C) 557 558/(?(abc))/ 559Failed: error 115 at offset 3: reference to non-existent subpattern 560 561/(?(?<ab))/ 562Failed: error 128 at offset 2: assertion expected after (?( or (?(?C) 563 564/((?s)blah)\s+\1/I 565Capture group count = 1 566Max back reference = 1 567First code unit = 'b' 568Last code unit = 'h' 569Subject length lower bound = 9 570 571/((?i)blah)\s+\1/I 572Capture group count = 1 573Max back reference = 1 574First code unit = 'b' (caseless) 575Last code unit = 'h' (caseless) 576Subject length lower bound = 9 577 578/((?i)b)/IB 579------------------------------------------------------------------ 580 Bra 581 CBra 1 582 /i b 583 Ket 584 Ket 585 End 586------------------------------------------------------------------ 587Capture group count = 1 588First code unit = 'b' (caseless) 589Subject length lower bound = 1 590 591/(a*b|(?i:c*(?-i)d))/I 592Capture group count = 1 593Starting code units: C a b c d 594Subject length lower bound = 1 595 596/a$/I 597Capture group count = 0 598First code unit = 'a' 599Subject length lower bound = 1 600 a 601 0: a 602 a\n 603 0: a 604\= Expect no match 605 a\=noteol 606No match 607 a\n\=noteol 608No match 609 610/a$/Im 611Capture group count = 0 612Options: multiline 613First code unit = 'a' 614Subject length lower bound = 1 615 a 616 0: a 617 a\n 618 0: a 619 a\n\=noteol 620 0: a 621\= Expect no match 622 a\=noteol 623No match 624 625/\Aabc/Im 626Capture group count = 0 627Max lookbehind = 1 628Compile options: multiline 629Overall options: anchored multiline 630First code unit = 'a' 631Subject length lower bound = 3 632 633/^abc/Im 634Capture group count = 0 635Options: multiline 636First code unit at start or follows newline 637Last code unit = 'c' 638Subject length lower bound = 3 639 640/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I 641Capture group count = 5 642Compile options: <none> 643Overall options: anchored 644First code unit = 'a' 645Subject length lower bound = 3 646 aaaaabbbbbcccccdef 647 0: aaaaabbbbbcccccdef 648 1: aaaaabbbbbcccccdef 649 2: aaaaa 650 3: b 651 4: bbbbccccc 652 5: def 653 654/(?<=foo)[ab]/I 655Capture group count = 0 656Max lookbehind = 3 657Starting code units: a b 658Subject length lower bound = 1 659 660/(?<!foo)(alpha|omega)/I 661Capture group count = 1 662Max lookbehind = 3 663Starting code units: a o 664Last code unit = 'a' 665Subject length lower bound = 5 666 667/(?!alphabet)[ab]/I 668Capture group count = 0 669Starting code units: a b 670Subject length lower bound = 1 671 672/(?<=foo\n)^bar/Im 673Capture group count = 0 674Max lookbehind = 4 675Contains explicit CR or LF match 676Options: multiline 677Last code unit = 'r' 678Subject length lower bound = 3 679 foo\nbarbar 680 0: bar 681\= Expect no match 682 rhubarb 683No match 684 barbell 685No match 686 abc\nbarton 687No match 688 689/^(?<=foo\n)bar/Im 690Capture group count = 0 691Max lookbehind = 4 692Contains explicit CR or LF match 693Options: multiline 694First code unit at start or follows newline 695Last code unit = 'r' 696Subject length lower bound = 3 697 foo\nbarbar 698 0: bar 699\= Expect no match 700 rhubarb 701No match 702 barbell 703No match 704 abc\nbarton 705No match 706 707/(?>^abc)/Im 708Capture group count = 0 709Options: multiline 710First code unit at start or follows newline 711Last code unit = 'c' 712Subject length lower bound = 3 713 abc 714 0: abc 715 def\nabc 716 0: abc 717\= Expect no match 718 defabc 719No match 720 721/(?<=ab(c+)d)ef/ 722Failed: error 125 at offset 0: length of lookbehind assertion is not limited 723 724/(?<=ab(?<=c+)d)ef/ 725Failed: error 125 at offset 6: length of lookbehind assertion is not limited 726 727/The next three are in testinput2 because they have variable length branches/ 728 729/(?<=bullock|donkey)-cart/I 730Capture group count = 0 731Max lookbehind = 7 732First code unit = '-' 733Last code unit = 't' 734Subject length lower bound = 5 735 the bullock-cart 736 0: -cart 737 a donkey-cart race 738 0: -cart 739\= Expect no match 740 cart 741No match 742 horse-and-cart 743No match 744 745/(?<=ab(?i)x|y|z)/I 746Capture group count = 0 747Max lookbehind = 3 748May match empty string 749Subject length lower bound = 0 750 751/(?>.*)(?<=(abcd)|(xyz))/I 752Capture group count = 2 753Max lookbehind = 4 754May match empty string 755Subject length lower bound = 0 756 alphabetabcd 757 0: alphabetabcd 758 1: abcd 759 endingxyz 760 0: endingxyz 761 1: <unset> 762 2: xyz 763 764/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I 765Capture group count = 0 766Max lookbehind = 4 767First code unit = 'Z' 768Last code unit = 'Z' 769Subject length lower bound = 2 770 abxyZZ 771 0: ZZ 772 abXyZZ 773 0: ZZ 774 ZZZ 775 0: ZZ 776 zZZ 777 0: ZZ 778 bZZ 779 0: ZZ 780 BZZ 781 0: ZZ 782\= Expect no match 783 ZZ 784No match 785 abXYZZ 786No match 787 zzz 788No match 789 bzz 790No match 791 792/(?<!(foo)a)bar/I 793Capture group count = 1 794Max lookbehind = 4 795First code unit = 'b' 796Last code unit = 'r' 797Subject length lower bound = 3 798 bar 799 0: bar 800 foobbar 801 0: bar 802\= Expect no match 803 fooabar 804No match 805 806# Perl does not fail these two for the final subjects. 807 808/^(xa|=?\1a){2}$/ 809 xa=xaa 810 0: xa=xaa 811 1: =xaa 812\= Expect no match 813 xa=xaaa 814No match 815 816/^(xa|=?\1a)+$/ 817 xa=xaa 818 0: xa=xaa 819 1: =xaa 820\= Expect no match 821 xa=xaaa 822No match 823 824# These are syntax tests from Perl 5.005 825 826/a[b-a]/ 827Failed: error 108 at offset 4: range out of order in character class 828 829/a[]b/ 830Failed: error 106 at offset 4: missing terminating ] for character class 831 832/a[/ 833Failed: error 106 at offset 2: missing terminating ] for character class 834 835/*a/ 836Failed: error 109 at offset 0: quantifier does not follow a repeatable item 837 838/(*)b/ 839Failed: error 109 at offset 1: quantifier does not follow a repeatable item 840 841/abc)/ 842Failed: error 122 at offset 3: unmatched closing parenthesis 843 844/(abc/ 845Failed: error 114 at offset 4: missing closing parenthesis 846 847/a**/ 848Failed: error 109 at offset 2: quantifier does not follow a repeatable item 849 850/)(/ 851Failed: error 122 at offset 0: unmatched closing parenthesis 852 853/\1/ 854Failed: error 115 at offset 1: reference to non-existent subpattern 855 856/\2/ 857Failed: error 115 at offset 1: reference to non-existent subpattern 858 859/(a)|\2/ 860Failed: error 115 at offset 5: reference to non-existent subpattern 861 862/a[b-a]/Ii 863Failed: error 108 at offset 4: range out of order in character class 864 865/a[]b/Ii 866Failed: error 106 at offset 4: missing terminating ] for character class 867 868/a[/Ii 869Failed: error 106 at offset 2: missing terminating ] for character class 870 871/*a/Ii 872Failed: error 109 at offset 0: quantifier does not follow a repeatable item 873 874/(*)b/Ii 875Failed: error 109 at offset 1: quantifier does not follow a repeatable item 876 877/abc)/Ii 878Failed: error 122 at offset 3: unmatched closing parenthesis 879 880/(abc/Ii 881Failed: error 114 at offset 4: missing closing parenthesis 882 883/a**/Ii 884Failed: error 109 at offset 2: quantifier does not follow a repeatable item 885 886/)(/Ii 887Failed: error 122 at offset 0: unmatched closing parenthesis 888 889/:(?:/ 890Failed: error 114 at offset 4: missing closing parenthesis 891 892/(?<%)b/ 893Failed: error 162 at offset 3: subpattern name expected 894 895/a(?{)b/ 896Failed: error 111 at offset 3: unrecognized character after (? or (?- 897 898/a(?{{})b/ 899Failed: error 111 at offset 3: unrecognized character after (? or (?- 900 901/a(?{}})b/ 902Failed: error 111 at offset 3: unrecognized character after (? or (?- 903 904/a(?{"{"})b/ 905Failed: error 111 at offset 3: unrecognized character after (? or (?- 906 907/a(?{"{"}})b/ 908Failed: error 111 at offset 3: unrecognized character after (? or (?- 909 910/(?(1?)a|b)/ 911Failed: error 124 at offset 4: missing closing parenthesis for condition 912 913/[a[:xyz:/ 914Failed: error 106 at offset 8: missing terminating ] for character class 915 916/(?<=x+)y/ 917Failed: error 125 at offset 0: length of lookbehind assertion is not limited 918 919/a{37,17}/ 920Failed: error 104 at offset 7: numbers out of order in {} quantifier 921 922/abc/\ 923Failed: error 101 at offset 4: \ at end of pattern 924 925/abc/\i 926Failed: error 101 at offset 4: \ at end of pattern 927 928/(a)bc(d)/I 929Capture group count = 2 930First code unit = 'a' 931Last code unit = 'd' 932Subject length lower bound = 4 933 abcd 934 0: abcd 935 1: a 936 2: d 937 abcd\=copy=2 938 0: abcd 939 1: a 940 2: d 941 2C d (1) 942 abcd\=copy=5 943 0: abcd 944 1: a 945 2: d 946Copy substring 5 failed (-49): unknown substring 947 948/(.{20})/I 949Capture group count = 1 950Subject length lower bound = 20 951 abcdefghijklmnopqrstuvwxyz 952 0: abcdefghijklmnopqrst 953 1: abcdefghijklmnopqrst 954 abcdefghijklmnopqrstuvwxyz\=copy=1 955 0: abcdefghijklmnopqrst 956 1: abcdefghijklmnopqrst 957 1C abcdefghijklmnopqrst (20) 958 abcdefghijklmnopqrstuvwxyz\=get=1 959 0: abcdefghijklmnopqrst 960 1: abcdefghijklmnopqrst 961 1G abcdefghijklmnopqrst (20) 962 963/(.{15})/I 964Capture group count = 1 965Subject length lower bound = 15 966 abcdefghijklmnopqrstuvwxyz 967 0: abcdefghijklmno 968 1: abcdefghijklmno 969 abcdefghijklmnopqrstuvwxyz\=copy=1,get=1 970 0: abcdefghijklmno 971 1: abcdefghijklmno 972 1C abcdefghijklmno (15) 973 1G abcdefghijklmno (15) 974 975/(.{16})/I 976Capture group count = 1 977Subject length lower bound = 16 978 abcdefghijklmnopqrstuvwxyz 979 0: abcdefghijklmnop 980 1: abcdefghijklmnop 981 abcdefghijklmnopqrstuvwxyz\=copy=1,get=1,getall 982 0: abcdefghijklmnop 983 1: abcdefghijklmnop 984 1C abcdefghijklmnop (16) 985 1G abcdefghijklmnop (16) 986 0L abcdefghijklmnop 987 1L abcdefghijklmnop 988 989/^(a|(bc))de(f)/I 990Capture group count = 3 991Compile options: <none> 992Overall options: anchored 993Starting code units: a b 994Subject length lower bound = 4 995 adef\=get=1,get=2,get=3,get=4,getall 996 0: adef 997 1: a 998 2: <unset> 999 3: f 1000 1G a (1) 1001Get substring 2 failed (-55): requested value is not set 1002 3G f (1) 1003Get substring 4 failed (-49): unknown substring 1004 0L adef 1005 1L a 1006 2L 1007 3L f 1008 bcdef\=get=1,get=2,get=3,get=4,getall 1009 0: bcdef 1010 1: bc 1011 2: bc 1012 3: f 1013 1G bc (2) 1014 2G bc (2) 1015 3G f (1) 1016Get substring 4 failed (-49): unknown substring 1017 0L bcdef 1018 1L bc 1019 2L bc 1020 3L f 1021 adefghijk\=copy=0 1022 0: adef 1023 1: a 1024 2: <unset> 1025 3: f 1026 0C adef (4) 1027 1028/^abc\00def/I 1029Capture group count = 0 1030Compile options: <none> 1031Overall options: anchored 1032First code unit = 'a' 1033Subject length lower bound = 7 1034 abc\00def\=copy=0,getall 1035 0: abc\x00def 1036 0C abc\x00def (7) 1037 0L abc\x00def 1038 1039/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ 1040)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ 1041)?)?)?)?)?)?)?)?)?otherword/I 1042Capture group count = 8 1043Contains explicit CR or LF match 1044First code unit = 'w' 1045Last code unit = 'd' 1046Subject length lower bound = 14 1047 1048/.*X/IB 1049------------------------------------------------------------------ 1050 Bra 1051 Any* 1052 X 1053 Ket 1054 End 1055------------------------------------------------------------------ 1056Capture group count = 0 1057First code unit at start or follows newline 1058Last code unit = 'X' 1059Subject length lower bound = 1 1060 1061/.*X/IBs 1062------------------------------------------------------------------ 1063 Bra 1064 AllAny* 1065 X 1066 Ket 1067 End 1068------------------------------------------------------------------ 1069Capture group count = 0 1070Compile options: dotall 1071Overall options: anchored dotall 1072Last code unit = 'X' 1073Subject length lower bound = 1 1074 1075/(.*X|^B)/IB 1076------------------------------------------------------------------ 1077 Bra 1078 CBra 1 1079 Any* 1080 X 1081 Alt 1082 ^ 1083 B 1084 Ket 1085 Ket 1086 End 1087------------------------------------------------------------------ 1088Capture group count = 1 1089First code unit at start or follows newline 1090Subject length lower bound = 1 1091 1092/(.*X|^B)/IBs 1093------------------------------------------------------------------ 1094 Bra 1095 CBra 1 1096 AllAny* 1097 X 1098 Alt 1099 ^ 1100 B 1101 Ket 1102 Ket 1103 End 1104------------------------------------------------------------------ 1105Capture group count = 1 1106Compile options: dotall 1107Overall options: anchored dotall 1108Subject length lower bound = 1 1109 1110/(?s)(.*X|^B)/IB 1111------------------------------------------------------------------ 1112 Bra 1113 CBra 1 1114 AllAny* 1115 X 1116 Alt 1117 ^ 1118 B 1119 Ket 1120 Ket 1121 End 1122------------------------------------------------------------------ 1123Capture group count = 1 1124Compile options: <none> 1125Overall options: anchored 1126Subject length lower bound = 1 1127 1128/(?s:.*X|^B)/IB 1129------------------------------------------------------------------ 1130 Bra 1131 Bra 1132 AllAny* 1133 X 1134 Alt 1135 ^ 1136 B 1137 Ket 1138 Ket 1139 End 1140------------------------------------------------------------------ 1141Capture group count = 0 1142Compile options: <none> 1143Overall options: anchored 1144Subject length lower bound = 1 1145 1146/\Biss\B/I,aftertext 1147Capture group count = 0 1148Max lookbehind = 1 1149First code unit = 'i' 1150Last code unit = 's' 1151Subject length lower bound = 3 1152 Mississippi 1153 0: iss 1154 0+ issippi 1155 1156/iss/I,aftertext,altglobal 1157Capture group count = 0 1158First code unit = 'i' 1159Last code unit = 's' 1160Subject length lower bound = 3 1161 Mississippi 1162 0: iss 1163 0+ issippi 1164 0: iss 1165 0+ ippi 1166 1167/\Biss\B/I,aftertext,altglobal 1168Capture group count = 0 1169Max lookbehind = 1 1170First code unit = 'i' 1171Last code unit = 's' 1172Subject length lower bound = 3 1173 Mississippi 1174 0: iss 1175 0+ issippi 1176 1177/\Biss\B/Ig,aftertext 1178Capture group count = 0 1179Max lookbehind = 1 1180First code unit = 'i' 1181Last code unit = 's' 1182Subject length lower bound = 3 1183 Mississippi 1184 0: iss 1185 0+ issippi 1186 0: iss 1187 0+ ippi 1188\= Expect no match 1189 Mississippi\=anchored 1190No match 1191 1192/(?<=[Ms])iss/Ig,aftertext 1193Capture group count = 0 1194Max lookbehind = 1 1195First code unit = 'i' 1196Last code unit = 's' 1197Subject length lower bound = 3 1198 Mississippi 1199 0: iss 1200 0+ issippi 1201 0: iss 1202 0+ ippi 1203 1204/(?<=[Ms])iss/I,aftertext,altglobal 1205Capture group count = 0 1206Max lookbehind = 1 1207First code unit = 'i' 1208Last code unit = 's' 1209Subject length lower bound = 3 1210 Mississippi 1211 0: iss 1212 0+ issippi 1213 1214/^iss/Ig,aftertext 1215Capture group count = 0 1216Compile options: <none> 1217Overall options: anchored 1218First code unit = 'i' 1219Subject length lower bound = 3 1220 ississippi 1221 0: iss 1222 0+ issippi 1223 1224/.*iss/Ig,aftertext 1225Capture group count = 0 1226First code unit at start or follows newline 1227Last code unit = 's' 1228Subject length lower bound = 3 1229 abciss\nxyzisspqr 1230 0: abciss 1231 0+ \x0axyzisspqr 1232 0: xyziss 1233 0+ pqr 1234 1235/.i./Ig,aftertext 1236Capture group count = 0 1237Last code unit = 'i' 1238Subject length lower bound = 3 1239 Mississippi 1240 0: Mis 1241 0+ sissippi 1242 0: sis 1243 0+ sippi 1244 0: sip 1245 0+ pi 1246 Mississippi\=anchored 1247 0: Mis 1248 0+ sissippi 1249 0: sis 1250 0+ sippi 1251 0: sip 1252 0+ pi 1253 Missouri river 1254 0: Mis 1255 0+ souri river 1256 0: ri 1257 0+ river 1258 0: riv 1259 0+ er 1260 Missouri river\=anchored 1261 0: Mis 1262 0+ souri river 1263 1264/^.is/Ig,aftertext 1265Capture group count = 0 1266Compile options: <none> 1267Overall options: anchored 1268Subject length lower bound = 3 1269 Mississippi 1270 0: Mis 1271 0+ sissippi 1272 1273/^ab\n/Ig,aftertext 1274Capture group count = 0 1275Contains explicit CR or LF match 1276Compile options: <none> 1277Overall options: anchored 1278First code unit = 'a' 1279Subject length lower bound = 3 1280 ab\nab\ncd 1281 0: ab\x0a 1282 0+ ab\x0acd 1283 1284/^ab\n/Igm,aftertext 1285Capture group count = 0 1286Contains explicit CR or LF match 1287Options: multiline 1288First code unit at start or follows newline 1289Last code unit = \x0a 1290Subject length lower bound = 3 1291 ab\nab\ncd 1292 0: ab\x0a 1293 0+ ab\x0acd 1294 0: ab\x0a 1295 0+ cd 1296 1297/^/gm,newline=any 1298 a\rb\nc\r\nxyz\=aftertext 1299 0: 1300 0+ a\x0db\x0ac\x0d\x0axyz 1301 0: 1302 0+ b\x0ac\x0d\x0axyz 1303 0: 1304 0+ c\x0d\x0axyz 1305 0: 1306 0+ xyz 1307 1308/abc/I 1309Capture group count = 0 1310First code unit = 'a' 1311Last code unit = 'c' 1312Subject length lower bound = 3 1313 1314/abc|bac/I 1315Capture group count = 0 1316Starting code units: a b 1317Last code unit = 'c' 1318Subject length lower bound = 3 1319 1320/(abc|bac)/I 1321Capture group count = 1 1322Starting code units: a b 1323Last code unit = 'c' 1324Subject length lower bound = 3 1325 1326/(abc|(c|dc))/I 1327Capture group count = 2 1328Starting code units: a c d 1329Last code unit = 'c' 1330Subject length lower bound = 1 1331 1332/(abc|(d|de)c)/I 1333Capture group count = 2 1334Starting code units: a d 1335Last code unit = 'c' 1336Subject length lower bound = 2 1337 1338/a*/I 1339Capture group count = 0 1340May match empty string 1341Subject length lower bound = 0 1342 1343/a+/I 1344Capture group count = 0 1345First code unit = 'a' 1346Subject length lower bound = 1 1347 1348/(baa|a+)/I 1349Capture group count = 1 1350Starting code units: a b 1351Last code unit = 'a' 1352Subject length lower bound = 1 1353 1354/a{0,3}/I 1355Capture group count = 0 1356May match empty string 1357Subject length lower bound = 0 1358 1359/baa{3,}/I 1360Capture group count = 0 1361First code unit = 'b' 1362Last code unit = 'a' 1363Subject length lower bound = 5 1364 1365/"([^\\"]+|\\.)*"/I 1366Capture group count = 1 1367First code unit = '"' 1368Last code unit = '"' 1369Subject length lower bound = 2 1370 1371/(abc|ab[cd])/I 1372Capture group count = 1 1373First code unit = 'a' 1374Subject length lower bound = 3 1375 1376/(a|.)/I 1377Capture group count = 1 1378Subject length lower bound = 1 1379 1380/a|ba|\w/I 1381Capture group count = 0 1382Starting 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 1383 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 1384Subject length lower bound = 1 1385 1386/abc(?=pqr)/I 1387Capture group count = 0 1388First code unit = 'a' 1389Last code unit = 'r' 1390Subject length lower bound = 3 1391 1392/...(?<=abc)/I 1393Capture group count = 0 1394Max lookbehind = 3 1395Subject length lower bound = 3 1396 1397/abc(?!pqr)/I 1398Capture group count = 0 1399First code unit = 'a' 1400Last code unit = 'c' 1401Subject length lower bound = 3 1402 1403/ab./I 1404Capture group count = 0 1405First code unit = 'a' 1406Last code unit = 'b' 1407Subject length lower bound = 3 1408 1409/ab[xyz]/I 1410Capture group count = 0 1411First code unit = 'a' 1412Last code unit = 'b' 1413Subject length lower bound = 3 1414 1415/abc*/I 1416Capture group count = 0 1417First code unit = 'a' 1418Last code unit = 'b' 1419Subject length lower bound = 2 1420 1421/ab.c*/I 1422Capture group count = 0 1423First code unit = 'a' 1424Last code unit = 'b' 1425Subject length lower bound = 3 1426 1427/a.c*/I 1428Capture group count = 0 1429First code unit = 'a' 1430Subject length lower bound = 2 1431 1432/.c*/I 1433Capture group count = 0 1434Subject length lower bound = 1 1435 1436/ac*/I 1437Capture group count = 0 1438First code unit = 'a' 1439Subject length lower bound = 1 1440 1441/(a.c*|b.c*)/I 1442Capture group count = 1 1443Starting code units: a b 1444Subject length lower bound = 2 1445 1446/a.c*|aba/I 1447Capture group count = 0 1448First code unit = 'a' 1449Subject length lower bound = 2 1450 1451/.+a/I 1452Capture group count = 0 1453Last code unit = 'a' 1454Subject length lower bound = 2 1455 1456/(?=abcda)a.*/I 1457Capture group count = 0 1458First code unit = 'a' 1459Last code unit = 'a' 1460Subject length lower bound = 2 1461 1462/(?=a)a.*/I 1463Capture group count = 0 1464First code unit = 'a' 1465Subject length lower bound = 1 1466 1467/a(b)*/I 1468Capture group count = 1 1469First code unit = 'a' 1470Subject length lower bound = 1 1471 1472/a\d*/I 1473Capture group count = 0 1474First code unit = 'a' 1475Subject length lower bound = 1 1476 1477/ab\d*/I 1478Capture group count = 0 1479First code unit = 'a' 1480Last code unit = 'b' 1481Subject length lower bound = 2 1482 1483/a(\d)*/I 1484Capture group count = 1 1485First code unit = 'a' 1486Subject length lower bound = 1 1487 1488/abcde{0,0}/I 1489Capture group count = 0 1490First code unit = 'a' 1491Last code unit = 'd' 1492Subject length lower bound = 4 1493 1494/ab\d+/I 1495Capture group count = 0 1496First code unit = 'a' 1497Last code unit = 'b' 1498Subject length lower bound = 3 1499 1500/a(?(1)b)(.)/I 1501Capture group count = 1 1502Max back reference = 1 1503First code unit = 'a' 1504Subject length lower bound = 2 1505 1506/a(?(1)bag|big)(.)/I 1507Capture group count = 1 1508Max back reference = 1 1509First code unit = 'a' 1510Last code unit = 'g' 1511Subject length lower bound = 5 1512 1513/a(?(1)bag|big)*(.)/I 1514Capture group count = 1 1515Max back reference = 1 1516First code unit = 'a' 1517Subject length lower bound = 2 1518 1519/a(?(1)bag|big)+(.)/I 1520Capture group count = 1 1521Max back reference = 1 1522First code unit = 'a' 1523Last code unit = 'g' 1524Subject length lower bound = 5 1525 1526/a(?(1)b..|b..)(.)/I 1527Capture group count = 1 1528Max back reference = 1 1529First code unit = 'a' 1530Last code unit = 'b' 1531Subject length lower bound = 5 1532 1533/ab\d{0}e/I 1534Capture group count = 0 1535First code unit = 'a' 1536Last code unit = 'e' 1537Subject length lower bound = 3 1538 1539/a?b?/I 1540Capture group count = 0 1541May match empty string 1542Subject length lower bound = 0 1543 a 1544 0: a 1545 b 1546 0: b 1547 ab 1548 0: ab 1549 \ 1550 0: 1551\= Expect no match 1552 \=notempty 1553No match 1554 1555/|-/I 1556Capture group count = 0 1557May match empty string 1558Subject length lower bound = 0 1559 abcd 1560 0: 1561 -abc 1562 0: 1563 ab-c\=notempty 1564 0: - 1565\= Expect no match 1566 abc\=notempty 1567No match 1568 1569/^.?abcd/I 1570Capture group count = 0 1571Compile options: <none> 1572Overall options: anchored 1573Last code unit = 'd' 1574Subject length lower bound = 4 1575 1576/\( # ( at start 1577 (?: # Non-capturing bracket 1578 (?>[^()]+) # Either a sequence of non-brackets (no backtracking) 1579 | # Or 1580 (?R) # Recurse - i.e. nested bracketed string 1581 )* # Zero or more contents 1582 \) # Closing ) 1583 /Ix 1584Capture group count = 0 1585Options: extended 1586First code unit = '(' 1587Last code unit = ')' 1588Subject length lower bound = 2 1589 (abcd) 1590 0: (abcd) 1591 (abcd)xyz 1592 0: (abcd) 1593 xyz(abcd) 1594 0: (abcd) 1595 (ab(xy)cd)pqr 1596 0: (ab(xy)cd) 1597 (ab(xycd)pqr 1598 0: (xycd) 1599 () abc () 1600 0: () 1601 12(abcde(fsh)xyz(foo(bar))lmno)89 1602 0: (abcde(fsh)xyz(foo(bar))lmno) 1603\= Expect no match 1604 abcd 1605No match 1606 abcd) 1607No match 1608 (abcd 1609No match 1610 1611/\( ( (?>[^()]+) | (?R) )* \) /Igx 1612Capture group count = 1 1613Options: extended 1614First code unit = '(' 1615Last code unit = ')' 1616Subject length lower bound = 2 1617 (ab(xy)cd)pqr 1618 0: (ab(xy)cd) 1619 1: cd 1620 1(abcd)(x(y)z)pqr 1621 0: (abcd) 1622 1: abcd 1623 0: (x(y)z) 1624 1: z 1625 1626/\( (?: (?>[^()]+) | (?R) ) \) /Ix 1627Capture group count = 0 1628Options: extended 1629First code unit = '(' 1630Last code unit = ')' 1631Subject length lower bound = 3 1632 (abcd) 1633 0: (abcd) 1634 (ab(xy)cd) 1635 0: (xy) 1636 (a(b(c)d)e) 1637 0: (c) 1638 ((ab)) 1639 0: ((ab)) 1640\= Expect no match 1641 () 1642No match 1643 1644/\( (?: (?>[^()]+) | (?R) )? \) /Ix 1645Capture group count = 0 1646Options: extended 1647First code unit = '(' 1648Last code unit = ')' 1649Subject length lower bound = 2 1650 () 1651 0: () 1652 12(abcde(fsh)xyz(foo(bar))lmno)89 1653 0: (fsh) 1654 1655/\( ( (?>[^()]+) | (?R) )* \) /Ix 1656Capture group count = 1 1657Options: extended 1658First code unit = '(' 1659Last code unit = ')' 1660Subject length lower bound = 2 1661 (ab(xy)cd) 1662 0: (ab(xy)cd) 1663 1: cd 1664 1665/\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix 1666Capture group count = 2 1667Options: extended 1668First code unit = '(' 1669Last code unit = ')' 1670Subject length lower bound = 2 1671 (ab(xy)cd) 1672 0: (ab(xy)cd) 1673 1: ab(xy)cd 1674 2: cd 1675 1676/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix 1677Capture group count = 3 1678Options: extended 1679First code unit = '(' 1680Last code unit = ')' 1681Subject length lower bound = 2 1682 (ab(xy)cd) 1683 0: (ab(xy)cd) 1684 1: <unset> 1685 2: ab(xy)cd 1686 3: cd 1687 (123ab(xy)cd) 1688 0: (123ab(xy)cd) 1689 1: 123 1690 2: ab(xy)cd 1691 3: cd 1692 1693/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix 1694Capture group count = 3 1695Options: extended 1696First code unit = '(' 1697Last code unit = ')' 1698Subject length lower bound = 2 1699 (ab(xy)cd) 1700 0: (ab(xy)cd) 1701 1: ab(xy)cd 1702 2: <unset> 1703 3: cd 1704 (123ab(xy)cd) 1705 0: (123ab(xy)cd) 1706 1: 123ab(xy)cd 1707 2: 123 1708 3: cd 1709 1710/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix 1711Capture group count = 11 1712Options: extended 1713First code unit = '(' 1714Last code unit = ')' 1715Subject length lower bound = 2 1716 (ab(xy)cd) 1717 0: (ab(xy)cd) 1718 1: ab(xy)cd 1719 2: ab(xy)cd 1720 3: ab(xy)cd 1721 4: ab(xy)cd 1722 5: ab(xy)cd 1723 6: ab(xy)cd 1724 7: ab(xy)cd 1725 8: ab(xy)cd 1726 9: ab(xy)cd 172710: ab(xy)cd 172811: cd 1729 1730/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix 1731Capture group count = 3 1732Options: extended 1733First code unit = '(' 1734Last code unit = ')' 1735Subject length lower bound = 2 1736 (abcd(xyz<p>qrs)123) 1737 0: (abcd(xyz<p>qrs)123) 1738 1: abcd(xyz<p>qrs)123 1739 2: 123 1740 1741/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix 1742Capture group count = 3 1743Options: extended 1744First code unit = '(' 1745Last code unit = ')' 1746Subject length lower bound = 2 1747 (ab(cd)ef) 1748 0: (ab(cd)ef) 1749 1: ab(cd)ef 1750 2: ef 1751 3: (cd) 1752 (ab(cd(ef)gh)ij) 1753 0: (ab(cd(ef)gh)ij) 1754 1: ab(cd(ef)gh)ij 1755 2: ij 1756 3: (cd(ef)gh) 1757 1758/^[[:alnum:]]/IB 1759------------------------------------------------------------------ 1760 Bra 1761 ^ 1762 [0-9A-Za-z] 1763 Ket 1764 End 1765------------------------------------------------------------------ 1766Capture group count = 0 1767Compile options: <none> 1768Overall options: anchored 1769Starting 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 1770 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 1771Subject length lower bound = 1 1772 1773/^[[:^alnum:]]/IB 1774------------------------------------------------------------------ 1775 Bra 1776 ^ 1777 [\x00-/:-@[-`{-\xff] (neg) 1778 Ket 1779 End 1780------------------------------------------------------------------ 1781Capture group count = 0 1782Compile options: <none> 1783Overall options: anchored 1784Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 1785 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 1786 \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = > 1787 ? @ [ \ ] ^ _ ` { | } ~ \x7f \x80 \x81 \x82 \x83 \x84 \x85 \x86 \x87 \x88 1788 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92 \x93 \x94 \x95 \x96 \x97 1789 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 1790 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 1791 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf \xc0 \xc1 \xc2 \xc3 \xc4 1792 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3 1793 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \xe0 \xe1 \xe2 1794 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \xf0 \xf1 1795 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd \xfe \xff 1796Subject length lower bound = 1 1797 1798/^[[:alpha:]]/IB 1799------------------------------------------------------------------ 1800 Bra 1801 ^ 1802 [A-Za-z] 1803 Ket 1804 End 1805------------------------------------------------------------------ 1806Capture group count = 0 1807Compile options: <none> 1808Overall options: anchored 1809Starting 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 1810 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 1811Subject length lower bound = 1 1812 1813/^[[:^alpha:]]/IB 1814------------------------------------------------------------------ 1815 Bra 1816 ^ 1817 [\x00-@[-`{-\xff] (neg) 1818 Ket 1819 End 1820------------------------------------------------------------------ 1821Capture group count = 0 1822Compile options: <none> 1823Overall options: anchored 1824Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 1825 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 1826 \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 1827 5 6 7 8 9 : ; < = > ? @ [ \ ] ^ _ ` { | } ~ \x7f \x80 \x81 \x82 \x83 \x84 1828 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92 \x93 1829 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1 \xa2 1830 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0 \xb1 1831 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf \xc0 1832 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf 1833 \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde 1834 \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed 1835 \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc 1836 \xfd \xfe \xff 1837Subject length lower bound = 1 1838 1839/[_[:alpha:]]/I 1840Capture group count = 0 1841Starting 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 1842 _ 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 1843Subject length lower bound = 1 1844 1845/^[[:ascii:]]/IB 1846------------------------------------------------------------------ 1847 Bra 1848 ^ 1849 [\x00-\x7f] 1850 Ket 1851 End 1852------------------------------------------------------------------ 1853Capture group count = 0 1854Compile options: <none> 1855Overall options: anchored 1856Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 1857 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 1858 \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 1859 5 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 1860 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 { | } ~ 1861 \x7f 1862Subject length lower bound = 1 1863 1864/^[[:^ascii:]]/IB 1865------------------------------------------------------------------ 1866 Bra 1867 ^ 1868 [\x80-\xff] (neg) 1869 Ket 1870 End 1871------------------------------------------------------------------ 1872Capture group count = 0 1873Compile options: <none> 1874Overall options: anchored 1875Starting code units: \x80 \x81 \x82 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a 1876 \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 1877 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 1878 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 1879 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 1880 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 1881 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 1882 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \xf0 \xf1 \xf2 \xf3 1883 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd \xfe \xff 1884Subject length lower bound = 1 1885 1886/^[[:blank:]]/IB 1887------------------------------------------------------------------ 1888 Bra 1889 ^ 1890 [\x09 ] 1891 Ket 1892 End 1893------------------------------------------------------------------ 1894Capture group count = 0 1895Compile options: <none> 1896Overall options: anchored 1897Starting code units: \x09 \x20 1898Subject length lower bound = 1 1899 1900/^[[:^blank:]]/IB 1901------------------------------------------------------------------ 1902 Bra 1903 ^ 1904 [\x00-\x08\x0a-\x1f!-\xff] (neg) 1905 Ket 1906 End 1907------------------------------------------------------------------ 1908Capture group count = 0 1909Compile options: <none> 1910Overall options: anchored 1911Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0a \x0b 1912 \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a 1913 \x1b \x1c \x1d \x1e \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 1914 : ; < = > ? @ 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 [ \ ] ^ 1915 _ ` 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 \x80 1916 \x81 \x82 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f 1917 \x90 \x91 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e 1918 \x9f \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad 1919 \xae \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc 1920 \xbd \xbe \xbf \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb 1921 \xcc \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda 1922 \xdb \xdc \xdd \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 1923 \xea \xeb \xec \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 1924 \xf9 \xfa \xfb \xfc \xfd \xfe \xff 1925Subject length lower bound = 1 1926 1927/[\n\x0b\x0c\x0d[:blank:]]/I 1928Capture group count = 0 1929Contains explicit CR or LF match 1930Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 1931Subject length lower bound = 1 1932 1933/^[[:cntrl:]]/IB 1934------------------------------------------------------------------ 1935 Bra 1936 ^ 1937 [\x00-\x1f\x7f] 1938 Ket 1939 End 1940------------------------------------------------------------------ 1941Capture group count = 0 1942Compile options: <none> 1943Overall options: anchored 1944Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 1945 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 1946 \x1a \x1b \x1c \x1d \x1e \x1f \x7f 1947Subject length lower bound = 1 1948 1949/^[[:digit:]]/IB 1950------------------------------------------------------------------ 1951 Bra 1952 ^ 1953 [0-9] 1954 Ket 1955 End 1956------------------------------------------------------------------ 1957Capture group count = 0 1958Compile options: <none> 1959Overall options: anchored 1960Starting code units: 0 1 2 3 4 5 6 7 8 9 1961Subject length lower bound = 1 1962 1963/^[[:graph:]]/IB 1964------------------------------------------------------------------ 1965 Bra 1966 ^ 1967 [!-~] 1968 Ket 1969 End 1970------------------------------------------------------------------ 1971Capture group count = 0 1972Compile options: <none> 1973Overall options: anchored 1974Starting code units: ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : 1975 ; < = > ? @ 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 [ \ ] ^ _ 1976 ` 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 { | } ~ 1977Subject length lower bound = 1 1978 1979/^[[:lower:]]/IB 1980------------------------------------------------------------------ 1981 Bra 1982 ^ 1983 [a-z] 1984 Ket 1985 End 1986------------------------------------------------------------------ 1987Capture group count = 0 1988Compile options: <none> 1989Overall options: anchored 1990Starting 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 1991Subject length lower bound = 1 1992 1993/^[[:print:]]/IB 1994------------------------------------------------------------------ 1995 Bra 1996 ^ 1997 [ -~] 1998 Ket 1999 End 2000------------------------------------------------------------------ 2001Capture group count = 0 2002Compile options: <none> 2003Overall options: anchored 2004Starting code units: \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 2005 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 [ \ ] 2006 ^ _ ` 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 { | } ~ 2007Subject length lower bound = 1 2008 2009/^[[:punct:]]/IB 2010------------------------------------------------------------------ 2011 Bra 2012 ^ 2013 [!-/:-@[-`{-~] 2014 Ket 2015 End 2016------------------------------------------------------------------ 2017Capture group count = 0 2018Compile options: <none> 2019Overall options: anchored 2020Starting code units: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ 2021 _ ` { | } ~ 2022Subject length lower bound = 1 2023 2024/^[[:space:]]/IB 2025------------------------------------------------------------------ 2026 Bra 2027 ^ 2028 [\x09-\x0d ] 2029 Ket 2030 End 2031------------------------------------------------------------------ 2032Capture group count = 0 2033Compile options: <none> 2034Overall options: anchored 2035Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 2036Subject length lower bound = 1 2037 2038/^[[:upper:]]/IB 2039------------------------------------------------------------------ 2040 Bra 2041 ^ 2042 [A-Z] 2043 Ket 2044 End 2045------------------------------------------------------------------ 2046Capture group count = 0 2047Compile options: <none> 2048Overall options: anchored 2049Starting 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 2050Subject length lower bound = 1 2051 2052/^[[:xdigit:]]/IB 2053------------------------------------------------------------------ 2054 Bra 2055 ^ 2056 [0-9A-Fa-f] 2057 Ket 2058 End 2059------------------------------------------------------------------ 2060Capture group count = 0 2061Compile options: <none> 2062Overall options: anchored 2063Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f 2064Subject length lower bound = 1 2065 2066/^[[:word:]]/IB 2067------------------------------------------------------------------ 2068 Bra 2069 ^ 2070 [0-9A-Z_a-z] 2071 Ket 2072 End 2073------------------------------------------------------------------ 2074Capture group count = 0 2075Compile options: <none> 2076Overall options: anchored 2077Starting 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 2078 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 2079Subject length lower bound = 1 2080 2081/^[[:^cntrl:]]/IB 2082------------------------------------------------------------------ 2083 Bra 2084 ^ 2085 [ -~\x80-\xff] (neg) 2086 Ket 2087 End 2088------------------------------------------------------------------ 2089Capture group count = 0 2090Compile options: <none> 2091Overall options: anchored 2092Starting code units: \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 2093 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 [ \ ] 2094 ^ _ ` 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 { | } ~ \x80 \x81 2095 \x82 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 2096 \x91 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f 2097 \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae 2098 \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd 2099 \xbe \xbf \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc 2100 \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb 2101 \xdc \xdd \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea 2102 \xeb \xec \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 2103 \xfa \xfb \xfc \xfd \xfe \xff 2104Subject length lower bound = 1 2105 2106/^[12[:^digit:]]/IB 2107------------------------------------------------------------------ 2108 Bra 2109 ^ 2110 [\x00-/12:-\xff] (neg) 2111 Ket 2112 End 2113------------------------------------------------------------------ 2114Capture group count = 0 2115Compile options: <none> 2116Overall options: anchored 2117Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 2118 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 2119 \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 1 2 : ; < 2120 = > ? @ 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 [ \ ] ^ _ ` a 2121 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 \x80 \x81 \x82 2122 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 2123 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 2124 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf 2125 \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe 2126 \xbf \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd 2127 \xce \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc 2128 \xdd \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb 2129 \xec \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa 2130 \xfb \xfc \xfd \xfe \xff 2131Subject length lower bound = 1 2132 2133/^[[:^blank:]]/IB 2134------------------------------------------------------------------ 2135 Bra 2136 ^ 2137 [\x00-\x08\x0a-\x1f!-\xff] (neg) 2138 Ket 2139 End 2140------------------------------------------------------------------ 2141Capture group count = 0 2142Compile options: <none> 2143Overall options: anchored 2144Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0a \x0b 2145 \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a 2146 \x1b \x1c \x1d \x1e \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 2147 : ; < = > ? @ 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 [ \ ] ^ 2148 _ ` 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 \x80 2149 \x81 \x82 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f 2150 \x90 \x91 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e 2151 \x9f \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad 2152 \xae \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc 2153 \xbd \xbe \xbf \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb 2154 \xcc \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda 2155 \xdb \xdc \xdd \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 2156 \xea \xeb \xec \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 2157 \xf9 \xfa \xfb \xfc \xfd \xfe \xff 2158Subject length lower bound = 1 2159 2160/[01[:alpha:]%]/IB 2161------------------------------------------------------------------ 2162 Bra 2163 [%01A-Za-z] 2164 Ket 2165 End 2166------------------------------------------------------------------ 2167Capture group count = 0 2168Starting 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 2169 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 2170Subject length lower bound = 1 2171 2172/[[.ch.]]/I 2173Failed: error 113 at offset 1: POSIX collating elements are not supported 2174 2175/[[=ch=]]/I 2176Failed: error 113 at offset 1: POSIX collating elements are not supported 2177 2178/[[:rhubarb:]]/I 2179Failed: error 130 at offset 3: unknown POSIX class name 2180 2181/[[:upper:]]/Ii 2182Capture group count = 0 2183Options: caseless 2184Starting 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 2185 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 2186Subject length lower bound = 1 2187 A 2188 0: A 2189 a 2190 0: a 2191 2192/[[:lower:]]/Ii 2193Capture group count = 0 2194Options: caseless 2195Starting 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 2196 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 2197Subject length lower bound = 1 2198 A 2199 0: A 2200 a 2201 0: a 2202 2203/((?-i)[[:lower:]])[[:lower:]]/Ii 2204Capture group count = 1 2205Options: caseless 2206Starting 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 2207Subject length lower bound = 2 2208 ab 2209 0: ab 2210 1: a 2211 aB 2212 0: aB 2213 1: a 2214\= Expect no match 2215 Ab 2216No match 2217 AB 2218No match 2219 2220/[\200-\110]/I 2221Failed: error 108 at offset 9: range out of order in character class 2222 2223/^(?(0)f|b)oo/I 2224Failed: error 115 at offset 5: reference to non-existent subpattern 2225 2226# This one's here because of the large output vector needed 2227 2228/(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\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 2229Capture group count = 271 2230Max back reference = 270 2231Starting code units: 0 1 2 3 4 5 6 7 8 9 2232Subject length lower bound = 1 2233 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 2234 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 2235 1: 1 2236 2: 2 2237 3: 3 2238 4: 4 2239 5: 5 2240 6: 6 2241 7: 7 2242 8: 8 2243 9: 9 224410: 10 224511: 11 224612: 12 224713: 13 224814: 14 224915: 15 225016: 16 225117: 17 225218: 18 225319: 19 225420: 20 225521: 21 225622: 22 225723: 23 225824: 24 225925: 25 226026: 26 226127: 27 226228: 28 226329: 29 226430: 30 226531: 31 226632: 32 226733: 33 226834: 34 226935: 35 227036: 36 227137: 37 227238: 38 227339: 39 227440: 40 227541: 41 227642: 42 227743: 43 227844: 44 227945: 45 228046: 46 228147: 47 228248: 48 228349: 49 228450: 50 228551: 51 228652: 52 228753: 53 228854: 54 228955: 55 229056: 56 229157: 57 229258: 58 229359: 59 229460: 60 229561: 61 229662: 62 229763: 63 229864: 64 229965: 65 230066: 66 230167: 67 230268: 68 230369: 69 230470: 70 230571: 71 230672: 72 230773: 73 230874: 74 230975: 75 231076: 76 231177: 77 231278: 78 231379: 79 231480: 80 231581: 81 231682: 82 231783: 83 231884: 84 231985: 85 232086: 86 232187: 87 232288: 88 232389: 89 232490: 90 232591: 91 232692: 92 232793: 93 232894: 94 232995: 95 233096: 96 233197: 97 233298: 98 233399: 99 2334100: 100 2335101: 101 2336102: 102 2337103: 103 2338104: 104 2339105: 105 2340106: 106 2341107: 107 2342108: 108 2343109: 109 2344110: 110 2345111: 111 2346112: 112 2347113: 113 2348114: 114 2349115: 115 2350116: 116 2351117: 117 2352118: 118 2353119: 119 2354120: 120 2355121: 121 2356122: 122 2357123: 123 2358124: 124 2359125: 125 2360126: 126 2361127: 127 2362128: 128 2363129: 129 2364130: 130 2365131: 131 2366132: 132 2367133: 133 2368134: 134 2369135: 135 2370136: 136 2371137: 137 2372138: 138 2373139: 139 2374140: 140 2375141: 141 2376142: 142 2377143: 143 2378144: 144 2379145: 145 2380146: 146 2381147: 147 2382148: 148 2383149: 149 2384150: 150 2385151: 151 2386152: 152 2387153: 153 2388154: 154 2389155: 155 2390156: 156 2391157: 157 2392158: 158 2393159: 159 2394160: 160 2395161: 161 2396162: 162 2397163: 163 2398164: 164 2399165: 165 2400166: 166 2401167: 167 2402168: 168 2403169: 169 2404170: 170 2405171: 171 2406172: 172 2407173: 173 2408174: 174 2409175: 175 2410176: 176 2411177: 177 2412178: 178 2413179: 179 2414180: 180 2415181: 181 2416182: 182 2417183: 183 2418184: 184 2419185: 185 2420186: 186 2421187: 187 2422188: 188 2423189: 189 2424190: 190 2425191: 191 2426192: 192 2427193: 193 2428194: 194 2429195: 195 2430196: 196 2431197: 197 2432198: 198 2433199: 199 2434200: 200 2435201: 201 2436202: 202 2437203: 203 2438204: 204 2439205: 205 2440206: 206 2441207: 207 2442208: 208 2443209: 209 2444210: 210 2445211: 211 2446212: 212 2447213: 213 2448214: 214 2449215: 215 2450216: 216 2451217: 217 2452218: 218 2453219: 219 2454220: 220 2455221: 221 2456222: 222 2457223: 223 2458224: 224 2459225: 225 2460226: 226 2461227: 227 2462228: 228 2463229: 229 2464230: 230 2465231: 231 2466232: 232 2467233: 233 2468234: 234 2469235: 235 2470236: 236 2471237: 237 2472238: 238 2473239: 239 2474240: 240 2475241: 241 2476242: 242 2477243: 243 2478244: 244 2479245: 245 2480246: 246 2481247: 247 2482248: 248 2483249: 249 2484250: 250 2485251: 251 2486252: 252 2487253: 253 2488254: 254 2489255: 255 2490256: 256 2491257: 257 2492258: 258 2493259: 259 2494260: 260 2495261: 261 2496262: 262 2497263: 263 2498264: 264 2499265: 265 2500266: 266 2501267: 267 2502268: 268 2503269: 269 2504270: ABC 2505271: ABC 2506 2507# This one's here because Perl does this differently and PCRE2 can't at present 2508 2509/(main(O)?)+/I 2510Capture group count = 2 2511First code unit = 'm' 2512Last code unit = 'n' 2513Subject length lower bound = 4 2514 mainmain 2515 0: mainmain 2516 1: main 2517 mainOmain 2518 0: mainOmain 2519 1: main 2520 2: O 2521 2522# These are all cases where Perl does it differently (nested captures) 2523 2524/^(a(b)?)+$/I 2525Capture group count = 2 2526Compile options: <none> 2527Overall options: anchored 2528First code unit = 'a' 2529Subject length lower bound = 1 2530 aba 2531 0: aba 2532 1: a 2533 2: b 2534 2535/^(aa(bb)?)+$/I 2536Capture group count = 2 2537Compile options: <none> 2538Overall options: anchored 2539First code unit = 'a' 2540Subject length lower bound = 2 2541 aabbaa 2542 0: aabbaa 2543 1: aa 2544 2: bb 2545 2546/^(aa|aa(bb))+$/I 2547Capture group count = 2 2548Compile options: <none> 2549Overall options: anchored 2550First code unit = 'a' 2551Subject length lower bound = 2 2552 aabbaa 2553 0: aabbaa 2554 1: aa 2555 2: bb 2556 2557/^(aa(bb)??)+$/I 2558Capture group count = 2 2559Compile options: <none> 2560Overall options: anchored 2561First code unit = 'a' 2562Subject length lower bound = 2 2563 aabbaa 2564 0: aabbaa 2565 1: aa 2566 2: bb 2567 2568/^(?:aa(bb)?)+$/I 2569Capture group count = 1 2570Compile options: <none> 2571Overall options: anchored 2572First code unit = 'a' 2573Subject length lower bound = 2 2574 aabbaa 2575 0: aabbaa 2576 1: bb 2577 2578/^(aa(b(b))?)+$/I 2579Capture group count = 3 2580Compile options: <none> 2581Overall options: anchored 2582First code unit = 'a' 2583Subject length lower bound = 2 2584 aabbaa 2585 0: aabbaa 2586 1: aa 2587 2: bb 2588 3: b 2589 2590/^(?:aa(b(b))?)+$/I 2591Capture group count = 2 2592Compile options: <none> 2593Overall options: anchored 2594First code unit = 'a' 2595Subject length lower bound = 2 2596 aabbaa 2597 0: aabbaa 2598 1: bb 2599 2: b 2600 2601/^(?:aa(b(?:b))?)+$/I 2602Capture group count = 1 2603Compile options: <none> 2604Overall options: anchored 2605First code unit = 'a' 2606Subject length lower bound = 2 2607 aabbaa 2608 0: aabbaa 2609 1: bb 2610 2611/^(?:aa(bb(?:b))?)+$/I 2612Capture group count = 1 2613Compile options: <none> 2614Overall options: anchored 2615First code unit = 'a' 2616Subject length lower bound = 2 2617 aabbbaa 2618 0: aabbbaa 2619 1: bbb 2620 2621/^(?:aa(b(?:bb))?)+$/I 2622Capture group count = 1 2623Compile options: <none> 2624Overall options: anchored 2625First code unit = 'a' 2626Subject length lower bound = 2 2627 aabbbaa 2628 0: aabbbaa 2629 1: bbb 2630 2631/^(?:aa(?:b(b))?)+$/I 2632Capture group count = 1 2633Compile options: <none> 2634Overall options: anchored 2635First code unit = 'a' 2636Subject length lower bound = 2 2637 aabbaa 2638 0: aabbaa 2639 1: b 2640 2641/^(?:aa(?:b(bb))?)+$/I 2642Capture group count = 1 2643Compile options: <none> 2644Overall options: anchored 2645First code unit = 'a' 2646Subject length lower bound = 2 2647 aabbbaa 2648 0: aabbbaa 2649 1: bb 2650 2651/^(aa(b(bb))?)+$/I 2652Capture group count = 3 2653Compile options: <none> 2654Overall options: anchored 2655First code unit = 'a' 2656Subject length lower bound = 2 2657 aabbbaa 2658 0: aabbbaa 2659 1: aa 2660 2: bbb 2661 3: bb 2662 2663/^(aa(bb(bb))?)+$/I 2664Capture group count = 3 2665Compile options: <none> 2666Overall options: anchored 2667First code unit = 'a' 2668Subject length lower bound = 2 2669 aabbbbaa 2670 0: aabbbbaa 2671 1: aa 2672 2: bbbb 2673 3: bb 2674 2675# ---------------- 2676 2677/#/IBx 2678------------------------------------------------------------------ 2679 Bra 2680 Ket 2681 End 2682------------------------------------------------------------------ 2683Capture group count = 0 2684May match empty string 2685Options: extended 2686Subject length lower bound = 0 2687 2688/a#/IBx 2689------------------------------------------------------------------ 2690 Bra 2691 a 2692 Ket 2693 End 2694------------------------------------------------------------------ 2695Capture group count = 0 2696Options: extended 2697First code unit = 'a' 2698Subject length lower bound = 1 2699 2700/[\s]/IB 2701------------------------------------------------------------------ 2702 Bra 2703 [\x09-\x0d ] 2704 Ket 2705 End 2706------------------------------------------------------------------ 2707Capture group count = 0 2708Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 2709Subject length lower bound = 1 2710 2711/[\S]/IB 2712------------------------------------------------------------------ 2713 Bra 2714 [\x00-\x08\x0e-\x1f!-\xff] (neg) 2715 Ket 2716 End 2717------------------------------------------------------------------ 2718Capture group count = 0 2719Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0e \x0f 2720 \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \x1b \x1c \x1d \x1e 2721 \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C 2722 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 2723 i j k l m n o p q r s t u v w x y z { | } ~ \x7f \x80 \x81 \x82 \x83 \x84 2724 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92 \x93 2725 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1 \xa2 2726 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0 \xb1 2727 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf \xc0 2728 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf 2729 \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde 2730 \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed 2731 \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc 2732 \xfd \xfe \xff 2733Subject length lower bound = 1 2734 2735/a(?i)b/IB 2736------------------------------------------------------------------ 2737 Bra 2738 a 2739 /i b 2740 Ket 2741 End 2742------------------------------------------------------------------ 2743Capture group count = 0 2744First code unit = 'a' 2745Last code unit = 'b' (caseless) 2746Subject length lower bound = 2 2747 ab 2748 0: ab 2749 aB 2750 0: aB 2751\= Expect no match 2752 AB 2753No match 2754 2755/(a(?i)b)/IB 2756------------------------------------------------------------------ 2757 Bra 2758 CBra 1 2759 a 2760 /i b 2761 Ket 2762 Ket 2763 End 2764------------------------------------------------------------------ 2765Capture group count = 1 2766First code unit = 'a' 2767Last code unit = 'b' (caseless) 2768Subject length lower bound = 2 2769 ab 2770 0: ab 2771 1: ab 2772 aB 2773 0: aB 2774 1: aB 2775\= Expect no match 2776 AB 2777No match 2778 2779/ (?i)abc/IBx 2780------------------------------------------------------------------ 2781 Bra 2782 /i abc 2783 Ket 2784 End 2785------------------------------------------------------------------ 2786Capture group count = 0 2787Options: extended 2788First code unit = 'a' (caseless) 2789Last code unit = 'c' (caseless) 2790Subject length lower bound = 3 2791 2792/#this is a comment 2793 (?i)abc/IBx 2794------------------------------------------------------------------ 2795 Bra 2796 /i abc 2797 Ket 2798 End 2799------------------------------------------------------------------ 2800Capture group count = 0 2801Options: extended 2802First code unit = 'a' (caseless) 2803Last code unit = 'c' (caseless) 2804Subject length lower bound = 3 2805 2806/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/IB 2807------------------------------------------------------------------ 2808 Bra 2809 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 2810 Ket 2811 End 2812------------------------------------------------------------------ 2813Capture group count = 0 2814First code unit = '1' 2815Last code unit = '0' 2816Subject length lower bound = 300 2817 2818/\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/IB 2819------------------------------------------------------------------ 2820 Bra 2821 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 2822 Ket 2823 End 2824------------------------------------------------------------------ 2825Capture group count = 0 2826First code unit = '1' 2827Last code unit = '0' 2828Subject length lower bound = 300 2829 2830/\Q\E/IB 2831------------------------------------------------------------------ 2832 Bra 2833 Ket 2834 End 2835------------------------------------------------------------------ 2836Capture group count = 0 2837May match empty string 2838Subject length lower bound = 0 2839 \ 2840 0: 2841 2842/\Q\Ex/IB 2843------------------------------------------------------------------ 2844 Bra 2845 x 2846 Ket 2847 End 2848------------------------------------------------------------------ 2849Capture group count = 0 2850First code unit = 'x' 2851Subject length lower bound = 1 2852 2853/ \Q\E/IB 2854------------------------------------------------------------------ 2855 Bra 2856 2857 Ket 2858 End 2859------------------------------------------------------------------ 2860Capture group count = 0 2861First code unit = ' ' 2862Subject length lower bound = 1 2863 2864/a\Q\E/IB 2865------------------------------------------------------------------ 2866 Bra 2867 a 2868 Ket 2869 End 2870------------------------------------------------------------------ 2871Capture group count = 0 2872First code unit = 'a' 2873Subject length lower bound = 1 2874 abc 2875 0: a 2876 bca 2877 0: a 2878 bac 2879 0: a 2880 2881/a\Q\Eb/IB 2882------------------------------------------------------------------ 2883 Bra 2884 ab 2885 Ket 2886 End 2887------------------------------------------------------------------ 2888Capture group count = 0 2889First code unit = 'a' 2890Last code unit = 'b' 2891Subject length lower bound = 2 2892 abc 2893 0: ab 2894 2895/\Q\Eabc/IB 2896------------------------------------------------------------------ 2897 Bra 2898 abc 2899 Ket 2900 End 2901------------------------------------------------------------------ 2902Capture group count = 0 2903First code unit = 'a' 2904Last code unit = 'c' 2905Subject length lower bound = 3 2906 2907/x*+\w/IB 2908------------------------------------------------------------------ 2909 Bra 2910 x*+ 2911 \w 2912 Ket 2913 End 2914------------------------------------------------------------------ 2915Capture group count = 0 2916Starting 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 2917 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 2918Subject length lower bound = 1 2919\= Expect no match 2920 xxxxx 2921No match 2922 2923/x?+/IB 2924------------------------------------------------------------------ 2925 Bra 2926 x?+ 2927 Ket 2928 End 2929------------------------------------------------------------------ 2930Capture group count = 0 2931May match empty string 2932Subject length lower bound = 0 2933 2934/x++/IB 2935------------------------------------------------------------------ 2936 Bra 2937 x++ 2938 Ket 2939 End 2940------------------------------------------------------------------ 2941Capture group count = 0 2942First code unit = 'x' 2943Subject length lower bound = 1 2944 2945/x{1,3}+/B,no_auto_possess 2946------------------------------------------------------------------ 2947 Bra 2948 x 2949 x{0,2}+ 2950 Ket 2951 End 2952------------------------------------------------------------------ 2953 2954/x{1,3}+/Bi,no_auto_possess 2955------------------------------------------------------------------ 2956 Bra 2957 /i x 2958 /i x{0,2}+ 2959 Ket 2960 End 2961------------------------------------------------------------------ 2962 2963/[^x]{1,3}+/B,no_auto_possess 2964------------------------------------------------------------------ 2965 Bra 2966 [^x] 2967 [^x]{0,2}+ 2968 Ket 2969 End 2970------------------------------------------------------------------ 2971 2972/[^x]{1,3}+/Bi,no_auto_possess 2973------------------------------------------------------------------ 2974 Bra 2975 /i [^x] 2976 /i [^x]{0,2}+ 2977 Ket 2978 End 2979------------------------------------------------------------------ 2980 2981/(x)*+/IB 2982------------------------------------------------------------------ 2983 Bra 2984 Braposzero 2985 CBraPos 1 2986 x 2987 KetRpos 2988 Ket 2989 End 2990------------------------------------------------------------------ 2991Capture group count = 1 2992May match empty string 2993Subject length lower bound = 0 2994 2995/^(\w++|\s++)*$/I 2996Capture group count = 1 2997May match empty string 2998Compile options: <none> 2999Overall options: anchored 3000Subject length lower bound = 0 3001 now is the time for all good men to come to the aid of the party 3002 0: now is the time for all good men to come to the aid of the party 3003 1: party 3004\= Expect no match 3005 this is not a line with only words and spaces! 3006No match 3007 3008/(\d++)(\w)/I 3009Capture group count = 2 3010Starting code units: 0 1 2 3 4 5 6 7 8 9 3011Subject length lower bound = 2 3012 12345a 3013 0: 12345a 3014 1: 12345 3015 2: a 3016\= Expect no match 3017 12345+ 3018No match 3019 3020/a++b/I 3021Capture group count = 0 3022First code unit = 'a' 3023Last code unit = 'b' 3024Subject length lower bound = 2 3025 aaab 3026 0: aaab 3027 3028/(a++b)/I 3029Capture group count = 1 3030First code unit = 'a' 3031Last code unit = 'b' 3032Subject length lower bound = 2 3033 aaab 3034 0: aaab 3035 1: aaab 3036 3037/(a++)b/I 3038Capture group count = 1 3039First code unit = 'a' 3040Last code unit = 'b' 3041Subject length lower bound = 2 3042 aaab 3043 0: aaab 3044 1: aaa 3045 3046/([^()]++|\([^()]*\))+/I 3047Capture group count = 1 3048Starting code units: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a 3049 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 3050 \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( * + , - . / 0 1 2 3 4 5 3051 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 3052 [ \ ] ^ _ ` 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 3053 \x80 \x81 \x82 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e 3054 \x8f \x90 \x91 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d 3055 \x9e \x9f \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac 3056 \xad \xae \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb 3057 \xbc \xbd \xbe \xbf \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca 3058 \xcb \xcc \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 3059 \xda \xdb \xdc \xdd \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 3060 \xe9 \xea \xeb \xec \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 3061 \xf8 \xf9 \xfa \xfb \xfc \xfd \xfe \xff 3062Subject length lower bound = 1 3063 ((abc(ade)ufh()()x 3064 0: abc(ade)ufh()()x 3065 1: x 3066 3067/\(([^()]++|\([^()]+\))+\)/I 3068Capture group count = 1 3069First code unit = '(' 3070Last code unit = ')' 3071Subject length lower bound = 3 3072 (abc) 3073 0: (abc) 3074 1: abc 3075 (abc(def)xyz) 3076 0: (abc(def)xyz) 3077 1: xyz 3078\= Expect no match 3079 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3080No match 3081 3082/(abc){1,3}+/IB 3083------------------------------------------------------------------ 3084 Bra 3085 Once 3086 CBra 1 3087 abc 3088 Ket 3089 Brazero 3090 Bra 3091 CBra 1 3092 abc 3093 Ket 3094 Brazero 3095 CBra 1 3096 abc 3097 Ket 3098 Ket 3099 Ket 3100 Ket 3101 End 3102------------------------------------------------------------------ 3103Capture group count = 1 3104First code unit = 'a' 3105Last code unit = 'c' 3106Subject length lower bound = 3 3107 3108/a+?+/I 3109Failed: error 109 at offset 3: quantifier does not follow a repeatable item 3110 3111/a{2,3}?+b/I 3112Failed: error 109 at offset 7: quantifier does not follow a repeatable item 3113 3114/(?U)a+?+/I 3115Failed: error 109 at offset 7: quantifier does not follow a repeatable item 3116 3117/a{2,3}?+b/I,ungreedy 3118Failed: error 109 at offset 7: quantifier does not follow a repeatable item 3119 3120/x(?U)a++b/IB 3121------------------------------------------------------------------ 3122 Bra 3123 x 3124 a++ 3125 b 3126 Ket 3127 End 3128------------------------------------------------------------------ 3129Capture group count = 0 3130First code unit = 'x' 3131Last code unit = 'b' 3132Subject length lower bound = 3 3133 xaaaab 3134 0: xaaaab 3135 3136/(?U)xa++b/IB 3137------------------------------------------------------------------ 3138 Bra 3139 x 3140 a++ 3141 b 3142 Ket 3143 End 3144------------------------------------------------------------------ 3145Capture group count = 0 3146First code unit = 'x' 3147Last code unit = 'b' 3148Subject length lower bound = 3 3149 xaaaab 3150 0: xaaaab 3151 3152/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/IB 3153------------------------------------------------------------------ 3154 Bra 3155 ^ 3156 CBra 1 3157 CBra 2 3158 a+ 3159 Ket 3160 CBra 3 3161 [ab]+? 3162 Ket 3163 CBra 4 3164 [bc]+ 3165 Ket 3166 CBra 5 3167 \w*+ 3168 Ket 3169 Ket 3170 Ket 3171 End 3172------------------------------------------------------------------ 3173Capture group count = 5 3174Compile options: <none> 3175Overall options: anchored 3176First code unit = 'a' 3177Subject length lower bound = 3 3178 3179/^x(?U)a+b/IB 3180------------------------------------------------------------------ 3181 Bra 3182 ^ 3183 x 3184 a++ 3185 b 3186 Ket 3187 End 3188------------------------------------------------------------------ 3189Capture group count = 0 3190Compile options: <none> 3191Overall options: anchored 3192First code unit = 'x' 3193Last code unit = 'b' 3194Subject length lower bound = 3 3195 3196/^x(?U)(a+)b/IB 3197------------------------------------------------------------------ 3198 Bra 3199 ^ 3200 x 3201 CBra 1 3202 a+? 3203 Ket 3204 b 3205 Ket 3206 End 3207------------------------------------------------------------------ 3208Capture group count = 1 3209Compile options: <none> 3210Overall options: anchored 3211First code unit = 'x' 3212Last code unit = 'b' 3213Subject length lower bound = 3 3214 3215/[.x.]/I 3216Failed: error 113 at offset 0: POSIX collating elements are not supported 3217 3218/[=x=]/I 3219Failed: error 113 at offset 0: POSIX collating elements are not supported 3220 3221/[:x:]/I 3222Failed: error 112 at offset 0: POSIX named classes are supported only within a class 3223 3224/\F/I 3225Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u 3226 3227/\l/I 3228Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u 3229 3230/\L/I 3231Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u 3232 3233/\N{name}/I 3234Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u 3235 3236/\u/I 3237Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u 3238 3239/\U/I 3240Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u 3241 3242/\N{4}/ 3243 abcdefg 3244 0: abcd 3245 3246/\N{,}/ 3247Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u 3248 3249/\N{25,ab}/ 3250Failed: error 137 at offset 2: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u 3251 3252/a{1,3}b/ungreedy 3253 ab 3254 0: ab 3255 3256/[/I 3257Failed: error 106 at offset 1: missing terminating ] for character class 3258 3259/[a-/I 3260Failed: error 106 at offset 3: missing terminating ] for character class 3261 3262/[[:space:]/I 3263Failed: error 106 at offset 10: missing terminating ] for character class 3264 3265/[\s]/IB 3266------------------------------------------------------------------ 3267 Bra 3268 [\x09-\x0d ] 3269 Ket 3270 End 3271------------------------------------------------------------------ 3272Capture group count = 0 3273Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 3274Subject length lower bound = 1 3275 3276/[[:space:]]/IB 3277------------------------------------------------------------------ 3278 Bra 3279 [\x09-\x0d ] 3280 Ket 3281 End 3282------------------------------------------------------------------ 3283Capture group count = 0 3284Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 3285Subject length lower bound = 1 3286 3287/[[:space:]abcde]/IB 3288------------------------------------------------------------------ 3289 Bra 3290 [\x09-\x0d a-e] 3291 Ket 3292 End 3293------------------------------------------------------------------ 3294Capture group count = 0 3295Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 a b c d e 3296Subject length lower bound = 1 3297 3298/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix 3299Capture group count = 0 3300Options: extended 3301First code unit = '<' 3302Last code unit = '>' 3303Subject length lower bound = 2 3304 <> 3305 0: <> 3306 <abcd> 3307 0: <abcd> 3308 <abc <123> hij> 3309 0: <abc <123> hij> 3310 <abc <def> hij> 3311 0: <def> 3312 <abc<>def> 3313 0: <abc<>def> 3314 <abc<> 3315 0: <> 3316\= Expect no match 3317 <abc 3318No match 3319 3320/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 3321------------------------------------------------------------------ 3322 Bra 3323 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 3324 \b 3325 Ket 3326 End 3327------------------------------------------------------------------ 3328Capture group count = 0 3329Max lookbehind = 1 3330First code unit = '8' 3331Last code unit = 'X' 3332Subject length lower bound = 409 3333 3334/\$\<\.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 3335------------------------------------------------------------------ 3336 Bra 3337 $<.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 3338 \b 3339 Ket 3340 End 3341------------------------------------------------------------------ 3342Capture group count = 0 3343Max lookbehind = 1 3344First code unit = '$' 3345Last code unit = 'X' 3346Subject length lower bound = 404 3347 3348/(.*)\d+\1/I 3349Capture group count = 1 3350Max back reference = 1 3351Subject length lower bound = 1 3352 3353/(.*)\d+/I 3354Capture group count = 1 3355First code unit at start or follows newline 3356Subject length lower bound = 1 3357 3358/(.*)\d+\1/Is 3359Capture group count = 1 3360Max back reference = 1 3361Options: dotall 3362Subject length lower bound = 1 3363 3364/(.*)\d+/Is 3365Capture group count = 1 3366Compile options: dotall 3367Overall options: anchored dotall 3368Subject length lower bound = 1 3369 3370/(.*(xyz))\d+\2/I 3371Capture group count = 2 3372Max back reference = 2 3373First code unit at start or follows newline 3374Last code unit = 'z' 3375Subject length lower bound = 7 3376 3377/((.*))\d+\1/I 3378Capture group count = 2 3379Max back reference = 1 3380Subject length lower bound = 1 3381 abc123bc 3382 0: bc123bc 3383 1: bc 3384 2: bc 3385 3386/a[b]/I 3387Capture group count = 0 3388First code unit = 'a' 3389Last code unit = 'b' 3390Subject length lower bound = 2 3391 3392/(?=a).*/I 3393Capture group count = 0 3394May match empty string 3395First code unit = 'a' 3396Subject length lower bound = 1 3397 3398/(?=abc).xyz/Ii 3399Capture group count = 0 3400Options: caseless 3401First code unit = 'a' (caseless) 3402Last code unit = 'z' (caseless) 3403Subject length lower bound = 4 3404 3405/(?=abc)(?i).xyz/I 3406Capture group count = 0 3407First code unit = 'a' 3408Last code unit = 'z' (caseless) 3409Subject length lower bound = 4 3410 3411/(?=a)(?=b)/I 3412Capture group count = 0 3413May match empty string 3414First code unit = 'a' 3415Subject length lower bound = 1 3416 3417/(?=.)a/I 3418Capture group count = 0 3419First code unit = 'a' 3420Subject length lower bound = 1 3421 3422/((?=abcda)a)/I 3423Capture group count = 1 3424First code unit = 'a' 3425Last code unit = 'a' 3426Subject length lower bound = 2 3427 3428/((?=abcda)ab)/I 3429Capture group count = 1 3430First code unit = 'a' 3431Last code unit = 'b' 3432Subject length lower bound = 2 3433 3434/()a/I 3435Capture group count = 1 3436First code unit = 'a' 3437Subject length lower bound = 1 3438 3439/(?:(?=.)|(?<!x))a/I 3440Capture group count = 0 3441Max lookbehind = 1 3442First code unit = 'a' 3443Subject length lower bound = 1 3444 3445/(?(1)ab|ac)(.)/I 3446Capture group count = 1 3447Max back reference = 1 3448First code unit = 'a' 3449Subject length lower bound = 3 3450 3451/(?(1)abz|acz)(.)/I 3452Capture group count = 1 3453Max back reference = 1 3454First code unit = 'a' 3455Last code unit = 'z' 3456Subject length lower bound = 4 3457 3458/(?(1)abz)(.)/I 3459Capture group count = 1 3460Max back reference = 1 3461Subject length lower bound = 1 3462 3463/(?(1)abz)(1)23/I 3464Capture group count = 1 3465Max back reference = 1 3466Last code unit = '3' 3467Subject length lower bound = 3 3468 3469/(a)+/I 3470Capture group count = 1 3471First code unit = 'a' 3472Subject length lower bound = 1 3473 3474/(a){2,3}/I 3475Capture group count = 1 3476First code unit = 'a' 3477Last code unit = 'a' 3478Subject length lower bound = 2 3479 3480/(a)*/I 3481Capture group count = 1 3482May match empty string 3483Subject length lower bound = 0 3484 3485/[a]/I 3486Capture group count = 0 3487First code unit = 'a' 3488Subject length lower bound = 1 3489 3490/[ab]/I 3491Capture group count = 0 3492Starting code units: a b 3493Subject length lower bound = 1 3494 3495/[ab]/I 3496Capture group count = 0 3497Starting code units: a b 3498Subject length lower bound = 1 3499 3500/[^a]/I 3501Capture group count = 0 3502Subject length lower bound = 1 3503 3504/\d456/I 3505Capture group count = 0 3506Starting code units: 0 1 2 3 4 5 6 7 8 9 3507Last code unit = '6' 3508Subject length lower bound = 4 3509 3510/\d456/I 3511Capture group count = 0 3512Starting code units: 0 1 2 3 4 5 6 7 8 9 3513Last code unit = '6' 3514Subject length lower bound = 4 3515 3516/a^b/I 3517Capture group count = 0 3518First code unit = 'a' 3519Last code unit = 'b' 3520Subject length lower bound = 2 3521 3522/^a/Im 3523Capture group count = 0 3524Options: multiline 3525First code unit at start or follows newline 3526Last code unit = 'a' 3527Subject length lower bound = 1 3528 abcde 3529 0: a 3530 xy\nabc 3531 0: a 3532\= Expect no match 3533 xyabc 3534No match 3535 3536/c|abc/I 3537Capture group count = 0 3538Starting code units: a c 3539Last code unit = 'c' 3540Subject length lower bound = 1 3541 3542/(?i)[ab]/I 3543Capture group count = 0 3544Starting code units: A B a b 3545Subject length lower bound = 1 3546 3547/[ab](?i)cd/I 3548Capture group count = 0 3549Starting code units: a b 3550Last code unit = 'd' (caseless) 3551Subject length lower bound = 3 3552 3553/abc(?C)def/I 3554Capture group count = 0 3555First code unit = 'a' 3556Last code unit = 'f' 3557Subject length lower bound = 6 3558 abcdef 3559--->abcdef 3560 0 ^ ^ d 3561 0: abcdef 3562 1234abcdef 3563--->1234abcdef 3564 0 ^ ^ d 3565 0: abcdef 3566\= Expect no match 3567 abcxyz 3568No match 3569 abcxyzf 3570--->abcxyzf 3571 0 ^ ^ d 3572No match 3573 3574/abc(?C)de(?C1)f/I 3575Capture group count = 0 3576First code unit = 'a' 3577Last code unit = 'f' 3578Subject length lower bound = 6 3579 123abcdef 3580--->123abcdef 3581 0 ^ ^ d 3582 1 ^ ^ f 3583 0: abcdef 3584 3585/(?C1)\dabc(?C2)def/I 3586Capture group count = 0 3587Starting code units: 0 1 2 3 4 5 6 7 8 9 3588Last code unit = 'f' 3589Subject length lower bound = 7 3590 1234abcdef 3591--->1234abcdef 3592 1 ^ \d 3593 1 ^ \d 3594 1 ^ \d 3595 1 ^ \d 3596 2 ^ ^ d 3597 0: 4abcdef 3598\= Expect no match 3599 abcdef 3600No match 3601 3602/(?C1)\dabc(?C2)def/I 3603Capture group count = 0 3604Starting code units: 0 1 2 3 4 5 6 7 8 9 3605Last code unit = 'f' 3606Subject length lower bound = 7 3607 1234abcdef 3608--->1234abcdef 3609 1 ^ \d 3610 1 ^ \d 3611 1 ^ \d 3612 1 ^ \d 3613 2 ^ ^ d 3614 0: 4abcdef 3615\= Expect no match 3616 abcdef 3617No match 3618 3619/(?C255)ab/I 3620Capture group count = 0 3621First code unit = 'a' 3622Last code unit = 'b' 3623Subject length lower bound = 2 3624 3625/(?C256)ab/I 3626Failed: error 138 at offset 6: number after (?C is greater than 255 3627 3628/(?Cab)xx/I 3629Failed: error 182 at offset 3: unrecognized string delimiter follows (?C 3630 3631/(?C12vr)x/I 3632Failed: error 139 at offset 5: closing parenthesis for (?C expected 3633 3634/abc(?C)def/I 3635Capture group count = 0 3636First code unit = 'a' 3637Last code unit = 'f' 3638Subject length lower bound = 6 3639 \x83\x0\x61bcdef 3640--->\x83\x00abcdef 3641 0 ^ ^ d 3642 0: abcdef 3643 3644/(abc)(?C)de(?C1)f/I 3645Capture group count = 1 3646First code unit = 'a' 3647Last code unit = 'f' 3648Subject length lower bound = 6 3649 123abcdef 3650--->123abcdef 3651 0 ^ ^ d 3652 1 ^ ^ f 3653 0: abcdef 3654 1: abc 3655 123abcdef\=callout_capture 3656Callout 0: last capture = 1 3657 1: abc 3658--->123abcdef 3659 ^ ^ d 3660Callout 1: last capture = 1 3661 1: abc 3662--->123abcdef 3663 ^ ^ f 3664 0: abcdef 3665 1: abc 3666 123abcdefC-\=callout_none 3667 0: abcdef 3668 1: abc 3669\= Expect no match 3670 123abcdef\=callout_fail=1 3671--->123abcdef 3672 0 ^ ^ d 3673 1 ^ ^ f 3674No match 3675 3676/(?C0)(abc(?C1))*/I 3677Capture group count = 1 3678May match empty string 3679Subject length lower bound = 0 3680 abcabcabc 3681--->abcabcabc 3682 0 ^ ( 3683 1 ^ ^ )* 3684 1 ^ ^ )* 3685 1 ^ ^ )* 3686 0: abcabcabc 3687 1: abc 3688 abcabc\=callout_fail=1:4 3689--->abcabc 3690 0 ^ ( 3691 1 ^ ^ )* 3692 1 ^ ^ )* 3693 0: abcabc 3694 1: abc 3695 abcabcabc\=callout_fail=1:4 3696--->abcabcabc 3697 0 ^ ( 3698 1 ^ ^ )* 3699 1 ^ ^ )* 3700 1 ^ ^ )* 3701 0: abcabc 3702 1: abc 3703 3704/(\d{3}(?C))*/I 3705Capture group count = 1 3706May match empty string 3707Subject length lower bound = 0 3708 123\=callout_capture 3709Callout 0: last capture = 0 3710--->123 3711 ^ ^ )* 3712 0: 123 3713 1: 123 3714 123456\=callout_capture 3715Callout 0: last capture = 0 3716--->123456 3717 ^ ^ )* 3718Callout 0: last capture = 1 3719 1: 123 3720--->123456 3721 ^ ^ )* 3722 0: 123456 3723 1: 456 3724 123456789\=callout_capture 3725Callout 0: last capture = 0 3726--->123456789 3727 ^ ^ )* 3728Callout 0: last capture = 1 3729 1: 123 3730--->123456789 3731 ^ ^ )* 3732Callout 0: last capture = 1 3733 1: 456 3734--->123456789 3735 ^ ^ )* 3736 0: 123456789 3737 1: 789 3738 3739/((xyz)(?C)p|(?C1)xyzabc)/I 3740Capture group count = 2 3741First code unit = 'x' 3742Subject length lower bound = 4 3743 xyzabc\=callout_capture 3744Callout 0: last capture = 2 3745 1: <unset> 3746 2: xyz 3747--->xyzabc 3748 ^ ^ p 3749Callout 1: last capture = 0 3750--->xyzabc 3751 ^ x 3752 0: xyzabc 3753 1: xyzabc 3754 3755/(X)((xyz)(?C)p|(?C1)xyzabc)/I 3756Capture group count = 3 3757First code unit = 'X' 3758Last code unit = 'x' 3759Subject length lower bound = 5 3760 Xxyzabc\=callout_capture 3761Callout 0: last capture = 3 3762 1: X 3763 2: <unset> 3764 3: xyz 3765--->Xxyzabc 3766 ^ ^ p 3767Callout 1: last capture = 1 3768 1: X 3769--->Xxyzabc 3770 ^^ x 3771 0: Xxyzabc 3772 1: X 3773 2: xyzabc 3774 3775/(?=(abc))(?C)abcdef/I 3776Capture group count = 1 3777First code unit = 'a' 3778Last code unit = 'f' 3779Subject length lower bound = 6 3780 abcdef\=callout_capture 3781Callout 0: last capture = 1 3782 1: abc 3783--->abcdef 3784 ^ a 3785 0: abcdef 3786 1: abc 3787 3788/(?!(abc)(?C1)d)(?C2)abcxyz/I 3789Capture group count = 1 3790First code unit = 'a' 3791Last code unit = 'z' 3792Subject length lower bound = 6 3793 abcxyz\=callout_capture 3794Callout 1: last capture = 1 3795 1: abc 3796--->abcxyz 3797 ^ ^ d 3798Callout 2: last capture = 0 3799--->abcxyz 3800 ^ a 3801 0: abcxyz 3802 3803/(?<=(abc)(?C))xyz/I 3804Capture group count = 1 3805Max lookbehind = 3 3806First code unit = 'x' 3807Last code unit = 'z' 3808Subject length lower bound = 3 3809 abcxyz\=callout_capture 3810Callout 0: last capture = 1 3811 1: abc 3812--->abcxyz 3813 ^ ) 3814 0: xyz 3815 1: abc 3816 3817/a(b+)(c*)(?C1)/I 3818Capture group count = 2 3819First code unit = 'a' 3820Last code unit = 'b' 3821Subject length lower bound = 2 3822\= Expect no match 3823 abbbbbccc\=callout_data=1 3824--->abbbbbccc 3825 1 ^ ^ End of pattern 3826Callout data = 1 3827No match 3828 3829/a(b+?)(c*?)(?C1)/I 3830Capture group count = 2 3831First code unit = 'a' 3832Last code unit = 'b' 3833Subject length lower bound = 2 3834\= Expect no match 3835 abbbbbccc\=callout_data=1 3836--->abbbbbccc 3837 1 ^ ^ End of pattern 3838Callout data = 1 3839 1 ^ ^ End of pattern 3840Callout data = 1 3841 1 ^ ^ End of pattern 3842Callout data = 1 3843 1 ^ ^ End of pattern 3844Callout data = 1 3845 1 ^ ^ End of pattern 3846Callout data = 1 3847 1 ^ ^ End of pattern 3848Callout data = 1 3849 1 ^ ^ End of pattern 3850Callout data = 1 3851 1 ^ ^ End of pattern 3852Callout data = 1 3853No match 3854 3855/(?C)abc/I 3856Capture group count = 0 3857First code unit = 'a' 3858Last code unit = 'c' 3859Subject length lower bound = 3 3860 3861/(?C)^abc/I 3862Capture group count = 0 3863Compile options: <none> 3864Overall options: anchored 3865First code unit = 'a' 3866Subject length lower bound = 3 3867 3868/(?C)a|b/I 3869Capture group count = 0 3870Starting code units: a b 3871Subject length lower bound = 1 3872 3873/a|(b)(?C)/I 3874Capture group count = 1 3875Starting code units: a b 3876Subject length lower bound = 1 3877 b 3878--->b 3879 0 ^^ End of pattern 3880 0: b 3881 1: b 3882 3883/x(ab|(bc|(de|(?R))))/I 3884Capture group count = 3 3885First code unit = 'x' 3886Subject length lower bound = 3 3887 xab 3888 0: xab 3889 1: ab 3890 xbc 3891 0: xbc 3892 1: bc 3893 2: bc 3894 xde 3895 0: xde 3896 1: de 3897 2: de 3898 3: de 3899 xxab 3900 0: xxab 3901 1: xab 3902 2: xab 3903 3: xab 3904 xxxab 3905 0: xxxab 3906 1: xxab 3907 2: xxab 3908 3: xxab 3909\= Expect no match 3910 xyab 3911No match 3912 3913/^([^()]|\((?1)*\))*$/I 3914Capture group count = 1 3915May match empty string 3916Compile options: <none> 3917Overall options: anchored 3918Subject length lower bound = 0 3919 abc 3920 0: abc 3921 1: c 3922 a(b)c 3923 0: a(b)c 3924 1: c 3925 a(b(c))d 3926 0: a(b(c))d 3927 1: d 3928\= Expect no match) 3929 a(b(c)d 3930No match 3931 3932/^>abc>([^()]|\((?1)*\))*<xyz<$/I 3933Capture group count = 1 3934Compile options: <none> 3935Overall options: anchored 3936First code unit = '>' 3937Last code unit = '<' 3938Subject length lower bound = 10 3939 >abc>123<xyz< 3940 0: >abc>123<xyz< 3941 1: 3 3942 >abc>1(2)3<xyz< 3943 0: >abc>1(2)3<xyz< 3944 1: 3 3945 >abc>(1(2)3)<xyz< 3946 0: >abc>(1(2)3)<xyz< 3947 1: (1(2)3) 3948 3949/(a(?1)b)/IB 3950------------------------------------------------------------------ 3951 Bra 3952 CBra 1 3953 a 3954 Recurse 3955 b 3956 Ket 3957 Ket 3958 End 3959------------------------------------------------------------------ 3960Capture group count = 1 3961First code unit = 'a' 3962Last code unit = 'b' 3963Subject length lower bound = 2 3964 3965/(a(?1)+b)/IB 3966------------------------------------------------------------------ 3967 Bra 3968 CBra 1 3969 a 3970 SBra 3971 Recurse 3972 KetRmax 3973 b 3974 Ket 3975 Ket 3976 End 3977------------------------------------------------------------------ 3978Capture group count = 1 3979First code unit = 'a' 3980Last code unit = 'b' 3981Subject length lower bound = 2 3982 3983/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I 3984Capture group count = 2 3985Compile options: <none> 3986Overall options: anchored 3987Starting code units: ( - 0 1 2 3 4 5 6 7 8 9 3988Subject length lower bound = 1 3989 12 3990 0: 12 3991 1: 12 3992 (((2+2)*-3)-7) 3993 0: (((2+2)*-3)-7) 3994 1: (((2+2)*-3)-7) 3995 2: - 3996 -12 3997 0: -12 3998 1: -12 3999\= Expect no match 4000 ((2+2)*-3)-7) 4001No match 4002 4003/^(x(y|(?1){2})z)/I 4004Capture group count = 2 4005Compile options: <none> 4006Overall options: anchored 4007First code unit = 'x' 4008Subject length lower bound = 3 4009 xyz 4010 0: xyz 4011 1: xyz 4012 2: y 4013 xxyzxyzz 4014 0: xxyzxyzz 4015 1: xxyzxyzz 4016 2: xyzxyz 4017\= Expect no match 4018 xxyzz 4019No match 4020 xxyzxyzxyzz 4021No match 4022 4023/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix 4024Capture group count = 2 4025Options: extended 4026First code unit = '<' 4027Last code unit = '>' 4028Subject length lower bound = 2 4029 <> 4030 0: <> 4031 1: <> 4032 2: <> 4033 <abcd> 4034 0: <abcd> 4035 1: <abcd> 4036 2: <abcd> 4037 <abc <123> hij> 4038 0: <abc <123> hij> 4039 1: <abc <123> hij> 4040 2: <abc <123> hij> 4041 <abc <def> hij> 4042 0: <def> 4043 1: <def> 4044 2: <def> 4045 <abc<>def> 4046 0: <abc<>def> 4047 1: <abc<>def> 4048 2: <abc<>def> 4049 <abc<> 4050 0: <> 4051 1: <> 4052 2: <> 4053\= Expect no match 4054 <abc 4055No match 4056 4057/(?1)/I 4058Failed: error 115 at offset 3: reference to non-existent subpattern 4059 4060/((?2)(abc)/I 4061Failed: error 114 at offset 10: missing closing parenthesis 4062 4063/^(abc)def(?1)/I 4064Capture group count = 1 4065Compile options: <none> 4066Overall options: anchored 4067First code unit = 'a' 4068Subject length lower bound = 9 4069 abcdefabc 4070 0: abcdefabc 4071 1: abc 4072 4073/^(a|b|c)=(?1)+/I 4074Capture group count = 1 4075Compile options: <none> 4076Overall options: anchored 4077Starting code units: a b c 4078Subject length lower bound = 2 4079 a=a 4080 0: a=a 4081 1: a 4082 a=b 4083 0: a=b 4084 1: a 4085 a=bc 4086 0: a=bc 4087 1: a 4088 4089/^(a|b|c)=((?1))+/I 4090Capture group count = 2 4091Compile options: <none> 4092Overall options: anchored 4093Starting code units: a b c 4094Subject length lower bound = 2 4095 a=a 4096 0: a=a 4097 1: a 4098 2: a 4099 a=b 4100 0: a=b 4101 1: a 4102 2: b 4103 a=bc 4104 0: a=bc 4105 1: a 4106 2: c 4107 4108/a(?P<name1>b|c)d(?P<longername2>e)/IB 4109------------------------------------------------------------------ 4110 Bra 4111 a 4112 CBra 1 4113 b 4114 Alt 4115 c 4116 Ket 4117 d 4118 CBra 2 4119 e 4120 Ket 4121 Ket 4122 End 4123------------------------------------------------------------------ 4124Capture group count = 2 4125Named capture groups: 4126 longername2 2 4127 name1 1 4128First code unit = 'a' 4129Last code unit = 'e' 4130Subject length lower bound = 4 4131 abde 4132 0: abde 4133 1: b 4134 2: e 4135 acde 4136 0: acde 4137 1: c 4138 2: e 4139 4140/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/IB 4141------------------------------------------------------------------ 4142 Bra 4143 Bra 4144 a 4145 CBra 1 4146 c 4147 CBra 2 4148 d 4149 Ket 4150 Ket 4151 Ket 4152 CBra 3 4153 a 4154 Ket 4155 Ket 4156 End 4157------------------------------------------------------------------ 4158Capture group count = 3 4159Named capture groups: 4160 a 3 4161 c 1 4162 d 2 4163First code unit = 'a' 4164Last code unit = 'a' 4165Subject length lower bound = 4 4166 4167/(?P<a>a)...(?P=a)bbb(?P>a)d/IB 4168------------------------------------------------------------------ 4169 Bra 4170 CBra 1 4171 a 4172 Ket 4173 Any 4174 Any 4175 Any 4176 \1 4177 bbb 4178 Recurse 4179 d 4180 Ket 4181 End 4182------------------------------------------------------------------ 4183Capture group count = 1 4184Max back reference = 1 4185Named capture groups: 4186 a 1 4187First code unit = 'a' 4188Last code unit = 'd' 4189Subject length lower bound = 10 4190 4191/^\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 4192Capture group count = 4 4193Max back reference = 4 4194Named capture groups: 4195 four 4 4196 one 1 4197 three 3 4198 two 2 4199May match empty string 4200Compile options: caseless 4201Overall options: anchored caseless 4202Subject length lower bound = 0 4203 1221 4204 0: 1221 4205 1: 1221 4206 2: 1 4207 Satan, oscillate my metallic sonatas! 4208 0: Satan, oscillate my metallic sonatas! 4209 1: <unset> 4210 2: <unset> 4211 3: Satan, oscillate my metallic sonatas 4212 4: S 4213 A man, a plan, a canal: Panama! 4214 0: A man, a plan, a canal: Panama! 4215 1: <unset> 4216 2: <unset> 4217 3: A man, a plan, a canal: Panama 4218 4: A 4219 Able was I ere I saw Elba. 4220 0: Able was I ere I saw Elba. 4221 1: <unset> 4222 2: <unset> 4223 3: Able was I ere I saw Elba 4224 4: A 4225\= Expect no match 4226 The quick brown fox 4227No match 4228 4229/((?(R)a|b))\1(?1)?/I 4230Capture group count = 1 4231Max back reference = 1 4232Subject length lower bound = 2 4233 bb 4234 0: bb 4235 1: b 4236 bbaa 4237 0: bba 4238 1: b 4239 4240/(.*)a/Is 4241Capture group count = 1 4242Compile options: dotall 4243Overall options: anchored dotall 4244Last code unit = 'a' 4245Subject length lower bound = 1 4246 4247/(.*)a\1/Is 4248Capture group count = 1 4249Max back reference = 1 4250Options: dotall 4251Last code unit = 'a' 4252Subject length lower bound = 1 4253 4254/(.*)a(b)\2/Is 4255Capture group count = 2 4256Max back reference = 2 4257Compile options: dotall 4258Overall options: anchored dotall 4259Last code unit = 'b' 4260Subject length lower bound = 3 4261 4262/((.*)a|(.*)b)z/Is 4263Capture group count = 3 4264Compile options: dotall 4265Overall options: anchored dotall 4266Last code unit = 'z' 4267Subject length lower bound = 2 4268 4269/((.*)a|(.*)b)z\1/Is 4270Capture group count = 3 4271Max back reference = 1 4272Options: dotall 4273Last code unit = 'z' 4274Subject length lower bound = 3 4275 4276/((.*)a|(.*)b)z\2/Is 4277Capture group count = 3 4278Max back reference = 2 4279Options: dotall 4280Last code unit = 'z' 4281Subject length lower bound = 2 4282 4283/((.*)a|(.*)b)z\3/Is 4284Capture group count = 3 4285Max back reference = 3 4286Options: dotall 4287Last code unit = 'z' 4288Subject length lower bound = 2 4289 4290/((.*)a|^(.*)b)z\3/Is 4291Capture group count = 3 4292Max back reference = 3 4293Compile options: dotall 4294Overall options: anchored dotall 4295Last code unit = 'z' 4296Subject length lower bound = 2 4297 4298/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is 4299Capture group count = 31 4300May match empty string 4301Compile options: dotall 4302Overall options: anchored dotall 4303Subject length lower bound = 0 4304 4305/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is 4306Capture group count = 31 4307Max back reference = 31 4308May match empty string 4309Options: dotall 4310Subject length lower bound = 0 4311 4312/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is 4313Capture group count = 32 4314Max back reference = 32 4315May match empty string 4316Options: dotall 4317Subject length lower bound = 0 4318 4319/(a)(bc)/IB,no_auto_capture 4320------------------------------------------------------------------ 4321 Bra 4322 Bra 4323 a 4324 Ket 4325 Bra 4326 bc 4327 Ket 4328 Ket 4329 End 4330------------------------------------------------------------------ 4331Capture group count = 0 4332Options: no_auto_capture 4333First code unit = 'a' 4334Last code unit = 'c' 4335Subject length lower bound = 3 4336 abc 4337 0: abc 4338 4339/(?P<one>a)(bc)/IB,no_auto_capture 4340------------------------------------------------------------------ 4341 Bra 4342 CBra 1 4343 a 4344 Ket 4345 Bra 4346 bc 4347 Ket 4348 Ket 4349 End 4350------------------------------------------------------------------ 4351Capture group count = 1 4352Named capture groups: 4353 one 1 4354Options: no_auto_capture 4355First code unit = 'a' 4356Last code unit = 'c' 4357Subject length lower bound = 3 4358 abc 4359 0: abc 4360 1: a 4361 4362/(a)(?P<named>bc)/IB,no_auto_capture 4363------------------------------------------------------------------ 4364 Bra 4365 Bra 4366 a 4367 Ket 4368 CBra 1 4369 bc 4370 Ket 4371 Ket 4372 End 4373------------------------------------------------------------------ 4374Capture group count = 1 4375Named capture groups: 4376 named 1 4377Options: no_auto_capture 4378First code unit = 'a' 4379Last code unit = 'c' 4380Subject length lower bound = 3 4381 4382/(aaa(?C1)bbb|ab)/I 4383Capture group count = 1 4384First code unit = 'a' 4385Last code unit = 'b' 4386Subject length lower bound = 2 4387 aaabbb 4388--->aaabbb 4389 1 ^ ^ b 4390 0: aaabbb 4391 1: aaabbb 4392 aaabbb\=callout_data=0 4393--->aaabbb 4394 1 ^ ^ b 4395 0: aaabbb 4396 1: aaabbb 4397 aaabbb\=callout_data=1 4398--->aaabbb 4399 1 ^ ^ b 4400Callout data = 1 4401 0: ab 4402 1: ab 4403\= Expect no match 4404 aaabbb\=callout_data=-1 4405--->aaabbb 4406 1 ^ ^ b 4407Callout data = -1 4408No match 4409 4410/ab(?P<one>cd)ef(?P<two>gh)/I 4411Capture group count = 2 4412Named capture groups: 4413 one 1 4414 two 2 4415First code unit = 'a' 4416Last code unit = 'h' 4417Subject length lower bound = 8 4418 abcdefgh 4419 0: abcdefgh 4420 1: cd 4421 2: gh 4422 abcdefgh\=copy=1,get=two 4423 0: abcdefgh 4424 1: cd 4425 2: gh 4426 1C cd (2) 4427 G gh (2) two (group 2) 4428 abcdefgh\=copy=one,copy=two 4429 0: abcdefgh 4430 1: cd 4431 2: gh 4432 C cd (2) one (group 1) 4433 C gh (2) two (group 2) 4434 abcdefgh\=copy=three 4435 0: abcdefgh 4436 1: cd 4437 2: gh 4438Number not found for group 'three' 4439Copy substring 'three' failed (-49): unknown substring 4440 4441/(?P<Tes>)(?P<Test>)/IB 4442------------------------------------------------------------------ 4443 Bra 4444 CBra 1 4445 Ket 4446 CBra 2 4447 Ket 4448 Ket 4449 End 4450------------------------------------------------------------------ 4451Capture group count = 2 4452Named capture groups: 4453 Tes 1 4454 Test 2 4455May match empty string 4456Subject length lower bound = 0 4457 4458/(?P<Test>)(?P<Tes>)/IB 4459------------------------------------------------------------------ 4460 Bra 4461 CBra 1 4462 Ket 4463 CBra 2 4464 Ket 4465 Ket 4466 End 4467------------------------------------------------------------------ 4468Capture group count = 2 4469Named capture groups: 4470 Tes 2 4471 Test 1 4472May match empty string 4473Subject length lower bound = 0 4474 4475/(?P<Z>zz)(?P<A>aa)/I 4476Capture group count = 2 4477Named capture groups: 4478 A 2 4479 Z 1 4480First code unit = 'z' 4481Last code unit = 'a' 4482Subject length lower bound = 4 4483 zzaa\=copy=Z 4484 0: zzaa 4485 1: zz 4486 2: aa 4487 C zz (2) Z (group 1) 4488 zzaa\=copy=A 4489 0: zzaa 4490 1: zz 4491 2: aa 4492 C aa (2) A (group 2) 4493 4494/(?P<x>eks)(?P<x>eccs)/I 4495Failed: error 143 at offset 16: two named subpatterns have the same name (PCRE2_DUPNAMES not set) 4496 4497/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I 4498Failed: error 143 at offset 31: two named subpatterns have the same name (PCRE2_DUPNAMES not set) 4499 4500"\[((?P<elem>\d+)(,(?P>elem))*)\]"I 4501Capture group count = 3 4502Named capture groups: 4503 elem 2 4504First code unit = '[' 4505Last code unit = ']' 4506Subject length lower bound = 3 4507 [10,20,30,5,5,4,4,2,43,23,4234] 4508 0: [10,20,30,5,5,4,4,2,43,23,4234] 4509 1: 10,20,30,5,5,4,4,2,43,23,4234 4510 2: 10 4511 3: ,4234 4512\= Expect no match 4513 [] 4514No match 4515 4516"\[((?P<elem>\d+)(,(?P>elem))*)?\]"I 4517Capture group count = 3 4518Named capture groups: 4519 elem 2 4520First code unit = '[' 4521Last code unit = ']' 4522Subject length lower bound = 2 4523 [10,20,30,5,5,4,4,2,43,23,4234] 4524 0: [10,20,30,5,5,4,4,2,43,23,4234] 4525 1: 10,20,30,5,5,4,4,2,43,23,4234 4526 2: 10 4527 3: ,4234 4528 [] 4529 0: [] 4530 4531/(a(b(?2)c))?/IB 4532------------------------------------------------------------------ 4533 Bra 4534 Brazero 4535 CBra 1 4536 a 4537 CBra 2 4538 b 4539 Recurse 4540 c 4541 Ket 4542 Ket 4543 Ket 4544 End 4545------------------------------------------------------------------ 4546Capture group count = 2 4547May match empty string 4548Subject length lower bound = 0 4549 4550/(a(b(?2)c))*/IB 4551------------------------------------------------------------------ 4552 Bra 4553 Brazero 4554 CBra 1 4555 a 4556 CBra 2 4557 b 4558 Recurse 4559 c 4560 Ket 4561 KetRmax 4562 Ket 4563 End 4564------------------------------------------------------------------ 4565Capture group count = 2 4566May match empty string 4567Subject length lower bound = 0 4568 4569/(a(b(?2)c)){0,2}/IB 4570------------------------------------------------------------------ 4571 Bra 4572 Brazero 4573 Bra 4574 CBra 1 4575 a 4576 CBra 2 4577 b 4578 Recurse 4579 c 4580 Ket 4581 Ket 4582 Brazero 4583 CBra 1 4584 a 4585 CBra 2 4586 b 4587 Recurse 4588 c 4589 Ket 4590 Ket 4591 Ket 4592 Ket 4593 End 4594------------------------------------------------------------------ 4595Capture group count = 2 4596May match empty string 4597Subject length lower bound = 0 4598 4599/[ab]{1}+/B 4600------------------------------------------------------------------ 4601 Bra 4602 [ab] 4603 Ket 4604 End 4605------------------------------------------------------------------ 4606 4607/()(?1){1}/B 4608------------------------------------------------------------------ 4609 Bra 4610 CBra 1 4611 Ket 4612 Recurse 4613 Ket 4614 End 4615------------------------------------------------------------------ 4616 4617/()(?1)/B 4618------------------------------------------------------------------ 4619 Bra 4620 CBra 1 4621 Ket 4622 Recurse 4623 Ket 4624 End 4625------------------------------------------------------------------ 4626 4627/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii 4628Capture group count = 3 4629Options: caseless 4630Last code unit = 'g' (caseless) 4631Subject length lower bound = 8 4632 Baby Bjorn Active Carrier - With free SHIPPING!! 4633 0: Baby Bjorn Active Carrier - With free SHIPPING!! 4634 1: Baby Bjorn Active Carrier - With free SHIPPING!! 4635 4636/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii 4637Capture group count = 3 4638Options: caseless 4639Last code unit = 'g' (caseless) 4640Subject length lower bound = 8 4641 Baby Bjorn Active Carrier - With free SHIPPING!! 4642 0: Baby Bjorn Active Carrier - With free SHIPPING!! 4643 1: Baby Bjorn Active Carrier - With free SHIPPING!! 4644 4645/a*.*b/IB 4646------------------------------------------------------------------ 4647 Bra 4648 a* 4649 Any* 4650 b 4651 Ket 4652 End 4653------------------------------------------------------------------ 4654Capture group count = 0 4655Last code unit = 'b' 4656Subject length lower bound = 1 4657 4658/(a|b)*.?c/IB 4659------------------------------------------------------------------ 4660 Bra 4661 Brazero 4662 CBra 1 4663 a 4664 Alt 4665 b 4666 KetRmax 4667 Any? 4668 c 4669 Ket 4670 End 4671------------------------------------------------------------------ 4672Capture group count = 1 4673Last code unit = 'c' 4674Subject length lower bound = 1 4675 4676/abc(?C255)de(?C)f/IB 4677------------------------------------------------------------------ 4678 Bra 4679 abc 4680 Callout 255 10 1 4681 de 4682 Callout 0 16 1 4683 f 4684 Ket 4685 End 4686------------------------------------------------------------------ 4687Capture group count = 0 4688First code unit = 'a' 4689Last code unit = 'f' 4690Subject length lower bound = 6 4691 4692/abcde/IB,auto_callout 4693------------------------------------------------------------------ 4694 Bra 4695 Callout 255 0 1 4696 a 4697 Callout 255 1 1 4698 b 4699 Callout 255 2 1 4700 c 4701 Callout 255 3 1 4702 d 4703 Callout 255 4 1 4704 e 4705 Callout 255 5 0 4706 Ket 4707 End 4708------------------------------------------------------------------ 4709Capture group count = 0 4710Options: auto_callout 4711First code unit = 'a' 4712Last code unit = 'e' 4713Subject length lower bound = 5 4714 abcde 4715--->abcde 4716 +0 ^ a 4717 +1 ^^ b 4718 +2 ^ ^ c 4719 +3 ^ ^ d 4720 +4 ^ ^ e 4721 +5 ^ ^ End of pattern 4722 0: abcde 4723\= Expect no match 4724 abcdfe 4725--->abcdfe 4726 +0 ^ a 4727 +1 ^^ b 4728 +2 ^ ^ c 4729 +3 ^ ^ d 4730 +4 ^ ^ e 4731No match 4732 4733/a*b/IB,auto_callout 4734------------------------------------------------------------------ 4735 Bra 4736 Callout 255 0 2 4737 a*+ 4738 Callout 255 2 1 4739 b 4740 Callout 255 3 0 4741 Ket 4742 End 4743------------------------------------------------------------------ 4744Capture group count = 0 4745Options: auto_callout 4746Starting code units: a b 4747Last code unit = 'b' 4748Subject length lower bound = 1 4749 ab 4750--->ab 4751 +0 ^ a* 4752 +2 ^^ b 4753 +3 ^ ^ End of pattern 4754 0: ab 4755 aaaab 4756--->aaaab 4757 +0 ^ a* 4758 +2 ^ ^ b 4759 +3 ^ ^ End of pattern 4760 0: aaaab 4761 aaaacb 4762--->aaaacb 4763 +0 ^ a* 4764 +2 ^ ^ b 4765 +0 ^ a* 4766 +2 ^ ^ b 4767 +0 ^ a* 4768 +2 ^ ^ b 4769 +0 ^ a* 4770 +2 ^^ b 4771 +0 ^ a* 4772 +2 ^ b 4773 +3 ^^ End of pattern 4774 0: b 4775 4776/a*b/IB,auto_callout 4777------------------------------------------------------------------ 4778 Bra 4779 Callout 255 0 2 4780 a*+ 4781 Callout 255 2 1 4782 b 4783 Callout 255 3 0 4784 Ket 4785 End 4786------------------------------------------------------------------ 4787Capture group count = 0 4788Options: auto_callout 4789Starting code units: a b 4790Last code unit = 'b' 4791Subject length lower bound = 1 4792 ab 4793--->ab 4794 +0 ^ a* 4795 +2 ^^ b 4796 +3 ^ ^ End of pattern 4797 0: ab 4798 aaaab 4799--->aaaab 4800 +0 ^ a* 4801 +2 ^ ^ b 4802 +3 ^ ^ End of pattern 4803 0: aaaab 4804 aaaacb 4805--->aaaacb 4806 +0 ^ a* 4807 +2 ^ ^ b 4808 +0 ^ a* 4809 +2 ^ ^ b 4810 +0 ^ a* 4811 +2 ^ ^ b 4812 +0 ^ a* 4813 +2 ^^ b 4814 +0 ^ a* 4815 +2 ^ b 4816 +3 ^^ End of pattern 4817 0: b 4818 4819/a+b/IB,auto_callout 4820------------------------------------------------------------------ 4821 Bra 4822 Callout 255 0 2 4823 a++ 4824 Callout 255 2 1 4825 b 4826 Callout 255 3 0 4827 Ket 4828 End 4829------------------------------------------------------------------ 4830Capture group count = 0 4831Options: auto_callout 4832First code unit = 'a' 4833Last code unit = 'b' 4834Subject length lower bound = 2 4835 ab 4836--->ab 4837 +0 ^ a+ 4838 +2 ^^ b 4839 +3 ^ ^ End of pattern 4840 0: ab 4841 aaaab 4842--->aaaab 4843 +0 ^ a+ 4844 +2 ^ ^ b 4845 +3 ^ ^ End of pattern 4846 0: aaaab 4847\= Expect no match 4848 aaaacb 4849--->aaaacb 4850 +0 ^ a+ 4851 +2 ^ ^ b 4852 +0 ^ a+ 4853 +2 ^ ^ b 4854 +0 ^ a+ 4855 +2 ^ ^ b 4856 +0 ^ a+ 4857 +2 ^^ b 4858No match 4859 4860/(abc|def)x/IB,auto_callout 4861------------------------------------------------------------------ 4862 Bra 4863 Callout 255 0 1 4864 CBra 1 4865 Callout 255 1 1 4866 a 4867 Callout 255 2 1 4868 b 4869 Callout 255 3 1 4870 c 4871 Callout 255 4 1 4872 Alt 4873 Callout 255 5 1 4874 d 4875 Callout 255 6 1 4876 e 4877 Callout 255 7 1 4878 f 4879 Callout 255 8 1 4880 Ket 4881 Callout 255 9 1 4882 x 4883 Callout 255 10 0 4884 Ket 4885 End 4886------------------------------------------------------------------ 4887Capture group count = 1 4888Options: auto_callout 4889Starting code units: a d 4890Last code unit = 'x' 4891Subject length lower bound = 4 4892 abcx 4893--->abcx 4894 +0 ^ ( 4895 +1 ^ a 4896 +2 ^^ b 4897 +3 ^ ^ c 4898 +4 ^ ^ | 4899 +9 ^ ^ x 4900+10 ^ ^ End of pattern 4901 0: abcx 4902 1: abc 4903 defx 4904--->defx 4905 +0 ^ ( 4906 +1 ^ a 4907 +5 ^ d 4908 +6 ^^ e 4909 +7 ^ ^ f 4910 +8 ^ ^ ) 4911 +9 ^ ^ x 4912+10 ^ ^ End of pattern 4913 0: defx 4914 1: def 4915\= Expect no match 4916 abcdefzx 4917--->abcdefzx 4918 +0 ^ ( 4919 +1 ^ a 4920 +2 ^^ b 4921 +3 ^ ^ c 4922 +4 ^ ^ | 4923 +9 ^ ^ x 4924 +5 ^ d 4925 +0 ^ ( 4926 +1 ^ a 4927 +5 ^ d 4928 +6 ^^ e 4929 +7 ^ ^ f 4930 +8 ^ ^ ) 4931 +9 ^ ^ x 4932No match 4933 4934/(abc|def)x/IB,auto_callout 4935------------------------------------------------------------------ 4936 Bra 4937 Callout 255 0 1 4938 CBra 1 4939 Callout 255 1 1 4940 a 4941 Callout 255 2 1 4942 b 4943 Callout 255 3 1 4944 c 4945 Callout 255 4 1 4946 Alt 4947 Callout 255 5 1 4948 d 4949 Callout 255 6 1 4950 e 4951 Callout 255 7 1 4952 f 4953 Callout 255 8 1 4954 Ket 4955 Callout 255 9 1 4956 x 4957 Callout 255 10 0 4958 Ket 4959 End 4960------------------------------------------------------------------ 4961Capture group count = 1 4962Options: auto_callout 4963Starting code units: a d 4964Last code unit = 'x' 4965Subject length lower bound = 4 4966 abcx 4967--->abcx 4968 +0 ^ ( 4969 +1 ^ a 4970 +2 ^^ b 4971 +3 ^ ^ c 4972 +4 ^ ^ | 4973 +9 ^ ^ x 4974+10 ^ ^ End of pattern 4975 0: abcx 4976 1: abc 4977 defx 4978--->defx 4979 +0 ^ ( 4980 +1 ^ a 4981 +5 ^ d 4982 +6 ^^ e 4983 +7 ^ ^ f 4984 +8 ^ ^ ) 4985 +9 ^ ^ x 4986+10 ^ ^ End of pattern 4987 0: defx 4988 1: def 4989\= Expect no match 4990 abcdefzx 4991--->abcdefzx 4992 +0 ^ ( 4993 +1 ^ a 4994 +2 ^^ b 4995 +3 ^ ^ c 4996 +4 ^ ^ | 4997 +9 ^ ^ x 4998 +5 ^ d 4999 +0 ^ ( 5000 +1 ^ a 5001 +5 ^ d 5002 +6 ^^ e 5003 +7 ^ ^ f 5004 +8 ^ ^ ) 5005 +9 ^ ^ x 5006No match 5007 5008/(ab|cd){3,4}/I,auto_callout 5009Capture group count = 1 5010Options: auto_callout 5011Starting code units: a c 5012Subject length lower bound = 6 5013 ababab 5014--->ababab 5015 +0 ^ ( 5016 +1 ^ a 5017 +2 ^^ b 5018 +3 ^ ^ | 5019 +1 ^ ^ a 5020 +2 ^ ^ b 5021 +3 ^ ^ | 5022 +1 ^ ^ a 5023 +2 ^ ^ b 5024 +3 ^ ^ | 5025 +1 ^ ^ a 5026 +4 ^ ^ c 5027+12 ^ ^ End of pattern 5028 0: ababab 5029 1: ab 5030 abcdabcd 5031--->abcdabcd 5032 +0 ^ ( 5033 +1 ^ a 5034 +2 ^^ b 5035 +3 ^ ^ | 5036 +1 ^ ^ a 5037 +4 ^ ^ c 5038 +5 ^ ^ d 5039 +6 ^ ^ ){3,4} 5040 +1 ^ ^ a 5041 +2 ^ ^ b 5042 +3 ^ ^ | 5043 +1 ^ ^ a 5044 +4 ^ ^ c 5045 +5 ^ ^ d 5046 +6 ^ ^ ){3,4} 5047+12 ^ ^ End of pattern 5048 0: abcdabcd 5049 1: cd 5050 abcdcdcdcdcd 5051--->abcdcdcdcdcd 5052 +0 ^ ( 5053 +1 ^ a 5054 +2 ^^ b 5055 +3 ^ ^ | 5056 +1 ^ ^ a 5057 +4 ^ ^ c 5058 +5 ^ ^ d 5059 +6 ^ ^ ){3,4} 5060 +1 ^ ^ a 5061 +4 ^ ^ c 5062 +5 ^ ^ d 5063 +6 ^ ^ ){3,4} 5064 +1 ^ ^ a 5065 +4 ^ ^ c 5066 +5 ^ ^ d 5067 +6 ^ ^ ){3,4} 5068+12 ^ ^ End of pattern 5069 0: abcdcdcd 5070 1: cd 5071 5072/([ab]{,}c|xy)/IB,auto_callout 5073------------------------------------------------------------------ 5074 Bra 5075 Callout 255 0 1 5076 CBra 1 5077 Callout 255 1 4 5078 [ab] 5079 Callout 255 5 1 5080 { 5081 Callout 255 6 1 5082 , 5083 Callout 255 7 1 5084 } 5085 Callout 255 8 1 5086 c 5087 Callout 255 9 1 5088 Alt 5089 Callout 255 10 1 5090 x 5091 Callout 255 11 1 5092 y 5093 Callout 255 12 1 5094 Ket 5095 Callout 255 13 0 5096 Ket 5097 End 5098------------------------------------------------------------------ 5099Capture group count = 1 5100Options: auto_callout 5101Starting code units: a b x 5102Subject length lower bound = 2 5103\= Expect no match 5104 Note: that {,} does NOT introduce a quantifier 5105--->Note: that {,} does NOT introduce a quantifier 5106 +0 ^ ( 5107 +1 ^ [ab] 5108 +5 ^^ { 5109+10 ^ x 5110 +0 ^ ( 5111 +1 ^ [ab] 5112 +5 ^^ { 5113+10 ^ x 5114 +0 ^ ( 5115 +1 ^ [ab] 5116 +5 ^^ { 5117+10 ^ x 5118No match 5119 5120/([ab]{,}c|xy)/IB,auto_callout 5121------------------------------------------------------------------ 5122 Bra 5123 Callout 255 0 1 5124 CBra 1 5125 Callout 255 1 4 5126 [ab] 5127 Callout 255 5 1 5128 { 5129 Callout 255 6 1 5130 , 5131 Callout 255 7 1 5132 } 5133 Callout 255 8 1 5134 c 5135 Callout 255 9 1 5136 Alt 5137 Callout 255 10 1 5138 x 5139 Callout 255 11 1 5140 y 5141 Callout 255 12 1 5142 Ket 5143 Callout 255 13 0 5144 Ket 5145 End 5146------------------------------------------------------------------ 5147Capture group count = 1 5148Options: auto_callout 5149Starting code units: a b x 5150Subject length lower bound = 2 5151\= Expect no match 5152 Note: that {,} does NOT introduce a quantifier 5153--->Note: that {,} does NOT introduce a quantifier 5154 +0 ^ ( 5155 +1 ^ [ab] 5156 +5 ^^ { 5157+10 ^ x 5158 +0 ^ ( 5159 +1 ^ [ab] 5160 +5 ^^ { 5161+10 ^ x 5162 +0 ^ ( 5163 +1 ^ [ab] 5164 +5 ^^ { 5165+10 ^ x 5166No match 5167 5168/([ab]{1,4}c|xy){4,5}?123/IB,auto_callout 5169------------------------------------------------------------------ 5170 Bra 5171 Callout 255 0 1 5172 CBra 1 5173 Callout 255 1 9 5174 [ab]{1,4}+ 5175 Callout 255 10 1 5176 c 5177 Callout 255 11 1 5178 Alt 5179 Callout 255 12 1 5180 x 5181 Callout 255 13 1 5182 y 5183 Callout 255 14 7 5184 Ket 5185 CBra 1 5186 Callout 255 1 9 5187 [ab]{1,4}+ 5188 Callout 255 10 1 5189 c 5190 Callout 255 11 1 5191 Alt 5192 Callout 255 12 1 5193 x 5194 Callout 255 13 1 5195 y 5196 Callout 255 14 7 5197 Ket 5198 CBra 1 5199 Callout 255 1 9 5200 [ab]{1,4}+ 5201 Callout 255 10 1 5202 c 5203 Callout 255 11 1 5204 Alt 5205 Callout 255 12 1 5206 x 5207 Callout 255 13 1 5208 y 5209 Callout 255 14 7 5210 Ket 5211 CBra 1 5212 Callout 255 1 9 5213 [ab]{1,4}+ 5214 Callout 255 10 1 5215 c 5216 Callout 255 11 1 5217 Alt 5218 Callout 255 12 1 5219 x 5220 Callout 255 13 1 5221 y 5222 Callout 255 14 7 5223 Ket 5224 Braminzero 5225 CBra 1 5226 Callout 255 1 9 5227 [ab]{1,4}+ 5228 Callout 255 10 1 5229 c 5230 Callout 255 11 1 5231 Alt 5232 Callout 255 12 1 5233 x 5234 Callout 255 13 1 5235 y 5236 Callout 255 14 7 5237 Ket 5238 Callout 255 21 1 5239 1 5240 Callout 255 22 1 5241 2 5242 Callout 255 23 1 5243 3 5244 Callout 255 24 0 5245 Ket 5246 End 5247------------------------------------------------------------------ 5248Capture group count = 1 5249Options: auto_callout 5250Starting code units: a b x 5251Last code unit = '3' 5252Subject length lower bound = 11 5253 aacaacaacaacaac123 5254--->aacaacaacaacaac123 5255 +0 ^ ( 5256 +1 ^ [ab]{1,4} 5257+10 ^ ^ c 5258+11 ^ ^ | 5259 +1 ^ ^ [ab]{1,4} 5260+10 ^ ^ c 5261+11 ^ ^ | 5262 +1 ^ ^ [ab]{1,4} 5263+10 ^ ^ c 5264+11 ^ ^ | 5265 +1 ^ ^ [ab]{1,4} 5266+10 ^ ^ c 5267+11 ^ ^ | 5268+21 ^ ^ 1 5269 +1 ^ ^ [ab]{1,4} 5270+10 ^ ^ c 5271+11 ^ ^ | 5272+21 ^ ^ 1 5273+22 ^ ^ 2 5274+23 ^ ^ 3 5275+24 ^ ^ End of pattern 5276 0: aacaacaacaacaac123 5277 1: aac 5278 5279/\b.*/I 5280Capture group count = 0 5281Max lookbehind = 1 5282May match empty string 5283Subject length lower bound = 0 5284 ab cd\=offset=1 5285 0: cd 5286 5287/\b.*/Is 5288Capture group count = 0 5289Max lookbehind = 1 5290May match empty string 5291Options: dotall 5292Subject length lower bound = 0 5293 ab cd\=startoffset=1 5294 0: cd 5295 5296/(?!.bcd).*/I 5297Capture group count = 0 5298May match empty string 5299Subject length lower bound = 0 5300 Xbcd12345 5301 0: bcd12345 5302 5303/abcde/I 5304Capture group count = 0 5305First code unit = 'a' 5306Last code unit = 'e' 5307Subject length lower bound = 5 5308 ab\=ps 5309Partial match: ab 5310 abc\=ps 5311Partial match: abc 5312 abcd\=ps 5313Partial match: abcd 5314 abcde\=ps 5315 0: abcde 5316 the quick brown abc\=ps 5317Partial match: abc 5318\= Expect no match\=ps 5319 the quick brown abxyz fox\=ps 5320No match 5321 5322"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I 5323Capture group count = 3 5324Compile options: <none> 5325Overall options: anchored 5326Starting code units: 0 1 2 3 4 5 6 7 8 9 5327Last code unit = '/' 5328Subject length lower bound = 6 5329 13/05/04\=ps 5330 0: 13/05/04 5331 1: 13 5332 2: 05 5333 13/5/2004\=ps 5334 0: 13/5/2004 5335 1: 13 5336 2: 5 5337 3: 20 5338 02/05/09\=ps 5339 0: 02/05/09 5340 1: 02 5341 2: 05 5342 1\=ps 5343Partial match: 1 5344 1/2\=ps 5345Partial match: 1/2 5346 1/2/0\=ps 5347Partial match: 1/2/0 5348 1/2/04\=ps 5349 0: 1/2/04 5350 1: 1 5351 2: 2 5352 0\=ps 5353Partial match: 0 5354 02/\=ps 5355Partial match: 02/ 5356 02/0\=ps 5357Partial match: 02/0 5358 02/1\=ps 5359Partial match: 02/1 5360\= Expect no match\=ps 5361 \=ps 5362No match 5363 123\=ps 5364No match 5365 33/4/04\=ps 5366No match 5367 3/13/04\=ps 5368No match 5369 0/1/2003\=ps 5370No match 5371 0/\=ps 5372No match 5373 02/0/\=ps 5374No match 5375 02/13\=ps 5376No match 5377 5378/0{0,2}ABC/I 5379Capture group count = 0 5380Starting code units: 0 A 5381Last code unit = 'C' 5382Subject length lower bound = 3 5383 5384/\d{3,}ABC/I 5385Capture group count = 0 5386Starting code units: 0 1 2 3 4 5 6 7 8 9 5387Last code unit = 'C' 5388Subject length lower bound = 6 5389 5390/\d*ABC/I 5391Capture group count = 0 5392Starting code units: 0 1 2 3 4 5 6 7 8 9 A 5393Last code unit = 'C' 5394Subject length lower bound = 3 5395 5396/[abc]+DE/I 5397Capture group count = 0 5398Starting code units: a b c 5399Last code unit = 'E' 5400Subject length lower bound = 3 5401 5402/[abc]?123/I 5403Capture group count = 0 5404Starting code units: 1 a b c 5405Last code unit = '3' 5406Subject length lower bound = 3 5407 123\=ps 5408 0: 123 5409 a\=ps 5410Partial match: a 5411 b\=ps 5412Partial match: b 5413 c\=ps 5414Partial match: c 5415 c12\=ps 5416Partial match: c12 5417 c123\=ps 5418 0: c123 5419 5420/^(?:\d){3,5}X/I 5421Capture group count = 0 5422Compile options: <none> 5423Overall options: anchored 5424Starting code units: 0 1 2 3 4 5 6 7 8 9 5425Last code unit = 'X' 5426Subject length lower bound = 4 5427 1\=ps 5428Partial match: 1 5429 123\=ps 5430Partial match: 123 5431 123X 5432 0: 123X 5433 1234\=ps 5434Partial match: 1234 5435 1234X 5436 0: 1234X 5437 12345\=ps 5438Partial match: 12345 5439 12345X 5440 0: 12345X 5441\= Expect no match 5442 1X 5443No match 5444 123456\=ps 5445No match 5446 5447"<(\w+)/?>(.)*</(\1)>"Igms 5448Capture group count = 3 5449Max back reference = 1 5450Options: dotall multiline 5451First code unit = '<' 5452Last code unit = '>' 5453Subject length lower bound = 7 5454 <!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 5455 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> 5456 1: seite 5457 2: \x0a 5458 3: seite 5459 5460/line\nbreak/I 5461Capture group count = 0 5462Contains explicit CR or LF match 5463First code unit = 'l' 5464Last code unit = 'k' 5465Subject length lower bound = 10 5466 this is a line\nbreak 5467 0: line\x0abreak 5468 line one\nthis is a line\nbreak in the second line 5469 0: line\x0abreak 5470 5471/line\nbreak/I,firstline 5472Capture group count = 0 5473Contains explicit CR or LF match 5474Options: firstline 5475First code unit = 'l' 5476Last code unit = 'k' 5477Subject length lower bound = 10 5478 this is a line\nbreak 5479 0: line\x0abreak 5480\= Expect no match 5481 line one\nthis is a line\nbreak in the second line 5482No match 5483 5484/line\nbreak/Im,firstline 5485Capture group count = 0 5486Contains explicit CR or LF match 5487Options: firstline multiline 5488First code unit = 'l' 5489Last code unit = 'k' 5490Subject length lower bound = 10 5491 this is a line\nbreak 5492 0: line\x0abreak 5493\= Expect no match 5494 line one\nthis is a line\nbreak in the second line 5495No match 5496 5497/(?i)(?-i)AbCd/I 5498Capture group count = 0 5499First code unit = 'A' 5500Last code unit = 'd' 5501Subject length lower bound = 4 5502 AbCd 5503 0: AbCd 5504\= Expect no match 5505 abcd 5506No match 5507 5508/a{11111111111111111111}/I 5509Failed: error 105 at offset 8: number too big in {} quantifier 5510 5511/(){64294967295}/I 5512Failed: error 105 at offset 9: number too big in {} quantifier 5513 5514/(){2,4294967295}/I 5515Failed: error 105 at offset 11: number too big in {} quantifier 5516 5517"(?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 5518Capture group count = 1 5519Max back reference = 1 5520First code unit = 'a' (caseless) 5521Last code unit = 'B' 5522Subject length lower bound = 15 5523 abcdefghijklAkB 5524 0: abcdefghijklAkB 5525 1: k 5526 5527"(?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 5528Capture group count = 12 5529Max back reference = 11 5530Named capture groups: 5531 n0 1 5532 n1 2 5533 n10 11 5534 n11 12 5535 n2 3 5536 n3 4 5537 n4 5 5538 n5 6 5539 n6 7 5540 n7 8 5541 n8 9 5542 n9 10 5543First code unit = 'a' 5544Last code unit = 'B' 5545Subject length lower bound = 15 5546 abcdefghijklAkB 5547 0: abcdefghijklAkB 5548 1: a 5549 2: b 5550 3: c 5551 4: d 5552 5: e 5553 6: f 5554 7: g 5555 8: h 5556 9: i 555710: j 555811: k 555912: l 5560 5561"(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I 5562Capture group count = 12 5563Max back reference = 11 5564First code unit = 'a' 5565Last code unit = 'B' 5566Subject length lower bound = 15 5567 abcdefghijklAkB 5568 0: abcdefghijklAkB 5569 1: a 5570 2: b 5571 3: c 5572 4: d 5573 5: e 5574 6: f 5575 7: g 5576 8: h 5577 9: i 557810: j 557911: k 558012: l 5581 5582"(?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 5583Capture group count = 101 5584Named capture groups: 5585 name0 1 5586 name1 2 5587 name10 11 5588 name100 101 5589 name11 12 5590 name12 13 5591 name13 14 5592 name14 15 5593 name15 16 5594 name16 17 5595 name17 18 5596 name18 19 5597 name19 20 5598 name2 3 5599 name20 21 5600 name21 22 5601 name22 23 5602 name23 24 5603 name24 25 5604 name25 26 5605 name26 27 5606 name27 28 5607 name28 29 5608 name29 30 5609 name3 4 5610 name30 31 5611 name31 32 5612 name32 33 5613 name33 34 5614 name34 35 5615 name35 36 5616 name36 37 5617 name37 38 5618 name38 39 5619 name39 40 5620 name4 5 5621 name40 41 5622 name41 42 5623 name42 43 5624 name43 44 5625 name44 45 5626 name45 46 5627 name46 47 5628 name47 48 5629 name48 49 5630 name49 50 5631 name5 6 5632 name50 51 5633 name51 52 5634 name52 53 5635 name53 54 5636 name54 55 5637 name55 56 5638 name56 57 5639 name57 58 5640 name58 59 5641 name59 60 5642 name6 7 5643 name60 61 5644 name61 62 5645 name62 63 5646 name63 64 5647 name64 65 5648 name65 66 5649 name66 67 5650 name67 68 5651 name68 69 5652 name69 70 5653 name7 8 5654 name70 71 5655 name71 72 5656 name72 73 5657 name73 74 5658 name74 75 5659 name75 76 5660 name76 77 5661 name77 78 5662 name78 79 5663 name79 80 5664 name8 9 5665 name80 81 5666 name81 82 5667 name82 83 5668 name83 84 5669 name84 85 5670 name85 86 5671 name86 87 5672 name87 88 5673 name88 89 5674 name89 90 5675 name9 10 5676 name90 91 5677 name91 92 5678 name92 93 5679 name93 94 5680 name94 95 5681 name95 96 5682 name96 97 5683 name97 98 5684 name98 99 5685 name99 100 5686First code unit = 'a' 5687Last code unit = 'a' 5688Subject length lower bound = 101 5689 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5690Matched, but too many substrings 5691 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5692 1: a 5693 2: a 5694 3: a 5695 4: a 5696 5: a 5697 6: a 5698 7: a 5699 8: a 5700 9: a 570110: a 570211: a 570312: a 570413: a 570514: a 5706 5707"(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 5708Capture group count = 101 5709First code unit = 'a' 5710Last code unit = 'a' 5711Subject length lower bound = 101 5712 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5713Matched, but too many substrings 5714 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5715 1: a 5716 2: a 5717 3: a 5718 4: a 5719 5: a 5720 6: a 5721 7: a 5722 8: a 5723 9: a 572410: a 572511: a 572612: a 572713: a 572814: a 5729 5730/[^()]*(?:\((?R)\)[^()]*)*/I 5731Capture group count = 0 5732May match empty string 5733Subject length lower bound = 0 5734 (this(and)that 5735 0: 5736 (this(and)that) 5737 0: (this(and)that) 5738 (this(and)that)stuff 5739 0: (this(and)that)stuff 5740 5741/[^()]*(?:\((?>(?R))\)[^()]*)*/I 5742Capture group count = 0 5743May match empty string 5744Subject length lower bound = 0 5745 (this(and)that 5746 0: 5747 (this(and)that) 5748 0: (this(and)that) 5749 5750/[^()]*(?:\((?R)\))*[^()]*/I 5751Capture group count = 0 5752May match empty string 5753Subject length lower bound = 0 5754 (this(and)that 5755 0: 5756 (this(and)that) 5757 0: (this(and)that) 5758 5759/(?:\((?R)\))*[^()]*/I 5760Capture group count = 0 5761May match empty string 5762Subject length lower bound = 0 5763 (this(and)that 5764 0: 5765 (this(and)that) 5766 0: 5767 ((this)) 5768 0: ((this)) 5769 5770/(?:\((?R)\))|[^()]*/I 5771Capture group count = 0 5772May match empty string 5773Subject length lower bound = 0 5774 (this(and)that 5775 0: 5776 (this(and)that) 5777 0: 5778 (this) 5779 0: (this) 5780 ((this)) 5781 0: ((this)) 5782 5783/\x{0000ff}/I 5784Capture group count = 0 5785First code unit = \xff 5786Subject length lower bound = 1 5787 5788/^((?P<A>a1)|(?P<A>a2)b)/I 5789Failed: error 143 at offset 18: two named subpatterns have the same name (PCRE2_DUPNAMES not set) 5790 5791/^((?P<A>a1)|(?P<A>a2)b)/I,dupnames 5792Capture group count = 3 5793Named capture groups: 5794 A 2 5795 A 3 5796Compile options: dupnames 5797Overall options: anchored dupnames 5798First code unit = 'a' 5799Subject length lower bound = 2 5800 a1b\=copy=A 5801 0: a1 5802 1: a1 5803 2: a1 5804 C a1 (2) A (non-unique) 5805 a2b\=copy=A 5806 0: a2b 5807 1: a2b 5808 2: <unset> 5809 3: a2 5810 C a2 (2) A (non-unique) 5811 a1b\=copy=Z,copy=A 5812 0: a1 5813 1: a1 5814 2: a1 5815Number not found for group 'Z' 5816Copy substring 'Z' failed (-49): unknown substring 5817 C a1 (2) A (non-unique) 5818 5819/(?|(?<a>)(?<b>)(?<a>)|(?<a>)(?<b>)(?<a>))/I,dupnames 5820Capture group count = 3 5821Named capture groups: 5822 a 1 5823 a 3 5824 b 2 5825May match empty string 5826Options: dupnames 5827Subject length lower bound = 0 5828 5829/^(?P<A>a)(?P<A>b)/I,dupnames 5830Capture group count = 2 5831Named capture groups: 5832 A 1 5833 A 2 5834Compile options: dupnames 5835Overall options: anchored dupnames 5836First code unit = 'a' 5837Subject length lower bound = 2 5838 ab\=copy=A 5839 0: ab 5840 1: a 5841 2: b 5842 C a (1) A (non-unique) 5843 5844/^(?P<A>a)(?P<A>b)|cd/I,dupnames 5845Capture group count = 2 5846Named capture groups: 5847 A 1 5848 A 2 5849Options: dupnames 5850Starting code units: a c 5851Subject length lower bound = 2 5852 ab\=copy=A 5853 0: ab 5854 1: a 5855 2: b 5856 C a (1) A (non-unique) 5857 cd\=copy=A 5858 0: cd 5859Copy substring 'A' failed (-55): requested value is not set 5860 5861/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/I,dupnames 5862Capture group count = 4 5863Named capture groups: 5864 A 1 5865 A 2 5866 A 3 5867 A 4 5868Options: dupnames 5869Starting code units: a c 5870Subject length lower bound = 2 5871 cdefgh\=copy=A 5872 0: cdefgh 5873 1: <unset> 5874 2: <unset> 5875 3: ef 5876 4: gh 5877 C ef (2) A (non-unique) 5878 5879/^((?P<A>a1)|(?P<A>a2)b)/I,dupnames 5880Capture group count = 3 5881Named capture groups: 5882 A 2 5883 A 3 5884Compile options: dupnames 5885Overall options: anchored dupnames 5886First code unit = 'a' 5887Subject length lower bound = 2 5888 a1b\=get=A 5889 0: a1 5890 1: a1 5891 2: a1 5892 G a1 (2) A (non-unique) 5893 a2b\=get=A 5894 0: a2b 5895 1: a2b 5896 2: <unset> 5897 3: a2 5898 G a2 (2) A (non-unique) 5899 a1b\=get=Z,get=A 5900 0: a1 5901 1: a1 5902 2: a1 5903Number not found for group 'Z' 5904Get substring 'Z' failed (-49): unknown substring 5905 G a1 (2) A (non-unique) 5906 5907/^(?P<A>a)(?P<A>b)/I,dupnames 5908Capture group count = 2 5909Named capture groups: 5910 A 1 5911 A 2 5912Compile options: dupnames 5913Overall options: anchored dupnames 5914First code unit = 'a' 5915Subject length lower bound = 2 5916 ab\=get=A 5917 0: ab 5918 1: a 5919 2: b 5920 G a (1) A (non-unique) 5921 5922/^(?P<A>a)(?P<A>b)|cd/I,dupnames 5923Capture group count = 2 5924Named capture groups: 5925 A 1 5926 A 2 5927Options: dupnames 5928Starting code units: a c 5929Subject length lower bound = 2 5930 ab\=get=A 5931 0: ab 5932 1: a 5933 2: b 5934 G a (1) A (non-unique) 5935 cd\=get=A 5936 0: cd 5937Get substring 'A' failed (-55): requested value is not set 5938 5939/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/I,dupnames 5940Capture group count = 4 5941Named capture groups: 5942 A 1 5943 A 2 5944 A 3 5945 A 4 5946Options: dupnames 5947Starting code units: a c 5948Subject length lower bound = 2 5949 cdefgh\=get=A 5950 0: cdefgh 5951 1: <unset> 5952 2: <unset> 5953 3: ef 5954 4: gh 5955 G ef (2) A (non-unique) 5956 5957/(?J)^((?P<A>a1)|(?P<A>a2)b)/I 5958Capture group count = 3 5959Named capture groups: 5960 A 2 5961 A 3 5962Compile options: <none> 5963Overall options: anchored 5964Duplicate name status changes 5965First code unit = 'a' 5966Subject length lower bound = 2 5967 a1b\=copy=A 5968 0: a1 5969 1: a1 5970 2: a1 5971 C a1 (2) A (non-unique) 5972 a2b\=copy=A 5973 0: a2b 5974 1: a2b 5975 2: <unset> 5976 3: a2 5977 C a2 (2) A (non-unique) 5978 5979/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I 5980Failed: error 143 at offset 38: two named subpatterns have the same name (PCRE2_DUPNAMES not set) 5981 5982# In this next test, J is not set at the outer level; consequently it isn't set 5983# in the pattern's options; consequently pcre2_substring_get_byname() produces 5984# a random value. 5985 5986/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I 5987Capture group count = 4 5988Named capture groups: 5989 A 1 5990 B 2 5991 B 3 5992 C 4 5993Compile options: <none> 5994Overall options: anchored 5995Duplicate name status changes 5996First code unit = 'a' 5997Subject length lower bound = 6 5998 a bc d\=copy=A,copy=B,copy=C 5999 0: a bc d 6000 1: a 6001 2: b 6002 3: c 6003 4: d 6004 C a (1) A (group 1) 6005 C b (1) B (non-unique) 6006 C d (1) C (group 4) 6007 6008/^(?P<A>a)?(?(A)a|b)/I 6009Capture group count = 1 6010Max back reference = 1 6011Named capture groups: 6012 A 1 6013Compile options: <none> 6014Overall options: anchored 6015Subject length lower bound = 1 6016 aabc 6017 0: aa 6018 1: a 6019 bc 6020 0: b 6021\= Expect no match 6022 abc 6023No match 6024 6025/(?:(?(ZZ)a|b)(?P<ZZ>X))+/I 6026Capture group count = 1 6027Max back reference = 1 6028Named capture groups: 6029 ZZ 1 6030Last code unit = 'X' 6031Subject length lower bound = 2 6032 bXaX 6033 0: bXaX 6034 1: X 6035 6036/(?:(?(2y)a|b)(X))+/I 6037Failed: error 124 at offset 7: missing closing parenthesis for condition 6038 6039/(?:(?(ZA)a|b)(?P<ZZ>X))+/I 6040Failed: error 115 at offset 6: reference to non-existent subpattern 6041 6042/(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I 6043Capture group count = 1 6044Max back reference = 1 6045Named capture groups: 6046 ZZ 1 6047Last code unit = 'X' 6048Subject length lower bound = 3 6049 bbXaaX 6050 0: bbXaaX 6051 1: X 6052 6053/(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I 6054Capture group count = 1 6055Max back reference = 1 6056Named capture groups: 6057 ZZ 1 6058Last code unit = 'X' 6059Subject length lower bound = 3 6060 (b)\\Xa\\X 6061 0: (b)\Xa\X 6062 1: X 6063 6064/(?P<ABC/I 6065Failed: error 142 at offset 7: syntax error in subpattern name (missing terminator?) 6066 6067/(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I 6068Capture group count = 1 6069Max back reference = 1 6070Named capture groups: 6071 A 1 6072Subject length lower bound = 2 6073 bXXaYYaY 6074 0: bXXaYYaY 6075 1: Y 6076 bXYaXXaX 6077 0: bX 6078 1: X 6079 6080/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I 6081Capture group count = 10 6082Max back reference = 10 6083Named capture groups: 6084 A 10 6085Subject length lower bound = 2 6086 bXXaYYaY 6087 0: bXXaYYaY 6088 1: 6089 2: 6090 3: 6091 4: 6092 5: 6093 6: 6094 7: 6095 8: 6096 9: 609710: Y 6098 6099/\s*,\s*/I 6100Capture group count = 0 6101Starting code units: \x09 \x0a \x0b \x0c \x0d \x20 , 6102Last code unit = ',' 6103Subject length lower bound = 1 6104 \x0b,\x0b 6105 0: \x0b,\x0b 6106 \x0c,\x0d 6107 0: \x0c,\x0d 6108 6109/^abc/Im,newline=lf 6110Capture group count = 0 6111Options: multiline 6112Forced newline is LF 6113First code unit at start or follows newline 6114Last code unit = 'c' 6115Subject length lower bound = 3 6116 xyz\nabc 6117 0: abc 6118 xyz\r\nabc 6119 0: abc 6120\= Expect no match 6121 xyz\rabc 6122No match 6123 xyzabc\r 6124No match 6125 xyzabc\rpqr 6126No match 6127 xyzabc\r\n 6128No match 6129 xyzabc\r\npqr 6130No match 6131 6132/^abc/Im,newline=crlf 6133Capture group count = 0 6134Options: multiline 6135Forced newline is CRLF 6136First code unit at start or follows newline 6137Last code unit = 'c' 6138Subject length lower bound = 3 6139 xyz\r\nabclf> 6140 0: abc 6141\= Expect no match 6142 xyz\nabclf 6143No match 6144 xyz\rabclf 6145No match 6146 6147/^abc/Im,newline=cr 6148Capture group count = 0 6149Options: multiline 6150Forced newline is CR 6151First code unit at start or follows newline 6152Last code unit = 'c' 6153Subject length lower bound = 3 6154 xyz\rabc 6155 0: abc 6156\= Expect no match 6157 xyz\nabc 6158No match 6159 xyz\r\nabc 6160No match 6161 6162/^abc/Im,newline=bad 6163** Invalid value in 'newline=bad' 6164 6165/.*/I,newline=lf 6166Capture group count = 0 6167May match empty string 6168Forced newline is LF 6169First code unit at start or follows newline 6170Subject length lower bound = 0 6171 abc\ndef 6172 0: abc 6173 abc\rdef 6174 0: abc\x0ddef 6175 abc\r\ndef 6176 0: abc\x0d 6177 6178/.*/I,newline=cr 6179Capture group count = 0 6180May match empty string 6181Forced newline is CR 6182First code unit at start or follows newline 6183Subject length lower bound = 0 6184 abc\ndef 6185 0: abc\x0adef 6186 abc\rdef 6187 0: abc 6188 abc\r\ndef 6189 0: abc 6190 6191/.*/I,newline=crlf 6192Capture group count = 0 6193May match empty string 6194Forced newline is CRLF 6195First code unit at start or follows newline 6196Subject length lower bound = 0 6197 abc\ndef 6198 0: abc\x0adef 6199 abc\rdef 6200 0: abc\x0ddef 6201 abc\r\ndef 6202 0: abc 6203 6204/\w+(.)(.)?def/Is 6205Capture group count = 2 6206Options: dotall 6207Starting 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 6208 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 6209Last code unit = 'f' 6210Subject length lower bound = 5 6211 abc\ndef 6212 0: abc\x0adef 6213 1: \x0a 6214 abc\rdef 6215 0: abc\x0ddef 6216 1: \x0d 6217 abc\r\ndef 6218 0: abc\x0d\x0adef 6219 1: \x0d 6220 2: \x0a 6221 6222/(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I 6223Capture group count = 1 6224Named capture groups: 6225 B 1 6226Starting code units: 0 1 2 3 4 5 6 7 8 9 6227Last code unit = '.' 6228Subject length lower bound = 7 6229 6230/()()()()()()()()()()()()()()()()()()()() 6231 ()()()()()()()()()()()()()()()()()()()() 6232 ()()()()()()()()()()()()()()()()()()()() 6233 ()()()()()()()()()()()()()()()()()()()() 6234 ()()()()()()()()()()()()()()()()()()()() 6235 (.(.))/Ix 6236Capture group count = 102 6237Options: extended 6238Subject length lower bound = 2 6239 XY\=ovector=133 6240 0: XY 6241 1: 6242 2: 6243 3: 6244 4: 6245 5: 6246 6: 6247 7: 6248 8: 6249 9: 625010: 625111: 625212: 625313: 625414: 625515: 625616: 625717: 625818: 625919: 626020: 626121: 626222: 626323: 626424: 626525: 626626: 626727: 626828: 626929: 627030: 627131: 627232: 627333: 627434: 627535: 627636: 627737: 627838: 627939: 628040: 628141: 628242: 628343: 628444: 628545: 628646: 628747: 628848: 628949: 629050: 629151: 629252: 629353: 629454: 629555: 629656: 629757: 629858: 629959: 630060: 630161: 630262: 630363: 630464: 630565: 630666: 630767: 630868: 630969: 631070: 631171: 631272: 631373: 631474: 631575: 631676: 631777: 631878: 631979: 632080: 632181: 632282: 632383: 632484: 632585: 632686: 632787: 632888: 632989: 633090: 633191: 633292: 633393: 633494: 633595: 633696: 633797: 633898: 633999: 6340100: 6341101: XY 6342102: Y 6343 6344/(a*b|(?i:c*(?-i)d))/I 6345Capture group count = 1 6346Starting code units: C a b c d 6347Subject length lower bound = 1 6348 6349/()[ab]xyz/I 6350Capture group count = 1 6351Starting code units: a b 6352Last code unit = 'z' 6353Subject length lower bound = 4 6354 6355/(|)[ab]xyz/I 6356Capture group count = 1 6357Starting code units: a b 6358Last code unit = 'z' 6359Subject length lower bound = 4 6360 6361/(|c)[ab]xyz/I 6362Capture group count = 1 6363Starting code units: a b c 6364Last code unit = 'z' 6365Subject length lower bound = 4 6366 6367/(|c?)[ab]xyz/I 6368Capture group count = 1 6369Starting code units: a b c 6370Last code unit = 'z' 6371Subject length lower bound = 4 6372 6373/(d?|c?)[ab]xyz/I 6374Capture group count = 1 6375Starting code units: a b c d 6376Last code unit = 'z' 6377Subject length lower bound = 4 6378 6379/(d?|c)[ab]xyz/I 6380Capture group count = 1 6381Starting code units: a b c d 6382Last code unit = 'z' 6383Subject length lower bound = 4 6384 6385/^a*b\d/IB 6386------------------------------------------------------------------ 6387 Bra 6388 ^ 6389 a*+ 6390 b 6391 \d 6392 Ket 6393 End 6394------------------------------------------------------------------ 6395Capture group count = 0 6396Compile options: <none> 6397Overall options: anchored 6398Starting code units: a b 6399Last code unit = 'b' 6400Subject length lower bound = 2 6401 6402/^a*+b\d/IB 6403------------------------------------------------------------------ 6404 Bra 6405 ^ 6406 a*+ 6407 b 6408 \d 6409 Ket 6410 End 6411------------------------------------------------------------------ 6412Capture group count = 0 6413Compile options: <none> 6414Overall options: anchored 6415Starting code units: a b 6416Last code unit = 'b' 6417Subject length lower bound = 2 6418 6419/^a*?b\d/IB 6420------------------------------------------------------------------ 6421 Bra 6422 ^ 6423 a*+ 6424 b 6425 \d 6426 Ket 6427 End 6428------------------------------------------------------------------ 6429Capture group count = 0 6430Compile options: <none> 6431Overall options: anchored 6432Starting code units: a b 6433Last code unit = 'b' 6434Subject length lower bound = 2 6435 6436/^a+A\d/IB 6437------------------------------------------------------------------ 6438 Bra 6439 ^ 6440 a++ 6441 A 6442 \d 6443 Ket 6444 End 6445------------------------------------------------------------------ 6446Capture group count = 0 6447Compile options: <none> 6448Overall options: anchored 6449First code unit = 'a' 6450Last code unit = 'A' 6451Subject length lower bound = 3 6452 aaaA5 6453 0: aaaA5 6454\= Expect no match 6455 aaaa5 6456No match 6457 6458/^a*A\d/IBi 6459------------------------------------------------------------------ 6460 Bra 6461 ^ 6462 /i a* 6463 /i A 6464 \d 6465 Ket 6466 End 6467------------------------------------------------------------------ 6468Capture group count = 0 6469Compile options: caseless 6470Overall options: anchored caseless 6471Starting code units: A a 6472Last code unit = 'A' (caseless) 6473Subject length lower bound = 2 6474 aaaA5 6475 0: aaaA5 6476 aaaa5 6477 0: aaaa5 6478 a5 6479 0: a5 6480 6481/(a*|b*)[cd]/I 6482Capture group count = 1 6483Starting code units: a b c d 6484Subject length lower bound = 1 6485 6486/(a+|b*)[cd]/I 6487Capture group count = 1 6488Starting code units: a b c d 6489Subject length lower bound = 1 6490 6491/(a*|b+)[cd]/I 6492Capture group count = 1 6493Starting code units: a b c d 6494Subject length lower bound = 1 6495 6496/(a+|b+)[cd]/I 6497Capture group count = 1 6498Starting code units: a b 6499Subject length lower bound = 2 6500 6501/(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 6502 (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 6503 ((( 6504 a 6505 )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) 6506 )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) 6507 ))) 6508/Ix 6509Capture group count = 203 6510Options: extended 6511First code unit = 'a' 6512Subject length lower bound = 1 6513 large nest 6514Matched, but too many substrings 6515 0: a 6516 1: a 6517 2: a 6518 3: a 6519 4: a 6520 5: a 6521 6: a 6522 7: a 6523 8: a 6524 9: a 652510: a 652611: a 652712: a 652813: a 652914: a 6530 6531/a*\d/B 6532------------------------------------------------------------------ 6533 Bra 6534 a*+ 6535 \d 6536 Ket 6537 End 6538------------------------------------------------------------------ 6539 6540/a*\D/B 6541------------------------------------------------------------------ 6542 Bra 6543 a* 6544 \D 6545 Ket 6546 End 6547------------------------------------------------------------------ 6548 6549/0*\d/B 6550------------------------------------------------------------------ 6551 Bra 6552 0* 6553 \d 6554 Ket 6555 End 6556------------------------------------------------------------------ 6557 6558/0*\D/B 6559------------------------------------------------------------------ 6560 Bra 6561 0*+ 6562 \D 6563 Ket 6564 End 6565------------------------------------------------------------------ 6566 6567/a*\s/B 6568------------------------------------------------------------------ 6569 Bra 6570 a*+ 6571 \s 6572 Ket 6573 End 6574------------------------------------------------------------------ 6575 6576/a*\S/B 6577------------------------------------------------------------------ 6578 Bra 6579 a* 6580 \S 6581 Ket 6582 End 6583------------------------------------------------------------------ 6584 6585/ *\s/B 6586------------------------------------------------------------------ 6587 Bra 6588 * 6589 \s 6590 Ket 6591 End 6592------------------------------------------------------------------ 6593 6594/ *\S/B 6595------------------------------------------------------------------ 6596 Bra 6597 *+ 6598 \S 6599 Ket 6600 End 6601------------------------------------------------------------------ 6602 6603/a*\w/B 6604------------------------------------------------------------------ 6605 Bra 6606 a* 6607 \w 6608 Ket 6609 End 6610------------------------------------------------------------------ 6611 6612/a*\W/B 6613------------------------------------------------------------------ 6614 Bra 6615 a*+ 6616 \W 6617 Ket 6618 End 6619------------------------------------------------------------------ 6620 6621/=*\w/B 6622------------------------------------------------------------------ 6623 Bra 6624 =*+ 6625 \w 6626 Ket 6627 End 6628------------------------------------------------------------------ 6629 6630/=*\W/B 6631------------------------------------------------------------------ 6632 Bra 6633 =* 6634 \W 6635 Ket 6636 End 6637------------------------------------------------------------------ 6638 6639/\d*a/B 6640------------------------------------------------------------------ 6641 Bra 6642 \d*+ 6643 a 6644 Ket 6645 End 6646------------------------------------------------------------------ 6647 6648/\d*2/B 6649------------------------------------------------------------------ 6650 Bra 6651 \d* 6652 2 6653 Ket 6654 End 6655------------------------------------------------------------------ 6656 6657/\d*\d/B 6658------------------------------------------------------------------ 6659 Bra 6660 \d* 6661 \d 6662 Ket 6663 End 6664------------------------------------------------------------------ 6665 6666/\d*\D/B 6667------------------------------------------------------------------ 6668 Bra 6669 \d*+ 6670 \D 6671 Ket 6672 End 6673------------------------------------------------------------------ 6674 6675/\d*\s/B 6676------------------------------------------------------------------ 6677 Bra 6678 \d*+ 6679 \s 6680 Ket 6681 End 6682------------------------------------------------------------------ 6683 6684/\d*\S/B 6685------------------------------------------------------------------ 6686 Bra 6687 \d* 6688 \S 6689 Ket 6690 End 6691------------------------------------------------------------------ 6692 6693/\d*\w/B 6694------------------------------------------------------------------ 6695 Bra 6696 \d* 6697 \w 6698 Ket 6699 End 6700------------------------------------------------------------------ 6701 6702/\d*\W/B 6703------------------------------------------------------------------ 6704 Bra 6705 \d*+ 6706 \W 6707 Ket 6708 End 6709------------------------------------------------------------------ 6710 6711/\D*a/B 6712------------------------------------------------------------------ 6713 Bra 6714 \D* 6715 a 6716 Ket 6717 End 6718------------------------------------------------------------------ 6719 6720/\D*2/B 6721------------------------------------------------------------------ 6722 Bra 6723 \D*+ 6724 2 6725 Ket 6726 End 6727------------------------------------------------------------------ 6728 6729/\D*\d/B 6730------------------------------------------------------------------ 6731 Bra 6732 \D*+ 6733 \d 6734 Ket 6735 End 6736------------------------------------------------------------------ 6737 6738/\D*\D/B 6739------------------------------------------------------------------ 6740 Bra 6741 \D* 6742 \D 6743 Ket 6744 End 6745------------------------------------------------------------------ 6746 6747/\D*\s/B 6748------------------------------------------------------------------ 6749 Bra 6750 \D* 6751 \s 6752 Ket 6753 End 6754------------------------------------------------------------------ 6755 6756/\D*\S/B 6757------------------------------------------------------------------ 6758 Bra 6759 \D* 6760 \S 6761 Ket 6762 End 6763------------------------------------------------------------------ 6764 6765/\D*\w/B 6766------------------------------------------------------------------ 6767 Bra 6768 \D* 6769 \w 6770 Ket 6771 End 6772------------------------------------------------------------------ 6773 6774/\D*\W/B 6775------------------------------------------------------------------ 6776 Bra 6777 \D* 6778 \W 6779 Ket 6780 End 6781------------------------------------------------------------------ 6782 6783/\s*a/B 6784------------------------------------------------------------------ 6785 Bra 6786 \s*+ 6787 a 6788 Ket 6789 End 6790------------------------------------------------------------------ 6791 6792/\s*2/B 6793------------------------------------------------------------------ 6794 Bra 6795 \s*+ 6796 2 6797 Ket 6798 End 6799------------------------------------------------------------------ 6800 6801/\s*\d/B 6802------------------------------------------------------------------ 6803 Bra 6804 \s*+ 6805 \d 6806 Ket 6807 End 6808------------------------------------------------------------------ 6809 6810/\s*\D/B 6811------------------------------------------------------------------ 6812 Bra 6813 \s* 6814 \D 6815 Ket 6816 End 6817------------------------------------------------------------------ 6818 6819/\s*\s/B 6820------------------------------------------------------------------ 6821 Bra 6822 \s* 6823 \s 6824 Ket 6825 End 6826------------------------------------------------------------------ 6827 6828/\s*\S/B 6829------------------------------------------------------------------ 6830 Bra 6831 \s*+ 6832 \S 6833 Ket 6834 End 6835------------------------------------------------------------------ 6836 6837/\s*\w/B 6838------------------------------------------------------------------ 6839 Bra 6840 \s*+ 6841 \w 6842 Ket 6843 End 6844------------------------------------------------------------------ 6845 6846/\s*\W/B 6847------------------------------------------------------------------ 6848 Bra 6849 \s* 6850 \W 6851 Ket 6852 End 6853------------------------------------------------------------------ 6854 6855/\S*a/B 6856------------------------------------------------------------------ 6857 Bra 6858 \S* 6859 a 6860 Ket 6861 End 6862------------------------------------------------------------------ 6863 6864/\S*2/B 6865------------------------------------------------------------------ 6866 Bra 6867 \S* 6868 2 6869 Ket 6870 End 6871------------------------------------------------------------------ 6872 6873/\S*\d/B 6874------------------------------------------------------------------ 6875 Bra 6876 \S* 6877 \d 6878 Ket 6879 End 6880------------------------------------------------------------------ 6881 6882/\S*\D/B 6883------------------------------------------------------------------ 6884 Bra 6885 \S* 6886 \D 6887 Ket 6888 End 6889------------------------------------------------------------------ 6890 6891/\S*\s/B 6892------------------------------------------------------------------ 6893 Bra 6894 \S*+ 6895 \s 6896 Ket 6897 End 6898------------------------------------------------------------------ 6899 6900/\S*\S/B 6901------------------------------------------------------------------ 6902 Bra 6903 \S* 6904 \S 6905 Ket 6906 End 6907------------------------------------------------------------------ 6908 6909/\S*\w/B 6910------------------------------------------------------------------ 6911 Bra 6912 \S* 6913 \w 6914 Ket 6915 End 6916------------------------------------------------------------------ 6917 6918/\S*\W/B 6919------------------------------------------------------------------ 6920 Bra 6921 \S* 6922 \W 6923 Ket 6924 End 6925------------------------------------------------------------------ 6926 6927/\w*a/B 6928------------------------------------------------------------------ 6929 Bra 6930 \w* 6931 a 6932 Ket 6933 End 6934------------------------------------------------------------------ 6935 6936/\w*2/B 6937------------------------------------------------------------------ 6938 Bra 6939 \w* 6940 2 6941 Ket 6942 End 6943------------------------------------------------------------------ 6944 6945/\w*\d/B 6946------------------------------------------------------------------ 6947 Bra 6948 \w* 6949 \d 6950 Ket 6951 End 6952------------------------------------------------------------------ 6953 6954/\w*\D/B 6955------------------------------------------------------------------ 6956 Bra 6957 \w* 6958 \D 6959 Ket 6960 End 6961------------------------------------------------------------------ 6962 6963/\w*\s/B 6964------------------------------------------------------------------ 6965 Bra 6966 \w*+ 6967 \s 6968 Ket 6969 End 6970------------------------------------------------------------------ 6971 6972/\w*\S/B 6973------------------------------------------------------------------ 6974 Bra 6975 \w* 6976 \S 6977 Ket 6978 End 6979------------------------------------------------------------------ 6980 6981/\w*\w/B 6982------------------------------------------------------------------ 6983 Bra 6984 \w* 6985 \w 6986 Ket 6987 End 6988------------------------------------------------------------------ 6989 6990/\w*\W/B 6991------------------------------------------------------------------ 6992 Bra 6993 \w*+ 6994 \W 6995 Ket 6996 End 6997------------------------------------------------------------------ 6998 6999/\W*a/B 7000------------------------------------------------------------------ 7001 Bra 7002 \W*+ 7003 a 7004 Ket 7005 End 7006------------------------------------------------------------------ 7007 7008/\W*2/B 7009------------------------------------------------------------------ 7010 Bra 7011 \W*+ 7012 2 7013 Ket 7014 End 7015------------------------------------------------------------------ 7016 7017/\W*\d/B 7018------------------------------------------------------------------ 7019 Bra 7020 \W*+ 7021 \d 7022 Ket 7023 End 7024------------------------------------------------------------------ 7025 7026/\W*\D/B 7027------------------------------------------------------------------ 7028 Bra 7029 \W* 7030 \D 7031 Ket 7032 End 7033------------------------------------------------------------------ 7034 7035/\W*\s/B 7036------------------------------------------------------------------ 7037 Bra 7038 \W* 7039 \s 7040 Ket 7041 End 7042------------------------------------------------------------------ 7043 7044/\W*\S/B 7045------------------------------------------------------------------ 7046 Bra 7047 \W* 7048 \S 7049 Ket 7050 End 7051------------------------------------------------------------------ 7052 7053/\W*\w/B 7054------------------------------------------------------------------ 7055 Bra 7056 \W*+ 7057 \w 7058 Ket 7059 End 7060------------------------------------------------------------------ 7061 7062/\W*\W/B 7063------------------------------------------------------------------ 7064 Bra 7065 \W* 7066 \W 7067 Ket 7068 End 7069------------------------------------------------------------------ 7070 7071/[^a]+a/B 7072------------------------------------------------------------------ 7073 Bra 7074 [^a]++ 7075 a 7076 Ket 7077 End 7078------------------------------------------------------------------ 7079 7080/[^a]+a/Bi 7081------------------------------------------------------------------ 7082 Bra 7083 /i [^a]++ 7084 /i a 7085 Ket 7086 End 7087------------------------------------------------------------------ 7088 7089/[^a]+A/Bi 7090------------------------------------------------------------------ 7091 Bra 7092 /i [^a]++ 7093 /i A 7094 Ket 7095 End 7096------------------------------------------------------------------ 7097 7098/[^a]+b/B 7099------------------------------------------------------------------ 7100 Bra 7101 [^a]+ 7102 b 7103 Ket 7104 End 7105------------------------------------------------------------------ 7106 7107/[^a]+\d/B 7108------------------------------------------------------------------ 7109 Bra 7110 [^a]+ 7111 \d 7112 Ket 7113 End 7114------------------------------------------------------------------ 7115 7116/a*[^a]/B 7117------------------------------------------------------------------ 7118 Bra 7119 a*+ 7120 [^a] 7121 Ket 7122 End 7123------------------------------------------------------------------ 7124 7125/(?P<abc>x)(?P<xyz>y)/I 7126Capture group count = 2 7127Named capture groups: 7128 abc 1 7129 xyz 2 7130First code unit = 'x' 7131Last code unit = 'y' 7132Subject length lower bound = 2 7133 xy\=copy=abc,copy=xyz 7134 0: xy 7135 1: x 7136 2: y 7137 C x (1) abc (group 1) 7138 C y (1) xyz (group 2) 7139 7140/(?<abc>x)(?'xyz'y)/I 7141Capture group count = 2 7142Named capture groups: 7143 abc 1 7144 xyz 2 7145First code unit = 'x' 7146Last code unit = 'y' 7147Subject length lower bound = 2 7148 xy\=copy=abc,copy=xyz 7149 0: xy 7150 1: x 7151 2: y 7152 C x (1) abc (group 1) 7153 C y (1) xyz (group 2) 7154 7155/(?<abc'x)(?'xyz'y)/I 7156Failed: error 142 at offset 6: syntax error in subpattern name (missing terminator?) 7157 7158/(?<abc>x)(?'xyz>y)/I 7159Failed: error 142 at offset 15: syntax error in subpattern name (missing terminator?) 7160 7161/(?P'abc'x)(?P<xyz>y)/I 7162Failed: error 141 at offset 3: unrecognized character after (?P 7163 7164/^(?:(?(ZZ)a|b)(?<ZZ>X))+/ 7165 bXaX 7166 0: bXaX 7167 1: X 7168 bXbX 7169 0: bX 7170 1: X 7171\= Expect no match 7172 aXaX 7173No match 7174 aXbX 7175No match 7176 7177/^(?P>abc)(?<abcd>xxx)/ 7178Failed: error 115 at offset 5: reference to non-existent subpattern 7179 7180/^(?P>abc)(?<abc>x|y)/ 7181 xx 7182 0: xx 7183 1: x 7184 xy 7185 0: xy 7186 1: y 7187 yy 7188 0: yy 7189 1: y 7190 yx 7191 0: yx 7192 1: x 7193 7194/^(?P>abc)(?P<abc>x|y)/ 7195 xx 7196 0: xx 7197 1: x 7198 xy 7199 0: xy 7200 1: y 7201 yy 7202 0: yy 7203 1: y 7204 yx 7205 0: yx 7206 1: x 7207 7208/^((?(abc)a|b)(?<abc>x|y))+/ 7209 bxay 7210 0: bxay 7211 1: ay 7212 2: y 7213 bxby 7214 0: bx 7215 1: bx 7216 2: x 7217\= Expect no match 7218 axby 7219No match 7220 7221/^(((?P=abc)|X)(?<abc>x|y))+/ 7222 XxXxxx 7223 0: XxXxxx 7224 1: xx 7225 2: x 7226 3: x 7227 XxXyyx 7228 0: XxXyyx 7229 1: yx 7230 2: y 7231 3: x 7232 XxXyxx 7233 0: XxXy 7234 1: Xy 7235 2: X 7236 3: y 7237\= Expect no match 7238 x 7239No match 7240 7241/^(?1)(abc)/ 7242 abcabc 7243 0: abcabc 7244 1: abc 7245 7246/^(?:(?:\1|X)(a|b))+/ 7247 Xaaa 7248 0: Xaaa 7249 1: a 7250 Xaba 7251 0: Xa 7252 1: a 7253 7254/^[\E\Qa\E-\Qz\E]+/B 7255------------------------------------------------------------------ 7256 Bra 7257 ^ 7258 [a-z]++ 7259 Ket 7260 End 7261------------------------------------------------------------------ 7262 7263/^[a\Q]bc\E]/B 7264------------------------------------------------------------------ 7265 Bra 7266 ^ 7267 [\]a-c] 7268 Ket 7269 End 7270------------------------------------------------------------------ 7271 7272/^[a-\Q\E]/B 7273------------------------------------------------------------------ 7274 Bra 7275 ^ 7276 [\-a] 7277 Ket 7278 End 7279------------------------------------------------------------------ 7280 7281/^(?P>abc)[()](?<abc>)/B 7282------------------------------------------------------------------ 7283 Bra 7284 ^ 7285 Recurse 7286 [()] 7287 CBra 1 7288 Ket 7289 Ket 7290 End 7291------------------------------------------------------------------ 7292 7293/^((?(abc)y)[()](?P<abc>x))+/B 7294------------------------------------------------------------------ 7295 Bra 7296 ^ 7297 CBra 1 7298 Cond 7299 2 Cond ref 7300 y 7301 Ket 7302 [()] 7303 CBra 2 7304 x 7305 Ket 7306 KetRmax 7307 Ket 7308 End 7309------------------------------------------------------------------ 7310 (xy)x 7311 0: (xy)x 7312 1: y)x 7313 2: x 7314 7315/^(?P>abc)\Q()\E(?<abc>)/B 7316------------------------------------------------------------------ 7317 Bra 7318 ^ 7319 Recurse 7320 () 7321 CBra 1 7322 Ket 7323 Ket 7324 End 7325------------------------------------------------------------------ 7326 7327/^(?P>abc)[a\Q(]\E(](?<abc>)/B 7328------------------------------------------------------------------ 7329 Bra 7330 ^ 7331 Recurse 7332 [(\]a] 7333 CBra 1 7334 Ket 7335 Ket 7336 End 7337------------------------------------------------------------------ 7338 7339/^(?P>abc) # this is (a comment) 7340 (?<abc>)/Bx 7341------------------------------------------------------------------ 7342 Bra 7343 ^ 7344 Recurse 7345 CBra 1 7346 Ket 7347 Ket 7348 End 7349------------------------------------------------------------------ 7350 7351/^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii 7352Capture group count = 4 7353Max back reference = 4 7354Named capture groups: 7355 four 4 7356 one 1 7357 three 3 7358 two 2 7359May match empty string 7360Compile options: caseless 7361Overall options: anchored caseless 7362Subject length lower bound = 0 7363 1221 7364 0: 1221 7365 1: 1221 7366 2: 1 7367 Satan, oscillate my metallic sonatas! 7368 0: Satan, oscillate my metallic sonatas! 7369 1: <unset> 7370 2: <unset> 7371 3: Satan, oscillate my metallic sonatas 7372 4: S 7373 A man, a plan, a canal: Panama! 7374 0: A man, a plan, a canal: Panama! 7375 1: <unset> 7376 2: <unset> 7377 3: A man, a plan, a canal: Panama 7378 4: A 7379 Able was I ere I saw Elba. 7380 0: Able was I ere I saw Elba. 7381 1: <unset> 7382 2: <unset> 7383 3: Able was I ere I saw Elba 7384 4: A 7385\= Expect no match 7386 The quick brown fox 7387No match 7388 7389/(?=(\w+))\1:/I 7390Capture group count = 1 7391Max back reference = 1 7392Starting 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 7393 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 7394Last code unit = ':' 7395Subject length lower bound = 2 7396 abcd: 7397 0: abcd: 7398 1: abcd 7399 7400/(?=(?'abc'\w+))\k<abc>:/I 7401Capture group count = 1 7402Max back reference = 1 7403Named capture groups: 7404 abc 1 7405Starting 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 7406 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 7407Last code unit = ':' 7408Subject length lower bound = 2 7409 abcd: 7410 0: abcd: 7411 1: abcd 7412 7413/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/dupnames 7414 adaa 7415 0: adaa 7416 1: a 7417 2: d 7418\= Expect no match 7419 addd 7420No match 7421 adbb 7422No match 7423 7424/(?'abc'a|b)(?<abc>d|e)(?&abc){2}/dupnames 7425 bdaa 7426 0: bdaa 7427 1: b 7428 2: d 7429 bdab 7430 0: bdab 7431 1: b 7432 2: d 7433\= Expect no match 7434 bddd 7435No match 7436 7437/(?(<bc))/ 7438Failed: error 142 at offset 6: syntax error in subpattern name (missing terminator?) 7439 7440/(?(''))/ 7441Failed: error 162 at offset 4: subpattern name expected 7442 7443/(?('R')stuff)/ 7444Failed: error 115 at offset 4: reference to non-existent subpattern 7445 7446/((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) /x 7447 abcabc1Xabc2XabcXabcabc 7448 0: abcabc1Xabc2XabcX 7449 1: abcabc1Xabc2XabcX 7450 2: abcabc1Xabc2XabcX 7451 7452/(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x 7453 abcabc1Xabc2XabcXabcabc 7454 0: abcabc1Xabc2XabcX 7455 1: abcabc1Xabc2XabcX 7456 2: abcabc1Xabc2XabcX 7457 7458/(?<A> (?'B' abc (?(R) (?(R&C)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x 7459Failed: error 115 at offset 27: reference to non-existent subpattern 7460 7461/^(?(DEFINE) abc | xyz ) /x 7462Failed: error 154 at offset 4: DEFINE subpattern contains more than one branch 7463 7464/(?(DEFINE) abc) xyz/Ix 7465Capture group count = 0 7466Options: extended 7467First code unit = 'x' 7468Last code unit = 'z' 7469Subject length lower bound = 3 7470 7471/(a|)*\d/ 7472 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4\=ovector=0 7473 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 7474 1: 7475\= Expect no match 7476 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\=ovector=0 7477No match 7478 7479/^a.b/newline=lf 7480 a\rb 7481 0: a\x0db 7482\= Expect no match 7483 a\nb 7484No match 7485 7486/^a.b/newline=cr 7487 a\nb 7488 0: a\x0ab 7489\= Expect no match 7490 a\rb 7491No match 7492 7493/^a.b/newline=anycrlf 7494 a\x85b 7495 0: a\x85b 7496\= Expect no match 7497 a\rb 7498No match 7499 7500/^a.b/newline=any 7501\= Expect no match 7502 a\nb 7503No match 7504 a\rb 7505No match 7506 a\x85b 7507No match 7508 7509/^abc./gmx,newline=any 7510 abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK 7511 0: abc1 7512 0: abc2 7513 0: abc3 7514 0: abc4 7515 0: abc5 7516 0: abc6 7517 0: abc7 7518 7519/abc.$/gmx,newline=any 7520 abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9 7521 0: abc1 7522 0: abc2 7523 0: abc3 7524 0: abc4 7525 0: abc5 7526 0: abc6 7527 0: abc9 7528 7529/^a\Rb/bsr=unicode 7530 a\nb 7531 0: a\x0ab 7532 a\rb 7533 0: a\x0db 7534 a\r\nb 7535 0: a\x0d\x0ab 7536 a\x0bb 7537 0: a\x0bb 7538 a\x0cb 7539 0: a\x0cb 7540 a\x85b 7541 0: a\x85b 7542\= Expect no match 7543 a\n\rb 7544No match 7545 7546/^a\R*b/bsr=unicode 7547 ab 7548 0: ab 7549 a\nb 7550 0: a\x0ab 7551 a\rb 7552 0: a\x0db 7553 a\r\nb 7554 0: a\x0d\x0ab 7555 a\x0bb 7556 0: a\x0bb 7557 a\x0cb 7558 0: a\x0cb 7559 a\x85b 7560 0: a\x85b 7561 a\n\rb 7562 0: a\x0a\x0db 7563 a\n\r\x85\x0cb 7564 0: a\x0a\x0d\x85\x0cb 7565 7566/^a\R+b/bsr=unicode 7567 a\nb 7568 0: a\x0ab 7569 a\rb 7570 0: a\x0db 7571 a\r\nb 7572 0: a\x0d\x0ab 7573 a\x0bb 7574 0: a\x0bb 7575 a\x0cb 7576 0: a\x0cb 7577 a\x85b 7578 0: a\x85b 7579 a\n\rb 7580 0: a\x0a\x0db 7581 a\n\r\x85\x0cb 7582 0: a\x0a\x0d\x85\x0cb 7583\= Expect no match 7584 ab 7585No match 7586 7587/^a\R{1,3}b/bsr=unicode 7588 a\nb 7589 0: a\x0ab 7590 a\n\rb 7591 0: a\x0a\x0db 7592 a\n\r\x85b 7593 0: a\x0a\x0d\x85b 7594 a\r\n\r\nb 7595 0: a\x0d\x0a\x0d\x0ab 7596 a\r\n\r\n\r\nb 7597 0: a\x0d\x0a\x0d\x0a\x0d\x0ab 7598 a\n\r\n\rb 7599 0: a\x0a\x0d\x0a\x0db 7600 a\n\n\r\nb 7601 0: a\x0a\x0a\x0d\x0ab 7602\= Expect no match 7603 a\n\n\n\rb 7604No match 7605 a\r 7606No match 7607 7608/(?&abc)X(?<abc>P)/I 7609Capture group count = 1 7610Named capture groups: 7611 abc 1 7612Last code unit = 'P' 7613Subject length lower bound = 3 7614 abcPXP123 7615 0: PXP 7616 1: P 7617 7618/(?1)X(?<abc>P)/I 7619Capture group count = 1 7620Named capture groups: 7621 abc 1 7622Last code unit = 'P' 7623Subject length lower bound = 3 7624 abcPXP123 7625 0: PXP 7626 1: P 7627 7628/(?:a(?&abc)b)*(?<abc>x)/ 7629 123axbaxbaxbx456 7630 0: axbaxbaxbx 7631 1: x 7632 123axbaxbaxb456 7633 0: x 7634 1: x 7635 7636/(?:a(?&abc)b){1,5}(?<abc>x)/ 7637 123axbaxbaxbx456 7638 0: axbaxbaxbx 7639 1: x 7640 7641/(?:a(?&abc)b){2,5}(?<abc>x)/ 7642 123axbaxbaxbx456 7643 0: axbaxbaxbx 7644 1: x 7645 7646/(?:a(?&abc)b){2,}(?<abc>x)/ 7647 123axbaxbaxbx456 7648 0: axbaxbaxbx 7649 1: x 7650 7651/(abc)(?i:(?1))/ 7652 defabcabcxyz 7653 0: abcabc 7654 1: abc 7655\= Expect no match 7656 DEFabcABCXYZ 7657No match 7658 7659/(abc)(?:(?i)(?1))/ 7660 defabcabcxyz 7661 0: abcabc 7662 1: abc 7663\= Expect no match 7664 DEFabcABCXYZ 7665No match 7666 7667/^(a)\g-2/ 7668Failed: error 115 at offset 8: reference to non-existent subpattern 7669 7670/^(a)\g/ 7671Failed: error 157 at offset 6: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 7672 7673/^(a)\g{0}/ 7674Failed: error 115 at offset 9: reference to non-existent subpattern 7675 7676/^(a)\g{3/ 7677Failed: error 157 at offset 6: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 7678 7679/^(a)\g{aa}/ 7680Failed: error 115 at offset 7: reference to non-existent subpattern 7681 7682/^a.b/newline=lf 7683 a\rb 7684 0: a\x0db 7685\= Expect no match 7686 a\nb 7687No match 7688 7689/.+foo/ 7690 afoo 7691 0: afoo 7692\= Expect no match 7693 \r\nfoo 7694No match 7695 \nfoo 7696No match 7697 7698/.+foo/newline=crlf 7699 afoo 7700 0: afoo 7701 \nfoo 7702 0: \x0afoo 7703\= Expect no match 7704 \r\nfoo 7705No match 7706 7707/.+foo/newline=any 7708 afoo 7709 0: afoo 7710\= Expect no match 7711 \nfoo 7712No match 7713 \r\nfoo 7714No match 7715 7716/.+foo/s 7717 afoo 7718 0: afoo 7719 \r\nfoo 7720 0: \x0d\x0afoo 7721 \nfoo 7722 0: \x0afoo 7723 7724/^$/gm,newline=any 7725 abc\r\rxyz 7726 0: 7727 abc\n\rxyz 7728 0: 7729\= Expect no match 7730 abc\r\nxyz 7731No match 7732 7733/(?m)^$/g,newline=any,aftertext 7734 abc\r\n\r\n 7735 0: 7736 0+ \x0d\x0a 7737 7738/(?m)^$|^\r\n/g,newline=any,aftertext 7739 abc\r\n\r\n 7740 0: 7741 0+ \x0d\x0a 7742 0: \x0d\x0a 7743 0+ 7744 7745/(?m)$/g,newline=any,aftertext 7746 abc\r\n\r\n 7747 0: 7748 0+ \x0d\x0a\x0d\x0a 7749 0: 7750 0+ \x0d\x0a 7751 0: 7752 0+ 7753 7754/abc.$/gmx,newline=anycrlf 7755 abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9 7756 0: abc1 7757 0: abc4 7758 0: abc5 7759 0: abc9 7760 7761/^X/m 7762 XABC 7763 0: X 7764\= Expect no match 7765 XABC\=notbol 7766No match 7767 7768/(ab|c)(?-1)/B 7769------------------------------------------------------------------ 7770 Bra 7771 CBra 1 7772 ab 7773 Alt 7774 c 7775 Ket 7776 Recurse 7777 Ket 7778 End 7779------------------------------------------------------------------ 7780 abc 7781 0: abc 7782 1: ab 7783 7784/xy(?+1)(abc)/B 7785------------------------------------------------------------------ 7786 Bra 7787 xy 7788 Recurse 7789 CBra 1 7790 abc 7791 Ket 7792 Ket 7793 End 7794------------------------------------------------------------------ 7795 xyabcabc 7796 0: xyabcabc 7797 1: abc 7798\= Expect no match 7799 xyabc 7800No match 7801 7802/x(?-0)y/ 7803Failed: error 126 at offset 5: a relative value of zero is not allowed 7804 7805/x(?-1)y/ 7806Failed: error 115 at offset 5: reference to non-existent subpattern 7807 7808/x(?+0)y/ 7809Failed: error 126 at offset 5: a relative value of zero is not allowed 7810 7811/x(?+1)y/ 7812Failed: error 115 at offset 5: reference to non-existent subpattern 7813 7814/^(abc)?(?(-1)X|Y)/B 7815------------------------------------------------------------------ 7816 Bra 7817 ^ 7818 Brazero 7819 CBra 1 7820 abc 7821 Ket 7822 Cond 7823 1 Cond ref 7824 X 7825 Alt 7826 Y 7827 Ket 7828 Ket 7829 End 7830------------------------------------------------------------------ 7831 abcX 7832 0: abcX 7833 1: abc 7834 Y 7835 0: Y 7836\= Expect no match 7837 abcY 7838No match 7839 7840/^((?(+1)X|Y)(abc))+/B 7841------------------------------------------------------------------ 7842 Bra 7843 ^ 7844 CBra 1 7845 Cond 7846 2 Cond ref 7847 X 7848 Alt 7849 Y 7850 Ket 7851 CBra 2 7852 abc 7853 Ket 7854 KetRmax 7855 Ket 7856 End 7857------------------------------------------------------------------ 7858 YabcXabc 7859 0: YabcXabc 7860 1: Xabc 7861 2: abc 7862 YabcXabcXabc 7863 0: YabcXabcXabc 7864 1: Xabc 7865 2: abc 7866\= Expect no match 7867 XabcXabc 7868No match 7869 7870/(?(-1)a)/B 7871Failed: error 115 at offset 5: reference to non-existent subpattern 7872 7873/((?(-1)a))/B 7874------------------------------------------------------------------ 7875 Bra 7876 CBra 1 7877 Cond 7878 1 Cond ref 7879 a 7880 Ket 7881 Ket 7882 Ket 7883 End 7884------------------------------------------------------------------ 7885 7886/((?(-2)a))/B 7887Failed: error 115 at offset 6: reference to non-existent subpattern 7888 7889/^(?(+1)X|Y)(.)/B 7890------------------------------------------------------------------ 7891 Bra 7892 ^ 7893 Cond 7894 1 Cond ref 7895 X 7896 Alt 7897 Y 7898 Ket 7899 CBra 1 7900 Any 7901 Ket 7902 Ket 7903 End 7904------------------------------------------------------------------ 7905 Y! 7906 0: Y! 7907 1: ! 7908 7909/(?<A>tom|bon)-\k{A}/ 7910 tom-tom 7911 0: tom-tom 7912 1: tom 7913 bon-bon 7914 0: bon-bon 7915 1: bon 7916\= Expect no match 7917 tom-bon 7918No match 7919 7920/\g{A/ 7921Failed: error 142 at offset 4: syntax error in subpattern name (missing terminator?) 7922 7923/(?|(abc)|(xyz))/B 7924------------------------------------------------------------------ 7925 Bra 7926 Bra 7927 CBra 1 7928 abc 7929 Ket 7930 Alt 7931 CBra 1 7932 xyz 7933 Ket 7934 Ket 7935 Ket 7936 End 7937------------------------------------------------------------------ 7938 >abc< 7939 0: abc 7940 1: abc 7941 >xyz< 7942 0: xyz 7943 1: xyz 7944 7945/(x)(?|(abc)|(xyz))(x)/B 7946------------------------------------------------------------------ 7947 Bra 7948 CBra 1 7949 x 7950 Ket 7951 Bra 7952 CBra 2 7953 abc 7954 Ket 7955 Alt 7956 CBra 2 7957 xyz 7958 Ket 7959 Ket 7960 CBra 3 7961 x 7962 Ket 7963 Ket 7964 End 7965------------------------------------------------------------------ 7966 xabcx 7967 0: xabcx 7968 1: x 7969 2: abc 7970 3: x 7971 xxyzx 7972 0: xxyzx 7973 1: x 7974 2: xyz 7975 3: x 7976 7977/(x)(?|(abc)(pqr)|(xyz))(x)/B 7978------------------------------------------------------------------ 7979 Bra 7980 CBra 1 7981 x 7982 Ket 7983 Bra 7984 CBra 2 7985 abc 7986 Ket 7987 CBra 3 7988 pqr 7989 Ket 7990 Alt 7991 CBra 2 7992 xyz 7993 Ket 7994 Ket 7995 CBra 4 7996 x 7997 Ket 7998 Ket 7999 End 8000------------------------------------------------------------------ 8001 xabcpqrx 8002 0: xabcpqrx 8003 1: x 8004 2: abc 8005 3: pqr 8006 4: x 8007 xxyzx 8008 0: xxyzx 8009 1: x 8010 2: xyz 8011 3: <unset> 8012 4: x 8013 8014/\H++X/B 8015------------------------------------------------------------------ 8016 Bra 8017 \H++ 8018 X 8019 Ket 8020 End 8021------------------------------------------------------------------ 8022\= Expect no match 8023 XXXX 8024No match 8025 8026/\H+\hY/B 8027------------------------------------------------------------------ 8028 Bra 8029 \H++ 8030 \h 8031 Y 8032 Ket 8033 End 8034------------------------------------------------------------------ 8035 XXXX Y 8036 0: XXXX Y 8037 8038/\H+ Y/B 8039------------------------------------------------------------------ 8040 Bra 8041 \H++ 8042 Y 8043 Ket 8044 End 8045------------------------------------------------------------------ 8046 8047/\h+A/B 8048------------------------------------------------------------------ 8049 Bra 8050 \h++ 8051 A 8052 Ket 8053 End 8054------------------------------------------------------------------ 8055 8056/\v*B/B 8057------------------------------------------------------------------ 8058 Bra 8059 \v*+ 8060 B 8061 Ket 8062 End 8063------------------------------------------------------------------ 8064 8065/\V+\x0a/B 8066------------------------------------------------------------------ 8067 Bra 8068 \V++ 8069 \x0a 8070 Ket 8071 End 8072------------------------------------------------------------------ 8073 8074/A+\h/B 8075------------------------------------------------------------------ 8076 Bra 8077 A++ 8078 \h 8079 Ket 8080 End 8081------------------------------------------------------------------ 8082 8083/ *\H/B 8084------------------------------------------------------------------ 8085 Bra 8086 *+ 8087 \H 8088 Ket 8089 End 8090------------------------------------------------------------------ 8091 8092/A*\v/B 8093------------------------------------------------------------------ 8094 Bra 8095 A*+ 8096 \v 8097 Ket 8098 End 8099------------------------------------------------------------------ 8100 8101/\x0b*\V/B 8102------------------------------------------------------------------ 8103 Bra 8104 \x0b*+ 8105 \V 8106 Ket 8107 End 8108------------------------------------------------------------------ 8109 8110/\d+\h/B 8111------------------------------------------------------------------ 8112 Bra 8113 \d++ 8114 \h 8115 Ket 8116 End 8117------------------------------------------------------------------ 8118 8119/\d*\v/B 8120------------------------------------------------------------------ 8121 Bra 8122 \d*+ 8123 \v 8124 Ket 8125 End 8126------------------------------------------------------------------ 8127 8128/S+\h\S+\v/B 8129------------------------------------------------------------------ 8130 Bra 8131 S++ 8132 \h 8133 \S++ 8134 \v 8135 Ket 8136 End 8137------------------------------------------------------------------ 8138 8139/\w{3,}\h\w+\v/B 8140------------------------------------------------------------------ 8141 Bra 8142 \w{3} 8143 \w*+ 8144 \h 8145 \w++ 8146 \v 8147 Ket 8148 End 8149------------------------------------------------------------------ 8150 8151/\h+\d\h+\w\h+\S\h+\H/B 8152------------------------------------------------------------------ 8153 Bra 8154 \h++ 8155 \d 8156 \h++ 8157 \w 8158 \h++ 8159 \S 8160 \h++ 8161 \H 8162 Ket 8163 End 8164------------------------------------------------------------------ 8165 8166/\v+\d\v+\w\v+\S\v+\V/B 8167------------------------------------------------------------------ 8168 Bra 8169 \v++ 8170 \d 8171 \v++ 8172 \w 8173 \v++ 8174 \S 8175 \v++ 8176 \V 8177 Ket 8178 End 8179------------------------------------------------------------------ 8180 8181/\H+\h\H+\d/B 8182------------------------------------------------------------------ 8183 Bra 8184 \H++ 8185 \h 8186 \H+ 8187 \d 8188 Ket 8189 End 8190------------------------------------------------------------------ 8191 8192/\V+\v\V+\w/B 8193------------------------------------------------------------------ 8194 Bra 8195 \V++ 8196 \v 8197 \V+ 8198 \w 8199 Ket 8200 End 8201------------------------------------------------------------------ 8202 8203/\( (?: [^()]* | (?R) )* \)/x 8204(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(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 8205 0: (0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(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) 8206 8207/[\E]AAA/ 8208Failed: error 106 at offset 7: missing terminating ] for character class 8209 8210/[\Q\E]AAA/ 8211Failed: error 106 at offset 9: missing terminating ] for character class 8212 8213/[^\E]AAA/ 8214Failed: error 106 at offset 8: missing terminating ] for character class 8215 8216/[^\Q\E]AAA/ 8217Failed: error 106 at offset 10: missing terminating ] for character class 8218 8219/[\E^]AAA/ 8220Failed: error 106 at offset 8: missing terminating ] for character class 8221 8222/[\Q\E^]AAA/ 8223Failed: error 106 at offset 10: missing terminating ] for character class 8224 8225/A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/B 8226------------------------------------------------------------------ 8227 Bra 8228 A 8229 *PRUNE 8230 B 8231 *SKIP 8232 C 8233 *THEN 8234 D 8235 *COMMIT 8236 E 8237 *FAIL 8238 F 8239 *FAIL 8240 G 8241 *FAIL 8242 H 8243 *ACCEPT 8244 I 8245 Ket 8246 End 8247------------------------------------------------------------------ 8248 8249/^a+(*FAIL)/auto_callout 8250\= Expect no match 8251 aaaaaa 8252--->aaaaaa 8253 +0 ^ ^ 8254 +1 ^ a+ 8255 +3 ^ ^ (*FAIL) 8256 +3 ^ ^ (*FAIL) 8257 +3 ^ ^ (*FAIL) 8258 +3 ^ ^ (*FAIL) 8259 +3 ^ ^ (*FAIL) 8260 +3 ^^ (*FAIL) 8261No match 8262 8263/a+b?c+(*FAIL)/auto_callout 8264\= Expect no match 8265 aaabccc 8266--->aaabccc 8267 +0 ^ a+ 8268 +2 ^ ^ b? 8269 +4 ^ ^ c+ 8270 +6 ^ ^ (*FAIL) 8271 +6 ^ ^ (*FAIL) 8272 +6 ^ ^ (*FAIL) 8273 +0 ^ a+ 8274 +2 ^ ^ b? 8275 +4 ^ ^ c+ 8276 +6 ^ ^ (*FAIL) 8277 +6 ^ ^ (*FAIL) 8278 +6 ^ ^ (*FAIL) 8279 +0 ^ a+ 8280 +2 ^^ b? 8281 +4 ^ ^ c+ 8282 +6 ^ ^ (*FAIL) 8283 +6 ^ ^ (*FAIL) 8284 +6 ^ ^ (*FAIL) 8285No match 8286 8287/a+b?(*PRUNE)c+(*FAIL)/auto_callout 8288\= Expect no match 8289 aaabccc 8290--->aaabccc 8291 +0 ^ a+ 8292 +2 ^ ^ b? 8293 +4 ^ ^ (*PRUNE) 8294+12 ^ ^ c+ 8295+14 ^ ^ (*FAIL) 8296+14 ^ ^ (*FAIL) 8297+14 ^ ^ (*FAIL) 8298 +0 ^ a+ 8299 +2 ^ ^ b? 8300 +4 ^ ^ (*PRUNE) 8301+12 ^ ^ c+ 8302+14 ^ ^ (*FAIL) 8303+14 ^ ^ (*FAIL) 8304+14 ^ ^ (*FAIL) 8305 +0 ^ a+ 8306 +2 ^^ b? 8307 +4 ^ ^ (*PRUNE) 8308+12 ^ ^ c+ 8309+14 ^ ^ (*FAIL) 8310+14 ^ ^ (*FAIL) 8311+14 ^ ^ (*FAIL) 8312No match 8313 8314/a+b?(*COMMIT)c+(*FAIL)/auto_callout 8315\= Expect no match 8316 aaabccc 8317--->aaabccc 8318 +0 ^ a+ 8319 +2 ^ ^ b? 8320 +4 ^ ^ (*COMMIT) 8321+13 ^ ^ c+ 8322+15 ^ ^ (*FAIL) 8323+15 ^ ^ (*FAIL) 8324+15 ^ ^ (*FAIL) 8325No match 8326 8327/a+b?(*SKIP)c+(*FAIL)/auto_callout 8328\= Expect no match 8329 aaabcccaaabccc 8330--->aaabcccaaabccc 8331 +0 ^ a+ 8332 +2 ^ ^ b? 8333 +4 ^ ^ (*SKIP) 8334+11 ^ ^ c+ 8335+13 ^ ^ (*FAIL) 8336+13 ^ ^ (*FAIL) 8337+13 ^ ^ (*FAIL) 8338 +0 ^ a+ 8339 +2 ^ ^ b? 8340 +4 ^ ^ (*SKIP) 8341+11 ^ ^ c+ 8342+13 ^ ^ (*FAIL) 8343+13 ^ ^ (*FAIL) 8344+13 ^ ^ (*FAIL) 8345No match 8346 8347/a+b?(*THEN)c+(*FAIL)/auto_callout 8348\= Expect no match 8349 aaabccc 8350--->aaabccc 8351 +0 ^ a+ 8352 +2 ^ ^ b? 8353 +4 ^ ^ (*THEN) 8354+11 ^ ^ c+ 8355+13 ^ ^ (*FAIL) 8356+13 ^ ^ (*FAIL) 8357+13 ^ ^ (*FAIL) 8358 +0 ^ a+ 8359 +2 ^ ^ b? 8360 +4 ^ ^ (*THEN) 8361+11 ^ ^ c+ 8362+13 ^ ^ (*FAIL) 8363+13 ^ ^ (*FAIL) 8364+13 ^ ^ (*FAIL) 8365 +0 ^ a+ 8366 +2 ^^ b? 8367 +4 ^ ^ (*THEN) 8368+11 ^ ^ c+ 8369+13 ^ ^ (*FAIL) 8370+13 ^ ^ (*FAIL) 8371+13 ^ ^ (*FAIL) 8372No match 8373 8374/a(*MARK)b/ 8375Failed: error 166 at offset 7: (*MARK) must have an argument 8376 8377/\g6666666666/ 8378Failed: error 161 at offset 7: subpattern number is too big 8379 8380/[\g6666666666]/B 8381------------------------------------------------------------------ 8382 Bra 8383 [6g] 8384 Ket 8385 End 8386------------------------------------------------------------------ 8387 8388/(?1)\c[/ 8389Failed: error 115 at offset 3: reference to non-existent subpattern 8390 8391/.+A/newline=crlf 8392\= Expect no match 8393 \r\nA 8394No match 8395 8396/\nA/newline=crlf 8397 \r\nA 8398 0: \x0aA 8399 8400/[\r\n]A/newline=crlf 8401 \r\nA 8402 0: \x0aA 8403 8404/(\r|\n)A/newline=crlf 8405 \r\nA 8406 0: \x0aA 8407 1: \x0a 8408 8409/a(*CR)b/ 8410Failed: error 160 at offset 5: (*VERB) not recognized or malformed 8411 8412/(*CR)a.b/ 8413 a\nb 8414 0: a\x0ab 8415\= Expect no match 8416 a\rb 8417No match 8418 8419/(*CR)a.b/newline=lf 8420 a\nb 8421 0: a\x0ab 8422\= Expect no match 8423 a\rb 8424No match 8425 8426/(*LF)a.b/newline=CRLF 8427 a\rb 8428 0: a\x0db 8429\= Expect no match 8430 a\nb 8431No match 8432 8433/(*CRLF)a.b/ 8434 a\rb 8435 0: a\x0db 8436 a\nb 8437 0: a\x0ab 8438\= Expect no match 8439 a\r\nb 8440No match 8441 8442/(*ANYCRLF)a.b/newline=CR 8443\= Expect no match 8444 a\rb 8445No match 8446 a\nb 8447No match 8448 a\r\nb 8449No match 8450 8451/(*ANY)a.b/newline=cr 8452\= Expect no match 8453 a\rb 8454No match 8455 a\nb 8456No match 8457 a\r\nb 8458No match 8459 a\x85b 8460No match 8461 8462/(*ANY).*/g 8463 abc\r\ndef 8464 0: abc 8465 0: 8466 0: def 8467 0: 8468 8469/(*ANYCRLF).*/g 8470 abc\r\ndef 8471 0: abc 8472 0: 8473 0: def 8474 0: 8475 8476/(*CRLF).*/g 8477 abc\r\ndef 8478 0: abc 8479 0: 8480 0: def 8481 0: 8482 8483/(*NUL)^.*/ 8484 a\nb\x00ccc 8485 0: a\x0ab 8486 8487/(*NUL)^.*/s 8488 a\nb\x00ccc 8489 0: a\x0ab\x00ccc 8490 8491/^x/m,newline=NUL 8492 ab\x00xy 8493 0: x 8494 8495/'#comment' 0d 0a 00 '^x\' 0a 'y'/x,newline=nul,hex 8496 x\nyz 8497 0: x\x0ay 8498 8499/(*NUL)^X\NY/ 8500 X\nY 8501 0: X\x0aY 8502 X\rY 8503 0: X\x0dY 8504\= Expect no match 8505 X\x00Y 8506No match 8507 8508/a\Rb/I,bsr=anycrlf 8509Capture group count = 0 8510\R matches CR, LF, or CRLF 8511First code unit = 'a' 8512Last code unit = 'b' 8513Subject length lower bound = 3 8514 a\rb 8515 0: a\x0db 8516 a\nb 8517 0: a\x0ab 8518 a\r\nb 8519 0: a\x0d\x0ab 8520\= Expect no match 8521 a\x85b 8522No match 8523 a\x0bb 8524No match 8525 8526/a\Rb/I,bsr=unicode 8527Capture group count = 0 8528\R matches any Unicode newline 8529First code unit = 'a' 8530Last code unit = 'b' 8531Subject length lower bound = 3 8532 a\rb 8533 0: a\x0db 8534 a\nb 8535 0: a\x0ab 8536 a\r\nb 8537 0: a\x0d\x0ab 8538 a\x85b 8539 0: a\x85b 8540 a\x0bb 8541 0: a\x0bb 8542 8543/a\R?b/I,bsr=anycrlf 8544Capture group count = 0 8545\R matches CR, LF, or CRLF 8546First code unit = 'a' 8547Last code unit = 'b' 8548Subject length lower bound = 2 8549 a\rb 8550 0: a\x0db 8551 a\nb 8552 0: a\x0ab 8553 a\r\nb 8554 0: a\x0d\x0ab 8555\= Expect no match 8556 a\x85b 8557No match 8558 a\x0bb 8559No match 8560 8561/a\R?b/I,bsr=unicode 8562Capture group count = 0 8563\R matches any Unicode newline 8564First code unit = 'a' 8565Last code unit = 'b' 8566Subject length lower bound = 2 8567 a\rb 8568 0: a\x0db 8569 a\nb 8570 0: a\x0ab 8571 a\r\nb 8572 0: a\x0d\x0ab 8573 a\x85b 8574 0: a\x85b 8575 a\x0bb 8576 0: a\x0bb 8577 8578/a\R{2,4}b/I,bsr=anycrlf 8579Capture group count = 0 8580\R matches CR, LF, or CRLF 8581First code unit = 'a' 8582Last code unit = 'b' 8583Subject length lower bound = 4 8584 a\r\n\nb 8585 0: a\x0d\x0a\x0ab 8586 a\n\r\rb 8587 0: a\x0a\x0d\x0db 8588 a\r\n\r\n\r\n\r\nb 8589 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab 8590\= Expect no match 8591 a\x85\x85b 8592No match 8593 a\x0b\x0bb 8594No match 8595 8596/a\R{2,4}b/I,bsr=unicode 8597Capture group count = 0 8598\R matches any Unicode newline 8599First code unit = 'a' 8600Last code unit = 'b' 8601Subject length lower bound = 4 8602 a\r\rb 8603 0: a\x0d\x0db 8604 a\n\n\nb 8605 0: a\x0a\x0a\x0ab 8606 a\r\n\n\r\rb 8607 0: a\x0d\x0a\x0a\x0d\x0db 8608 a\x85\x85b 8609 0: a\x85\x85b 8610 a\x0b\x0bb 8611 0: a\x0b\x0bb 8612\= Expect no match 8613 a\r\r\r\r\rb 8614No match 8615 8616/(*BSR_ANYCRLF)a\Rb/I 8617Capture group count = 0 8618\R matches CR, LF, or CRLF 8619First code unit = 'a' 8620Last code unit = 'b' 8621Subject length lower bound = 3 8622 a\nb 8623 0: a\x0ab 8624 a\rb 8625 0: a\x0db 8626 8627/(*BSR_UNICODE)a\Rb/I 8628Capture group count = 0 8629\R matches any Unicode newline 8630First code unit = 'a' 8631Last code unit = 'b' 8632Subject length lower bound = 3 8633 a\x85b 8634 0: a\x85b 8635 8636/(*BSR_ANYCRLF)(*CRLF)a\Rb/I 8637Capture group count = 0 8638\R matches CR, LF, or CRLF 8639Forced newline is CRLF 8640First code unit = 'a' 8641Last code unit = 'b' 8642Subject length lower bound = 3 8643 a\nb 8644 0: a\x0ab 8645 a\rb 8646 0: a\x0db 8647 8648/(*CRLF)(*BSR_UNICODE)a\Rb/I 8649Capture group count = 0 8650\R matches any Unicode newline 8651Forced newline is CRLF 8652First code unit = 'a' 8653Last code unit = 'b' 8654Subject length lower bound = 3 8655 a\x85b 8656 0: a\x85b 8657 8658/(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I 8659Capture group count = 0 8660\R matches CR, LF, or CRLF 8661Forced newline is CR 8662First code unit = 'a' 8663Last code unit = 'b' 8664Subject length lower bound = 2 8665 8666/(?<a>)(?&)/ 8667Failed: error 162 at offset 9: subpattern name expected 8668 8669/(?<abc>)(?&a)/ 8670Failed: error 115 at offset 11: reference to non-existent subpattern 8671 8672/(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/ 8673Failed: error 115 at offset 9: reference to non-existent subpattern 8674 8675/(?+-a)/ 8676Failed: error 129 at offset 2: digit expected after (?+ or (?- 8677 8678/(?-+a)/ 8679Failed: error 111 at offset 3: unrecognized character after (? or (?- 8680 8681/(?(-1))/ 8682Failed: error 115 at offset 5: reference to non-existent subpattern 8683 8684/(?(+10))/ 8685Failed: error 115 at offset 4: reference to non-existent subpattern 8686 8687/(?(10))/ 8688Failed: error 115 at offset 3: reference to non-existent subpattern 8689 8690/(?(+2))()()/ 8691 8692/(?(2))()()/ 8693 8694/\k''/ 8695Failed: error 162 at offset 3: subpattern name expected 8696 8697/\k<>/ 8698Failed: error 162 at offset 3: subpattern name expected 8699 8700/\k{}/ 8701Failed: error 162 at offset 3: subpattern name expected 8702 8703/\k/ 8704Failed: error 169 at offset 2: \k is not followed by a braced, angle-bracketed, or quoted name 8705 8706/\kabc/ 8707Failed: error 169 at offset 2: \k is not followed by a braced, angle-bracketed, or quoted name 8708 8709/(?P=)/ 8710Failed: error 162 at offset 4: subpattern name expected 8711 8712/(?P>)/ 8713Failed: error 162 at offset 4: subpattern name expected 8714 8715/[[:foo:]]/ 8716Failed: error 130 at offset 3: unknown POSIX class name 8717 8718/[[:1234:]]/ 8719Failed: error 130 at offset 3: unknown POSIX class name 8720 8721/[[:f\oo:]]/ 8722Failed: error 130 at offset 3: unknown POSIX class name 8723 8724/[[: :]]/ 8725Failed: error 130 at offset 3: unknown POSIX class name 8726 8727/[[:...:]]/ 8728Failed: error 130 at offset 3: unknown POSIX class name 8729 8730/[[:l\ower:]]/ 8731Failed: error 130 at offset 3: unknown POSIX class name 8732 8733/[[:abc\:]]/ 8734Failed: error 130 at offset 3: unknown POSIX class name 8735 8736/[abc[:x\]pqr:]]/ 8737Failed: error 130 at offset 6: unknown POSIX class name 8738 8739/[[:a\dz:]]/ 8740Failed: error 130 at offset 3: unknown POSIX class name 8741 8742/(^(a|b\g<-1'c))/ 8743Failed: error 157 at offset 8: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 8744 8745/^(?+1)(?<a>x|y){0}z/ 8746 xzxx 8747 0: xz 8748 yzyy 8749 0: yz 8750\= Expect no match 8751 xxz 8752No match 8753 8754/(\3)(\1)(a)/ 8755\= Expect no match 8756 cat 8757No match 8758 8759/(\3)(\1)(a)/allow_empty_class,match_unset_backref,dupnames 8760 cat 8761 0: a 8762 1: 8763 2: 8764 3: a 8765 8766/TA]/ 8767 The ACTA] comes 8768 0: TA] 8769 8770/TA]/allow_empty_class,match_unset_backref,dupnames 8771 The ACTA] comes 8772 0: TA] 8773 8774/(?2)[]a()b](abc)/ 8775Failed: error 115 at offset 3: reference to non-existent subpattern 8776 abcbabc 8777 8778/(?2)[^]a()b](abc)/ 8779Failed: error 115 at offset 3: reference to non-existent subpattern 8780 abcbabc 8781 8782/(?1)[]a()b](abc)/ 8783 abcbabc 8784 0: abcbabc 8785 1: abc 8786\= Expect no match 8787 abcXabc 8788No match 8789 8790/(?1)[^]a()b](abc)/ 8791 abcXabc 8792 0: abcXabc 8793 1: abc 8794\= Expect no match 8795 abcbabc 8796No match 8797 8798/(?2)[]a()b](abc)(xyz)/ 8799 xyzbabcxyz 8800 0: xyzbabcxyz 8801 1: abc 8802 2: xyz 8803 8804/(?&N)[]a(?<N>)](?<M>abc)/ 8805Failed: error 115 at offset 3: reference to non-existent subpattern 8806 abc<abc 8807 8808/(?&N)[]a(?<N>)](abc)/ 8809Failed: error 115 at offset 3: reference to non-existent subpattern 8810 abc<abc 8811 8812/a[]b/ 8813Failed: error 106 at offset 4: missing terminating ] for character class 8814 8815/a[^]b/ 8816Failed: error 106 at offset 5: missing terminating ] for character class 8817 8818/a[]b/allow_empty_class,match_unset_backref,dupnames 8819\= Expect no match 8820 ab 8821No match 8822 8823/a[]+b/allow_empty_class,match_unset_backref,dupnames 8824\= Expect no match 8825 ab 8826No match 8827 8828/a[]*+b/allow_empty_class,match_unset_backref,dupnames 8829\= Expect no match 8830 ab 8831No match 8832 8833/a[^]b/allow_empty_class,match_unset_backref,dupnames 8834 aXb 8835 0: aXb 8836 a\nb 8837 0: a\x0ab 8838\= Expect no match 8839 ab 8840No match 8841 8842/a[^]+b/allow_empty_class,match_unset_backref,dupnames 8843 aXb 8844 0: aXb 8845 a\nX\nXb 8846 0: a\x0aX\x0aXb 8847\= Expect no match 8848 ab 8849No match 8850 8851/a(?!)b/B 8852------------------------------------------------------------------ 8853 Bra 8854 a 8855 *FAIL 8856 b 8857 Ket 8858 End 8859------------------------------------------------------------------ 8860 8861/(?!)?a/B 8862------------------------------------------------------------------ 8863 Bra 8864 Brazero 8865 Assert not 8866 Ket 8867 a 8868 Ket 8869 End 8870------------------------------------------------------------------ 8871 ab 8872 0: a 8873 8874/a(*FAIL)+b/ 8875Failed: error 109 at offset 8: quantifier does not follow a repeatable item 8876 8877/(abc|pqr|123){0}[xyz]/I 8878Capture group count = 1 8879Starting code units: x y z 8880Subject length lower bound = 1 8881 8882/(?(?=.*b)b|^)/I,auto_callout 8883Capture group count = 0 8884May match empty string 8885Options: auto_callout 8886Subject length lower bound = 0 8887 adc 8888--->adc 8889 +0 ^ (? 8890 +2 ^ (?= 8891 +5 ^ .* 8892 +7 ^ ^ b 8893 +7 ^ ^ b 8894 +7 ^^ b 8895 +7 ^ b 8896+11 ^ ^ 8897+12 ^ ) 8898+13 ^ End of pattern 8899 0: 8900 abc 8901--->abc 8902 +0 ^ (? 8903 +2 ^ (?= 8904 +5 ^ .* 8905 +7 ^ ^ b 8906 +7 ^ ^ b 8907 +7 ^^ b 8908 +8 ^ ^ ) 8909 +9 ^ b 8910 +0 ^ (? 8911 +2 ^ (?= 8912 +5 ^ .* 8913 +7 ^ ^ b 8914 +7 ^^ b 8915 +7 ^ b 8916 +8 ^^ ) 8917 +9 ^ b 8918+10 ^^ | 8919+13 ^^ End of pattern 8920 0: b 8921 8922/(?(?=b).*b|^d)/I 8923Capture group count = 0 8924Subject length lower bound = 1 8925 8926/(?(?=.*b).*b|^d)/I 8927Capture group count = 0 8928Subject length lower bound = 1 8929 8930/xyz/auto_callout 8931 xyz 8932--->xyz 8933 +0 ^ x 8934 +1 ^^ y 8935 +2 ^ ^ z 8936 +3 ^ ^ End of pattern 8937 0: xyz 8938 abcxyz 8939--->abcxyz 8940 +0 ^ x 8941 +1 ^^ y 8942 +2 ^ ^ z 8943 +3 ^ ^ End of pattern 8944 0: xyz 8945\= Expect no match 8946 abc 8947No match 8948 abcxypqr 8949No match 8950 8951/xyz/auto_callout,no_start_optimize 8952 abcxyz 8953--->abcxyz 8954 +0 ^ x 8955 +0 ^ x 8956 +0 ^ x 8957 +0 ^ x 8958 +1 ^^ y 8959 +2 ^ ^ z 8960 +3 ^ ^ End of pattern 8961 0: xyz 8962\= Expect no match 8963 abc 8964--->abc 8965 +0 ^ x 8966 +0 ^ x 8967 +0 ^ x 8968 +0 ^ x 8969No match 8970 abcxypqr 8971--->abcxypqr 8972 +0 ^ x 8973 +0 ^ x 8974 +0 ^ x 8975 +0 ^ x 8976 +1 ^^ y 8977 +2 ^ ^ z 8978 +0 ^ x 8979 +0 ^ x 8980 +0 ^ x 8981 +0 ^ x 8982 +0 ^ x 8983No match 8984 8985/(*NO_START_OPT)xyz/auto_callout 8986 abcxyz 8987--->abcxyz 8988+15 ^ x 8989+15 ^ x 8990+15 ^ x 8991+15 ^ x 8992+16 ^^ y 8993+17 ^ ^ z 8994+18 ^ ^ End of pattern 8995 0: xyz 8996 8997/(*NO_AUTO_POSSESS)a+b/B 8998------------------------------------------------------------------ 8999 Bra 9000 a+ 9001 b 9002 Ket 9003 End 9004------------------------------------------------------------------ 9005 9006/xyz/auto_callout,no_start_optimize 9007 abcxyz 9008--->abcxyz 9009 +0 ^ x 9010 +0 ^ x 9011 +0 ^ x 9012 +0 ^ x 9013 +1 ^^ y 9014 +2 ^ ^ z 9015 +3 ^ ^ End of pattern 9016 0: xyz 9017 9018/^"((?(?=[a])[^"])|b)*"$/auto_callout 9019 "ab" 9020--->"ab" 9021 +0 ^ ^ 9022 +1 ^ " 9023 +2 ^^ ( 9024 +3 ^^ (? 9025 +5 ^^ (?= 9026 +8 ^^ [a] 9027+11 ^ ^ ) 9028+12 ^^ [^"] 9029+16 ^ ^ ) 9030+17 ^ ^ | 9031 +3 ^ ^ (? 9032 +5 ^ ^ (?= 9033 +8 ^ ^ [a] 9034+17 ^ ^ | 9035+21 ^ ^ " 9036+18 ^ ^ b 9037+19 ^ ^ )* 9038 +3 ^ ^ (? 9039 +5 ^ ^ (?= 9040 +8 ^ ^ [a] 9041+17 ^ ^ | 9042+21 ^ ^ " 9043+22 ^ ^ $ 9044+23 ^ ^ End of pattern 9045 0: "ab" 9046 1: 9047 9048/^"((?(?=[a])[^"])|b)*"$/ 9049 "ab" 9050 0: "ab" 9051 1: 9052 9053/^X(?5)(a)(?|(b)|(q))(c)(d)Y/ 9054Failed: error 115 at offset 5: reference to non-existent subpattern 9055 XYabcdY 9056 9057/^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/ 9058 XYabcdY 9059 0: XYabcdY 9060 1: a 9061 2: b 9062 3: c 9063 4: d 9064 5: Y 9065 9066/Xa{2,4}b/ 9067 X\=ps 9068Partial match: X 9069 Xa\=ps 9070Partial match: Xa 9071 Xaa\=ps 9072Partial match: Xaa 9073 Xaaa\=ps 9074Partial match: Xaaa 9075 Xaaaa\=ps 9076Partial match: Xaaaa 9077 9078/Xa{2,4}?b/ 9079 X\=ps 9080Partial match: X 9081 Xa\=ps 9082Partial match: Xa 9083 Xaa\=ps 9084Partial match: Xaa 9085 Xaaa\=ps 9086Partial match: Xaaa 9087 Xaaaa\=ps 9088Partial match: Xaaaa 9089 9090/Xa{2,4}+b/ 9091 X\=ps 9092Partial match: X 9093 Xa\=ps 9094Partial match: Xa 9095 Xaa\=ps 9096Partial match: Xaa 9097 Xaaa\=ps 9098Partial match: Xaaa 9099 Xaaaa\=ps 9100Partial match: Xaaaa 9101 9102/X\d{2,4}b/ 9103 X\=ps 9104Partial match: X 9105 X3\=ps 9106Partial match: X3 9107 X33\=ps 9108Partial match: X33 9109 X333\=ps 9110Partial match: X333 9111 X3333\=ps 9112Partial match: X3333 9113 9114/X\d{2,4}?b/ 9115 X\=ps 9116Partial match: X 9117 X3\=ps 9118Partial match: X3 9119 X33\=ps 9120Partial match: X33 9121 X333\=ps 9122Partial match: X333 9123 X3333\=ps 9124Partial match: X3333 9125 9126/X\d{2,4}+b/ 9127 X\=ps 9128Partial match: X 9129 X3\=ps 9130Partial match: X3 9131 X33\=ps 9132Partial match: X33 9133 X333\=ps 9134Partial match: X333 9135 X3333\=ps 9136Partial match: X3333 9137 9138/X\D{2,4}b/ 9139 X\=ps 9140Partial match: X 9141 Xa\=ps 9142Partial match: Xa 9143 Xaa\=ps 9144Partial match: Xaa 9145 Xaaa\=ps 9146Partial match: Xaaa 9147 Xaaaa\=ps 9148Partial match: Xaaaa 9149 9150/X\D{2,4}?b/ 9151 X\=ps 9152Partial match: X 9153 Xa\=ps 9154Partial match: Xa 9155 Xaa\=ps 9156Partial match: Xaa 9157 Xaaa\=ps 9158Partial match: Xaaa 9159 Xaaaa\=ps 9160Partial match: Xaaaa 9161 9162/X\D{2,4}+b/ 9163 X\=ps 9164Partial match: X 9165 Xa\=ps 9166Partial match: Xa 9167 Xaa\=ps 9168Partial match: Xaa 9169 Xaaa\=ps 9170Partial match: Xaaa 9171 Xaaaa\=ps 9172Partial match: Xaaaa 9173 9174/X[abc]{2,4}b/ 9175 X\=ps 9176Partial match: X 9177 Xa\=ps 9178Partial match: Xa 9179 Xaa\=ps 9180Partial match: Xaa 9181 Xaaa\=ps 9182Partial match: Xaaa 9183 Xaaaa\=ps 9184Partial match: Xaaaa 9185 9186/X[abc]{2,4}?b/ 9187 X\=ps 9188Partial match: X 9189 Xa\=ps 9190Partial match: Xa 9191 Xaa\=ps 9192Partial match: Xaa 9193 Xaaa\=ps 9194Partial match: Xaaa 9195 Xaaaa\=ps 9196Partial match: Xaaaa 9197 9198/X[abc]{2,4}+b/ 9199 X\=ps 9200Partial match: X 9201 Xa\=ps 9202Partial match: Xa 9203 Xaa\=ps 9204Partial match: Xaa 9205 Xaaa\=ps 9206Partial match: Xaaa 9207 Xaaaa\=ps 9208Partial match: Xaaaa 9209 9210/X[^a]{2,4}b/ 9211 X\=ps 9212Partial match: X 9213 Xz\=ps 9214Partial match: Xz 9215 Xzz\=ps 9216Partial match: Xzz 9217 Xzzz\=ps 9218Partial match: Xzzz 9219 Xzzzz\=ps 9220Partial match: Xzzzz 9221 9222/X[^a]{2,4}?b/ 9223 X\=ps 9224Partial match: X 9225 Xz\=ps 9226Partial match: Xz 9227 Xzz\=ps 9228Partial match: Xzz 9229 Xzzz\=ps 9230Partial match: Xzzz 9231 Xzzzz\=ps 9232Partial match: Xzzzz 9233 9234/X[^a]{2,4}+b/ 9235 X\=ps 9236Partial match: X 9237 Xz\=ps 9238Partial match: Xz 9239 Xzz\=ps 9240Partial match: Xzz 9241 Xzzz\=ps 9242Partial match: Xzzz 9243 Xzzzz\=ps 9244Partial match: Xzzzz 9245 9246/(Y)X\1{2,4}b/ 9247 YX\=ps 9248Partial match: YX 9249 YXY\=ps 9250Partial match: YXY 9251 YXYY\=ps 9252Partial match: YXYY 9253 YXYYY\=ps 9254Partial match: YXYYY 9255 YXYYYY\=ps 9256Partial match: YXYYYY 9257 9258/(Y)X\1{2,4}?b/ 9259 YX\=ps 9260Partial match: YX 9261 YXY\=ps 9262Partial match: YXY 9263 YXYY\=ps 9264Partial match: YXYY 9265 YXYYY\=ps 9266Partial match: YXYYY 9267 YXYYYY\=ps 9268Partial match: YXYYYY 9269 9270/(Y)X\1{2,4}+b/ 9271 YX\=ps 9272Partial match: YX 9273 YXY\=ps 9274Partial match: YXY 9275 YXYY\=ps 9276Partial match: YXYY 9277 YXYYY\=ps 9278Partial match: YXYYY 9279 YXYYYY\=ps 9280Partial match: YXYYYY 9281 9282/\++\KZ|\d+X|9+Y/startchar 9283 ++++123999\=ps 9284Partial match: 123999 9285 ++++123999Y\=ps 9286 0: 999Y 9287 ++++Z1234\=ps 9288 0: ++++Z 9289 ^^^^ 9290 9291/Z(*F)/ 9292\= Expect no match 9293 Z\=ps 9294No match 9295 ZA\=ps 9296No match 9297 9298/Z(?!)/ 9299\= Expect no match 9300 Z\=ps 9301No match 9302 ZA\=ps 9303No match 9304 9305/dog(sbody)?/ 9306 dogs\=ps 9307 0: dog 9308 dogs\=ph 9309Partial match: dogs 9310 9311/dog(sbody)??/ 9312 dogs\=ps 9313 0: dog 9314 dogs\=ph 9315 0: dog 9316 9317/dog|dogsbody/ 9318 dogs\=ps 9319 0: dog 9320 dogs\=ph 9321 0: dog 9322 9323/dogsbody|dog/ 9324 dogs\=ps 9325 0: dog 9326 dogs\=ph 9327Partial match: dogs 9328 9329/\bthe cat\b/ 9330 the cat\=ps 9331 0: the cat 9332 the cat\=ph 9333Partial match: the cat 9334 9335/abc/ 9336 abc\=ps 9337 0: abc 9338 abc\=ph 9339 0: abc 9340 9341/abc\K123/startchar 9342 xyzabc123pqr 9343 0: abc123 9344 ^^^ 9345 xyzabc12\=ps 9346Partial match: abc12 9347 xyzabc12\=ph 9348Partial match: abc12 9349 9350/(?<=abc)123/ 9351 xyzabc123pqr 9352 0: 123 9353 xyzabc12\=ps 9354Partial match: 12 9355 xyzabc12\=ph 9356Partial match: 12 9357 9358/\babc\b/ 9359 +++abc+++ 9360 0: abc 9361 +++ab\=ps 9362Partial match: ab 9363 +++ab\=ph 9364Partial match: ab 9365 9366/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/B 9367------------------------------------------------------------------ 9368 Bra 9369 Recurse 9370 Recurse 9371 Cond 9372 Cond false 9373 CBra 1 9374 < 9375 [^m] 9376 [^>] 9377 > 9378 [^<] 9379 Ket 9380 CBra 2 9381 \w*+ 9382 Ket 9383 Ket 9384 Ket 9385 End 9386------------------------------------------------------------------ 9387 9388/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/B 9389------------------------------------------------------------------ 9390 Bra 9391 Recurse 9392 Recurse 9393 Cond 9394 Cond false 9395 CBra 1 9396 < 9397 [\x00-/:-\xff] (neg) 9398 [^>] 9399 > 9400 [^<] 9401 Ket 9402 CBra 2 9403 \w*+ 9404 Ket 9405 Ket 9406 Ket 9407 End 9408------------------------------------------------------------------ 9409 9410/(ab)(x(y)z(cd(*ACCEPT)))pq/B 9411------------------------------------------------------------------ 9412 Bra 9413 CBra 1 9414 ab 9415 Ket 9416 CBra 2 9417 x 9418 CBra 3 9419 y 9420 Ket 9421 z 9422 CBra 4 9423 cd 9424 Close 4 9425 Close 2 9426 *ACCEPT 9427 Ket 9428 Ket 9429 pq 9430 Ket 9431 End 9432------------------------------------------------------------------ 9433 9434/abc\K/aftertext,startchar 9435 abcdef 9436 0: abc 9437 ^^^ 9438 0+ def 9439 abcdef\=notempty_atstart 9440 0: abc 9441 ^^^ 9442 0+ def 9443 xyzabcdef\=notempty_atstart 9444 0: abc 9445 ^^^ 9446 0+ def 9447\= Expect no match 9448 abcdef\=notempty 9449No match 9450 xyzabcdef\=notempty 9451No match 9452 9453/^(?:(?=abc)|abc\K)/aftertext,startchar 9454 abcdef 9455 0: 9456 0+ abcdef 9457 abcdef\=notempty_atstart 9458 0: abc 9459 ^^^ 9460 0+ def 9461\= Expect no match 9462 abcdef\=notempty 9463No match 9464 9465/a?b?/aftertext 9466 xyz 9467 0: 9468 0+ xyz 9469 xyzabc 9470 0: 9471 0+ xyzabc 9472 xyzabc\=notempty 9473 0: ab 9474 0+ c 9475 xyzabc\=notempty_atstart 9476 0: 9477 0+ yzabc 9478 xyz\=notempty_atstart 9479 0: 9480 0+ yz 9481\= Expect no match 9482 xyz\=notempty 9483No match 9484 9485/^a?b?/aftertext 9486 xyz 9487 0: 9488 0+ xyz 9489 xyzabc 9490 0: 9491 0+ xyzabc 9492\= Expect no match 9493 xyzabc\=notempty 9494No match 9495 xyzabc\=notempty_atstart 9496No match 9497 xyz\=notempty_atstart 9498No match 9499 xyz\=notempty 9500No match 9501 9502/^(?<name>a|b\g<name>c)/ 9503 aaaa 9504 0: a 9505 1: a 9506 bacxxx 9507 0: bac 9508 1: bac 9509 bbaccxxx 9510 0: bbacc 9511 1: bbacc 9512 bbbacccxx 9513 0: bbbaccc 9514 1: bbbaccc 9515 9516/^(?<name>a|b\g'name'c)/ 9517 aaaa 9518 0: a 9519 1: a 9520 bacxxx 9521 0: bac 9522 1: bac 9523 bbaccxxx 9524 0: bbacc 9525 1: bbacc 9526 bbbacccxx 9527 0: bbbaccc 9528 1: bbbaccc 9529 9530/^(a|b\g<1>c)/ 9531 aaaa 9532 0: a 9533 1: a 9534 bacxxx 9535 0: bac 9536 1: bac 9537 bbaccxxx 9538 0: bbacc 9539 1: bbacc 9540 bbbacccxx 9541 0: bbbaccc 9542 1: bbbaccc 9543 9544/^(a|b\g'1'c)/ 9545 aaaa 9546 0: a 9547 1: a 9548 bacxxx 9549 0: bac 9550 1: bac 9551 bbaccxxx 9552 0: bbacc 9553 1: bbacc 9554 bbbacccxx 9555 0: bbbaccc 9556 1: bbbaccc 9557 9558/^(a|b\g'-1'c)/ 9559 aaaa 9560 0: a 9561 1: a 9562 bacxxx 9563 0: bac 9564 1: bac 9565 bbaccxxx 9566 0: bbacc 9567 1: bbacc 9568 bbbacccxx 9569 0: bbbaccc 9570 1: bbbaccc 9571 9572/(^(a|b\g<-1>c))/ 9573 aaaa 9574 0: a 9575 1: a 9576 2: a 9577 bacxxx 9578 0: bac 9579 1: bac 9580 2: bac 9581 bbaccxxx 9582 0: bbacc 9583 1: bbacc 9584 2: bbacc 9585 bbbacccxx 9586 0: bbbaccc 9587 1: bbbaccc 9588 2: bbbaccc 9589 9590/(?-i:\g<name>)(?i:(?<name>a))/ 9591 XaaX 9592 0: aa 9593 1: a 9594 XAAX 9595 0: AA 9596 1: A 9597 9598/(?i:\g<name>)(?-i:(?<name>a))/ 9599 XaaX 9600 0: aa 9601 1: a 9602\= Expect no match 9603 XAAX 9604No match 9605 9606/(?-i:\g<+1>)(?i:(a))/ 9607 XaaX 9608 0: aa 9609 1: a 9610 XAAX 9611 0: AA 9612 1: A 9613 9614/(?=(?<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>\})\}))\{/ 9615 9616/(?<n>a|b|c)\g<n>*/ 9617 abc 9618 0: abc 9619 1: a 9620 accccbbb 9621 0: accccbbb 9622 1: a 9623 9624/^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/ 9625 XYabcdY 9626 0: XYabcdY 9627 1: a 9628 2: b 9629 3: <unset> 9630 4: <unset> 9631 5: c 9632 6: d 9633 7: Y 9634 9635/(?<=b(?1)|zzz)(a)/ 9636 xbaax 9637 0: a 9638 1: a 9639 xzzzax 9640 0: a 9641 1: a 9642 9643/(a)(?<=b\1)/ 9644 9645/(a)(?<=b+(?1))/ 9646Failed: error 125 at offset 3: length of lookbehind assertion is not limited 9647 9648/(a+)(?<=b(?1))/ 9649Failed: error 125 at offset 4: length of lookbehind assertion is not limited 9650 9651/(a(?<=b(?1)))/ 9652Failed: error 125 at offset 2: length of lookbehind assertion is not limited 9653 9654/(?<=b(?1))xyz/ 9655Failed: error 115 at offset 8: reference to non-existent subpattern 9656 9657/(?<=b(?1))xyz(b+)pqrstuvew/ 9658Failed: error 125 at offset 0: length of lookbehind assertion is not limited 9659 9660/(a|bc)\1/I 9661Capture group count = 1 9662Max back reference = 1 9663Starting code units: a b 9664Subject length lower bound = 2 9665 9666/(a|bc)\1{2,3}/I 9667Capture group count = 1 9668Max back reference = 1 9669Starting code units: a b 9670Subject length lower bound = 3 9671 9672/(a|bc)(?1)/I 9673Capture group count = 1 9674Starting code units: a b 9675Subject length lower bound = 2 9676 9677/(a|b\1)(a|b\1)/I 9678Capture group count = 2 9679Max back reference = 1 9680Starting code units: a b 9681Subject length lower bound = 2 9682 9683/(a|b\1){2}/I 9684Capture group count = 1 9685Max back reference = 1 9686Starting code units: a b 9687Subject length lower bound = 2 9688 9689/(a|bbbb\1)(a|bbbb\1)/I 9690Capture group count = 2 9691Max back reference = 1 9692Starting code units: a b 9693Subject length lower bound = 2 9694 9695/(a|bbbb\1){2}/I 9696Capture group count = 1 9697Max back reference = 1 9698Starting code units: a b 9699Subject length lower bound = 2 9700 9701/^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 9702Capture group count = 1 9703Compile options: <none> 9704Overall options: anchored 9705First code unit = 'F' 9706Last code unit = ':' 9707Subject length lower bound = 22 9708 9709/<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 9710Capture group count = 11 9711Options: caseless dotall 9712First code unit = '<' 9713Last code unit = '>' 9714Subject length lower bound = 47 9715 9716"(?>.*/)foo"I 9717Capture group count = 0 9718Last code unit = 'o' 9719Subject length lower bound = 4 9720 9721/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /Ix 9722Capture group count = 0 9723Options: extended 9724Last code unit = '-' 9725Subject length lower bound = 8 9726 9727/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/Ii 9728Capture group count = 1 9729Options: caseless 9730Starting code units: A B C a b c 9731Subject length lower bound = 1 9732 9733/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/I 9734Capture group count = 0 9735Starting code units: c d 9736Last code unit = 'b' 9737Subject length lower bound = 41 9738 9739/<a[\s]+href[\s]*=[\s]* # find <a href= 9740 ([\"\'])? # find single or double quote 9741 (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching 9742 # quote, otherwise match up to next space 9743/Iisx 9744Capture group count = 3 9745Max back reference = 1 9746Options: caseless dotall extended 9747First code unit = '<' 9748Last code unit = '=' 9749Subject length lower bound = 9 9750 9751/^(?!:) # colon disallowed at start 9752 (?: # start of item 9753 (?: [0-9a-f]{1,4} | # 1-4 hex digits or 9754 (?(1)0 | () ) ) # if null previously matched, fail; else null 9755 : # followed by colon 9756 ){1,7} # end item; 1-7 of them required 9757 [0-9a-f]{1,4} $ # final hex number at end of string 9758 (?(1)|.) # check that there was an empty component 9759 /Iix 9760Capture group count = 1 9761Max back reference = 1 9762Compile options: caseless extended 9763Overall options: anchored caseless extended 9764Last code unit = ':' 9765Subject length lower bound = 2 9766 9767/(?|(?<a>A)|(?<a>B))/I 9768Capture group count = 1 9769Named capture groups: 9770 a 1 9771Starting code units: A B 9772Subject length lower bound = 1 9773 AB\=copy=a 9774 0: A 9775 1: A 9776 C A (1) a (group 1) 9777 BA\=copy=a 9778 0: B 9779 1: B 9780 C B (1) a (group 1) 9781 9782/(?|(?<a>A)|(?<b>B))/ 9783Failed: error 165 at offset 16: different names for subpatterns of the same number are not allowed 9784 9785/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) | 9786 b(?<quote> (?<apostrophe>')|(?<realquote>")) ) 9787 (?('quote')[a-z]+|[0-9]+)/Ix,dupnames 9788Capture group count = 6 9789Max back reference = 4 9790Named capture groups: 9791 apostrophe 2 9792 apostrophe 5 9793 quote 1 9794 quote 4 9795 realquote 3 9796 realquote 6 9797Options: dupnames extended 9798Starting code units: a b 9799Subject length lower bound = 3 9800 a"aaaaa 9801 0: a"aaaaa 9802 1: " 9803 2: <unset> 9804 3: " 9805 b"aaaaa 9806 0: b"aaaaa 9807 1: <unset> 9808 2: <unset> 9809 3: <unset> 9810 4: " 9811 5: <unset> 9812 6: " 9813\= Expect no match 9814 b"11111 9815No match 9816 a"11111 9817No match 9818 9819/^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/IBx,dupnames 9820------------------------------------------------------------------ 9821 Bra 9822 ^ 9823 Bra 9824 CBra 1 9825 a 9826 Ket 9827 CBra 2 9828 b 9829 Ket 9830 CBra 3 9831 c 9832 Ket 9833 CBra 4 9834 d 9835 Ket 9836 Alt 9837 CBra 1 9838 e 9839 Ket 9840 Ket 9841 Cond 9842 Cond ref <D>2 9843 X 9844 Alt 9845 Y 9846 Ket 9847 Ket 9848 End 9849------------------------------------------------------------------ 9850Capture group count = 4 9851Max back reference = 4 9852Named capture groups: 9853 D 4 9854 D 1 9855Compile options: dupnames extended 9856Overall options: anchored dupnames extended 9857Starting code units: a e 9858Subject length lower bound = 2 9859 abcdX 9860 0: abcdX 9861 1: a 9862 2: b 9863 3: c 9864 4: d 9865 eX 9866 0: eX 9867 1: e 9868\= Expect no match 9869 abcdY 9870No match 9871 ey 9872No match 9873 9874/(?<A>a) (b)(c) (?<A>d (?(R&A)$ | (?4)) )/IBx,dupnames 9875------------------------------------------------------------------ 9876 Bra 9877 CBra 1 9878 a 9879 Ket 9880 CBra 2 9881 b 9882 Ket 9883 CBra 3 9884 c 9885 Ket 9886 CBra 4 9887 d 9888 Cond 9889 Cond recurse <A>2 9890 $ 9891 Alt 9892 Recurse 9893 Ket 9894 Ket 9895 Ket 9896 End 9897------------------------------------------------------------------ 9898Capture group count = 4 9899Max back reference = 4 9900Named capture groups: 9901 A 1 9902 A 4 9903Options: dupnames extended 9904First code unit = 'a' 9905Last code unit = 'd' 9906Subject length lower bound = 4 9907 abcdd 9908 0: abcdd 9909 1: a 9910 2: b 9911 3: c 9912 4: dd 9913\= Expect no match 9914 abcdde 9915No match 9916 9917/abcd*/ 9918 xxxxabcd\=ps 9919 0: abcd 9920 xxxxabcd\=ph 9921Partial match: abcd 9922 9923/abcd*/i 9924 xxxxabcd\=ps 9925 0: abcd 9926 xxxxabcd\=ph 9927Partial match: abcd 9928 XXXXABCD\=ps 9929 0: ABCD 9930 XXXXABCD\=ph 9931Partial match: ABCD 9932 9933/abc\d*/ 9934 xxxxabc1\=ps 9935 0: abc1 9936 xxxxabc1\=ph 9937Partial match: abc1 9938 9939/(a)bc\1*/ 9940 xxxxabca\=ps 9941 0: abca 9942 1: a 9943 xxxxabca\=ph 9944Partial match: abca 9945 9946/abc[de]*/ 9947 xxxxabcde\=ps 9948 0: abcde 9949 xxxxabcde\=ph 9950Partial match: abcde 9951 9952/(\3)(\1)(a)/allow_empty_class,match_unset_backref,dupnames 9953 cat 9954 0: a 9955 1: 9956 2: 9957 3: a 9958 9959/(\3)(\1)(a)/I,allow_empty_class,match_unset_backref,dupnames 9960Capture group count = 3 9961Max back reference = 3 9962Options: allow_empty_class dupnames match_unset_backref 9963Last code unit = 'a' 9964Subject length lower bound = 1 9965 cat 9966 0: a 9967 1: 9968 2: 9969 3: a 9970 9971/(\3)(\1)(a)/I 9972Capture group count = 3 9973Max back reference = 3 9974Last code unit = 'a' 9975Subject length lower bound = 3 9976\= Expect no match 9977 cat 9978No match 9979 9980/i(?(DEFINE)(?<s>a))/I 9981Capture group count = 1 9982Named capture groups: 9983 s 1 9984First code unit = 'i' 9985Subject length lower bound = 1 9986 i 9987 0: i 9988 9989/()i(?(1)a)/I 9990Capture group count = 1 9991Max back reference = 1 9992First code unit = 'i' 9993Subject length lower bound = 1 9994 ia 9995 0: ia 9996 1: 9997 9998/(?i)a(?-i)b|c/B 9999------------------------------------------------------------------ 10000 Bra 10001 /i a 10002 b 10003 Alt 10004 c 10005 Ket 10006 End 10007------------------------------------------------------------------ 10008 XabX 10009 0: ab 10010 XAbX 10011 0: Ab 10012 CcC 10013 0: c 10014\= Expect no match 10015 XABX 10016No match 10017 10018/(?i)a(?s)b|c/B 10019------------------------------------------------------------------ 10020 Bra 10021 /i ab 10022 Alt 10023 /i c 10024 Ket 10025 End 10026------------------------------------------------------------------ 10027 10028/(?i)a(?s-i)b|c/B 10029------------------------------------------------------------------ 10030 Bra 10031 /i a 10032 b 10033 Alt 10034 c 10035 Ket 10036 End 10037------------------------------------------------------------------ 10038 10039/^(ab(c\1)d|x){2}$/B 10040------------------------------------------------------------------ 10041 Bra 10042 ^ 10043 CBra 1 10044 ab 10045 CBra 2 10046 c 10047 \1 10048 Ket 10049 d 10050 Alt 10051 x 10052 Ket 10053 CBra 1 10054 ab 10055 CBra 2 10056 c 10057 \1 10058 Ket 10059 d 10060 Alt 10061 x 10062 Ket 10063 $ 10064 Ket 10065 End 10066------------------------------------------------------------------ 10067 xabcxd 10068 0: xabcxd 10069 1: abcxd 10070 2: cx 10071 10072/^(?&t)*+(?(DEFINE)(?<t>.))$/B 10073------------------------------------------------------------------ 10074 Bra 10075 ^ 10076 Braposzero 10077 SBraPos 10078 Recurse 10079 KetRpos 10080 Cond 10081 Cond false 10082 CBra 1 10083 Any 10084 Ket 10085 Ket 10086 $ 10087 Ket 10088 End 10089------------------------------------------------------------------ 10090 10091/^(?&t)*(?(DEFINE)(?<t>.))$/B 10092------------------------------------------------------------------ 10093 Bra 10094 ^ 10095 Brazero 10096 SBra 10097 Recurse 10098 KetRmax 10099 Cond 10100 Cond false 10101 CBra 1 10102 Any 10103 Ket 10104 Ket 10105 $ 10106 Ket 10107 End 10108------------------------------------------------------------------ 10109 10110# This one is here because Perl gives the match as "b" rather than "ab". I 10111# believe this to be a Perl bug. 10112 10113/(?>a\Kb)z|(ab)/ 10114 ab\=startchar 10115 0: ab 10116 1: ab 10117 10118/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/ 10119 abcd 10120 0: 10121 1: 10122 2: 10123 0abc 10124 0: 0 10125 1: 0 10126 2: 0 10127 10128/abc(*MARK:)pqr/ 10129Failed: error 166 at offset 10: (*MARK) must have an argument 10130 10131/abc(*:)pqr/ 10132Failed: error 166 at offset 6: (*MARK) must have an argument 10133 10134/(*COMMIT:X)/B 10135------------------------------------------------------------------ 10136 Bra 10137 *COMMIT X 10138 Ket 10139 End 10140------------------------------------------------------------------ 10141 10142# This should, and does, fail. In Perl, it does not, which I think is a 10143# bug because replacing the B in the pattern by (B|D) does make it fail. 10144# Turning off Perl's optimization by inserting (??{""}) also makes it fail. 10145 10146/A(*COMMIT)B/aftertext,mark 10147\= Expect no match 10148 ACABX 10149No match 10150 10151# These should be different, but in Perl they are not, which I think 10152# is a bug in Perl. 10153 10154/A(*THEN)B|A(*THEN)C/mark 10155 AC 10156 0: AC 10157 10158/A(*PRUNE)B|A(*PRUNE)C/mark 10159\= Expect no match 10160 AC 10161No match 10162 10163# Mark names can be duplicated. Perl doesn't give a mark for this one, 10164# though PCRE2 does. 10165 10166/^A(*:A)B|^X(*:A)Y/mark 10167\= Expect no match 10168 XAQQ 10169No match, mark = A 10170 10171# COMMIT at the start of a pattern should be the same as an anchor. Perl 10172# optimizations defeat this. So does the PCRE2 optimization unless we disable 10173# it. 10174 10175/(*COMMIT)ABC/ 10176 ABCDEFG 10177 0: ABC 10178 10179/(*COMMIT)ABC/no_start_optimize 10180\= Expect no match 10181 DEFGABC 10182No match 10183 10184/^(ab (c+(*THEN)cd) | xyz)/x 10185\= Expect no match 10186 abcccd 10187No match 10188 10189/^(ab (c+(*PRUNE)cd) | xyz)/x 10190\= Expect no match 10191 abcccd 10192No match 10193 10194/^(ab (c+(*FAIL)cd) | xyz)/x 10195\= Expect no match 10196 abcccd 10197No match 10198 10199# Perl gets some of these wrong 10200 10201/(?>.(*ACCEPT))*?5/ 10202 abcde 10203 0: a 10204 10205/(.(*ACCEPT))*?5/ 10206 abcde 10207 0: a 10208 1: a 10209 10210/(.(*ACCEPT))5/ 10211 abcde 10212 0: a 10213 1: a 10214 10215/(.(*ACCEPT))*5/ 10216 abcde 10217 0: a 10218 1: a 10219 10220/A\NB./B 10221------------------------------------------------------------------ 10222 Bra 10223 A 10224 Any 10225 B 10226 Any 10227 Ket 10228 End 10229------------------------------------------------------------------ 10230 ACBD 10231 0: ACBD 10232\= Expect no match 10233 A\nB 10234No match 10235 ACB\n 10236No match 10237 10238/A\NB./Bs 10239------------------------------------------------------------------ 10240 Bra 10241 A 10242 Any 10243 B 10244 AllAny 10245 Ket 10246 End 10247------------------------------------------------------------------ 10248 ACBD 10249 0: ACBD 10250 ACB\n 10251 0: ACB\x0a 10252\= Expect no match 10253 A\nB 10254No match 10255 10256/A\NB/newline=crlf 10257 A\nB 10258 0: A\x0aB 10259 A\rB 10260 0: A\x0dB 10261\= Expect no match 10262 A\r\nB 10263No match 10264 10265/\R+b/B 10266------------------------------------------------------------------ 10267 Bra 10268 \R++ 10269 b 10270 Ket 10271 End 10272------------------------------------------------------------------ 10273 10274/\R+\n/B 10275------------------------------------------------------------------ 10276 Bra 10277 \R+ 10278 \x0a 10279 Ket 10280 End 10281------------------------------------------------------------------ 10282 10283/\R+\d/B 10284------------------------------------------------------------------ 10285 Bra 10286 \R++ 10287 \d 10288 Ket 10289 End 10290------------------------------------------------------------------ 10291 10292/\d*\R/B 10293------------------------------------------------------------------ 10294 Bra 10295 \d*+ 10296 \R 10297 Ket 10298 End 10299------------------------------------------------------------------ 10300 10301/\s*\R/B 10302------------------------------------------------------------------ 10303 Bra 10304 \s* 10305 \R 10306 Ket 10307 End 10308------------------------------------------------------------------ 10309 \x20\x0a 10310 0: \x0a 10311 \x20\x0d 10312 0: \x0d 10313 \x20\x0d\x0a 10314 0: \x0d\x0a 10315 10316/\S*\R/B 10317------------------------------------------------------------------ 10318 Bra 10319 \S*+ 10320 \R 10321 Ket 10322 End 10323------------------------------------------------------------------ 10324 a\x0a 10325 0: a\x0a 10326 10327/X\h*\R/B 10328------------------------------------------------------------------ 10329 Bra 10330 X 10331 \h*+ 10332 \R 10333 Ket 10334 End 10335------------------------------------------------------------------ 10336 X\x20\x0a 10337 0: X \x0a 10338 10339/X\H*\R/B 10340------------------------------------------------------------------ 10341 Bra 10342 X 10343 \H* 10344 \R 10345 Ket 10346 End 10347------------------------------------------------------------------ 10348 X\x0d\x0a 10349 0: X\x0d\x0a 10350 10351/X\H+\R/B 10352------------------------------------------------------------------ 10353 Bra 10354 X 10355 \H+ 10356 \R 10357 Ket 10358 End 10359------------------------------------------------------------------ 10360 X\x0d\x0a 10361 0: X\x0d\x0a 10362 10363/X\H++\R/B 10364------------------------------------------------------------------ 10365 Bra 10366 X 10367 \H++ 10368 \R 10369 Ket 10370 End 10371------------------------------------------------------------------ 10372\= Expect no match 10373 X\x0d\x0a 10374No match 10375 10376/(?<=abc)def/ 10377 abc\=ph 10378Partial match: 10379 10380/abc$/ 10381 abc 10382 0: abc 10383 abc\=ps 10384 0: abc 10385 abc\=ph 10386Partial match: abc 10387 10388/abc$/m 10389 abc 10390 0: abc 10391 abc\n 10392 0: abc 10393 abc\=ph 10394Partial match: abc 10395 abc\n\=ph 10396 0: abc 10397 abc\=ps 10398 0: abc 10399 abc\n\=ps 10400 0: abc 10401 10402/abc\z/ 10403 abc 10404 0: abc 10405 abc\=ps 10406 0: abc 10407 abc\=ph 10408Partial match: abc 10409 10410/abc\Z/ 10411 abc 10412 0: abc 10413 abc\=ps 10414 0: abc 10415 abc\=ph 10416Partial match: abc 10417 10418/abc\b/ 10419 abc 10420 0: abc 10421 abc\=ps 10422 0: abc 10423 abc\=ph 10424Partial match: abc 10425 10426/abc\B/ 10427 abc\=ps 10428Partial match: abc 10429 abc\=ph 10430Partial match: abc 10431\= Expect no match 10432 abc 10433No match 10434 10435/.+/ 10436\= Bad offsets 10437 abc\=offset=4 10438Failed: error -33: bad offset value 10439 abc\=offset=-4 10440** Invalid value in 'offset=-4' 10441\= Valid data 10442 abc\=offset=0 10443 0: abc 10444 abc\=offset=1 10445 0: bc 10446 abc\=offset=2 10447 0: c 10448\= Expect no match 10449 abc\=offset=3 10450No match 10451 10452/^\cģ/ 10453Failed: error 168 at offset 3: \c must be followed by a printable ASCII character 10454 10455/(?P<abn>(?P=abn)xxx)/B 10456------------------------------------------------------------------ 10457 Bra 10458 CBra 1 10459 \1 10460 xxx 10461 Ket 10462 Ket 10463 End 10464------------------------------------------------------------------ 10465 10466/(a\1z)/B 10467------------------------------------------------------------------ 10468 Bra 10469 CBra 1 10470 a 10471 \1 10472 z 10473 Ket 10474 Ket 10475 End 10476------------------------------------------------------------------ 10477 10478/(?P<abn>(?P=abn)(?<badstufxxx)/B 10479Failed: error 142 at offset 29: syntax error in subpattern name (missing terminator?) 10480 10481/(?P<abn>(?P=axn)xxx)/B 10482Failed: error 115 at offset 12: reference to non-existent subpattern 10483 10484/(?P<abn>(?P=axn)xxx)(?<axn>yy)/B 10485------------------------------------------------------------------ 10486 Bra 10487 CBra 1 10488 \2 10489 xxx 10490 Ket 10491 CBra 2 10492 yy 10493 Ket 10494 Ket 10495 End 10496------------------------------------------------------------------ 10497 10498# These tests are here because Perl gets the first one wrong. 10499 10500/(\R*)(.)/s 10501 \r\n 10502 0: \x0d 10503 1: 10504 2: \x0d 10505 \r\r\n\n\r 10506 0: \x0d\x0d\x0a\x0a\x0d 10507 1: \x0d\x0d\x0a\x0a 10508 2: \x0d 10509 \r\r\n\n\r\n 10510 0: \x0d\x0d\x0a\x0a\x0d 10511 1: \x0d\x0d\x0a\x0a 10512 2: \x0d 10513 10514/(\R)*(.)/s 10515 \r\n 10516 0: \x0d 10517 1: <unset> 10518 2: \x0d 10519 \r\r\n\n\r 10520 0: \x0d\x0d\x0a\x0a\x0d 10521 1: \x0a 10522 2: \x0d 10523 \r\r\n\n\r\n 10524 0: \x0d\x0d\x0a\x0a\x0d 10525 1: \x0a 10526 2: \x0d 10527 10528/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s 10529 \r\n 10530 0: \x0d 10531 1: 10532 2: \x0d 10533 \r\r\n\n\r 10534 0: \x0d\x0d\x0a\x0a\x0d 10535 1: \x0d\x0d\x0a\x0a 10536 2: \x0d 10537 \r\r\n\n\r\n 10538 0: \x0d\x0d\x0a\x0a\x0d 10539 1: \x0d\x0d\x0a\x0a 10540 2: \x0d 10541 10542# ------------- 10543 10544/^abc$/B 10545------------------------------------------------------------------ 10546 Bra 10547 ^ 10548 abc 10549 $ 10550 Ket 10551 End 10552------------------------------------------------------------------ 10553 10554/^abc$/Bm 10555------------------------------------------------------------------ 10556 Bra 10557 /m ^ 10558 abc 10559 /m $ 10560 Ket 10561 End 10562------------------------------------------------------------------ 10563 10564/^(a)*+(\w)/ 10565 aaaaX 10566 0: aaaaX 10567 1: a 10568 2: X 10569\= Expect no match 10570 aaaa 10571No match 10572 10573/^(?:a)*+(\w)/ 10574 aaaaX 10575 0: aaaaX 10576 1: X 10577\= Expect no match 10578 aaaa 10579No match 10580 10581/(a)++1234/IB 10582------------------------------------------------------------------ 10583 Bra 10584 CBraPos 1 10585 a 10586 KetRpos 10587 1234 10588 Ket 10589 End 10590------------------------------------------------------------------ 10591Capture group count = 1 10592First code unit = 'a' 10593Last code unit = '4' 10594Subject length lower bound = 5 10595 10596/([abc])++1234/I 10597Capture group count = 1 10598Starting code units: a b c 10599Last code unit = '4' 10600Subject length lower bound = 5 10601 10602/(?<=(abc)+)X/ 10603Failed: error 125 at offset 0: length of lookbehind assertion is not limited 10604 10605/(^ab)/I 10606Capture group count = 1 10607Compile options: <none> 10608Overall options: anchored 10609First code unit = 'a' 10610Subject length lower bound = 2 10611 10612/(^ab)++/I 10613Capture group count = 1 10614Compile options: <none> 10615Overall options: anchored 10616First code unit = 'a' 10617Subject length lower bound = 2 10618 10619/(^ab|^)+/I 10620Capture group count = 1 10621May match empty string 10622Compile options: <none> 10623Overall options: anchored 10624Subject length lower bound = 0 10625 10626/(^ab|^)++/I 10627Capture group count = 1 10628May match empty string 10629Compile options: <none> 10630Overall options: anchored 10631Subject length lower bound = 0 10632 10633/(?:^ab)/I 10634Capture group count = 0 10635Compile options: <none> 10636Overall options: anchored 10637First code unit = 'a' 10638Subject length lower bound = 2 10639 10640/(?:^ab)++/I 10641Capture group count = 0 10642Compile options: <none> 10643Overall options: anchored 10644First code unit = 'a' 10645Subject length lower bound = 2 10646 10647/(?:^ab|^)+/I 10648Capture group count = 0 10649May match empty string 10650Compile options: <none> 10651Overall options: anchored 10652Subject length lower bound = 0 10653 10654/(?:^ab|^)++/I 10655Capture group count = 0 10656May match empty string 10657Compile options: <none> 10658Overall options: anchored 10659Subject length lower bound = 0 10660 10661/(.*ab)/I 10662Capture group count = 1 10663First code unit at start or follows newline 10664Last code unit = 'b' 10665Subject length lower bound = 2 10666 10667/(.*ab)++/I 10668Capture group count = 1 10669First code unit at start or follows newline 10670Last code unit = 'b' 10671Subject length lower bound = 2 10672 10673/(.*ab|.*)+/I 10674Capture group count = 1 10675May match empty string 10676First code unit at start or follows newline 10677Subject length lower bound = 0 10678 10679/(.*ab|.*)++/I 10680Capture group count = 1 10681May match empty string 10682First code unit at start or follows newline 10683Subject length lower bound = 0 10684 10685/(?:.*ab)/I 10686Capture group count = 0 10687First code unit at start or follows newline 10688Last code unit = 'b' 10689Subject length lower bound = 2 10690 10691/(?:.*ab)++/I 10692Capture group count = 0 10693First code unit at start or follows newline 10694Last code unit = 'b' 10695Subject length lower bound = 2 10696 10697/(?:.*ab|.*)+/I 10698Capture group count = 0 10699May match empty string 10700First code unit at start or follows newline 10701Subject length lower bound = 0 10702 10703/(?:.*ab|.*)++/I 10704Capture group count = 0 10705May match empty string 10706First code unit at start or follows newline 10707Subject length lower bound = 0 10708 10709/(?=a)[bcd]/I 10710Capture group count = 0 10711First code unit = 'a' 10712Subject length lower bound = 1 10713 10714/((?=a))[bcd]/I 10715Capture group count = 1 10716First code unit = 'a' 10717Subject length lower bound = 1 10718 10719/((?=a))+[bcd]/I 10720Capture group count = 1 10721First code unit = 'a' 10722Subject length lower bound = 1 10723 10724/((?=a))++[bcd]/I 10725Capture group count = 1 10726First code unit = 'a' 10727Subject length lower bound = 1 10728 10729/(?=a+)[bcd]/Ii 10730Capture group count = 0 10731Options: caseless 10732First code unit = 'a' (caseless) 10733Subject length lower bound = 1 10734 10735/(?=a+?)[bcd]/Ii 10736Capture group count = 0 10737Options: caseless 10738First code unit = 'a' (caseless) 10739Subject length lower bound = 1 10740 10741/(?=a++)[bcd]/Ii 10742Capture group count = 0 10743Options: caseless 10744First code unit = 'a' (caseless) 10745Subject length lower bound = 1 10746 10747/(?=a{3})[bcd]/Ii 10748Capture group count = 0 10749Options: caseless 10750First code unit = 'a' (caseless) 10751Last code unit = 'a' (caseless) 10752Subject length lower bound = 2 10753 10754/(abc)\1+/ 10755 10756# Perl doesn't get these right IMO (the 3rd is PCRE2-specific) 10757 10758/(?1)(?:(b(*ACCEPT))){0}/ 10759 b 10760 0: b 10761 10762/(?1)(?:(b(*ACCEPT))){0}c/ 10763 bc 10764 0: bc 10765\= Expect no match 10766 b 10767No match 10768 10769/(?1)(?:((*ACCEPT))){0}c/ 10770 c 10771 0: c 10772 c\=notempty 10773 0: c 10774 10775/^.*?(?(?=a)a|b(*THEN)c)/ 10776\= Expect no match 10777 ba 10778No match 10779 10780/^.*?(?(?=a)a|bc)/ 10781 ba 10782 0: ba 10783 10784/^.*?(?(?=a)a(*THEN)b|c)/ 10785\= Expect no match 10786 ac 10787No match 10788 10789/^.*?(?(?=a)a(*THEN)b)c/ 10790\= Expect no match 10791 ac 10792No match 10793 10794/^.*?(a(*THEN)b)c/ 10795\= Expect no match 10796 aabc 10797No match 10798 10799/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x 10800 aabc 10801 0: aabc 10802 10803/^.*?(a(*THEN)b|z)c/ 10804 aabc 10805 0: aabc 10806 1: ab 10807 10808/^.*?(z|a(*THEN)b)c/ 10809 aabc 10810 0: aabc 10811 1: ab 10812 10813# These are here because they are not Perl-compatible; the studying means the 10814# mark is not seen. 10815 10816/(*MARK:A)(*SKIP:B)(C|X)/mark 10817 C 10818 0: C 10819 1: C 10820MK: A 10821\= Expect no match 10822 D 10823No match, mark = A 10824 10825/(*:A)A+(*SKIP:A)(B|Z)/mark 10826\= Expect no match 10827 AAAC 10828No match, mark = A 10829 10830# ---------------------------- 10831 10832"(?=a*(*ACCEPT)b)c" 10833 c 10834 0: c 10835 c\=notempty 10836 0: c 10837 10838/(?1)c(?(DEFINE)((*ACCEPT)b))/ 10839 c 10840 0: c 10841 c\=notempty 10842 0: c 10843 10844/(?>(*ACCEPT)b)c/ 10845 c 10846 0: 10847\= Expect no match 10848 c\=notempty 10849No match 10850 10851/(?:(?>(a)))+a%/allaftertext 10852 %aa% 10853 0: aa% 10854 0+ 10855 1: a 10856 1+ a% 10857 10858/(a)b|ac/allaftertext 10859 ac\=ovector=1 10860 0: ac 10861 0+ 10862 10863/(a)(b)x|abc/allaftertext 10864 abc\=ovector=2 10865 0: abc 10866 0+ 10867 10868/(a)bc|(a)(b)\2/ 10869 abc\=ovector=1 10870Matched, but too many substrings 10871 0: abc 10872 abc\=ovector=2 10873 0: abc 10874 1: a 10875 aba\=ovector=1 10876Matched, but too many substrings 10877 0: aba 10878 aba\=ovector=2 10879Matched, but too many substrings 10880 0: aba 10881 1: <unset> 10882 aba\=ovector=3 10883Matched, but too many substrings 10884 0: aba 10885 1: <unset> 10886 2: a 10887 aba\=ovector=4 10888 0: aba 10889 1: <unset> 10890 2: a 10891 3: b 10892 10893/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/I 10894Capture group count = 2 10895May match empty string 10896Subject length lower bound = 0 10897 10898/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/I 10899Capture group count = 2 10900Starting code units: a b 10901Subject length lower bound = 3 10902 10903/(a(?2)|b)(b(?1)|a)(?1)(?2)/I 10904Capture group count = 2 10905Starting code units: a b 10906Subject length lower bound = 4 10907 10908/(abc)(?1)/I 10909Capture group count = 1 10910First code unit = 'a' 10911Last code unit = 'c' 10912Subject length lower bound = 6 10913 10914/(?:(foo)|(bar)|(baz))X/allcaptures 10915 bazfooX 10916 0: fooX 10917 1: foo 10918 2: <unset> 10919 3: <unset> 10920 foobazbarX 10921 0: barX 10922 1: <unset> 10923 2: bar 10924 3: <unset> 10925 barfooX 10926 0: fooX 10927 1: foo 10928 2: <unset> 10929 3: <unset> 10930 bazX 10931 0: bazX 10932 1: <unset> 10933 2: <unset> 10934 3: baz 10935 foobarbazX 10936 0: bazX 10937 1: <unset> 10938 2: <unset> 10939 3: baz 10940 bazfooX\=ovector=0 10941 0: fooX 10942 1: foo 10943 2: <unset> 10944 3: <unset> 10945 bazfooX\=ovector=1 10946Matched, but too many substrings 10947 0: fooX 10948 bazfooX\=ovector=2 10949 0: fooX 10950 1: foo 10951 bazfooX\=ovector=3 10952 0: fooX 10953 1: foo 10954 2: <unset> 10955 10956/(?=abc){3}abc/B 10957------------------------------------------------------------------ 10958 Bra 10959 Assert 10960 abc 10961 Ket 10962 Assert 10963 abc 10964 Ket 10965 Assert 10966 abc 10967 Ket 10968 abc 10969 Ket 10970 End 10971------------------------------------------------------------------ 10972 10973/(?=abc)+abc/B 10974------------------------------------------------------------------ 10975 Bra 10976 Assert 10977 abc 10978 Ket 10979 Brazero 10980 Assert 10981 abc 10982 Ket 10983 abc 10984 Ket 10985 End 10986------------------------------------------------------------------ 10987 10988/(?=abc)++abc/B 10989------------------------------------------------------------------ 10990 Bra 10991 Once 10992 Assert 10993 abc 10994 Ket 10995 Brazero 10996 Assert 10997 abc 10998 Ket 10999 Ket 11000 abc 11001 Ket 11002 End 11003------------------------------------------------------------------ 11004 11005/(?=abc){0}xyz/B 11006------------------------------------------------------------------ 11007 Bra 11008 Skip zero 11009 Assert 11010 abc 11011 Ket 11012 xyz 11013 Ket 11014 End 11015------------------------------------------------------------------ 11016 11017/(?=(a))?./B 11018------------------------------------------------------------------ 11019 Bra 11020 Brazero 11021 Assert 11022 CBra 1 11023 a 11024 Ket 11025 Ket 11026 Any 11027 Ket 11028 End 11029------------------------------------------------------------------ 11030 11031/(?=(a))??./B 11032------------------------------------------------------------------ 11033 Bra 11034 Braminzero 11035 Assert 11036 CBra 1 11037 a 11038 Ket 11039 Ket 11040 Any 11041 Ket 11042 End 11043------------------------------------------------------------------ 11044 11045/^(?=(a)){0}b(?1)/B 11046------------------------------------------------------------------ 11047 Bra 11048 ^ 11049 Skip zero 11050 Assert 11051 CBra 1 11052 a 11053 Ket 11054 Ket 11055 b 11056 Recurse 11057 Ket 11058 End 11059------------------------------------------------------------------ 11060 11061/(?(DEFINE)(a))?b(?1)/B 11062------------------------------------------------------------------ 11063 Bra 11064 Cond 11065 Cond false 11066 CBra 1 11067 a 11068 Ket 11069 Ket 11070 b 11071 Recurse 11072 Ket 11073 End 11074------------------------------------------------------------------ 11075 11076/^(?=(?1))?[az]([abc])d/B 11077------------------------------------------------------------------ 11078 Bra 11079 ^ 11080 Brazero 11081 Assert 11082 Recurse 11083 Ket 11084 [az] 11085 CBra 1 11086 [a-c] 11087 Ket 11088 d 11089 Ket 11090 End 11091------------------------------------------------------------------ 11092 11093/^(?!a){0}\w+/B 11094------------------------------------------------------------------ 11095 Bra 11096 ^ 11097 Skip zero 11098 Assert not 11099 a 11100 Ket 11101 \w++ 11102 Ket 11103 End 11104------------------------------------------------------------------ 11105 11106/(?<=(abc))?xyz/B 11107------------------------------------------------------------------ 11108 Bra 11109 Brazero 11110 Assert back 11111 Reverse 11112 CBra 1 11113 abc 11114 Ket 11115 Ket 11116 xyz 11117 Ket 11118 End 11119------------------------------------------------------------------ 11120 11121/[:a[:abc]b:]/B 11122------------------------------------------------------------------ 11123 Bra 11124 [:[a-c] 11125 b:] 11126 Ket 11127 End 11128------------------------------------------------------------------ 11129 11130/^(a(*:A)(d|e(*:B))z|aeq)/auto_callout 11131 adz 11132--->adz 11133 +0 ^ ^ 11134 +1 ^ ( 11135 +2 ^ a 11136 +3 ^^ (*:A) 11137 +8 ^^ ( 11138Latest Mark: A 11139 +9 ^^ d 11140+10 ^ ^ | 11141+18 ^ ^ z 11142+19 ^ ^ | 11143+24 ^ ^ End of pattern 11144 0: adz 11145 1: adz 11146 2: d 11147 aez 11148--->aez 11149 +0 ^ ^ 11150 +1 ^ ( 11151 +2 ^ a 11152 +3 ^^ (*:A) 11153 +8 ^^ ( 11154Latest Mark: A 11155 +9 ^^ d 11156+11 ^^ e 11157+12 ^ ^ (*:B) 11158+17 ^ ^ ) 11159Latest Mark: B 11160+18 ^ ^ z 11161+19 ^ ^ | 11162+24 ^ ^ End of pattern 11163 0: aez 11164 1: aez 11165 2: e 11166 aeqwerty 11167--->aeqwerty 11168 +0 ^ ^ 11169 +1 ^ ( 11170 +2 ^ a 11171 +3 ^^ (*:A) 11172 +8 ^^ ( 11173Latest Mark: A 11174 +9 ^^ d 11175+11 ^^ e 11176+12 ^ ^ (*:B) 11177+17 ^ ^ ) 11178Latest Mark: B 11179+18 ^ ^ z 11180+20 ^ a 11181+21 ^^ e 11182+22 ^ ^ q 11183+23 ^ ^ ) 11184+24 ^ ^ End of pattern 11185 0: aeq 11186 1: aeq 11187 11188/.(*F)/ 11189\= Expect no match 11190 abc\=ph 11191No match 11192 11193/\btype\b\W*?\btext\b\W*?\bjavascript\b/I 11194Capture group count = 0 11195Max lookbehind = 1 11196First code unit = 't' 11197Last code unit = 't' 11198Subject length lower bound = 18 11199 11200/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/I 11201Capture group count = 0 11202Max lookbehind = 1 11203Starting code units: < o t u 11204Subject length lower bound = 8 11205 11206/a(*SKIP)c|b(*ACCEPT)|/I,aftertext 11207Capture group count = 0 11208May match empty string 11209Subject length lower bound = 0 11210 a 11211 0: 11212 0+ 11213 11214/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/I 11215Capture group count = 0 11216Starting code units: a b x 11217Subject length lower bound = 1 11218 ax 11219 0: x 11220 11221'a*(*ACCEPT)b'aftertext 11222 abc\=notempty_atstart 11223 0: a 11224 0+ bc 11225 bbb\=notempty_atstart 11226 0: 11227 0+ bb 11228\= Expect no match 11229 \=notempty_atstart 11230No match 11231 11232/(*ACCEPT)a/I,aftertext 11233Capture group count = 0 11234May match empty string 11235Subject length lower bound = 0 11236 bax 11237 0: 11238 0+ bax 11239 11240/z(*ACCEPT)a/I,aftertext 11241Capture group count = 0 11242First code unit = 'z' 11243Subject length lower bound = 1 11244 baxzbx 11245 0: z 11246 0+ bx 11247 11248/^(?>a+)(?>(z+))\w/B 11249------------------------------------------------------------------ 11250 Bra 11251 ^ 11252 Once 11253 a++ 11254 Ket 11255 Once 11256 CBra 1 11257 z++ 11258 Ket 11259 Ket 11260 \w 11261 Ket 11262 End 11263------------------------------------------------------------------ 11264 aaaazzzzb 11265 0: aaaazzzzb 11266 1: zzzz 11267\= Expect no match 11268 aazz 11269No match 11270 11271/(.)(\1|a(?2))/ 11272 bab 11273 0: bab 11274 1: b 11275 2: ab 11276 11277/\1|(.)(?R)\1/ 11278 cbbbc 11279 0: cbbbc 11280 1: c 11281 11282/(.)((?(1)c|a)|a(?2))/ 11283\= Expect no match 11284 baa 11285No match 11286 11287/(?P<abn>(?P=abn)xxx)/B 11288------------------------------------------------------------------ 11289 Bra 11290 CBra 1 11291 \1 11292 xxx 11293 Ket 11294 Ket 11295 End 11296------------------------------------------------------------------ 11297 11298/(a\1z)/B 11299------------------------------------------------------------------ 11300 Bra 11301 CBra 1 11302 a 11303 \1 11304 z 11305 Ket 11306 Ket 11307 End 11308------------------------------------------------------------------ 11309 11310/^a\x41z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11311 aAz 11312 0: aAz 11313\= Expect no match 11314 ax41z 11315No match 11316 11317/^a[m\x41]z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11318 aAz 11319 0: aAz 11320 11321/^a\x1z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11322 ax1z 11323 0: ax1z 11324 11325/^a\u0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11326 aAz 11327 0: aAz 11328\= Expect no match 11329 au0041z 11330No match 11331 11332/^a[m\u0041]z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11333 aAz 11334 0: aAz 11335 11336/^a\u041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11337 au041z 11338 0: au041z 11339\= Expect no match 11340 aAz 11341No match 11342 11343/^a\U0041z/alt_bsux,allow_empty_class,match_unset_backref,dupnames 11344 aU0041z 11345 0: aU0041z 11346\= Expect no match 11347 aAz 11348No match 11349 11350/^\u{7a}/alt_bsux 11351 u{7a} 11352 0: u{7a} 11353\= Expect no match 11354 zoo 11355No match 11356 11357/^\u{7a}/extra_alt_bsux 11358 zoo 11359 0: z 11360 11361/\u{}/extra_alt_bsux 11362 u{} 11363 0: u{} 11364 11365/\u{Q12}/extra_alt_bsux 11366 --u{Q12}-- 11367 0: u{Q12} 11368 11369/\u{ 12}/extra_alt_bsux 11370 --u{ 12}-- 11371 0: u{ 12} 11372 11373/\u{{3}}/extra_alt_bsux 11374 --u{{{}-- 11375 0: u{{{} 11376 11377/(?(?=c)c|d)++Y/B 11378------------------------------------------------------------------ 11379 Bra 11380 BraPos 11381 Cond 11382 Assert 11383 c 11384 Ket 11385 c 11386 Alt 11387 d 11388 Ket 11389 KetRpos 11390 Y 11391 Ket 11392 End 11393------------------------------------------------------------------ 11394 11395/(?(?=c)c|d)*+Y/B 11396------------------------------------------------------------------ 11397 Bra 11398 Braposzero 11399 BraPos 11400 Cond 11401 Assert 11402 c 11403 Ket 11404 c 11405 Alt 11406 d 11407 Ket 11408 KetRpos 11409 Y 11410 Ket 11411 End 11412------------------------------------------------------------------ 11413 11414/a[\NB]c/ 11415Failed: error 171 at offset 4: \N is not supported in a class 11416 aNc 11417 11418/a[B-\Nc]/ 11419Failed: error 150 at offset 6: invalid range in character class 11420 11421/a[B\Nc]/ 11422Failed: error 171 at offset 5: \N is not supported in a class 11423 11424/(a)(?2){0,1999}?(b)/ 11425 11426/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/ 11427 11428# This test, with something more complicated than individual letters, causes 11429# different behaviour in Perl. Perhaps it disables some optimization; no tag is 11430# passed back for the failures, whereas in PCRE2 there is a tag. 11431 11432/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/x,mark 11433 AABC 11434 0: AB 11435 1: A 11436 2: B 11437MK: A 11438 XXYZ 11439 0: XXY 11440 1: <unset> 11441 2: <unset> 11442 3: X 11443 4: X 11444 5: Y 11445MK: B 11446\= Expect no match 11447 XAQQ 11448No match, mark = A 11449 XAQQXZZ 11450No match, mark = A 11451 AXQQQ 11452No match, mark = A 11453 AXXQQQ 11454No match, mark = B 11455 11456# Perl doesn't give marks for these, though it does if the alternatives are 11457# replaced by single letters. 11458 11459/(b|q)(*:m)f|a(*:n)w/mark 11460 aw 11461 0: aw 11462MK: n 11463\= Expect no match 11464 abc 11465No match, mark = m 11466 11467/(q|b)(*:m)f|a(*:n)w/mark 11468 aw 11469 0: aw 11470MK: n 11471\= Expect no match 11472 abc 11473No match, mark = m 11474 11475# After a partial match, the behaviour is as for a failure. 11476 11477/^a(*:X)bcde/mark 11478 abc\=ps 11479Partial match, mark=X: abc 11480 11481# These are here because Perl doesn't return a mark, except for the first. 11482 11483/(?=(*:x))(q|)/aftertext,mark 11484 abc 11485 0: 11486 0+ abc 11487 1: 11488MK: x 11489 11490/(?=(*:x))((*:y)q|)/aftertext,mark 11491 abc 11492 0: 11493 0+ abc 11494 1: 11495MK: x 11496 11497/(?=(*:x))(?:(*:y)q|)/aftertext,mark 11498 abc 11499 0: 11500 0+ abc 11501MK: x 11502 11503/(?=(*:x))(?>(*:y)q|)/aftertext,mark 11504 abc 11505 0: 11506 0+ abc 11507MK: x 11508 11509/(?=a(*:x))(?!a(*:y)c)/aftertext,mark 11510 ab 11511 0: 11512 0+ ab 11513MK: x 11514 11515/(?=a(*:x))(?=a(*:y)c|)/aftertext,mark 11516 ab 11517 0: 11518 0+ ab 11519MK: x 11520 11521/(..)\1/ 11522 ab\=ps 11523Partial match: ab 11524 aba\=ps 11525Partial match: aba 11526 abab\=ps 11527 0: abab 11528 1: ab 11529 11530/(..)\1/i 11531 ab\=ps 11532Partial match: ab 11533 abA\=ps 11534Partial match: abA 11535 aBAb\=ps 11536 0: aBAb 11537 1: aB 11538 11539/(..)\1{2,}/ 11540 ab\=ps 11541Partial match: ab 11542 aba\=ps 11543Partial match: aba 11544 abab\=ps 11545Partial match: abab 11546 ababa\=ps 11547Partial match: ababa 11548 ababab\=ps 11549 0: ababab 11550 1: ab 11551 ababab\=ph 11552Partial match: ababab 11553 abababa\=ps 11554 0: ababab 11555 1: ab 11556 abababa\=ph 11557Partial match: abababa 11558 11559/(..)\1{2,}/i 11560 ab\=ps 11561Partial match: ab 11562 aBa\=ps 11563Partial match: aBa 11564 aBAb\=ps 11565Partial match: aBAb 11566 AbaBA\=ps 11567Partial match: AbaBA 11568 abABAb\=ps 11569 0: abABAb 11570 1: ab 11571 aBAbaB\=ph 11572Partial match: aBAbaB 11573 abABabA\=ps 11574 0: abABab 11575 1: ab 11576 abaBABa\=ph 11577Partial match: abaBABa 11578 11579/(..)\1{2,}?x/i 11580 ab\=ps 11581Partial match: ab 11582 abA\=ps 11583Partial match: abA 11584 aBAb\=ps 11585Partial match: aBAb 11586 abaBA\=ps 11587Partial match: abaBA 11588 abAbaB\=ps 11589Partial match: abAbaB 11590 abaBabA\=ps 11591Partial match: abaBabA 11592 abAbABaBx\=ps 11593 0: abAbABaBx 11594 1: ab 11595 11596/^(..)\1/ 11597 aba\=ps 11598Partial match: aba 11599 11600/^(..)\1{2,3}x/ 11601 aba\=ps 11602Partial match: aba 11603 ababa\=ps 11604Partial match: ababa 11605 ababa\=ph 11606Partial match: ababa 11607 abababx 11608 0: abababx 11609 1: ab 11610 ababababx 11611 0: ababababx 11612 1: ab 11613 11614/^(..)\1{2,3}?x/ 11615 aba\=ps 11616Partial match: aba 11617 ababa\=ps 11618Partial match: ababa 11619 ababa\=ph 11620Partial match: ababa 11621 abababx 11622 0: abababx 11623 1: ab 11624 ababababx 11625 0: ababababx 11626 1: ab 11627 11628/^(..)(\1{2,3})ab/ 11629 abababab 11630 0: abababab 11631 1: ab 11632 2: abab 11633 11634/^\R/ 11635 \r\=ps 11636 0: \x0d 11637 \r\=ph 11638Partial match: \x0d 11639 11640/^\R{2,3}x/ 11641 \r\=ps 11642Partial match: \x0d 11643 \r\=ph 11644Partial match: \x0d 11645 \r\r\=ps 11646Partial match: \x0d\x0d 11647 \r\r\=ph 11648Partial match: \x0d\x0d 11649 \r\r\r\=ps 11650Partial match: \x0d\x0d\x0d 11651 \r\r\r\=ph 11652Partial match: \x0d\x0d\x0d 11653 \r\rx 11654 0: \x0d\x0dx 11655 \r\r\rx 11656 0: \x0d\x0d\x0dx 11657 11658/^\R{2,3}?x/ 11659 \r\=ps 11660Partial match: \x0d 11661 \r\=ph 11662Partial match: \x0d 11663 \r\r\=ps 11664Partial match: \x0d\x0d 11665 \r\r\=ph 11666Partial match: \x0d\x0d 11667 \r\r\r\=ps 11668Partial match: \x0d\x0d\x0d 11669 \r\r\r\=ph 11670Partial match: \x0d\x0d\x0d 11671 \r\rx 11672 0: \x0d\x0dx 11673 \r\r\rx 11674 0: \x0d\x0d\x0dx 11675 11676/^\R?x/ 11677 \r\=ps 11678Partial match: \x0d 11679 \r\=ph 11680Partial match: \x0d 11681 x 11682 0: x 11683 \rx 11684 0: \x0dx 11685 11686/^\R+x/ 11687 \r\=ps 11688Partial match: \x0d 11689 \r\=ph 11690Partial match: \x0d 11691 \r\n\=ps 11692Partial match: \x0d\x0a 11693 \r\n\=ph 11694Partial match: \x0d\x0a 11695 \rx 11696 0: \x0dx 11697 11698/^a$/newline=crlf 11699 a\r\=ps 11700Partial match: a\x0d 11701 a\r\=ph 11702Partial match: a\x0d 11703 11704/^a$/m,newline=crlf 11705 a\r\=ps 11706Partial match: a\x0d 11707 a\r\=ph 11708Partial match: a\x0d 11709 11710/^(a$|a\r)/newline=crlf 11711 a\r\=ps 11712 0: a\x0d 11713 1: a\x0d 11714 a\r\=ph 11715Partial match: a\x0d 11716 11717/^(a$|a\r)/m,newline=crlf 11718 a\r\=ps 11719 0: a\x0d 11720 1: a\x0d 11721 a\r\=ph 11722Partial match: a\x0d 11723 11724/./newline=crlf 11725 \r\=ps 11726 0: \x0d 11727 \r\=ph 11728Partial match: \x0d 11729 11730/.{2,3}/newline=crlf 11731 \r\=ps 11732Partial match: \x0d 11733 \r\=ph 11734Partial match: \x0d 11735 \r\r\=ps 11736 0: \x0d\x0d 11737 \r\r\=ph 11738Partial match: \x0d\x0d 11739 \r\r\r\=ps 11740 0: \x0d\x0d\x0d 11741 \r\r\r\=ph 11742Partial match: \x0d\x0d\x0d 11743 11744/.{2,3}?/newline=crlf 11745 \r\=ps 11746Partial match: \x0d 11747 \r\=ph 11748Partial match: \x0d 11749 \r\r\=ps 11750 0: \x0d\x0d 11751 \r\r\=ph 11752Partial match: \x0d\x0d 11753 \r\r\r\=ps 11754 0: \x0d\x0d 11755 \r\r\r\=ph 11756 0: \x0d\x0d 11757 11758"AB(C(D))(E(F))?(?(?=\2)(?=\4))" 11759 ABCDGHI\=ovector=01 11760Matched, but too many substrings 11761 0: ABCD 11762 11763# These are all run as real matches in test 1; here we are just checking the 11764# settings of the anchored and startline bits. 11765 11766/(?>.*?a)(?<=ba)/I 11767Capture group count = 0 11768Max lookbehind = 2 11769Last code unit = 'a' 11770Subject length lower bound = 1 11771 11772/(?:.*?a)(?<=ba)/I 11773Capture group count = 0 11774Max lookbehind = 2 11775First code unit at start or follows newline 11776Last code unit = 'a' 11777Subject length lower bound = 1 11778 11779/.*?a(*PRUNE)b/I 11780Capture group count = 0 11781Last code unit = 'b' 11782Subject length lower bound = 2 11783 11784/.*?a(*PRUNE)b/Is 11785Capture group count = 0 11786Options: dotall 11787Last code unit = 'b' 11788Subject length lower bound = 2 11789 11790/^a(*PRUNE)b/Is 11791Capture group count = 0 11792Compile options: dotall 11793Overall options: anchored dotall 11794First code unit = 'a' 11795Subject length lower bound = 2 11796 11797/.*?a(*SKIP)b/I 11798Capture group count = 0 11799Last code unit = 'b' 11800Subject length lower bound = 2 11801 11802/(?>.*?a)b/Is 11803Capture group count = 0 11804Options: dotall 11805Last code unit = 'b' 11806Subject length lower bound = 2 11807 11808/(?>.*?a)b/I 11809Capture group count = 0 11810Last code unit = 'b' 11811Subject length lower bound = 2 11812 11813/(?>^a)b/Is 11814Capture group count = 0 11815Compile options: dotall 11816Overall options: anchored dotall 11817First code unit = 'a' 11818Subject length lower bound = 2 11819 11820/(?>.*?)(?<=(abcd)|(wxyz))/I 11821Capture group count = 2 11822Max lookbehind = 4 11823May match empty string 11824Subject length lower bound = 0 11825 11826/(?>.*)(?<=(abcd)|(wxyz))/I 11827Capture group count = 2 11828Max lookbehind = 4 11829May match empty string 11830Subject length lower bound = 0 11831 11832"(?>.*)foo"I 11833Capture group count = 0 11834Last code unit = 'o' 11835Subject length lower bound = 3 11836 11837"(?>.*?)foo"I 11838Capture group count = 0 11839Last code unit = 'o' 11840Subject length lower bound = 3 11841 11842/(?>^abc)/Im 11843Capture group count = 0 11844Options: multiline 11845First code unit at start or follows newline 11846Last code unit = 'c' 11847Subject length lower bound = 3 11848 11849/(?>.*abc)/Im 11850Capture group count = 0 11851Options: multiline 11852Last code unit = 'c' 11853Subject length lower bound = 3 11854 11855/(?:.*abc)/Im 11856Capture group count = 0 11857Options: multiline 11858First code unit at start or follows newline 11859Last code unit = 'c' 11860Subject length lower bound = 3 11861 11862/(?:(a)+(?C1)bb|aa(?C2)b)/ 11863 aab\=callout_capture 11864Callout 1: last capture = 1 11865 1: a 11866--->aab 11867 ^ ^ b 11868Callout 1: last capture = 1 11869 1: a 11870--->aab 11871 ^^ b 11872Callout 2: last capture = 0 11873--->aab 11874 ^ ^ b 11875 0: aab 11876 11877/(?:(a)++(?C1)bb|aa(?C2)b)/ 11878 aab\=callout_capture 11879Callout 1: last capture = 1 11880 1: a 11881--->aab 11882 ^ ^ b 11883Callout 2: last capture = 0 11884--->aab 11885 ^ ^ b 11886 0: aab 11887 11888/(?:(?>(a))(?C1)bb|aa(?C2)b)/ 11889 aab\=callout_capture 11890Callout 1: last capture = 1 11891 1: a 11892--->aab 11893 ^^ b 11894Callout 2: last capture = 0 11895--->aab 11896 ^ ^ b 11897 0: aab 11898 11899/(?:(?1)(?C1)x|ab(?C2))((a)){0}/ 11900 aab\=callout_capture 11901Callout 1: last capture = 0 11902--->aab 11903 ^^ x 11904Callout 1: last capture = 0 11905--->aab 11906 ^^ x 11907Callout 2: last capture = 0 11908--->aab 11909 ^ ^ ) 11910 0: ab 11911 11912/(?1)(?C1)((a)(?C2)){0}/ 11913 aab\=callout_capture 11914Callout 2: last capture = 2 11915 1: <unset> 11916 2: a 11917--->aab 11918 ^^ ){0} 11919Callout 1: last capture = 0 11920--->aab 11921 ^^ ( 11922 0: a 11923 11924/(?:(a)+(?C1)bb|aa(?C2)b)++/ 11925 aab\=callout_capture 11926Callout 1: last capture = 1 11927 1: a 11928--->aab 11929 ^ ^ b 11930Callout 1: last capture = 1 11931 1: a 11932--->aab 11933 ^^ b 11934Callout 2: last capture = 0 11935--->aab 11936 ^ ^ b 11937 0: aab 11938 aab\=callout_capture,ovector=1 11939Callout 1: last capture = 1 11940 1: a 11941--->aab 11942 ^ ^ b 11943Callout 1: last capture = 1 11944 1: a 11945--->aab 11946 ^^ b 11947Callout 2: last capture = 0 11948--->aab 11949 ^ ^ b 11950 0: aab 11951 11952/(ab)x|ab/ 11953 ab\=ovector=0 11954 0: ab 11955 ab\=ovector=1 11956 0: ab 11957 11958/(?<=123)(*MARK:xx)abc/mark 11959 xxxx123a\=ph 11960Partial match, mark=xx: a 11961 xxxx123a\=ps 11962Partial match, mark=xx: a 11963 11964/123\Kabc/startchar 11965 xxxx123a\=ph 11966Partial match: 123a 11967 xxxx123a\=ps 11968Partial match: 123a 11969 11970/^(?(?=a)aa|bb)/auto_callout 11971 bb 11972--->bb 11973 +0 ^ ^ 11974 +1 ^ (? 11975 +3 ^ (?= 11976 +6 ^ a 11977+11 ^ b 11978+12 ^^ b 11979+13 ^ ^ ) 11980+14 ^ ^ End of pattern 11981 0: bb 11982 11983/(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/ 11984 bb 11985--->bb 11986 1 ^ ^ 11987 2 ^ (? 11988 99 ^ (?= 11989 3 ^ a 11990 8 ^ b 11991 9 ^^ b 11992 10 ^ ^ ) 11993 11 ^ ^ End of pattern 11994 0: bb 11995 11996# Perl seems to have a bug with this one. 11997 11998/aaaaa(*COMMIT)(*PRUNE)b|a+c/ 11999 aaaaaac 12000 0: aaaac 12001 12002# Here are some that Perl treats differently because of the way it handles 12003# backtracking verbs. 12004 12005/(?!a(*COMMIT)b)ac|ad/ 12006 ac 12007 0: ac 12008 ad 12009 0: ad 12010 12011/^(?!a(*THEN)b|ac)../ 12012 ad 12013 0: ad 12014\= Expect no match 12015 ac 12016No match 12017 12018/^(?=a(*THEN)b|ac)/ 12019 ac 12020 0: 12021 12022/\A.*?(?:a|b(*THEN)c)/ 12023 ba 12024 0: ba 12025 12026/\A.*?(?:a|b(*THEN)c)++/ 12027 ba 12028 0: ba 12029 12030/\A.*?(?:a|b(*THEN)c|d)/ 12031 ba 12032 0: ba 12033 12034/(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/ 12035 aac 12036 0: aac 12037 12038/\A.*?(a|b(*THEN)c)/ 12039 ba 12040 0: ba 12041 1: a 12042 12043/^(A(*THEN)B|A(*THEN)D)/ 12044 AD 12045 0: AD 12046 1: AD 12047 12048/(?!b(*THEN)a)bn|bnn/ 12049 bnn 12050 0: bn 12051 12052/(?(?=b(*SKIP)a)bn|bnn)/ 12053 bnn 12054 0: bnn 12055 12056/(?=b(*THEN)a|)bn|bnn/ 12057 bnn 12058 0: bn 12059 12060# This test causes a segfault with Perl 5.18.0 12061 12062/^(?=(a)){0}b(?1)/ 12063 backgammon 12064 0: ba 12065 12066/(?|(?<n>f)|(?<n>b))/I,dupnames 12067Capture group count = 1 12068Named capture groups: 12069 n 1 12070Options: dupnames 12071Starting code units: b f 12072Subject length lower bound = 1 12073 12074/(?<a>abc)(?<a>z)\k<a>()/IB,dupnames 12075------------------------------------------------------------------ 12076 Bra 12077 CBra 1 12078 abc 12079 Ket 12080 CBra 2 12081 z 12082 Ket 12083 \k<a>2 12084 CBra 3 12085 Ket 12086 Ket 12087 End 12088------------------------------------------------------------------ 12089Capture group count = 3 12090Max back reference = 2 12091Named capture groups: 12092 a 1 12093 a 2 12094Options: dupnames 12095First code unit = 'a' 12096Last code unit = 'z' 12097Subject length lower bound = 5 12098 12099/a*[bcd]/B 12100------------------------------------------------------------------ 12101 Bra 12102 a*+ 12103 [b-d] 12104 Ket 12105 End 12106------------------------------------------------------------------ 12107 12108/[bcd]*a/B 12109------------------------------------------------------------------ 12110 Bra 12111 [b-d]*+ 12112 a 12113 Ket 12114 End 12115------------------------------------------------------------------ 12116 12117# A complete set of tests for auto-possessification of character types, but 12118# omitting \C because it might be disabled (it has its own tests). 12119 12120/\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 12121------------------------------------------------------------------ 12122 Bra 12123 \D+ 12124 \D 12125 \D++ 12126 \d 12127 \D+ 12128 \S 12129 \D+ 12130 \s 12131 \D+ 12132 \W 12133 \D+ 12134 \w 12135 \D+ 12136 Any 12137 \D+ 12138 \R 12139 \D+ 12140 \H 12141 \D+ 12142 \h 12143 \D+ 12144 \V 12145 \D+ 12146 \v 12147 \D+ 12148 \Z 12149 \D++ 12150 \z 12151 \D+ 12152 $ 12153 Ket 12154 End 12155------------------------------------------------------------------ 12156 12157/\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 12158------------------------------------------------------------------ 12159 Bra 12160 \d++ 12161 \D 12162 \d+ 12163 \d 12164 \d+ 12165 \S 12166 \d++ 12167 \s 12168 \d++ 12169 \W 12170 \d+ 12171 \w 12172 \d+ 12173 Any 12174 \d++ 12175 \R 12176 \d+ 12177 \H 12178 \d++ 12179 \h 12180 \d+ 12181 \V 12182 \d++ 12183 \v 12184 \d++ 12185 \Z 12186 \d++ 12187 \z 12188 \d++ 12189 $ 12190 Ket 12191 End 12192------------------------------------------------------------------ 12193 12194/\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 12195------------------------------------------------------------------ 12196 Bra 12197 \S+ 12198 \D 12199 \S+ 12200 \d 12201 \S+ 12202 \S 12203 \S++ 12204 \s 12205 \S+ 12206 \W 12207 \S+ 12208 \w 12209 \S+ 12210 Any 12211 \S++ 12212 \R 12213 \S+ 12214 \H 12215 \S++ 12216 \h 12217 \S+ 12218 \V 12219 \S++ 12220 \v 12221 \S++ 12222 \Z 12223 \S++ 12224 \z 12225 \S++ 12226 $ 12227 Ket 12228 End 12229------------------------------------------------------------------ 12230 12231/\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 12232------------------------------------------------------------------ 12233 Bra 12234 \s+ 12235 \D 12236 \s++ 12237 \d 12238 \s++ 12239 \S 12240 \s+ 12241 \s 12242 \s+ 12243 \W 12244 \s++ 12245 \w 12246 \s+ 12247 Any 12248 \s+ 12249 \R 12250 \s+ 12251 \H 12252 \s+ 12253 \h 12254 \s+ 12255 \V 12256 \s+ 12257 \v 12258 \s+ 12259 \Z 12260 \s++ 12261 \z 12262 \s+ 12263 $ 12264 Ket 12265 End 12266------------------------------------------------------------------ 12267 12268/\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 12269------------------------------------------------------------------ 12270 Bra 12271 \W+ 12272 \D 12273 \W++ 12274 \d 12275 \W+ 12276 \S 12277 \W+ 12278 \s 12279 \W+ 12280 \W 12281 \W++ 12282 \w 12283 \W+ 12284 Any 12285 \W+ 12286 \R 12287 \W+ 12288 \H 12289 \W+ 12290 \h 12291 \W+ 12292 \V 12293 \W+ 12294 \v 12295 \W+ 12296 \Z 12297 \W++ 12298 \z 12299 \W+ 12300 $ 12301 Ket 12302 End 12303------------------------------------------------------------------ 12304 12305/\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 12306------------------------------------------------------------------ 12307 Bra 12308 \w+ 12309 \D 12310 \w+ 12311 \d 12312 \w+ 12313 \S 12314 \w++ 12315 \s 12316 \w++ 12317 \W 12318 \w+ 12319 \w 12320 \w+ 12321 Any 12322 \w++ 12323 \R 12324 \w+ 12325 \H 12326 \w++ 12327 \h 12328 \w+ 12329 \V 12330 \w++ 12331 \v 12332 \w++ 12333 \Z 12334 \w++ 12335 \z 12336 \w++ 12337 $ 12338 Ket 12339 End 12340------------------------------------------------------------------ 12341 12342/\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 12343------------------------------------------------------------------ 12344 Bra 12345 \R+ 12346 \D 12347 \R++ 12348 \d 12349 \R+ 12350 \S 12351 \R++ 12352 \s 12353 \R+ 12354 \W 12355 \R++ 12356 \w 12357 \R++ 12358 Any 12359 \R+ 12360 \R 12361 \R+ 12362 \H 12363 \R++ 12364 \h 12365 \R+ 12366 \V 12367 \R+ 12368 \v 12369 \R+ 12370 \Z 12371 \R++ 12372 \z 12373 \R+ 12374 $ 12375 Ket 12376 End 12377------------------------------------------------------------------ 12378 12379/\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 12380------------------------------------------------------------------ 12381 Bra 12382 \H+ 12383 \D 12384 \H+ 12385 \d 12386 \H+ 12387 \S 12388 \H+ 12389 \s 12390 \H+ 12391 \W 12392 \H+ 12393 \w 12394 \H+ 12395 Any 12396 \H+ 12397 \R 12398 \H+ 12399 \H 12400 \H++ 12401 \h 12402 \H+ 12403 \V 12404 \H+ 12405 \v 12406 \H+ 12407 \Z 12408 \H++ 12409 \z 12410 \H+ 12411 $ 12412 Ket 12413 End 12414------------------------------------------------------------------ 12415 12416/\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 12417------------------------------------------------------------------ 12418 Bra 12419 \h+ 12420 \D 12421 \h++ 12422 \d 12423 \h++ 12424 \S 12425 \h+ 12426 \s 12427 \h+ 12428 \W 12429 \h++ 12430 \w 12431 \h+ 12432 Any 12433 \h++ 12434 \R 12435 \h++ 12436 \H 12437 \h+ 12438 \h 12439 \h+ 12440 \V 12441 \h++ 12442 \v 12443 \h+ 12444 \Z 12445 \h++ 12446 \z 12447 \h+ 12448 $ 12449 Ket 12450 End 12451------------------------------------------------------------------ 12452 12453/\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 12454------------------------------------------------------------------ 12455 Bra 12456 \V+ 12457 \D 12458 \V+ 12459 \d 12460 \V+ 12461 \S 12462 \V+ 12463 \s 12464 \V+ 12465 \W 12466 \V+ 12467 \w 12468 \V+ 12469 Any 12470 \V++ 12471 \R 12472 \V+ 12473 \H 12474 \V+ 12475 \h 12476 \V+ 12477 \V 12478 \V++ 12479 \v 12480 \V+ 12481 \Z 12482 \V++ 12483 \z 12484 \V+ 12485 $ 12486 Ket 12487 End 12488------------------------------------------------------------------ 12489 12490/\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 12491------------------------------------------------------------------ 12492 Bra 12493 \v+ 12494 \D 12495 \v++ 12496 \d 12497 \v++ 12498 \S 12499 \v+ 12500 \s 12501 \v+ 12502 \W 12503 \v++ 12504 \w 12505 \v+ 12506 Any 12507 \v+ 12508 \R 12509 \v+ 12510 \H 12511 \v++ 12512 \h 12513 \v++ 12514 \V 12515 \v+ 12516 \v 12517 \v+ 12518 \Z 12519 \v++ 12520 \z 12521 \v+ 12522 $ 12523 Ket 12524 End 12525------------------------------------------------------------------ 12526 12527/ 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 12528------------------------------------------------------------------ 12529 Bra 12530 a+ 12531 \D 12532 a++ 12533 \d 12534 a+ 12535 \S 12536 a++ 12537 \s 12538 a++ 12539 \W 12540 a+ 12541 \w 12542 a+ 12543 Any 12544 a++ 12545 \R 12546 a+ 12547 \H 12548 a++ 12549 \h 12550 a+ 12551 \V 12552 a++ 12553 \v 12554 a++ 12555 \Z 12556 a++ 12557 \z 12558 a++ 12559 $ 12560 Ket 12561 End 12562------------------------------------------------------------------ 12563 12564/\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 12565------------------------------------------------------------------ 12566 Bra 12567 \x0a+ 12568 \D 12569 \x0a++ 12570 \d 12571 \x0a++ 12572 \S 12573 \x0a+ 12574 \s 12575 \x0a+ 12576 \W 12577 \x0a++ 12578 \w 12579 \x0a+ 12580 Any 12581 \x0a+ 12582 \R 12583 \x0a+ 12584 \H 12585 \x0a++ 12586 \h 12587 \x0a++ 12588 \V 12589 \x0a+ 12590 \v 12591 \x0a+ 12592 \Z 12593 \x0a++ 12594 \z 12595 \x0a+ 12596 $ 12597 Ket 12598 End 12599------------------------------------------------------------------ 12600 12601/ .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/Bx 12602------------------------------------------------------------------ 12603 Bra 12604 Any+ 12605 \D 12606 Any+ 12607 \d 12608 Any+ 12609 \S 12610 Any+ 12611 \s 12612 Any+ 12613 \W 12614 Any+ 12615 \w 12616 Any+ 12617 Any 12618 Any++ 12619 \R 12620 Any+ 12621 \H 12622 Any+ 12623 \h 12624 Any+ 12625 \V 12626 Any+ 12627 \v 12628 Any+ 12629 \Z 12630 Any++ 12631 \z 12632 Any+ 12633 $ 12634 Ket 12635 End 12636------------------------------------------------------------------ 12637 12638/ .+\D .+\d .+\S .+\s .+\W .+\w .+. .+\R .+\H .+\h .+\V .+\v .+\Z .+\z .+$/Bsx 12639------------------------------------------------------------------ 12640 Bra 12641 AllAny+ 12642 \D 12643 AllAny+ 12644 \d 12645 AllAny+ 12646 \S 12647 AllAny+ 12648 \s 12649 AllAny+ 12650 \W 12651 AllAny+ 12652 \w 12653 AllAny+ 12654 AllAny 12655 AllAny+ 12656 \R 12657 AllAny+ 12658 \H 12659 AllAny+ 12660 \h 12661 AllAny+ 12662 \V 12663 AllAny+ 12664 \v 12665 AllAny+ 12666 \Z 12667 AllAny++ 12668 \z 12669 AllAny+ 12670 $ 12671 Ket 12672 End 12673------------------------------------------------------------------ 12674 12675/ \D+$ \d+$ \S+$ \s+$ \W+$ \w+$ \R+$ \H+$ \h+$ \V+$ \v+$ a+$ \n+$ .+$ .+$/Bmx 12676------------------------------------------------------------------ 12677 Bra 12678 \D+ 12679 /m $ 12680 \d++ 12681 /m $ 12682 \S++ 12683 /m $ 12684 \s+ 12685 /m $ 12686 \W+ 12687 /m $ 12688 \w++ 12689 /m $ 12690 \R+ 12691 /m $ 12692 \H+ 12693 /m $ 12694 \h+ 12695 /m $ 12696 \V+ 12697 /m $ 12698 \v+ 12699 /m $ 12700 a+ 12701 /m $ 12702 \x0a+ 12703 /m $ 12704 Any+ 12705 /m $ 12706 Any+ 12707 /m $ 12708 Ket 12709 End 12710------------------------------------------------------------------ 12711 12712/(?=a+)a(a+)++a/B 12713------------------------------------------------------------------ 12714 Bra 12715 Assert 12716 a++ 12717 Ket 12718 a 12719 CBraPos 1 12720 a+ 12721 KetRpos 12722 a 12723 Ket 12724 End 12725------------------------------------------------------------------ 12726 12727/a+(bb|cc)a+(?:bb|cc)a+(?>bb|cc)a+(?:bb|cc)+a+(aa)a+(?:bb|aa)/B 12728------------------------------------------------------------------ 12729 Bra 12730 a++ 12731 CBra 1 12732 bb 12733 Alt 12734 cc 12735 Ket 12736 a++ 12737 Bra 12738 bb 12739 Alt 12740 cc 12741 Ket 12742 a++ 12743 Once 12744 bb 12745 Alt 12746 cc 12747 Ket 12748 a++ 12749 Bra 12750 bb 12751 Alt 12752 cc 12753 KetRmax 12754 a+ 12755 CBra 2 12756 aa 12757 Ket 12758 a+ 12759 Bra 12760 bb 12761 Alt 12762 aa 12763 Ket 12764 Ket 12765 End 12766------------------------------------------------------------------ 12767 12768/a+(bb|cc)?#a+(?:bb|cc)??#a+(?:bb|cc)?+#a+(?:bb|cc)*#a+(bb|cc)?a#a+(?:aa)?/B 12769------------------------------------------------------------------ 12770 Bra 12771 a++ 12772 Brazero 12773 CBra 1 12774 bb 12775 Alt 12776 cc 12777 Ket 12778 # 12779 a++ 12780 Braminzero 12781 Bra 12782 bb 12783 Alt 12784 cc 12785 Ket 12786 # 12787 a++ 12788 Once 12789 Brazero 12790 Bra 12791 bb 12792 Alt 12793 cc 12794 Ket 12795 Ket 12796 # 12797 a++ 12798 Brazero 12799 Bra 12800 bb 12801 Alt 12802 cc 12803 KetRmax 12804 # 12805 a+ 12806 Brazero 12807 CBra 2 12808 bb 12809 Alt 12810 cc 12811 Ket 12812 a# 12813 a+ 12814 Brazero 12815 Bra 12816 aa 12817 Ket 12818 Ket 12819 End 12820------------------------------------------------------------------ 12821 12822/a+(?:bb)?a#a+(?:|||)#a+(?:|b)a#a+(?:|||)?a/B 12823------------------------------------------------------------------ 12824 Bra 12825 a+ 12826 Brazero 12827 Bra 12828 bb 12829 Ket 12830 a# 12831 a++ 12832 Bra 12833 Alt 12834 Alt 12835 Alt 12836 Ket 12837 # 12838 a+ 12839 Bra 12840 Alt 12841 b 12842 Ket 12843 a# 12844 a+ 12845 Brazero 12846 Bra 12847 Alt 12848 Alt 12849 Alt 12850 Ket 12851 a 12852 Ket 12853 End 12854------------------------------------------------------------------ 12855 12856/[ab]*/B 12857------------------------------------------------------------------ 12858 Bra 12859 [ab]*+ 12860 Ket 12861 End 12862------------------------------------------------------------------ 12863 aaaa 12864 0: aaaa 12865 12866/[ab]*?/B 12867------------------------------------------------------------------ 12868 Bra 12869 [ab]*? 12870 Ket 12871 End 12872------------------------------------------------------------------ 12873 aaaa 12874 0: 12875 12876/[ab]?/B 12877------------------------------------------------------------------ 12878 Bra 12879 [ab]?+ 12880 Ket 12881 End 12882------------------------------------------------------------------ 12883 aaaa 12884 0: a 12885 12886/[ab]??/B 12887------------------------------------------------------------------ 12888 Bra 12889 [ab]?? 12890 Ket 12891 End 12892------------------------------------------------------------------ 12893 aaaa 12894 0: 12895 12896/[ab]+/B 12897------------------------------------------------------------------ 12898 Bra 12899 [ab]++ 12900 Ket 12901 End 12902------------------------------------------------------------------ 12903 aaaa 12904 0: aaaa 12905 12906/[ab]+?/B 12907------------------------------------------------------------------ 12908 Bra 12909 [ab]+? 12910 Ket 12911 End 12912------------------------------------------------------------------ 12913 aaaa 12914 0: a 12915 12916/[ab]{2,3}/B 12917------------------------------------------------------------------ 12918 Bra 12919 [ab]{2,3}+ 12920 Ket 12921 End 12922------------------------------------------------------------------ 12923 aaaa 12924 0: aaa 12925 12926/[ab]{2,3}?/B 12927------------------------------------------------------------------ 12928 Bra 12929 [ab]{2,3}? 12930 Ket 12931 End 12932------------------------------------------------------------------ 12933 aaaa 12934 0: aa 12935 12936/[ab]{2,}/B 12937------------------------------------------------------------------ 12938 Bra 12939 [ab]{2,}+ 12940 Ket 12941 End 12942------------------------------------------------------------------ 12943 aaaa 12944 0: aaaa 12945 12946/[ab]{2,}?/B 12947------------------------------------------------------------------ 12948 Bra 12949 [ab]{2,}? 12950 Ket 12951 End 12952------------------------------------------------------------------ 12953 aaaa 12954 0: aa 12955 12956/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/B 12957------------------------------------------------------------------ 12958 Bra 12959 \d++ 12960 \s{0,5}+ 12961 = 12962 \s*+ 12963 \S? 12964 = 12965 \w{0,4}+ 12966 \W*+ 12967 Ket 12968 End 12969------------------------------------------------------------------ 12970 12971/[a-d]{5,12}[e-z0-9]*#[^a-z]+[b-y]*a[2-7]?[^0-9a-z]+/B 12972------------------------------------------------------------------ 12973 Bra 12974 [a-d]{5,12}+ 12975 [0-9e-z]*+ 12976 # 12977 [\x00-`{-\xff] (neg)++ 12978 [b-y]*+ 12979 a 12980 [2-7]?+ 12981 [\x00-/:-`{-\xff] (neg)++ 12982 Ket 12983 End 12984------------------------------------------------------------------ 12985 12986/[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 12987------------------------------------------------------------------ 12988 Bra 12989 [a-z]*+ 12990 \s 12991 # 12992 [\x09 ]?+ 12993 \S 12994 # 12995 [a-c]* 12996 \S 12997 # 12998 [C-G]++ 12999 \d 13000 # 13001 [4-8]*+ 13002 \D 13003 # 13004 [,4-9]* 13005 \D 13006 # 13007 [!$]{0,5}+ 13008 \w 13009 # 13010 [M-Xf-l]++ 13011 \W 13012 # 13013 [,a-c]? 13014 \W 13015 Ket 13016 End 13017------------------------------------------------------------------ 13018 13019/a+(aa|bb)*c#a*(bb|cc)*a#a?(bb|cc)*d#[a-f]*(g|hh)*f/B 13020------------------------------------------------------------------ 13021 Bra 13022 a+ 13023 Brazero 13024 CBra 1 13025 aa 13026 Alt 13027 bb 13028 KetRmax 13029 c# 13030 a* 13031 Brazero 13032 CBra 2 13033 bb 13034 Alt 13035 cc 13036 KetRmax 13037 a# 13038 a?+ 13039 Brazero 13040 CBra 3 13041 bb 13042 Alt 13043 cc 13044 KetRmax 13045 d# 13046 [a-f]* 13047 Brazero 13048 CBra 4 13049 g 13050 Alt 13051 hh 13052 KetRmax 13053 f 13054 Ket 13055 End 13056------------------------------------------------------------------ 13057 13058/[a-f]*(g|hh|i)*i#[a-x]{4,}(y{0,6})*y#[a-k]+(ll|mm)+n/B 13059------------------------------------------------------------------ 13060 Bra 13061 [a-f]*+ 13062 Brazero 13063 CBra 1 13064 g 13065 Alt 13066 hh 13067 Alt 13068 i 13069 KetRmax 13070 i# 13071 [a-x]{4,} 13072 Brazero 13073 SCBra 2 13074 y{0,6} 13075 KetRmax 13076 y# 13077 [a-k]++ 13078 CBra 3 13079 ll 13080 Alt 13081 mm 13082 KetRmax 13083 n 13084 Ket 13085 End 13086------------------------------------------------------------------ 13087 13088/[a-f]*(?>gg|hh)+#[a-f]*(?>gg|hh)?#[a-f]*(?>gg|hh)*a#[a-f]*(?>gg|hh)*h/B 13089------------------------------------------------------------------ 13090 Bra 13091 [a-f]*+ 13092 Once 13093 gg 13094 Alt 13095 hh 13096 KetRmax 13097 # 13098 [a-f]*+ 13099 Brazero 13100 Once 13101 gg 13102 Alt 13103 hh 13104 Ket 13105 # 13106 [a-f]* 13107 Brazero 13108 Once 13109 gg 13110 Alt 13111 hh 13112 KetRmax 13113 a# 13114 [a-f]*+ 13115 Brazero 13116 Once 13117 gg 13118 Alt 13119 hh 13120 KetRmax 13121 h 13122 Ket 13123 End 13124------------------------------------------------------------------ 13125 13126/[a-c]*d/IB 13127------------------------------------------------------------------ 13128 Bra 13129 [a-c]*+ 13130 d 13131 Ket 13132 End 13133------------------------------------------------------------------ 13134Capture group count = 0 13135Starting code units: a b c d 13136Last code unit = 'd' 13137Subject length lower bound = 1 13138 13139/[a-c]+d/IB 13140------------------------------------------------------------------ 13141 Bra 13142 [a-c]++ 13143 d 13144 Ket 13145 End 13146------------------------------------------------------------------ 13147Capture group count = 0 13148Starting code units: a b c 13149Last code unit = 'd' 13150Subject length lower bound = 2 13151 13152/[a-c]?d/IB 13153------------------------------------------------------------------ 13154 Bra 13155 [a-c]?+ 13156 d 13157 Ket 13158 End 13159------------------------------------------------------------------ 13160Capture group count = 0 13161Starting code units: a b c d 13162Last code unit = 'd' 13163Subject length lower bound = 1 13164 13165/[a-c]{4,6}d/IB 13166------------------------------------------------------------------ 13167 Bra 13168 [a-c]{4,6}+ 13169 d 13170 Ket 13171 End 13172------------------------------------------------------------------ 13173Capture group count = 0 13174Starting code units: a b c 13175Last code unit = 'd' 13176Subject length lower bound = 5 13177 13178/[a-c]{0,6}d/IB 13179------------------------------------------------------------------ 13180 Bra 13181 [a-c]{0,6}+ 13182 d 13183 Ket 13184 End 13185------------------------------------------------------------------ 13186Capture group count = 0 13187Starting code units: a b c d 13188Last code unit = 'd' 13189Subject length lower bound = 1 13190 13191# End of special auto-possessive tests 13192 13193/^A\o{1239}B/ 13194Failed: error 164 at offset 8: non-octal character in \o{} (closing brace missing?) 13195 A\123B 13196 13197/^A\oB/ 13198Failed: error 155 at offset 4: missing opening brace after \o 13199 13200/^A\x{zz}B/ 13201Failed: error 167 at offset 5: non-hex character in \x{} (closing brace missing?) 13202 13203/^A\x{12Z/ 13204Failed: error 167 at offset 7: non-hex character in \x{} (closing brace missing?) 13205 13206/^A\x{/ 13207Failed: error 178 at offset 5: digits missing in \x{} or \o{} or \N{U+} 13208 13209/[ab]++/B,no_auto_possess 13210------------------------------------------------------------------ 13211 Bra 13212 [ab]++ 13213 Ket 13214 End 13215------------------------------------------------------------------ 13216 13217/[^ab]*+/B,no_auto_possess 13218------------------------------------------------------------------ 13219 Bra 13220 [\x00-`c-\xff] (neg)*+ 13221 Ket 13222 End 13223------------------------------------------------------------------ 13224 13225/a{4}+/B,no_auto_possess 13226------------------------------------------------------------------ 13227 Bra 13228 a{4} 13229 Ket 13230 End 13231------------------------------------------------------------------ 13232 13233/a{4}+/Bi,no_auto_possess 13234------------------------------------------------------------------ 13235 Bra 13236 /i a{4} 13237 Ket 13238 End 13239------------------------------------------------------------------ 13240 13241/[a-[:digit:]]+/ 13242Failed: error 150 at offset 4: invalid range in character class 13243 13244/[A-[:digit:]]+/ 13245Failed: error 150 at offset 4: invalid range in character class 13246 13247/[a-[.xxx.]]+/ 13248Failed: error 150 at offset 4: invalid range in character class 13249 13250/[a-[=xxx=]]+/ 13251Failed: error 150 at offset 4: invalid range in character class 13252 13253/[a-[!xxx!]]+/ 13254Failed: error 108 at offset 3: range out of order in character class 13255 13256/[A-[!xxx!]]+/ 13257 A]]] 13258 0: A]]] 13259 13260/[a-\d]+/ 13261Failed: error 150 at offset 5: invalid range in character class 13262 13263/(?<0abc>xx)/ 13264Failed: error 144 at offset 3: subpattern name must start with a non-digit 13265 13266/(?&1abc)xx(?<1abc>y)/ 13267Failed: error 144 at offset 3: subpattern name must start with a non-digit 13268 13269/(?<ab-cd>xx)/ 13270Failed: error 142 at offset 5: syntax error in subpattern name (missing terminator?) 13271 13272/(?'0abc'xx)/ 13273Failed: error 144 at offset 3: subpattern name must start with a non-digit 13274 13275/(?P<0abc>xx)/ 13276Failed: error 144 at offset 4: subpattern name must start with a non-digit 13277 13278/\k<5ghj>/ 13279Failed: error 144 at offset 3: subpattern name must start with a non-digit 13280 13281/\k'5ghj'/ 13282Failed: error 144 at offset 3: subpattern name must start with a non-digit 13283 13284/\k{2fgh}/ 13285Failed: error 144 at offset 3: subpattern name must start with a non-digit 13286 13287/(?P=8yuki)/ 13288Failed: error 144 at offset 4: subpattern name must start with a non-digit 13289 13290/\g{4df}/ 13291Failed: error 157 at offset 2: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 13292 13293/(?&1abc)xx(?<1abc>y)/ 13294Failed: error 144 at offset 3: subpattern name must start with a non-digit 13295 13296/(?P>1abc)xx(?<1abc>y)/ 13297Failed: error 144 at offset 4: subpattern name must start with a non-digit 13298 13299/\g'3gh'/ 13300Failed: error 157 at offset 2: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 13301 13302/\g<5fg>/ 13303Failed: error 157 at offset 2: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 13304 13305/(?(<4gh>)abc)/ 13306Failed: error 144 at offset 4: subpattern name must start with a non-digit 13307 13308/(?('4gh')abc)/ 13309Failed: error 144 at offset 4: subpattern name must start with a non-digit 13310 13311/(?(4gh)abc)/ 13312Failed: error 124 at offset 4: missing closing parenthesis for condition 13313 13314/(?(R&6yh)abc)/ 13315Failed: error 144 at offset 5: subpattern name must start with a non-digit 13316 13317/(((a\2)|(a*)\g<-1>))*a?/B 13318------------------------------------------------------------------ 13319 Bra 13320 Brazero 13321 SCBra 1 13322 CBra 2 13323 CBra 3 13324 a 13325 \2 13326 Ket 13327 Alt 13328 CBra 4 13329 a* 13330 Ket 13331 Recurse 13332 Ket 13333 KetRmax 13334 a?+ 13335 Ket 13336 End 13337------------------------------------------------------------------ 13338 13339# Test the ugly "start or end of word" compatibility syntax. 13340 13341/[[:<:]]red[[:>:]]/B 13342------------------------------------------------------------------ 13343 Bra 13344 \b 13345 Assert 13346 \w 13347 Ket 13348 red 13349 \b 13350 Assert back 13351 Reverse 13352 \w 13353 Ket 13354 Ket 13355 End 13356------------------------------------------------------------------ 13357 little red riding hood 13358 0: red 13359 a /red/ thing 13360 0: red 13361 red is a colour 13362 0: red 13363 put it all on red 13364 0: red 13365\= Expect no match 13366 no reduction 13367No match 13368 Alfred Winifred 13369No match 13370 13371/[a[:<:]] should give error/ 13372Failed: error 130 at offset 4: unknown POSIX class name 13373 13374/(?=ab\K)/aftertext,allow_lookaround_bsk 13375 abcd\=startchar 13376Start of matched string is beyond its end - displaying from end to start. 13377 0: ab 13378 0+ abcd 13379 13380/abcd/newline=lf,firstline 13381\= Expect no match 13382 xx\nxabcd 13383No match 13384 13385# Test stack guard external calls. 13386 13387/(((a)))/stackguard=1 13388Failed: error 133 at offset 7: parentheses are too deeply nested (stack check) 13389 13390/(((a)))/stackguard=2 13391Failed: error 133 at offset 7: parentheses are too deeply nested (stack check) 13392 13393/(((a)))/stackguard=3 13394 13395/(((((a)))))/ 13396 13397# End stack guard tests 13398 13399/^\w+(?>\s*)(?<=\w)/B 13400------------------------------------------------------------------ 13401 Bra 13402 ^ 13403 \w+ 13404 Once 13405 \s*+ 13406 Ket 13407 Assert back 13408 Reverse 13409 \w 13410 Ket 13411 Ket 13412 End 13413------------------------------------------------------------------ 13414 13415/\othing/ 13416Failed: error 155 at offset 2: missing opening brace after \o 13417 13418/\o{}/ 13419Failed: error 178 at offset 3: digits missing in \x{} or \o{} or \N{U+} 13420 13421/\o{whatever}/ 13422Failed: error 164 at offset 3: non-octal character in \o{} (closing brace missing?) 13423 13424/\xthing/ 13425 13426/\x{}/ 13427Failed: error 178 at offset 3: digits missing in \x{} or \o{} or \N{U+} 13428 13429/\x{whatever}/ 13430Failed: error 167 at offset 3: non-hex character in \x{} (closing brace missing?) 13431 13432/A\8B/ 13433Failed: error 115 at offset 2: reference to non-existent subpattern 13434 13435/A\9B/ 13436Failed: error 115 at offset 2: reference to non-existent subpattern 13437 13438# This one is here because Perl fails to match "12" for this pattern when the $ 13439# is present. 13440 13441/^(?(?=abc)\w{3}:|\d\d)$/ 13442 abc: 13443 0: abc: 13444 12 13445 0: 12 13446\= Expect no match 13447 123 13448No match 13449 xyz 13450No match 13451 13452# Perl gets this one wrong, giving "a" as the after text for ca and failing to 13453# match for cd. 13454 13455/(?(?=ab)ab)/aftertext 13456 abxxx 13457 0: ab 13458 0+ xxx 13459 ca 13460 0: 13461 0+ ca 13462 cd 13463 0: 13464 0+ cd 13465 13466# This should test both paths for processing OP_RECURSE. 13467 13468/(?(R)a+|(?R)b)/ 13469 aaaabcde 13470 0: aaaab 13471 aaaabcde\=ovector=100 13472 0: aaaab 13473 13474/a*?b*?/ 13475 ab 13476 0: 13477 13478/(*NOTEMPTY)a*?b*?/ 13479 ab 13480 0: a 13481 ba 13482 0: b 13483 cb 13484 0: b 13485 13486/(*NOTEMPTY_ATSTART)a*?b*?/aftertext 13487 ab 13488 0: a 13489 0+ b 13490 cdab 13491 0: 13492 0+ dab 13493 13494/(?(VERSION>=10.0)yes|no)/I 13495Capture group count = 0 13496Subject length lower bound = 2 13497 yesno 13498 0: yes 13499 13500/(?(VERSION>=10.04)yes|no)/ 13501 yesno 13502 0: yes 13503 13504/(?(VERSION=8)yes){3}/BI,aftertext 13505------------------------------------------------------------------ 13506 Bra 13507 Cond 13508 Cond false 13509 yes 13510 Ket 13511 Ket 13512 End 13513------------------------------------------------------------------ 13514Capture group count = 0 13515May match empty string 13516Subject length lower bound = 0 13517 yesno 13518 0: 13519 0+ yesno 13520 13521/(?(VERSION=8)yes|no){3}/I 13522Capture group count = 0 13523Subject length lower bound = 6 13524 yesnononoyes 13525 0: nonono 13526\= Expect no match 13527 yesno 13528No match 13529 13530/(?:(?<VERSION>abc)|xyz)(?(VERSION)yes|no)/I 13531Capture group count = 1 13532Max back reference = 1 13533Named capture groups: 13534 VERSION 1 13535Starting code units: a x 13536Subject length lower bound = 5 13537 abcyes 13538 0: abcyes 13539 1: abc 13540 xyzno 13541 0: xyzno 13542\= Expect no match 13543 abcno 13544No match 13545 xyzyes 13546No match 13547 13548/(?(VERSION<10)yes|no)/ 13549Failed: error 179 at offset 10: syntax error or number too big in (?(VERSION condition 13550 13551/(?(VERSION>10)yes|no)/ 13552Failed: error 179 at offset 11: syntax error or number too big in (?(VERSION condition 13553 13554/(?(VERSION>=10.0.0)yes|no)/ 13555Failed: error 179 at offset 16: syntax error or number too big in (?(VERSION condition 13556 13557/(?(VERSION=10.101)yes|no)/ 13558Failed: error 179 at offset 16: syntax error or number too big in (?(VERSION condition 13559 13560/abcd/I 13561Capture group count = 0 13562First code unit = 'a' 13563Last code unit = 'd' 13564Subject length lower bound = 4 13565 13566/abcd/I,no_start_optimize 13567Capture group count = 0 13568Options: no_start_optimize 13569 13570/(|ab)*?d/I 13571Capture group count = 1 13572Starting code units: a d 13573Last code unit = 'd' 13574Subject length lower bound = 1 13575 abd 13576 0: abd 13577 1: ab 13578 xyd 13579 0: d 13580 13581/(|ab)*?d/I,no_start_optimize 13582Capture group count = 1 13583Options: no_start_optimize 13584 abd 13585 0: abd 13586 1: ab 13587 xyd 13588 0: d 13589 13590/\k<A>*(?<A>aa)(?<A>bb)/match_unset_backref,dupnames 13591 aabb 13592 0: aabb 13593 1: aa 13594 2: bb 13595 13596/(((((a)))))/parens_nest_limit=2 13597Failed: error 119 at offset 3: parentheses are too deeply nested 13598 13599/abc/replace=XYZ 13600 123123 13601 0: 123123 13602 123abc123 13603 1: 123XYZ123 13604 123abc123abc123 13605 1: 123XYZ123abc123 13606 123123\=zero_terminate 13607 0: 123123 13608 123abc123\=zero_terminate 13609 1: 123XYZ123 13610 123abc123abc123\=zero_terminate 13611 1: 123XYZ123abc123 13612 13613/abc/g,replace=XYZ 13614 123abc123 13615 1: 123XYZ123 13616 123abc123abc123 13617 2: 123XYZ123XYZ123 13618 13619/abc/replace=X$$Z 13620 123abc123 13621 1: 123X$Z123 13622 13623/abc/g,replace=X$$Z 13624 123abc123abc123 13625 2: 123X$Z123X$Z123 13626 13627/a(b)c(d)e/replace=X$1Y${2}Z 13628 "abcde" 13629 1: "XbYdZ" 13630 13631/a(b)c(d)e/replace=X$1Y${2}Z,global 13632 "abcde-abcde" 13633 2: "XbYdZ-XbYdZ" 13634 13635/a(?<ONE>b)c(?<TWO>d)e/replace=X$ONE+${TWO}Z 13636 "abcde" 13637 1: "Xb+dZ" 13638 13639/a(?<ONE>b)c(?<TWO>d)e/g,replace=X$ONE+${TWO}Z 13640 "abcde-abcde-" 13641 2: "Xb+dZ-Xb+dZ-" 13642 13643/abc/replace=a$++ 13644 123abc 13645Failed: error -35 at offset 2 in replacement: invalid replacement string 13646 13647/abc/replace=a$bad 13648 123abc 13649Failed: error -49 at offset 5 in replacement: unknown substring 13650 13651/abc/replace=a${A234567890123456789_123456789012}z 13652 123abc 13653Failed: error -49 at offset 36 in replacement: unknown substring 13654 13655/abc/replace=a${A23456789012345678901234567890123}z 13656 123abc 13657Failed: error -35 at offset 35 in replacement: invalid replacement string 13658 13659/abc/replace=a${bcd 13660 123abc 13661Failed: error -58 at offset 6 in replacement: expected closing curly bracket in replacement string 13662 13663/abc/replace=a${b+d}z 13664 123abc 13665Failed: error -58 at offset 4 in replacement: expected closing curly bracket in replacement string 13666 13667/abc/replace=[10]XYZ 13668 123abc123 13669 1: 123XYZ123 13670 13671/abc/replace=[9]XYZ 13672 123abc123 13673Failed: error -48: no more memory 13674 13675/abc/replace=xyz 13676 1abc2\=partial_hard 13677Failed: error -34: bad option value 13678 13679/abc/replace=xyz 13680 123abc456 13681 1: 123xyz456 13682 123abc456\=replace=pqr 13683 1: 123pqr456 13684 123abc456abc789 13685 1: 123xyz456abc789 13686 123abc456abc789\=g 13687 2: 123xyz456xyz789 13688 13689/(?<=abc)(|def)/g,replace=<$0> 13690 123abcxyzabcdef789abcpqr 13691 4: 123abc<>xyzabc<><def>789abc<>pqr 13692 13693/./replace=$0 13694 a 13695 1: a 13696 13697/(.)(.)/replace=$2+$1 13698 abc 13699 1: b+ac 13700 13701/(?<A>.)(?<B>.)/replace=$B+$A 13702 abc 13703 1: b+ac 13704 13705/(.)(.)/g,replace=$2$1 13706 abcdefgh 13707 4: badcfehg 13708 13709/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=${*MARK} 13710 apple lemon blackberry 13711 3: pear orange strawberry 13712 apple strudel 13713 1: pear strudel 13714 fruitless 13715 0: fruitless 13716 13717/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/replace=${*MARK} sauce, 13718 apple lemon blackberry 13719 1: pear sauce lemon blackberry 13720 13721/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=<$*MARK> 13722 apple lemon blackberry 13723 3: <pear> <orange> <strawberry> 13724 apple strudel 13725 1: <pear> strudel 13726 fruitless 13727 0: fruitless 13728 13729/(*:pear)apple/g,replace=${*MARKING} 13730 apple lemon blackberry 13731Failed: error -35 at offset 11 in replacement: invalid replacement string 13732 13733/(*:pear)apple/g,replace=${*MARK-time 13734 apple lemon blackberry 13735Failed: error -58 at offset 7 in replacement: expected closing curly bracket in replacement string 13736 13737/(*:pear)apple/g,replace=${*mark} 13738 apple lemon blackberry 13739Failed: error -35 at offset 8 in replacement: invalid replacement string 13740 13741/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=<$*MARKET> 13742 apple lemon blackberry 13743Failed: error -35 at offset 9 in replacement: invalid replacement string 13744 13745/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=[22]${*MARK} 13746 apple lemon blackberry 13747Failed: error -48: no more memory 13748 apple lemon blackberry\=substitute_overflow_length 13749Failed: error -48: no more memory: 23 code units are needed 13750 13751/(*:pear)apple|(*:orange)lemon|(*:strawberry)blackberry/g,replace=[23]${*MARK} 13752 apple lemon blackberry 13753 3: pear orange strawberry 13754 13755/abc/ 13756 123abc123\=replace=[9]XYZ 13757Failed: error -48: no more memory 13758 123abc123\=substitute_overflow_length,replace=[9]XYZ 13759Failed: error -48: no more memory: 10 code units are needed 13760 123abc123\=substitute_overflow_length,replace=[6]XYZ 13761Failed: error -48: no more memory: 10 code units are needed 13762 123abc123\=substitute_overflow_length,replace=[1]XYZ 13763Failed: error -48: no more memory: 10 code units are needed 13764 123abc123\=substitute_overflow_length,replace=[0]XYZ 13765Failed: error -48: no more memory: 10 code units are needed 13766 13767/a(b)c/ 13768 123abc123\=replace=[9]x$1z 13769Failed: error -48: no more memory 13770 123abc123\=substitute_overflow_length,replace=[9]x$1z 13771Failed: error -48: no more memory: 10 code units are needed 13772 123abc123\=substitute_overflow_length,replace=[6]x$1z 13773Failed: error -48: no more memory: 10 code units are needed 13774 123abc123\=substitute_overflow_length,replace=[1]x$1z 13775Failed: error -48: no more memory: 10 code units are needed 13776 123abc123\=substitute_overflow_length,replace=[0]x$1z 13777Failed: error -48: no more memory: 10 code units are needed 13778 13779"((?=(?(?=(?(?=(?(?=()))))))))" 13780 a 13781 0: 13782 1: 13783 2: 13784 13785"(?(?=)==)(((((((((?=)))))))))" 13786\= Expect no match 13787 a 13788No match 13789 13790/(a)(b)|(c)/ 13791 XcX\=ovector=2,get=1,get=2,get=3,get=4,getall 13792Matched, but too many substrings 13793 0: c 13794 1: <unset> 13795Get substring 1 failed (-55): requested value is not set 13796Get substring 2 failed (-54): requested value is not available 13797Get substring 3 failed (-54): requested value is not available 13798Get substring 4 failed (-49): unknown substring 13799 0L c 13800 1L 13801 13802/x(?=ab\K)/allow_lookaround_bsk 13803 xab\=get=0 13804Start of matched string is beyond its end - displaying from end to start. 13805 0: ab 13806 0G (0) 13807 xab\=copy=0 13808Start of matched string is beyond its end - displaying from end to start. 13809 0: ab 13810 0C (0) 13811 xab\=getall 13812Start of matched string is beyond its end - displaying from end to start. 13813 0: ab 13814 0L 13815 13816/(?<A>a)|(?<A>b)/dupnames 13817 a\=ovector=1,copy=A,get=A,get=2 13818Matched, but too many substrings 13819 0: a 13820Copy substring 'A' failed (-54): requested value is not available 13821Get substring 2 failed (-54): requested value is not available 13822Get substring 'A' failed (-54): requested value is not available 13823 a\=ovector=2,copy=A,get=A,get=2 13824 0: a 13825 1: a 13826 C a (1) A (non-unique) 13827Get substring 2 failed (-54): requested value is not available 13828 G a (1) A (non-unique) 13829 b\=ovector=2,copy=A,get=A,get=2 13830Matched, but too many substrings 13831 0: b 13832 1: <unset> 13833Copy substring 'A' failed (-55): requested value is not set 13834Get substring 2 failed (-54): requested value is not available 13835Get substring 'A' failed (-55): requested value is not set 13836 13837/a(b)c(d)/ 13838 abc\=ph,copy=0,copy=1,getall 13839Partial match: abc 13840 0C abc (3) 13841Copy substring 1 failed (-2): partial match 13842get substring list failed (-2): partial match 13843 13844/^abc/info 13845Capture group count = 0 13846Compile options: <none> 13847Overall options: anchored 13848First code unit = 'a' 13849Subject length lower bound = 3 13850 13851/^abc/info,no_dotstar_anchor 13852Capture group count = 0 13853Compile options: no_dotstar_anchor 13854Overall options: anchored no_dotstar_anchor 13855First code unit = 'a' 13856Subject length lower bound = 3 13857 13858/.*\d/info,auto_callout 13859Capture group count = 0 13860Options: auto_callout 13861First code unit at start or follows newline 13862Subject length lower bound = 1 13863\= Expect no match 13864 aaa 13865--->aaa 13866 +0 ^ .* 13867 +2 ^ ^ \d 13868 +2 ^ ^ \d 13869 +2 ^^ \d 13870 +2 ^ \d 13871No match 13872 13873/.*\d/info,no_dotstar_anchor,auto_callout 13874Capture group count = 0 13875Options: auto_callout no_dotstar_anchor 13876Subject length lower bound = 1 13877\= Expect no match 13878 aaa 13879--->aaa 13880 +0 ^ .* 13881 +2 ^ ^ \d 13882 +2 ^ ^ \d 13883 +2 ^^ \d 13884 +2 ^ \d 13885 +0 ^ .* 13886 +2 ^ ^ \d 13887 +2 ^^ \d 13888 +2 ^ \d 13889 +0 ^ .* 13890 +2 ^^ \d 13891 +2 ^ \d 13892No match 13893 13894/.*\d/dotall,info 13895Capture group count = 0 13896Compile options: dotall 13897Overall options: anchored dotall 13898Subject length lower bound = 1 13899 13900/.*\d/dotall,no_dotstar_anchor,info 13901Capture group count = 0 13902Options: dotall no_dotstar_anchor 13903Subject length lower bound = 1 13904 13905/(*NO_DOTSTAR_ANCHOR)(?s).*\d/info 13906Capture group count = 0 13907Compile options: <none> 13908Overall options: no_dotstar_anchor 13909Subject length lower bound = 1 13910 13911'^(?:(a)|b)(?(1)A|B)' 13912 aA123\=ovector=1 13913Matched, but too many substrings 13914 0: aA 13915 aA123\=ovector=2 13916 0: aA 13917 1: a 13918 13919'^(?:(?<AA>a)|b)(?(<AA>)A|B)' 13920 aA123\=ovector=1 13921Matched, but too many substrings 13922 0: aA 13923 aA123\=ovector=2 13924 0: aA 13925 1: a 13926 13927'^(?<AA>)(?:(?<AA>a)|b)(?(<AA>)A|B)'dupnames 13928 aA123\=ovector=1 13929Matched, but too many substrings 13930 0: aA 13931 aA123\=ovector=2 13932Matched, but too many substrings 13933 0: aA 13934 1: 13935 aA123\=ovector=3 13936 0: aA 13937 1: 13938 2: a 13939 13940'^(?:(?<AA>X)|)(?:(?<AA>a)|b)\k{AA}'dupnames 13941 aa123\=ovector=1 13942Matched, but too many substrings 13943 0: aa 13944 aa123\=ovector=2 13945Matched, but too many substrings 13946 0: aa 13947 1: <unset> 13948 aa123\=ovector=3 13949 0: aa 13950 1: <unset> 13951 2: a 13952 13953/(?<N111>(?J)(?<N111>1(111111)11|)1|1|)(?(<N111>)1)/ 13954 13955/(?<N>(?J)(?<N>))(?-J)\k<N>/ 13956 13957# Quantifiers are not allowed on condition assertions, but are otherwise 13958# OK in conditions. 13959 13960/(?(?=0)?)+/ 13961Failed: error 109 at offset 7: quantifier does not follow a repeatable item 13962 13963/(?(?=0)(?=00)?00765)/ 13964 00765 13965 0: 00765 13966 13967/(?(?=0)(?=00)?00765|(?!3).56)/ 13968 00765 13969 0: 00765 13970 456 13971 0: 456 13972\= Expect no match 13973 356 13974No match 13975 13976'^(a)*+(\w)' 13977 g 13978 0: g 13979 1: <unset> 13980 2: g 13981 g\=ovector=1 13982Matched, but too many substrings 13983 0: g 13984 13985'^(?:a)*+(\w)' 13986 g 13987 0: g 13988 1: g 13989 g\=ovector=1 13990Matched, but too many substrings 13991 0: g 13992 13993# These two pattern showeds up compile-time bugs 13994 13995"((?2){0,1999}())?" 13996 13997/((?+1)(\1))/B 13998------------------------------------------------------------------ 13999 Bra 14000 CBra 1 14001 Recurse 14002 CBra 2 14003 \1 14004 Ket 14005 Ket 14006 Ket 14007 End 14008------------------------------------------------------------------ 14009 14010# Callouts with string arguments 14011 14012/a(?C"/ 14013Failed: error 181 at offset 4: missing terminating delimiter for callout with string argument 14014 14015/a(?C"a/ 14016Failed: error 181 at offset 4: missing terminating delimiter for callout with string argument 14017 14018/a(?C"a"/ 14019Failed: error 139 at offset 7: closing parenthesis for (?C expected 14020 14021/a(?C"a"bcde(?C"b")xyz/ 14022Failed: error 139 at offset 7: closing parenthesis for (?C expected 14023 14024/a(?C"a)b""c")/B 14025------------------------------------------------------------------ 14026 Bra 14027 a 14028 CalloutStr "a)b"c" 5 13 0 14029 Ket 14030 End 14031------------------------------------------------------------------ 14032 14033/ab(?C" any text with spaces ")cde/B 14034------------------------------------------------------------------ 14035 Bra 14036 ab 14037 CalloutStr " any text with spaces " 6 30 1 14038 cde 14039 Ket 14040 End 14041------------------------------------------------------------------ 14042 abcde 14043Callout (6): " any text with spaces " 14044--->abcde 14045 ^ ^ c 14046 0: abcde 14047 12abcde 14048Callout (6): " any text with spaces " 14049--->12abcde 14050 ^ ^ c 14051 0: abcde 14052 14053/^a(b)c(?C1)def/ 14054 abcdef 14055--->abcdef 14056 1 ^ ^ d 14057 0: abcdef 14058 1: b 14059 14060/^a(b)c(?C"AB")def/ 14061 abcdef 14062Callout (10): "AB" 14063--->abcdef 14064 ^ ^ d 14065 0: abcdef 14066 1: b 14067 14068/^a(b)c(?C1)def/ 14069 abcdef\=callout_capture 14070Callout 1: last capture = 1 14071 1: b 14072--->abcdef 14073 ^ ^ d 14074 0: abcdef 14075 1: b 14076 14077/^a(b)c(?C{AB})def/B 14078------------------------------------------------------------------ 14079 Bra 14080 ^ 14081 a 14082 CBra 1 14083 b 14084 Ket 14085 c 14086 CalloutStr {AB} 10 14 1 14087 def 14088 Ket 14089 End 14090------------------------------------------------------------------ 14091 abcdef\=callout_capture 14092Callout (10): {AB} last capture = 1 14093 1: b 14094--->abcdef 14095 ^ ^ d 14096 0: abcdef 14097 1: b 14098 14099/(?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 14100------------------------------------------------------------------ 14101 Bra 14102 CalloutStr `a`b` 4 10 0 14103 CalloutStr 'a'b' 14 20 0 14104 CalloutStr "a"b" 24 30 0 14105 CalloutStr ^a^b^ 34 40 0 14106 CalloutStr %a%b% 44 50 0 14107 CalloutStr #a#b# 54 60 0 14108 CalloutStr $a$b$ 64 70 0 14109 CalloutStr {a}b} 74 80 0 14110 Ket 14111 End 14112------------------------------------------------------------------ 14113Callout `a`b` ( 14114Callout 'a'b' ( 14115Callout "a"b" ( 14116Callout ^a^b^ ( 14117Callout %a%b% ( 14118Callout #a#b# ( 14119Callout $a$b$ ( 14120Callout {a}b} 14121 14122/(?:a(?C`code`)){3}/B 14123------------------------------------------------------------------ 14124 Bra 14125 Bra 14126 a 14127 CalloutStr `code` 8 14 4 14128 Ket 14129 Bra 14130 a 14131 CalloutStr `code` 8 14 4 14132 Ket 14133 Bra 14134 a 14135 CalloutStr `code` 8 14 4 14136 Ket 14137 Ket 14138 End 14139------------------------------------------------------------------ 14140 14141/^(?(?C25)(?=abc)abcd|xyz)/B,callout_info 14142------------------------------------------------------------------ 14143 Bra 14144 ^ 14145 Cond 14146 Callout 25 9 3 14147 Assert 14148 abc 14149 Ket 14150 abcd 14151 Alt 14152 xyz 14153 Ket 14154 Ket 14155 End 14156------------------------------------------------------------------ 14157Callout 25 (?= 14158 abcdefg 14159--->abcdefg 14160 25 ^ (?= 14161 0: abcd 14162 xyz123 14163--->xyz123 14164 25 ^ (?= 14165 0: xyz 14166 14167/^(?(?C$abc$)(?=abc)abcd|xyz)/B 14168------------------------------------------------------------------ 14169 Bra 14170 ^ 14171 Cond 14172 CalloutStr $abc$ 7 12 3 14173 Assert 14174 abc 14175 Ket 14176 abcd 14177 Alt 14178 xyz 14179 Ket 14180 Ket 14181 End 14182------------------------------------------------------------------ 14183 abcdefg 14184Callout (7): $abc$ 14185--->abcdefg 14186 ^ (?= 14187 0: abcd 14188 xyz123 14189Callout (7): $abc$ 14190--->xyz123 14191 ^ (?= 14192 0: xyz 14193 14194/^ab(?C'first')cd(?C"second")ef/ 14195 abcdefg 14196Callout (7): 'first' 14197--->abcdefg 14198 ^ ^ c 14199Callout (20): "second" 14200--->abcdefg 14201 ^ ^ e 14202 0: abcdef 14203 14204/(?:a(?C`code`)){3}X/ 14205 aaaXY 14206Callout (8): `code` 14207--->aaaXY 14208 ^^ ){3} 14209Callout (8): `code` 14210--->aaaXY 14211 ^ ^ ){3} 14212Callout (8): `code` 14213--->aaaXY 14214 ^ ^ ){3} 14215 0: aaaX 14216 14217# Binary zero in callout string 14218# a ( ? C ' x z ' ) b 14219/ 61 28 3f 43 27 78 00 7a 27 29 62/hex,callout_info 14220Callout 'x\x00z' b 14221 abcdefgh 14222Callout (5): 'x\x00z' 14223--->abcdefgh 14224 ^^ b 14225 0: ab 14226 14227/(?(?!)^)/ 14228 14229/(?(?!)a|b)/ 14230 bbb 14231 0: b 14232\= Expect no match 14233 aaa 14234No match 14235 14236# JIT gives a different error message for the infinite recursion 14237 14238"(*NO_JIT)((?2)+)((?1)){" 14239 abcd{ 14240Failed: error -52: nested recursion at the same subject position 14241 14242# Perl fails to diagnose the absence of an assertion 14243 14244"(?(?<E>.*!.*)?)" 14245Failed: error 128 at offset 2: assertion expected after (?( or (?(?C) 14246 14247"X((?2)()*+){2}+"B 14248------------------------------------------------------------------ 14249 Bra 14250 X 14251 Once 14252 CBra 1 14253 Recurse 14254 Braposzero 14255 SCBraPos 2 14256 KetRpos 14257 Ket 14258 CBra 1 14259 Recurse 14260 Braposzero 14261 SCBraPos 2 14262 KetRpos 14263 Ket 14264 Ket 14265 Ket 14266 End 14267------------------------------------------------------------------ 14268 14269"X((?2)()*+){2}"B 14270------------------------------------------------------------------ 14271 Bra 14272 X 14273 CBra 1 14274 Recurse 14275 Braposzero 14276 SCBraPos 2 14277 KetRpos 14278 Ket 14279 CBra 1 14280 Recurse 14281 Braposzero 14282 SCBraPos 2 14283 KetRpos 14284 Ket 14285 Ket 14286 End 14287------------------------------------------------------------------ 14288 14289/(?<=\bABQ(3(?-7)))/ 14290Failed: error 115 at offset 15: reference to non-existent subpattern 14291 14292/(?<=\bABQ(3(?+7)))/ 14293Failed: error 115 at offset 15: reference to non-existent subpattern 14294 14295";(?<=()((?3))((?2)))" 14296Failed: error 125 at offset 1: length of lookbehind assertion is not limited 14297 14298# Perl loops on this (PCRE2 used to!) 14299 14300/(?<=\Ka)/g,aftertext,allow_lookaround_bsk 14301 aaaaa 14302 0: a 14303 0+ aaaa 14304 0: a 14305 0+ aaa 14306 0: a 14307 0+ aa 14308 0: a 14309 0+ a 14310 0: a 14311 0+ 14312 14313/(?<=\Ka)/altglobal,aftertext,allow_lookaround_bsk 14314 aaaaa 14315 0: a 14316 0+ aaaa 14317 0: a 14318 0+ aaa 14319 0: a 14320 0+ aa 14321 0: a 14322 0+ a 14323 0: a 14324 0+ 14325 14326/((?2){73}(?2))((?1))/info 14327Capture group count = 2 14328May match empty string 14329Subject length lower bound = 0 14330 14331/abc/ 14332\= Expect no match 14333 \[9x!xxx(]{9999} 14334No match 14335 14336/(abc)*/ 14337 \[abc]{5} 14338 0: abcabcabcabcabc 14339 1: abc 14340 14341/^/gm 14342 \n\n\n 14343 0: 14344 0: 14345 0: 14346 14347/^/gm,alt_circumflex 14348 \n\n\n 14349 0: 14350 0: 14351 0: 14352 0: 14353 14354/((((((((x))))))))\81/ 14355Failed: error 115 at offset 19: reference to non-existent subpattern 14356 xx1 14357 14358/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\80/ 14359 xx 14360Matched, but too many substrings 14361 0: xx 14362 1: x 14363 2: x 14364 3: x 14365 4: x 14366 5: x 14367 6: x 14368 7: x 14369 8: x 14370 9: x 1437110: x 1437211: x 1437312: x 1437413: x 1437514: x 14376 14377/\80/ 14378Failed: error 115 at offset 2: reference to non-existent subpattern 14379 14380/A\8B\9C/ 14381Failed: error 115 at offset 2: reference to non-existent subpattern 14382 A8B9C 14383 14384/(?x:((?'a')) # comment (with parentheses) and | vertical 14385(?-x:#not a comment (?'b')) # this is a comment () 14386(?'c')) # not a comment (?'d')/info 14387Capture group count = 5 14388Named capture groups: 14389 a 2 14390 b 3 14391 c 4 14392 d 5 14393First code unit = '#' 14394Last code unit = ' ' 14395Subject length lower bound = 32 14396 14397/(?|(?'a')(2)(?'b')|(?'a')(?'a')(3))/I,dupnames 14398Capture group count = 3 14399Named capture groups: 14400 a 1 14401 a 2 14402 b 3 14403Options: dupnames 14404Starting code units: 2 3 14405Subject length lower bound = 1 14406 A23B 14407 0: 2 14408 1: 14409 2: 2 14410 3: 14411 B32A 14412 0: 3 14413 1: 14414 2: 14415 3: 3 14416 14417# These are some patterns that used to cause buffer overflows or other errors 14418# while compiling. 14419 14420/.((?2)(?R)|\1|$)()/B 14421------------------------------------------------------------------ 14422 Bra 14423 Any 14424 CBra 1 14425 Recurse 14426 Recurse 14427 Alt 14428 \1 14429 Alt 14430 $ 14431 Ket 14432 CBra 2 14433 Ket 14434 Ket 14435 End 14436------------------------------------------------------------------ 14437 14438/.((?3)(?R)()(?2)|\1|$)()/B 14439------------------------------------------------------------------ 14440 Bra 14441 Any 14442 CBra 1 14443 Recurse 14444 Recurse 14445 CBra 2 14446 Ket 14447 Recurse 14448 Alt 14449 \1 14450 Alt 14451 $ 14452 Ket 14453 CBra 3 14454 Ket 14455 Ket 14456 End 14457------------------------------------------------------------------ 14458 14459/(\9*+(?2);\3++()2|)++{/ 14460Failed: error 115 at offset 2: reference to non-existent subpattern 14461 14462/\V\x85\9*+((?2)\3++()2)*:2/ 14463Failed: error 115 at offset 7: reference to non-existent subpattern 14464 14465/(((?(R)){0,2}) (?'x'((?'R')((?'R')))))/dupnames 14466 14467/(((?(X)){0,2}) (?'x'((?'X')((?'X')))))/dupnames 14468 14469/(((?(R)){0,2}) (?'x'((?'X')((?'R')))))/ 14470 14471"(?J)(?'d'(?'d'\g{d}))" 14472 14473"(?=!((?2)(?))({8(?<=(?1){29}8bbbb\x16\xd\xc6^($(\xa9H4){4}h}?1)B))\x15')" 14474Failed: error 125 at offset 16: length of lookbehind assertion is not limited 14475 14476/A(?'')Z/ 14477Failed: error 162 at offset 4: subpattern name expected 14478 14479"(?J:(?|(?'R')(\k'R')|((?'R'))))" 14480 14481/(?<=|(\,\$(?73591620449005828816)\xa8.{7}){6}\x09)/ 14482Failed: error 161 at offset 17: subpattern number is too big 14483 14484/^(?:(?(1)x|)+)+$()/B 14485------------------------------------------------------------------ 14486 Bra 14487 ^ 14488 SBra 14489 SCond 14490 1 Cond ref 14491 x 14492 Alt 14493 KetRmax 14494 KetRmax 14495 $ 14496 CBra 1 14497 Ket 14498 Ket 14499 End 14500------------------------------------------------------------------ 14501 14502/[[:>:]](?<)/ 14503Failed: error 162 at offset 10: subpattern name expected 14504 14505/((?x)(*:0))#(?'/ 14506Failed: error 162 at offset 15: subpattern name expected 14507 14508/(?C$[$)(?<]/ 14509Failed: error 162 at offset 10: subpattern name expected 14510 14511/(?C$)$)(?<]/ 14512Failed: error 162 at offset 10: subpattern name expected 14513 14514/(?(R))*+/B 14515------------------------------------------------------------------ 14516 Bra 14517 Braposzero 14518 SBraPos 14519 SCond 14520 Cond recurse any 14521 Ket 14522 KetRpos 14523 Ket 14524 End 14525------------------------------------------------------------------ 14526 abcd 14527 0: 14528 14529/((?x)(?#))#(?'/ 14530Failed: error 162 at offset 14: subpattern name expected 14531 14532/((?x)(?#))#(?'abc')/I 14533Capture group count = 2 14534Named capture groups: 14535 abc 2 14536First code unit = '#' 14537Subject length lower bound = 1 14538 14539/[[:\\](?<[::]/ 14540Failed: error 162 at offset 9: subpattern name expected 14541 14542/[[:\\](?'abc')[a:]/I 14543Capture group count = 1 14544Named capture groups: 14545 abc 1 14546Starting code units: : [ \ 14547Subject length lower bound = 2 14548 14549"[[[.\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[[[:[::::::[[[:[[[[[[[[:[[::[::::[[:::::::[[:[[[[[[[:[[::[:[[:[~" 14550Failed: error 106 at offset 353: missing terminating ] for character class 14551 14552/()(?(R)0)*+/B 14553------------------------------------------------------------------ 14554 Bra 14555 CBra 1 14556 Ket 14557 Braposzero 14558 SBraPos 14559 SCond 14560 Cond recurse any 14561 0 14562 Ket 14563 KetRpos 14564 Ket 14565 End 14566------------------------------------------------------------------ 14567 14568/(?R-:(?</ 14569Failed: error 158 at offset 3: (?R (recursive pattern call) must be followed by a closing parenthesis 14570 14571/(?R-:(?<)/ 14572Failed: error 158 at offset 3: (?R (recursive pattern call) must be followed by a closing parenthesis 14573 14574/(?(?C{\Q})(?!(?'/ 14575Failed: error 162 at offset 16: subpattern name expected 14576 14577/(?(?C{\Q})(?!(?'abc')))/I 14578Capture group count = 1 14579Named capture groups: 14580 abc 1 14581May match empty string 14582Subject length lower bound = 0 14583 14584/(?1){3918}(((((0(\k'R'))))(?J)(?'R'(?'R'\3){99})))/I 14585Capture group count = 8 14586Max back reference = 8 14587Named capture groups: 14588 R 7 14589 R 8 14590Duplicate name status changes 14591Last code unit = '0' 14592Subject length lower bound = 65535 14593 14594/(?|(aaa)|(b))\g{1}/I 14595Capture group count = 1 14596Max back reference = 1 14597Starting code units: a b 14598Subject length lower bound = 1 14599 14600/(?|(aaa)|(b))(?1)/I 14601Capture group count = 1 14602Starting code units: a b 14603Subject length lower bound = 4 14604 14605/(?|(aaa)|(b))/I 14606Capture group count = 1 14607Starting code units: a b 14608Subject length lower bound = 1 14609 14610/(?|(?'a'aaa)|(?'a'b))\k'a'/I 14611Capture group count = 1 14612Max back reference = 1 14613Named capture groups: 14614 a 1 14615Starting code units: a b 14616Subject length lower bound = 1 14617 14618/(?|(?'a'aaa)|(?'a'b))(?'a'cccc)\k'a'/I,dupnames 14619Capture group count = 2 14620Max back reference = 2 14621Named capture groups: 14622 a 1 14623 a 2 14624Options: dupnames 14625Starting code units: a b 14626Last code unit = 'c' 14627Subject length lower bound = 5 14628 14629/ab{3cd/ 14630 ab{3cd 14631 0: ab{3cd 14632 14633/ab{3,cd/ 14634 ab{3,cd 14635 0: ab{3,cd 14636 14637/ab{3,4a}cd/ 14638 ab{3,4a}cd 14639 0: ab{3,4a}cd 14640 14641/{4,5a}bc/ 14642 {4,5a}bc 14643 0: {4,5a}bc 14644 14645/\x0{ab}/ 14646 \0{ab} 14647 0: \x00{ab} 14648 14649/^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/ 14650 ababababbbabZXXXX 14651 0: ababababbbabZ 14652 1: ab 14653 2: b 14654 14655/.*?a(*PRUNE)b/ 14656 aab 14657 0: ab 14658 14659/.*?a(*PRUNE)b/s 14660 aab 14661 0: ab 14662 14663/^a(*PRUNE)b/s 14664\= Expect no match 14665 aab 14666No match 14667 14668/.*?a(*SKIP)b/ 14669 aab 14670 0: ab 14671 14672/(?(8000000000/ 14673Failed: error 161 at offset 8: subpattern number is too big 14674 14675/((?(R8000000000)))/ 14676Failed: error 161 at offset 9: subpattern number is too big 14677 14678/0(?0)|(1)(*THEN)(*SKIP:0)(*FAIL)/ 14679\= Expect no match 14680 01 14681No match 14682 14683/(?(1)()\983040\2)/ 14684Failed: error 161 at offset 14: subpattern number is too big 14685 14686/(*LIMIT_MATCH=)abc/ 14687Failed: error 160 at offset 14: (*VERB) not recognized or malformed 14688 14689/(*CRLF)(*LIMIT_MATCH=)abc/ 14690Failed: error 160 at offset 21: (*VERB) not recognized or malformed 14691 14692/(?:ab)?(?:ab)(?:ab)/ 14693 abab 14694 0: abab 14695 ababab 14696 0: ababab 14697\= Expect no match 14698 aba 14699No match 14700 14701/((*MARK:A))++a(*SKIP:B)b/ 14702\= Expect no match 14703 aacb 14704No match 14705 14706/(*MARK:a\zb)z/alt_verbnames 14707Failed: error 140 at offset 10: invalid escape sequence in (*VERB) name 14708 14709/(*:ab\t(d\)c)xxx/ 14710Failed: error 122 at offset 12: unmatched closing parenthesis 14711 14712/(*:ab\t(d\)c)xxx/alt_verbnames,mark 14713 cxxxz 14714 0: xxx 14715MK: ab\x09(d)c 14716 14717/(*:A\Qxx)x\EB)x/alt_verbnames,mark 14718 x 14719 0: x 14720MK: Axx)xB 14721 14722/(*:A\ExxxB)x/alt_verbnames,mark 14723 x 14724 0: x 14725MK: AxxxB 14726 14727/(*: A \ and #comment 14728 \ B)x/x,alt_verbnames,mark 14729 x 14730 0: x 14731MK: A and B 14732 14733/(*: A \ and #comment 14734 \ B)x/alt_verbnames,mark 14735 x 14736 0: x 14737MK: A and #comment\x0a B 14738 14739/(*: A \ and #comment 14740 \ B)x/x,mark 14741 x 14742 0: x 14743MK: A \ and #comment\x0a \ B 14744 14745/(*: A \ and #comment 14746 \ B)x/mark 14747 x 14748 0: x 14749MK: A \ and #comment\x0a \ B 14750 14751/(*:A 14752B)x/alt_verbnames,mark 14753 x 14754 0: x 14755MK: A\x0aB 14756 14757/(*:abc\Qpqr)/alt_verbnames 14758Failed: error 160 at offset 12: (*VERB) not recognized or malformed 14759 14760/abc/use_offset_limit 14761 1234abcde\=offset_limit=100 14762 0: abc 14763 1234abcde\=offset_limit=9 14764 0: abc 14765 1234abcde\=offset_limit=4 14766 0: abc 14767 1234abcde\=offset_limit=4,offset=4 14768 0: abc 14769\= Expect no match 14770 1234abcde\=offset_limit=4,offset=5 14771No match 14772 1234abcde\=offset_limit=3 14773No match 14774 14775/(?<=abc)/use_offset_limit 14776 1234abc\=offset_limit=7 14777 0: 14778\= Expect no match 14779 1234abc\=offset_limit=6 14780No match 14781 14782/A/g,replace=-,use_offset_limit 14783 XAXAXAXAXA\=offset_limit=4 14784 2: X-X-XAXAXA 14785 14786/abc/ 14787\= Expect error 14788 1234abcde\=offset_limit=4 14789Failed: error -56: offset limit set without PCRE2_USE_OFFSET_LIMIT 14790 14791/^\w/m,use_offset_limit 14792 \n..\naa\=offset_limit=3 14793No match 14794 \n..\naa\=offset_limit=4 14795 0: a 14796 14797/abcd/null_context 14798 abcd\=null_context 14799 0: abcd 14800\= Expect error - not allowed together 14801 abcd\=null_context,find_limits 14802** Not allowed together: find_limits null_context 14803 abcd\=allusedtext,startchar 14804** Not allowed together: allusedtext startchar 14805 14806/abcd/replace=w\rx\x82y\o{333}z(\Q12\$34$$\x34\E5$$),substitute_extended 14807 abcd 14808 1: w\x0dx\x82y\xdbz(12\$34$$\x345$) 14809 14810/abcd/replace=w\rx\x82y\o{333}z(\Q12\$34$$\x34\E5$$),substitute_extended,substitute_literal 14811 >>abcd<< 14812 1: >>w\rx\x82y\o{333}z(\Q12\$34$$\x34\E5$$)<< 14813 14814/abcd/g,replace=\$1$2\,substitute_literal 14815 XabcdYabcdZ 14816 2: X\$1$2\Y\$1$2\Z 14817 14818/a(bc)(DE)/replace=a\u$1\U$1\E$1\l$2\L$2\Eab\Uab\LYZ\EDone,substitute_extended 14819 abcDE 14820 1: aBcBCbcdEdeabAByzDone 14821 14822/abcd/replace=xy\kz,substitute_extended 14823 abcd 14824Failed: error -57 at offset 4 in replacement: bad escape sequence in replacement string 14825 14826/a(?:(b)|(c))/substitute_extended,replace=X${1:+1:-1}X${2:+2:-2} 14827 ab 14828 1: X1X-2 14829 ac 14830 1: X-1X2 14831 ab\=replace=${1:+$1\:$1:$2} 14832 1: b:b 14833 ac\=replace=${1:+$1\:$1:$2} 14834 1: c 14835 >>ac<<\=replace=${1:+$1\:$1:$2},substitute_literal 14836 1: >>${1:+$1\:$1:$2}<< 14837 14838/a(?:(b)|(c))/substitute_extended,replace=X${1:-1:-1}X${2:-2:-2} 14839 ab 14840 1: XbX2:-2 14841 ac 14842 1: X1:-1Xc 14843 14844/(a)/substitute_extended,replace=>${1:+\Q$1:{}$$\E+\U$1}< 14845 a 14846 1: >$1:{}$$+A< 14847 14848/X(b)Y/substitute_extended 14849 XbY\=replace=x${1:+$1\U$1}y 14850 1: xbBY 14851 XbY\=replace=\Ux${1:+$1$1}y 14852 1: XBBY 14853 14854/a/substitute_extended,replace=${*MARK:+a:b} 14855 a 14856Failed: error -58 at offset 7 in replacement: expected closing curly bracket in replacement string 14857 14858/(abcd)/replace=${1:+xy\kz},substitute_extended 14859 abcd 14860Failed: error -57 at offset 8 in replacement: bad escape sequence in replacement string 14861 14862/(abcd)/ 14863 abcd\=replace=${1:+xy\kz},substitute_extended 14864Failed: error -57 at offset 8 in replacement: bad escape sequence in replacement string 14865 14866/abcd/substitute_extended,replace=>$1< 14867 abcd 14868Failed: error -49 at offset 3 in replacement: unknown substring 14869 14870/abcd/substitute_extended,replace=>xxx${xyz}<<< 14871 abcd 14872Failed: error -49 at offset 10 in replacement: unknown substring 14873 14874/(?J)(?:(?<A>a)|(?<A>b))/replace=<$A> 14875 [a] 14876 1: [<a>] 14877 [b] 14878 1: [<b>] 14879\= Expect error 14880 (a)\=ovector=1 14881Failed: error -54 at offset 3 in replacement: requested value is not available 14882 14883/(a)|(b)/replace=<$1> 14884\= Expect error 14885 b 14886Failed: error -55 at offset 3 in replacement: requested value is not set 14887 14888/(aa)(BB)/substitute_extended,replace=\U$1\L$2\E$1..\U$1\l$2$1 14889 aaBB 14890 1: AAbbaa..AAbBaa 14891 14892/abcd/replace=wxyz,substitute_matched 14893 abcd 14894 1: wxyz 14895 pqrs 14896 0: pqrs 14897 14898/abcd/g 14899 >abcd1234abcd5678<\=replace=wxyz,substitute_matched 14900 2: >wxyz1234wxyz5678< 14901 14902/^(o(\1{72}{\"{\\{00000059079}\d*){74}}){19}/I 14903Capture group count = 2 14904Max back reference = 1 14905Compile options: <none> 14906Overall options: anchored 14907First code unit = 'o' 14908Last code unit = '}' 14909Subject length lower bound = 65535 14910 14911/((p(?'K/ 14912Failed: error 142 at offset 7: syntax error in subpattern name (missing terminator?) 14913 14914/((p(?'K/no_auto_capture 14915Failed: error 142 at offset 7: syntax error in subpattern name (missing terminator?) 14916 14917/abc/replace=A$3123456789Z 14918 abc 14919Failed: error -49 at offset 3 in replacement: unknown substring 14920 14921/(?<!a{65535}a{5})x/I 14922Failed: error 187 at offset 0: lookbehind assertion is too long 14923 14924/(?<!a{65535})x/I 14925Capture group count = 0 14926Max lookbehind = 65535 14927First code unit = 'x' 14928Subject length lower bound = 1 14929 14930/(?=a\K)/replace=z,allow_lookaround_bsk 14931 BaCaD 14932Failed: error -60: match with end before start or start moved backwards is not supported 14933 14934/(?<=\K.)/g,replace=-,allow_lookaround_bsk 14935 ab 14936Failed: error -60: match with end before start or start moved backwards is not supported 14937 14938/(?'abcdefghijklmnopqrstuvwxyzABCDEFGabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEFGH'toolong)/ 14939Failed: error 148 at offset 132: subpattern name is too long (maximum 128 code units) 14940 14941/(?'abcdefghijklmnopqrstuvwxyzABCDEFGabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEFG'justright)/ 14942 14943# These two use zero-termination 14944/abcd/max_pattern_length=3 14945Failed: error 188 at offset 0: pattern string is longer than the limit set by the application 14946 14947/abc/max_pattern_length=3 14948 14949# These two, being hex, pass the length 14950/abcdefab/hex,max_pattern_length=3 14951Failed: error 188 at offset 0: pattern string is longer than the limit set by the application 14952 14953/abcdef/hex,max_pattern_length=3 14954 14955# Test compiled length limit 14956/(abcdefg){10}/max_pattern_compiled_length=100 14957Failed: error 201 at offset 13: compiled pattern would be longer than the limit set by the application 14958 14959# These patterns used to take a long time to compile 14960 14961"(.*) 14962((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14963((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14964((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))"xI 14965Capture group count = 12 14966May match empty string 14967Options: extended 14968First code unit at start or follows newline 14969Subject length lower bound = 0 14970 14971"(?<=a() 14972((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14973((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14974((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14975a)"xI 14976Capture group count = 12 14977Max lookbehind = 2 14978May match empty string 14979Options: extended 14980Subject length lower bound = 0 14981 14982"(?|()|())(.*) 14983((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14984((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14985((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))"xI 14986Capture group count = 13 14987May match empty string 14988Options: extended 14989Subject length lower bound = 0 14990 14991"(?|()|())(?<=a() 14992((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14993((?-2)(?-2))((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14994((?-2)(?-2))((?-2)(?-2))((?-2)(?-2)) 14995a)"xI 14996Failed: error 135 at offset 9: lookbehind is too complicated 14997 14998# Test the use of malloc for caching group information when there are more 14999# groups than fit into the on-stack workspace. 15000 15001/\[()]{1024}/I,expand 15002Expanded: ()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()() 15003Capture group count = 1024 15004May match empty string 15005Subject length lower bound = 0 15006 15007# Test minlength capped at 65535 15008 15009/(A{65000})\1{65000}/I 15010Capture group count = 1 15011Max back reference = 1 15012First code unit = 'A' 15013Last code unit = 'A' 15014Subject length lower bound = 65535 15015 15016# Test group scans when numbers are not unique 15017 15018/(?|()+|(a)+)/BI 15019------------------------------------------------------------------ 15020 Bra 15021 Bra 15022 SCBra 1 15023 KetRmax 15024 Alt 15025 CBra 1 15026 a 15027 KetRmax 15028 Ket 15029 Ket 15030 End 15031------------------------------------------------------------------ 15032Capture group count = 1 15033May match empty string 15034Subject length lower bound = 0 15035 15036/(?|(a)+|()+)/BI 15037------------------------------------------------------------------ 15038 Bra 15039 Bra 15040 CBra 1 15041 a 15042 KetRmax 15043 Alt 15044 SCBra 1 15045 KetRmax 15046 Ket 15047 Ket 15048 End 15049------------------------------------------------------------------ 15050Capture group count = 1 15051May match empty string 15052Subject length lower bound = 0 15053 15054/(?|()|(a))/BI 15055------------------------------------------------------------------ 15056 Bra 15057 Bra 15058 CBra 1 15059 Ket 15060 Alt 15061 CBra 1 15062 a 15063 Ket 15064 Ket 15065 Ket 15066 End 15067------------------------------------------------------------------ 15068Capture group count = 1 15069May match empty string 15070Subject length lower bound = 0 15071 15072/(?|(a)|())/BI 15073------------------------------------------------------------------ 15074 Bra 15075 Bra 15076 CBra 1 15077 a 15078 Ket 15079 Alt 15080 CBra 1 15081 Ket 15082 Ket 15083 Ket 15084 End 15085------------------------------------------------------------------ 15086Capture group count = 1 15087May match empty string 15088Subject length lower bound = 0 15089 15090# Test CRLF handling in empty string substitutions 15091 15092/^$/gm,newline=anycrlf,replace=- 15093 X\r\n\r\nY 15094 1: X\x0d\x0a-\x0d\x0aY 15095 15096/^$/gm,newline=crlf,replace=- 15097 X\r\n\r\nY 15098 1: X\x0d\x0a-\x0d\x0aY 15099 15100/^$/gm,newline=any,replace=- 15101 X\r\n\r\nY 15102 1: X\x0d\x0a-\x0d\x0aY 15103 15104"(*ANYCRLF)(?m)^(.*[^0-9\r\n].*|)$"g,replace=NaN 15105 15\r\nfoo\r\n20\r\nbar\r\nbaz\r\n\r\n20 15106 4: 15\x0d\x0aNaN\x0d\x0a20\x0d\x0aNaN\x0d\x0aNaN\x0d\x0aNaN\x0d\x0a20 15107 15108/a[[:punct:]b]/bincode 15109------------------------------------------------------------------ 15110 Bra 15111 a 15112 [!-/:-@[-`b{-~] 15113 Ket 15114 End 15115------------------------------------------------------------------ 15116 15117/a[b[:punct:]]/bincode 15118------------------------------------------------------------------ 15119 Bra 15120 a 15121 [!-/:-@[-`b{-~] 15122 Ket 15123 End 15124------------------------------------------------------------------ 15125 15126/L(?#(|++<!(2)?/B 15127------------------------------------------------------------------ 15128 Bra 15129 L?+ 15130 Ket 15131 End 15132------------------------------------------------------------------ 15133 15134/L(?#(|++<!(2)?/B,no_auto_possess 15135------------------------------------------------------------------ 15136 Bra 15137 L? 15138 Ket 15139 End 15140------------------------------------------------------------------ 15141 15142/L(?#(|++<!(2)?/B,auto_callout 15143------------------------------------------------------------------ 15144 Bra 15145 Callout 255 0 14 15146 L?+ 15147 Callout 255 14 0 15148 Ket 15149 End 15150------------------------------------------------------------------ 15151 15152/L(?#(|++<!(2)?/B,no_auto_possess,auto_callout 15153------------------------------------------------------------------ 15154 Bra 15155 Callout 255 0 14 15156 L? 15157 Callout 255 14 0 15158 Ket 15159 End 15160------------------------------------------------------------------ 15161 15162/(A*)\E+/B,auto_callout 15163------------------------------------------------------------------ 15164 Bra 15165 Callout 255 0 1 15166 SCBra 1 15167 Callout 255 1 2 15168 A* 15169 Callout 255 3 4 15170 KetRmax 15171 Callout 255 7 0 15172 Ket 15173 End 15174------------------------------------------------------------------ 15175 15176/()\Q\E*]/B,auto_callout 15177------------------------------------------------------------------ 15178 Bra 15179 Callout 255 0 1 15180 Brazero 15181 SCBra 1 15182 Callout 255 1 6 15183 KetRmax 15184 Callout 255 7 1 15185 ] 15186 Callout 255 8 0 15187 Ket 15188 End 15189------------------------------------------------------------------ 15190 a[bc]d 15191--->a[bc]d 15192 +0 ^ ( 15193 +1 ^ )\Q\E* 15194 +7 ^ ] 15195 +8 ^^ End of pattern 15196 0: ] 15197 1: 15198 15199/\x8a+f|;T?(*:;.'?`(\xeap ){![^()!y*''C*(?';]{1;(\x08)/B,alt_verbnames,dupnames,extended 15200------------------------------------------------------------------ 15201 Bra 15202 \x{8a}++ 15203 f 15204 Alt 15205 ; 15206 T? 15207 *MARK ;.'?`(\x{ea}p 15208 {! 15209 [\x00- "-&+-:<->@-BD-xz-\xff] (neg) 15210 {1; 15211 CBra 1 15212 \x08 15213 Ket 15214 Ket 15215 End 15216------------------------------------------------------------------ 15217 15218# Tests for NULL characters in comments and verb "names" and callouts 15219 15220# /A#B\x00C\x0aZ/ 15221/41 23 42 00 43 0a 5a/Bx,hex 15222------------------------------------------------------------------ 15223 Bra 15224 AZ 15225 Ket 15226 End 15227------------------------------------------------------------------ 15228 15229# /A+#B\x00C\x0a+/ 15230/41 2b 23 42 00 43 0a 2b/Bx,hex 15231------------------------------------------------------------------ 15232 Bra 15233 A++ 15234 Ket 15235 End 15236------------------------------------------------------------------ 15237 15238# /A(*:B\x00W#X\00Y\x0aC)Z/ 15239/41 28 2a 3a 42 00 57 23 58 00 59 0a 43 29 5a/Bx,hex,alt_verbnames 15240------------------------------------------------------------------ 15241 Bra 15242 A 15243 *MARK B\x{0}WC 15244 Z 15245 Ket 15246 End 15247------------------------------------------------------------------ 15248 15249# /A(*:B\x00W#X\00Y\x0aC)Z/ 15250/41 28 2a 3a 42 00 57 23 58 00 59 0a 43 29 5a/Bx,hex 15251------------------------------------------------------------------ 15252 Bra 15253 A 15254 *MARK B\x{0}W#X\x{0}Y\x{a}C 15255 Z 15256 Ket 15257 End 15258------------------------------------------------------------------ 15259 15260# /A(?C{X\x00Y})B/ 15261/41 28 3f 43 7b 58 00 59 7d 29 42/B,hex 15262------------------------------------------------------------------ 15263 Bra 15264 A 15265 CalloutStr {X\x{0}Y} 5 10 1 15266 B 15267 Ket 15268 End 15269------------------------------------------------------------------ 15270 15271# /A(?#X\x00Y)B/ 15272/41 28 3f 23 7b 00 7d 29 42/B,hex 15273------------------------------------------------------------------ 15274 Bra 15275 AB 15276 Ket 15277 End 15278------------------------------------------------------------------ 15279 15280# Tests for leading comment in extended patterns 15281 15282/ (?-x):?/extended 15283 15284/(?-x):?/extended 15285 15286/0b 28 3f 2d 78 29 3a/hex,extended 15287 15288/#comment 15289(?-x):?/extended 15290 15291/(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 15292Failed: error 162 at offset 49: subpattern name expected 15293 15294/a|(b)c/replace=>$1<,substitute_unset_empty 15295 cat 15296 1: c><t 15297 xbcom 15298 1: x>b<om 15299 15300/a|(b)c/ 15301 cat\=replace=>$1< 15302Failed: error -55 at offset 3 in replacement: requested value is not set 15303 cat\=replace=>$1<,substitute_unset_empty 15304 1: c><t 15305 xbcom\=replace=>$1<,substitute_unset_empty 15306 1: x>b<om 15307 15308/a|(b)c/substitute_extended 15309 cat\=replace=>${2:-xx}< 15310Failed: error -49 at offset 9 in replacement: unknown substring 15311 cat\=replace=>${2:-xx}<,substitute_unknown_unset 15312 1: c>xx<t 15313 cat\=replace=>${X:-xx}<,substitute_unknown_unset 15314 1: c>xx<t 15315 15316/a|(?'X'b)c/replace=>$X<,substitute_unset_empty 15317 cat 15318 1: c><t 15319 xbcom 15320 1: x>b<om 15321 15322/a|(?'X'b)c/replace=>$Y<,substitute_unset_empty 15323 cat 15324Failed: error -49 at offset 3 in replacement: unknown substring 15325 cat\=substitute_unknown_unset 15326 1: c><t 15327 cat\=substitute_unknown_unset,-substitute_unset_empty 15328Failed: error -55 at offset 3 in replacement: requested value is not set 15329 15330/a|(b)c/replace=>$2<,substitute_unset_empty 15331 cat 15332Failed: error -49 at offset 3 in replacement: unknown substring 15333 cat\=substitute_unknown_unset 15334 1: c><t 15335 cat\=substitute_unknown_unset,-substitute_unset_empty 15336Failed: error -55 at offset 3 in replacement: requested value is not set 15337 15338/()()()/use_offset_limit 15339 \=ovector=11000000000 15340** Invalid value in 'ovector=11000000000' 15341 \=callout_fail=11000000000 15342** Invalid value in 'callout_fail=11000000000' 15343 \=callout_fail=1:11000000000 15344** Invalid value in 'callout_fail=1:11000000000' 15345 \=callout_data=11000000000 15346** Invalid value in 'callout_data=11000000000' 15347 \=callout_data=-11000000000 15348** Invalid value in 'callout_data=-11000000000' 15349 \=offset_limit=1100000000000000000000 15350** Invalid value in 'offset_limit=1100000000000000000000' 15351 \=copy=11000000000 15352** Invalid value in 'copy=11000000000' 15353 15354/(*MARK:A\x00b)/mark 15355 abc 15356 0: 15357MK: A\x00b 15358 15359/(*MARK:A\x00b)/mark,alt_verbnames 15360 abc 15361 0: 15362MK: A\x00b 15363 15364/"(*MARK:A" 00 "b)"/mark,hex 15365 abc 15366 0: 15367MK: A\x00b 15368 15369/"(*MARK:A" 00 "b)"/mark,hex,alt_verbnames 15370 abc 15371 0: 15372MK: A\x00b 15373 15374/efg/hex 15375** Unexpected non-hex-digit 'g' at offset 2 in hex pattern: quote missing? 15376 15377/eff/hex 15378** Odd number of digits in hex pattern 15379 15380/effg/hex 15381** Unexpected non-hex-digit 'g' at offset 3 in hex pattern: quote missing? 15382 15383/(?J)(?'a'))(?'a')/ 15384Failed: error 122 at offset 10: unmatched closing parenthesis 15385 15386/(?<=((?C)0))/ 15387 9010 15388--->9010 15389 0 ^ 0 15390 0 ^ 0 15391 0: 15392 1: 0 15393\= Expect no match 15394 abc 15395--->abc 15396 0 ^ 0 15397 0 ^ 0 15398 0 ^ 0 15399No match 15400 15401/aaa/ 15402\[abc]{10000000000000000000000000000} 15403** Repeat count too large 15404\[a]{3} 15405 0: aaa 15406 15407/\[AB]{6000000000000000000000}/expand 15408** Pattern repeat count too large 15409 15410# Hex uses pattern length, not zero-terminated. This tests for overrunning 15411# the given length of a pattern. 15412 15413/'(*U'/hex 15414Failed: error 160 at offset 3: (*VERB) not recognized or malformed 15415 15416/'(*'/hex 15417Failed: error 109 at offset 1: quantifier does not follow a repeatable item 15418 15419/'('/hex 15420Failed: error 114 at offset 1: missing closing parenthesis 15421 15422//hex 15423 15424# These tests are here because Perl never allows a back reference in a 15425# lookbehind. PCRE2 supports some limited cases. 15426 15427/([ab])...(?<=\1)z/ 15428 a11az 15429 0: a11az 15430 1: a 15431 b11bz 15432 0: b11bz 15433 1: b 15434\= Expect no match 15435 b11az 15436No match 15437 15438/(?|([ab]))...(?<=\1)z/ 15439Failed: error 125 at offset 13: length of lookbehind assertion is not limited 15440 15441/([ab])(\1)...(?<=\2)z/ 15442 aa11az 15443 0: aa11az 15444 1: a 15445 2: a 15446 15447/(a\2)(b\1)(?<=\2)/ 15448Failed: error 125 at offset 10: length of lookbehind assertion is not limited 15449 15450/(?<A>[ab])...(?<=\k'A')z/ 15451 a11az 15452 0: a11az 15453 1: a 15454 b11bz 15455 0: b11bz 15456 1: b 15457\= Expect no match 15458 b11az 15459No match 15460 15461/(?<A>[ab])...(?<=\k'A')(?<A>)z/dupnames 15462Failed: error 125 at offset 13: length of lookbehind assertion is not limited 15463 15464# Perl does not support \g+n 15465 15466/((\g+1X)?([ab]))+/ 15467 aaXbbXa 15468 0: aaXbbXa 15469 1: bXa 15470 2: bX 15471 3: a 15472 15473/ab(?C1)c/auto_callout 15474 abc 15475--->abc 15476 +0 ^ a 15477 +1 ^^ b 15478 1 ^ ^ c 15479 +8 ^ ^ End of pattern 15480 0: abc 15481 15482/'ab(?C1)c'/hex,auto_callout 15483 abc 15484--->abc 15485 +0 ^ a 15486 +1 ^^ b 15487 1 ^ ^ c 15488 +8 ^ ^ End of pattern 15489 0: abc 15490 15491# Perl accepts these, but gives a warning. We can't warn, so give an error. 15492 15493/[a-[:digit:]]+/ 15494Failed: error 150 at offset 4: invalid range in character class 15495 a-a9-a 15496 15497/[A-[:digit:]]+/ 15498Failed: error 150 at offset 4: invalid range in character class 15499 A-A9-A 15500 15501/[a-\d]+/ 15502Failed: error 150 at offset 5: invalid range in character class 15503 a-a9-a 15504 15505/(?<RA>abc)(?(R)xyz)/B 15506------------------------------------------------------------------ 15507 Bra 15508 CBra 1 15509 abc 15510 Ket 15511 Cond 15512 Cond recurse any 15513 xyz 15514 Ket 15515 Ket 15516 End 15517------------------------------------------------------------------ 15518 15519/(?<R>abc)(?(R)xyz)/B 15520------------------------------------------------------------------ 15521 Bra 15522 CBra 1 15523 abc 15524 Ket 15525 Cond 15526 1 Cond ref 15527 xyz 15528 Ket 15529 Ket 15530 End 15531------------------------------------------------------------------ 15532 15533/(?=.*[A-Z])/I 15534Capture group count = 0 15535May match empty string 15536Subject length lower bound = 0 15537 15538/()(?<=(?0))/ 15539Failed: error 125 at offset 2: length of lookbehind assertion is not limited 15540 15541/(?<!|!(?<!))/ 15542 15543/(?<!|!|!||||||(?<!)||(?<!)!|!||(?<!)!|!(?<!)!|!|!|!||||!!|<!)!|!||||!|/ 15544 15545/{2,2{2,2/use_length 15546 15547/.>*?\g'0/use_length 15548Failed: error 157 at offset 6: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 15549 15550/.>*?\g'0/ 15551Failed: error 157 at offset 6: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 15552 15553/{�̈́�̈́�{'{22{2{{2{'{22{{22{2{'{22{2{{2{{222{{2{'{22{2{22{2{'{22{2{{2{'{22{2{22{2{'{'{22{2{22{2{'{22{2{{2{'{22{2{22{2{'{222{2Ą̈́�̈́�{'{22{2{{2{'{22{{11{2{'{22{2{{2{{'{22{2{{2{'{22{{22{1{'{22{2{{2{{222{{2{'{22{2{22{2{'{/auto_callout 15554 15555// 15556\=get=i00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 15557** Group name in 'get' is too long 15558\=get=i2345678901234567890123456789012,get=i1245678901234567890123456789012 15559** Too many characters in named 'get' modifiers 15560 15561"(?(?C))" 15562Failed: error 128 at offset 6: assertion expected after (?( or (?(?C) 15563 15564/(?(?(?(?(?(?))))))/ 15565Failed: error 128 at offset 2: assertion expected after (?( or (?(?C) 15566 15567/(?<=(?1))((?s))/anchored 15568 15569/(*:ab)*/ 15570Failed: error 109 at offset 6: quantifier does not follow a repeatable item 15571 15572%(*:(:(svvvvvvvvvv:]*[ Z!*;[]*[^[]*!^[+.+{{2,7}' _\\\\\\\\\\\\\)?.:.. *w////\\\Q\\\\\\\\\\\\\\\T\\\\\+/?/////'+\\\EEE?/////'+/*+/[^K]?]//(w)%never_backslash_c,alt_verbnames,auto_callout 15573 15574/./newline=crlf 15575 \=ph 15576No match 15577 15578/(\x0e00\000000\xc)/replace=\P,substitute_extended 15579 \x0e00\000000\xc 15580Failed: error -57 at offset 2 in replacement: bad escape sequence in replacement string 15581 15582//replace=0 15583 \=offset=7 15584Failed: error -33: bad offset value 15585 15586/(?<=\G.)/g,replace=+ 15587 abc 15588 3: a+b+c+ 15589 15590".+\QX\E+"B,no_auto_possess 15591------------------------------------------------------------------ 15592 Bra 15593 Any+ 15594 X+ 15595 Ket 15596 End 15597------------------------------------------------------------------ 15598 15599".+\QX\E+"B,auto_callout,no_auto_possess 15600------------------------------------------------------------------ 15601 Bra 15602 Callout 255 0 4 15603 Any+ 15604 Callout 255 4 4 15605 X+ 15606 Callout 255 8 0 15607 Ket 15608 End 15609------------------------------------------------------------------ 15610 15611# This one is here because Perl gives an 'unmatched )' error which goes away 15612# if one of the \) sequences is removed - which is weird. PCRE finds it too 15613# complicated to find a minimum matching length. 15614 15615"()X|((((((((()))))))((((())))))\2())((((((\2\2)))\2)(\22((((\2\2)2))\2)))(2\ZZZ)+:)Z^|91ZiZZnter(ZZ |91Z(ZZ ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z+:)Z|91Z(ZZ ZZ(\r2Z( or#(\Z2(Z\Z((Z*(\2(Z\':))\0)i|||||||||||||||loZ\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z)))int \)\0nte!rnal errpr\2\\21r(2\ZZZ)+:)Z!|91Z(ZZ ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z)))int \)\0(2\ZZZ)+:)Z^|91ZiZZnter(ZZ |91Z(ZZ ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z)))int \)\0(2\ZZZ)+:)Z^)))int \)\0(2\ZZZ)+:)Z^|91ZiZZnter(ZZernZal ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)2))\2Z)))int \))\ZZ(\r2Z( or#(\Z2(Z\Z(\2\2)2))\2Z)Z(\22Z((\Z2(Z\Z(\2\2)))\2))))((((((\2\2))))))"I 15616Capture group count = 108 15617Max back reference = 22 15618Contains explicit CR or LF match 15619Subject length lower bound = 1 15620 15621# This checks that new code for handling groups that may match an empty string 15622# works on a very large number of alternatives. This pattern used to provoke a 15623# complaint that it was too complicated. 15624 15625/(?:\[A|B|C|D|E|F|G|H|I|J|]{200}Z)/expand 15626 15627# This one used to compile rubbish instead of a compile error, and then 15628# behave unpredictably at match time. 15629 15630/.+(?(?C'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'))?!XXXX.=X/ 15631Failed: error 128 at offset 63: assertion expected after (?( or (?(?C) 15632 .+(?(?C'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'))?!XXXX.=X 15633 15634/[:[:alnum:]-[[a:lnum:]+/ 15635Failed: error 150 at offset 11: invalid range in character class 15636 15637/((?(?C'')\QX\E(?!((?(?C'')(?!X=X));=)r*X=X));=)/ 15638Failed: error 128 at offset 11: assertion expected after (?( or (?(?C) 15639 15640/((?(?C'')\Q\E(?!((?(?C'')(?!X=X));=)r*X=X));=)/ 15641 15642/abcd/auto_callout 15643 abcd\=callout_error=255:2 15644--->abcd 15645 +0 ^ a 15646 +1 ^^ b 15647Failed: error -37: callout error code 15648 15649/()(\g+65534)/ 15650Failed: error 161 at offset 11: subpattern number is too big 15651 15652/()(\g+65533)/ 15653Failed: error 115 at offset 10: reference to non-existent subpattern 15654 15655/�\x00\x00\x00�(\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\2*\x00k\d+\x00\x00\x00\x00\x00\x00\2*\x00\x00\1*.){36}int^\x00\x00��\x00�(\1{50779}?)J\w2/I 15656Capture group count = 2 15657Max back reference = 2 15658First code unit = \xc1 15659Last code unit = '2' 15660Subject length lower bound = 65535 15661 15662/(a)(b)\2\1\1\1\1/I 15663Capture group count = 2 15664Max back reference = 2 15665First code unit = 'a' 15666Last code unit = 'b' 15667Subject length lower bound = 7 15668 15669/(?<a>a)(?<b>b)\g{b}\g{a}\g{a}\g{a}\g{a}(?<a>xx)(?<b>zz)/I,dupnames 15670Capture group count = 4 15671Max back reference = 4 15672Named capture groups: 15673 a 1 15674 a 3 15675 b 2 15676 b 4 15677Options: dupnames 15678First code unit = 'a' 15679Last code unit = 'z' 15680Subject length lower bound = 11 15681 15682// 15683 \=ovector=7777777777 15684** Invalid value in 'ovector=7777777777' 15685 15686# This is here because Perl matches, even though a COMMIT is encountered 15687# outside of the recursion. 15688 15689/(?1)(A(*COMMIT)|B)D/ 15690 BAXBAD 15691No match 15692 15693"(?1){2}(a)"B 15694------------------------------------------------------------------ 15695 Bra 15696 Recurse 15697 Recurse 15698 CBra 1 15699 a 15700 Ket 15701 Ket 15702 End 15703------------------------------------------------------------------ 15704 15705"(?1){2,4}(a)"B 15706------------------------------------------------------------------ 15707 Bra 15708 Recurse 15709 Recurse 15710 Brazero 15711 Bra 15712 Bra 15713 Recurse 15714 Ket 15715 Brazero 15716 Bra 15717 Recurse 15718 Ket 15719 Ket 15720 CBra 1 15721 a 15722 Ket 15723 Ket 15724 End 15725------------------------------------------------------------------ 15726 15727# This test differs from Perl for the first subject. Perl ends up with 15728# $1 set to 'B'; PCRE2 has it unset (which I think is right). 15729 15730/^(?: 15731(?:A| (?:B|B(*ACCEPT)) (?<=(.)) D) 15732(Z) 15733)+$/x 15734 AZB 15735 0: AZB 15736 1: <unset> 15737 2: Z 15738 AZBDZ 15739 0: AZBDZ 15740 1: B 15741 2: Z 15742 15743# The first of these, when run by Perl, gives the mark 'aa', which is wrong. 15744 15745'(?>a(*:aa))b|ac' mark 15746 ac 15747 0: ac 15748 15749'(?:a(*:aa))b|ac' mark 15750 ac 15751 0: ac 15752 15753/(R?){65}/ 15754 (R?){65} 15755 0: 15756 1: 15757 15758/\[(a)]{60}/expand 15759 aaaa 15760No match 15761 15762/(?<!\1((?U)1((?U))))(*F)/never_backslash_c,alt_bsux,anchored,extended 15763 15764/\g{3/ 15765Failed: error 157 at offset 2: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number 15766 15767/(a(?C1)(b)(c)d)+/ 15768 abcdabcd\=callout_capture 15769Callout 1: last capture = 0 15770--->abcdabcd 15771 ^^ ( 15772Callout 1: last capture = 1 15773 1: abcd 15774 2: b 15775 3: c 15776--->abcdabcd 15777 ^ ^ ( 15778 0: abcdabcd 15779 1: abcd 15780 2: b 15781 3: c 15782 15783# Perl matches this one, but PCRE does not because (*ACCEPT) clears out any 15784# pending backtracks in the recursion. 15785 15786/^ (?(DEFINE) (..(*ACCEPT)|...) ) (?1)$/x 15787\= Expect no match 15788 abc 15789No match 15790 15791# Perl gives no match for this one 15792 15793/(a(*MARK:m)(*ACCEPT)){0}(?1)/mark 15794 abc 15795 0: a 15796MK: m 15797 15798/abc/endanchored 15799 xyzabc 15800 0: abc 15801\= Expect no match 15802 xyzabcdef 15803No match 15804\= Expect error 15805 xyzabc\=ph 15806Failed: error -34: bad option value 15807 15808/abc/ 15809 xyzabc\=endanchored 15810 0: abc 15811\= Expect no match 15812 xyzabcdef\=endanchored 15813No match 15814\= Expect error 15815 xyzabc\=ps,endanchored 15816Failed: error -34: bad option value 15817 15818/abc(*ACCEPT)d/endanchored 15819 xyzabc 15820 0: abc 15821\= Expect no match 15822 xyzabcdef 15823No match 15824 15825/abc|bcd/endanchored 15826 xyzabcd 15827 0: bcd 15828\= Expect no match 15829 xyzabcdef 15830No match 15831 15832/a(*ACCEPT)x|aa/endanchored 15833 aaa 15834 0: a 15835 15836# Check auto-anchoring when there is a group that is never obeyed at 15837# the start of a branch. 15838 15839/(?(DEFINE)(a))^bc/I 15840Capture group count = 1 15841Compile options: <none> 15842Overall options: anchored 15843First code unit = 'b' 15844Subject length lower bound = 2 15845 15846/(a){0}.*bc/sI 15847Capture group count = 1 15848Compile options: dotall 15849Overall options: anchored dotall 15850Last code unit = 'c' 15851Subject length lower bound = 2 15852 15853# This should be anchored, as the condition is always false and there is 15854# no alternative branch. 15855 15856/(?(VERSION>=999)yes)^bc/I 15857Capture group count = 0 15858Compile options: <none> 15859Overall options: anchored 15860Subject length lower bound = 2 15861 15862# This should not be anchored. 15863 15864/(?(VERSION>=999)yes|no)^bc/I 15865Capture group count = 0 15866Last code unit = 'c' 15867Subject length lower bound = 4 15868 15869/(*LIMIT_HEAP=0)xxx/I 15870Capture group count = 0 15871Heap limit = 0 15872First code unit = 'x' 15873Last code unit = 'x' 15874Subject length lower bound = 3 15875 15876/\d{0,3}(*:abc)(?C1)xxx/callout_info 15877Callout 1 x 15878 15879# ---------------------------------------------------------------------- 15880 15881# These are a whole pile of tests that touch lines of code that are not 15882# used by any other tests (at least when these were created). 15883 15884/^a+?x/i,no_start_optimize,no_auto_possess 15885\= Expect no match 15886 aaa 15887No match 15888 15889/^[^a]{3,}?x/i,no_start_optimize,no_auto_possess 15890\= Expect no match 15891 bbb 15892No match 15893 cc 15894No match 15895 15896/^X\S/no_start_optimize,no_auto_possess 15897\= Expect no match 15898 X 15899No match 15900 15901/^X\W/no_start_optimize,no_auto_possess 15902\= Expect no match 15903 X 15904No match 15905 15906/^X\H/no_start_optimize,no_auto_possess 15907\= Expect no match 15908 X 15909No match 15910 15911/^X\h/no_start_optimize,no_auto_possess 15912\= Expect no match 15913 X 15914No match 15915 15916/^X\V/no_start_optimize,no_auto_possess 15917\= Expect no match 15918 X 15919No match 15920 15921/^X\v/no_start_optimize,no_auto_possess 15922\= Expect no match 15923 X 15924No match 15925 15926/^X\h/no_start_optimize,no_auto_possess 15927\= Expect no match 15928 XY 15929No match 15930 15931/^X\V/no_start_optimize,no_auto_possess 15932\= Expect no match 15933 X\n 15934No match 15935 15936/^X\v/no_start_optimize,no_auto_possess 15937\= Expect no match 15938 XX 15939No match 15940 15941/^X.+?/s,no_start_optimize,no_auto_possess 15942\= Expect no match 15943 X 15944No match 15945 15946/^X\R+?/no_start_optimize,no_auto_possess 15947\= Expect no match 15948 XX 15949No match 15950 15951/^X\H+?/no_start_optimize,no_auto_possess 15952\= Expect no match 15953 X 15954No match 15955 15956/^X\h+?/no_start_optimize,no_auto_possess 15957\= Expect no match 15958 X 15959No match 15960 15961/^X\V+?/no_start_optimize,no_auto_possess 15962\= Expect no match 15963 X 15964No match 15965 X\n 15966No match 15967 15968/^X\D+?/no_start_optimize,no_auto_possess 15969\= Expect no match 15970 X 15971No match 15972 X9 15973No match 15974 15975/^X\S+?/no_start_optimize,no_auto_possess 15976\= Expect no match 15977 X 15978No match 15979 X\n 15980No match 15981 15982/^X\W+?/no_start_optimize,no_auto_possess 15983\= Expect no match 15984 X 15985No match 15986 XX 15987No match 15988 15989/^X.+?Z/no_start_optimize,no_auto_possess 15990\= Expect no match 15991 XY\n 15992No match 15993 15994/(*CRLF)^X.+?Z/no_start_optimize,no_auto_possess 15995\= Expect no match 15996 XY\r\=ps 15997Partial match: XY\x0d 15998 15999/^X\R+?Z/no_start_optimize,no_auto_possess 16000\= Expect no match 16001 X\nX 16002No match 16003 X\n\r\n 16004No match 16005 X\n\rY 16006No match 16007 X\n\nY 16008No match 16009 X\n\x{0c}Y 16010No match 16011 16012/(*BSR_ANYCRLF)^X\R+?Z/no_start_optimize,no_auto_possess 16013\= Expect no match 16014 X\nX 16015No match 16016 X\n\r\n 16017No match 16018 X\n\rY 16019No match 16020 X\n\nY 16021No match 16022 X\n\x{0c}Y 16023No match 16024 16025/^X\H+?Z/no_start_optimize,no_auto_possess 16026\= Expect no match 16027 XY\t 16028No match 16029 XYY 16030No match 16031 16032/^X\h+?Z/no_start_optimize,no_auto_possess 16033\= Expect no match 16034 X\t\t 16035No match 16036 X\tY 16037No match 16038 16039/^X\V+?Z/no_start_optimize,no_auto_possess 16040\= Expect no match 16041 XY\n 16042No match 16043 XYY 16044No match 16045 16046/^X\v+?Z/no_start_optimize,no_auto_possess 16047\= Expect no match 16048 X\n\n 16049No match 16050 X\nY 16051No match 16052 16053/^X\D+?Z/no_start_optimize,no_auto_possess 16054\= Expect no match 16055 XY9 16056No match 16057 XYY 16058No match 16059 16060/^X\d+?Z/no_start_optimize,no_auto_possess 16061\= Expect no match 16062 X99 16063No match 16064 X9Y 16065No match 16066 16067/^X\S+?Z/no_start_optimize,no_auto_possess 16068\= Expect no match 16069 XY\n 16070No match 16071 XYY 16072No match 16073 16074/^X\s+?Z/no_start_optimize,no_auto_possess 16075\= Expect no match 16076 X\n\n 16077No match 16078 X\nY 16079No match 16080 16081/^X\W+?Z/no_start_optimize,no_auto_possess 16082\= Expect no match 16083 X.A 16084No match 16085 X++ 16086No match 16087 16088/^X\w+?Z/no_start_optimize,no_auto_possess 16089\= Expect no match 16090 Xa. 16091No match 16092 Xaa 16093No match 16094 16095/^X.{1,3}Z/s,no_start_optimize,no_auto_possess 16096\= Expect no match 16097 Xa.bd 16098No match 16099 16100/^X\h+Z/no_start_optimize,no_auto_possess 16101\= Expect no match 16102 X\t\t 16103No match 16104 X\tY 16105No match 16106 16107/^X\V+Z/no_start_optimize,no_auto_possess 16108\= Expect no match 16109 XY\n 16110No match 16111 XYY 16112No match 16113 16114/^(X(*THEN)Y|AB){0}(?1)/ 16115 ABX 16116 0: AB 16117\= Expect no match 16118 XAB 16119No match 16120 16121/^(?!A(?C1)B)C/ 16122 ABC\=callout_error=1,no_jit 16123No match 16124 16125/^(?!A(?C1)B)C/no_start_optimize 16126 ABC\=callout_error=1 16127--->ABC 16128 1 ^^ B 16129Failed: error -37: callout error code 16130 16131/^(?(?!A(?C1)B)C)/ 16132 ABC\=callout_error=1 16133--->ABC 16134 1 ^^ B 16135Failed: error -37: callout error code 16136 16137# ---------------------------------------------------------------------- 16138 16139/[a b c]/BxxI 16140------------------------------------------------------------------ 16141 Bra 16142 [a-c] 16143 Ket 16144 End 16145------------------------------------------------------------------ 16146Capture group count = 0 16147Options: extended_more 16148Starting code units: a b c 16149Subject length lower bound = 1 16150 16151/[a b c]/BxxxI 16152------------------------------------------------------------------ 16153 Bra 16154 [a-c] 16155 Ket 16156 End 16157------------------------------------------------------------------ 16158Capture group count = 0 16159Options: extended extended_more 16160Starting code units: a b c 16161Subject length lower bound = 1 16162 16163/[a b c]/B,extended_more 16164------------------------------------------------------------------ 16165 Bra 16166 [a-c] 16167 Ket 16168 End 16169------------------------------------------------------------------ 16170 16171/[ a b c ]/B,extended_more 16172------------------------------------------------------------------ 16173 Bra 16174 [a-c] 16175 Ket 16176 End 16177------------------------------------------------------------------ 16178 16179/[a b](?xx: [ 12 ] (?-xx:[ 34 ]) )y z/B 16180------------------------------------------------------------------ 16181 Bra 16182 [ ab] 16183 Bra 16184 [12] 16185 Bra 16186 [ 34] 16187 Ket 16188 Ket 16189 y z 16190 Ket 16191 End 16192------------------------------------------------------------------ 16193 16194# Unsetting /x also unsets /xx 16195 16196/[a b](?xx: [ 12 ] (?-x:[ 34 ]) )y z/B 16197------------------------------------------------------------------ 16198 Bra 16199 [ ab] 16200 Bra 16201 [12] 16202 Bra 16203 [ 34] 16204 Ket 16205 Ket 16206 y z 16207 Ket 16208 End 16209------------------------------------------------------------------ 16210 16211/(a)(?-n:(b))(c)/nB 16212------------------------------------------------------------------ 16213 Bra 16214 Bra 16215 a 16216 Ket 16217 Bra 16218 CBra 1 16219 b 16220 Ket 16221 Ket 16222 Bra 16223 c 16224 Ket 16225 Ket 16226 End 16227------------------------------------------------------------------ 16228 16229# ---------------------------------------------------------------------- 16230# These test the dangerous PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL option. 16231 16232/\j\x{z}\o{82}\L\uabcd\u\U\g{\g/B,\bad_escape_is_literal 16233** Unrecognized modifier '\' in '\bad_escape_is_literal' 16234 16235/\N{\c/IB,bad_escape_is_literal 16236------------------------------------------------------------------ 16237 Bra 16238 N{c 16239 Ket 16240 End 16241------------------------------------------------------------------ 16242Capture group count = 0 16243Extra options: bad_escape_is_literal 16244First code unit = 'N' 16245Last code unit = 'c' 16246Subject length lower bound = 3 16247 16248/[\j\x{z}\o\gAb\g]/B,bad_escape_is_literal 16249------------------------------------------------------------------ 16250 Bra 16251 [Abgjoxz{}] 16252 Ket 16253 End 16254------------------------------------------------------------------ 16255 16256/[Q-\N]/B,bad_escape_is_literal 16257Failed: error 150 at offset 5: invalid range in character class 16258 16259/[\s-_]/bad_escape_is_literal 16260Failed: error 150 at offset 3: invalid range in character class 16261 16262/[_-\s]/bad_escape_is_literal 16263Failed: error 150 at offset 5: invalid range in character class 16264 16265/[\B\R\X]/B 16266Failed: error 107 at offset 2: escape sequence is invalid in character class 16267 16268/[\B\R\X]/B,bad_escape_is_literal 16269Failed: error 107 at offset 2: escape sequence is invalid in character class 16270 16271/[A-\BP-\RV-\X]/B 16272Failed: error 107 at offset 4: escape sequence is invalid in character class 16273 16274/[A-\BP-\RV-\X]/B,bad_escape_is_literal 16275Failed: error 107 at offset 4: escape sequence is invalid in character class 16276 16277# ---------------------------------------------------------------------- 16278 16279/a\b(c/literal 16280 a\\b(c 16281 0: a\b(c 16282 16283/a\b(c/literal,caseless 16284 a\\b(c 16285 0: a\b(c 16286 a\\B(c 16287 0: a\B(c 16288 16289/a\b(c/literal,firstline 16290 XYYa\\b(c 16291 0: a\b(c 16292\= Expect no match 16293 X\na\\b(c 16294No match 16295 16296/a\b?c/literal,use_offset_limit 16297 XXXXa\\b?c\=offset_limit=4 16298 0: a\b?c 16299\= Expect no match 16300 XXXXa\\b?c\=offset_limit=3 16301No match 16302 16303/a\b(c/literal,anchored,endanchored 16304 a\\b(c 16305 0: a\b(c 16306\= Expect no match 16307 Xa\\b(c 16308No match 16309 a\\b(cX 16310No match 16311 Xa\\b(cX 16312No match 16313 16314//literal,extended 16315Failed: error 192 at offset 0: invalid option bits with PCRE2_LITERAL 16316 16317/a\b(c/literal,auto_callout,no_start_optimize 16318 XXXXa\\b(c 16319--->XXXXa\b(c 16320 +0 ^ a 16321 +0 ^ a 16322 +0 ^ a 16323 +0 ^ a 16324 +0 ^ a 16325 +1 ^^ \ 16326 +2 ^ ^ b 16327 +3 ^ ^ ( 16328 +4 ^ ^ c 16329 +5 ^ ^ End of pattern 16330 0: a\b(c 16331 16332/a\b(c/literal,auto_callout 16333 XXXXa\\b(c 16334--->XXXXa\b(c 16335 +0 ^ a 16336 +1 ^^ \ 16337 +2 ^ ^ b 16338 +3 ^ ^ ( 16339 +4 ^ ^ c 16340 +5 ^ ^ End of pattern 16341 0: a\b(c 16342 16343/(*CR)abc/literal 16344 (*CR)abc 16345 0: (*CR)abc 16346 16347/cat|dog/I,match_word 16348Capture group count = 0 16349Max lookbehind = 1 16350Extra options: match_word 16351Starting code units: c d 16352Subject length lower bound = 3 16353 the cat sat 16354 0: cat 16355\= Expect no match 16356 caterpillar 16357No match 16358 snowcat 16359No match 16360 syndicate 16361No match 16362 16363/(cat)|dog/I,match_line,literal 16364Capture group count = 0 16365Compile options: literal 16366Overall options: anchored literal 16367Extra options: match_line 16368First code unit = '(' 16369Subject length lower bound = 9 16370 (cat)|dog 16371 0: (cat)|dog 16372\= Expect no match 16373 the cat sat 16374No match 16375 caterpillar 16376No match 16377 snowcat 16378No match 16379 syndicate 16380No match 16381 16382/a whole line/match_line,multiline 16383 Rhubarb \na whole line\n custard 16384 0: a whole line 16385\= Expect no match 16386 Not a whole line 16387No match 16388 16389# Perl gets this wrong, failing to capture 'b' in group 1. 16390 16391/^(b+|a){1,2}?bc/ 16392 bbc 16393 0: bbc 16394 1: b 16395 16396# And again here, for the "babc" subject string. 16397 16398/^(b*|ba){1,2}?bc/ 16399 babc 16400 0: babc 16401 1: ba 16402 bbabc 16403 0: bbabc 16404 1: ba 16405 bababc 16406 0: bababc 16407 1: ba 16408\= Expect no match 16409 bababbc 16410No match 16411 babababc 16412No match 16413 16414/[[:digit:]-a]/ 16415Failed: error 150 at offset 10: invalid range in character class 16416 16417/[[:digit:]-[:print:]]/ 16418Failed: error 150 at offset 10: invalid range in character class 16419 16420/[\d-a]/ 16421Failed: error 150 at offset 3: invalid range in character class 16422 16423/[\H-z]/ 16424Failed: error 150 at offset 3: invalid range in character class 16425 16426/[\d-[:print:]]/ 16427Failed: error 150 at offset 3: invalid range in character class 16428 16429# Perl gets the second of these wrong, giving no match. 16430 16431"(?<=(a))\1?b"I 16432Capture group count = 1 16433Max back reference = 1 16434Max lookbehind = 1 16435Last code unit = 'b' 16436Subject length lower bound = 1 16437 ab 16438 0: b 16439 1: a 16440 aaab 16441 0: ab 16442 1: a 16443 16444"(?=(a))\1?b"I 16445Capture group count = 1 16446Max back reference = 1 16447First code unit = 'a' 16448Last code unit = 'b' 16449Subject length lower bound = 2 16450 ab 16451 0: ab 16452 1: a 16453 aaab 16454 0: ab 16455 1: a 16456 16457# JIT does not support callout_extra 16458 16459/(*NO_JIT)(a+)b/auto_callout,no_start_optimize,no_auto_possess 16460\= Expect no match 16461 aac\=callout_extra 16462New match attempt 16463--->aac 16464 +9 ^ ( 16465+10 ^ a+ 16466+12 ^ ^ ) 16467+13 ^ ^ b 16468Backtrack 16469--->aac 16470+12 ^^ ) 16471+13 ^^ b 16472Backtrack 16473No other matching paths 16474New match attempt 16475--->aac 16476 +9 ^ ( 16477+10 ^ a+ 16478+12 ^^ ) 16479+13 ^^ b 16480Backtrack 16481No other matching paths 16482New match attempt 16483--->aac 16484 +9 ^ ( 16485+10 ^ a+ 16486Backtrack 16487No other matching paths 16488New match attempt 16489--->aac 16490 +9 ^ ( 16491+10 ^ a+ 16492No match 16493 16494/(*NO_JIT)a+(?C'XXX')b/no_start_optimize,no_auto_possess 16495\= Expect no match 16496 aac\=callout_extra 16497New match attempt 16498Callout (15): 'XXX' 16499--->aac 16500 ^ ^ b 16501Backtrack 16502Callout (15): 'XXX' 16503--->aac 16504 ^^ b 16505Backtrack 16506No other matching paths 16507New match attempt 16508Callout (15): 'XXX' 16509--->aac 16510 ^^ b 16511No match 16512 16513/\n/firstline 16514 xyz\nabc 16515 0: \x0a 16516 16517/\nabc/firstline 16518 xyz\nabc 16519 0: \x0aabc 16520 16521/\x{0a}abc/firstline,newline=crlf 16522\= Expect no match 16523 xyz\r\nabc 16524No match 16525 16526/[abc]/firstline 16527\= Expect no match 16528 \na 16529No match 16530 16531# These tests are matched in test 1 as they are Perl compatible. Here we are 16532# looking at what does and does not get auto-possessified. 16533 16534/(?(DEFINE)(?<optional_a>a?))^(?&optional_a)a$/B 16535------------------------------------------------------------------ 16536 Bra 16537 Cond 16538 Cond false 16539 CBra 1 16540 a? 16541 Ket 16542 Ket 16543 ^ 16544 Recurse 16545 a 16546 $ 16547 Ket 16548 End 16549------------------------------------------------------------------ 16550 16551/(?(DEFINE)(?<optional_a>a?)X)^(?&optional_a)a$/B 16552------------------------------------------------------------------ 16553 Bra 16554 Cond 16555 Cond false 16556 CBra 1 16557 a? 16558 Ket 16559 X 16560 Ket 16561 ^ 16562 Recurse 16563 a 16564 $ 16565 Ket 16566 End 16567------------------------------------------------------------------ 16568 16569/^(a?)b(?1)a/B 16570------------------------------------------------------------------ 16571 Bra 16572 ^ 16573 CBra 1 16574 a? 16575 Ket 16576 b 16577 Recurse 16578 a 16579 Ket 16580 End 16581------------------------------------------------------------------ 16582 16583/^(a?)+b(?1)a/B 16584------------------------------------------------------------------ 16585 Bra 16586 ^ 16587 SCBra 1 16588 a? 16589 KetRmax 16590 b 16591 Recurse 16592 a 16593 Ket 16594 End 16595------------------------------------------------------------------ 16596 16597/^(a?)++b(?1)a/B 16598------------------------------------------------------------------ 16599 Bra 16600 ^ 16601 SCBraPos 1 16602 a? 16603 KetRpos 16604 b 16605 Recurse 16606 a 16607 Ket 16608 End 16609------------------------------------------------------------------ 16610 16611/^(a?)+b/B 16612------------------------------------------------------------------ 16613 Bra 16614 ^ 16615 SCBra 1 16616 a? 16617 KetRmax 16618 b 16619 Ket 16620 End 16621------------------------------------------------------------------ 16622 16623/(?=a+)a(a+)++b/B 16624------------------------------------------------------------------ 16625 Bra 16626 Assert 16627 a++ 16628 Ket 16629 a 16630 CBraPos 1 16631 a++ 16632 KetRpos 16633 b 16634 Ket 16635 End 16636------------------------------------------------------------------ 16637 16638/(?<=(?=.){4,5}x)/B 16639------------------------------------------------------------------ 16640 Bra 16641 Assert back 16642 Reverse 16643 Assert 16644 Any 16645 Ket 16646 Assert 16647 Any 16648 Ket 16649 Assert 16650 Any 16651 Ket 16652 Assert 16653 Any 16654 Ket 16655 Brazero 16656 Assert 16657 Any 16658 Ket 16659 x 16660 Ket 16661 Ket 16662 End 16663------------------------------------------------------------------ 16664 16665# Perl behaves differently with these when optimization is turned off 16666 16667/a(*PRUNE:X)bc|qq/mark,no_start_optimize 16668\= Expect no match 16669 axy 16670No match, mark = X 16671 16672/a(*THEN:X)bc|qq/mark,no_start_optimize 16673\= Expect no match 16674 axy 16675No match, mark = X 16676 16677/(?^x-i)AB/ 16678Failed: error 194 at offset 4: invalid hyphen in option setting 16679 16680/(?^-i)AB/ 16681Failed: error 194 at offset 3: invalid hyphen in option setting 16682 16683/(?x-i-i)/ 16684Failed: error 194 at offset 5: invalid hyphen in option setting 16685 16686/(?(?=^))b/I 16687Capture group count = 0 16688Last code unit = 'b' 16689Subject length lower bound = 1 16690 abc 16691 0: b 16692 16693/(?(?=^)|)b/I 16694Capture group count = 0 16695First code unit = 'b' 16696Subject length lower bound = 1 16697 abc 16698 0: b 16699 16700/(?(?=^)|^)b/I 16701Capture group count = 0 16702Compile options: <none> 16703Overall options: anchored 16704First code unit = 'b' 16705Subject length lower bound = 1 16706 bbc 16707 0: b 16708\= Expect no match 16709 abc 16710No match 16711 16712/(?(1)^|^())/I 16713Capture group count = 1 16714Max back reference = 1 16715May match empty string 16716Compile options: <none> 16717Overall options: anchored 16718Subject length lower bound = 0 16719 16720/(?(1)^())b/I 16721Capture group count = 1 16722Max back reference = 1 16723Last code unit = 'b' 16724Subject length lower bound = 1 16725 16726/(?(1)^())+b/I,aftertext 16727Capture group count = 1 16728Max back reference = 1 16729Last code unit = 'b' 16730Subject length lower bound = 1 16731 abc 16732 0: b 16733 0+ c 16734 16735/(?(1)^()|^)+b/I,aftertext 16736Capture group count = 1 16737Max back reference = 1 16738Compile options: <none> 16739Overall options: anchored 16740First code unit = 'b' 16741Subject length lower bound = 1 16742 bbc 16743 0: b 16744 0+ bc 16745\= Expect no match 16746 abc 16747No match 16748 16749/(?(1)^()|^)*b/I,aftertext 16750Capture group count = 1 16751Max back reference = 1 16752First code unit = 'b' 16753Subject length lower bound = 1 16754 bbc 16755 0: b 16756 0+ bc 16757 abc 16758 0: b 16759 0+ c 16760 xbc 16761 0: b 16762 0+ c 16763 16764/(?(1)^())+b/I,aftertext 16765Capture group count = 1 16766Max back reference = 1 16767Last code unit = 'b' 16768Subject length lower bound = 1 16769 abc 16770 0: b 16771 0+ c 16772 16773/(?(1)^a()|^a)+b/I,aftertext 16774Capture group count = 1 16775Max back reference = 1 16776Compile options: <none> 16777Overall options: anchored 16778First code unit = 'a' 16779Last code unit = 'b' 16780Subject length lower bound = 2 16781 abc 16782 0: ab 16783 0+ c 16784\= Expect no match 16785 bbc 16786No match 16787 16788/(?(1)^|^(a))+b/I,aftertext 16789Capture group count = 1 16790Max back reference = 1 16791Compile options: <none> 16792Overall options: anchored 16793Last code unit = 'b' 16794Subject length lower bound = 1 16795 abc 16796 0: ab 16797 0+ c 16798 1: a 16799\= Expect no match 16800 bbc 16801No match 16802 16803/(?(1)^a()|^a)*b/I,aftertext 16804Capture group count = 1 16805Max back reference = 1 16806Last code unit = 'b' 16807Subject length lower bound = 1 16808 abc 16809 0: ab 16810 0+ c 16811 bbc 16812 0: b 16813 0+ bc 16814 xbc 16815 0: b 16816 0+ c 16817 16818/a(b)c|xyz/g,allvector,replace=<$0> 16819 abcdefabcpqr\=ovector=4 16820 2: <abc>def<abc>pqr 16821 0: 6 9 16822 1: 7 8 16823 2: <unchanged> 16824 3: <unchanged> 16825 abxyz\=ovector=4 16826 1: ab<xyz> 16827 0: 2 5 16828 1: <unset> 16829 2: <unchanged> 16830 3: <unchanged> 16831 abcdefxyz\=ovector=4 16832 2: <abc>def<xyz> 16833 0: 6 9 16834 1: <unset> 16835 2: <unchanged> 16836 3: <unchanged> 16837 16838/a(b)c|xyz/allvector 16839 abcdef\=ovector=4 16840 0: abc 16841 1: b 16842 2: <unchanged> 16843 3: <unchanged> 16844 abxyz\=ovector=4 16845 0: xyz 16846 1: <unset> 16847 2: <unchanged> 16848 3: <unchanged> 16849 16850/a(b)c|xyz/g,replace=<$0>,substitute_callout 16851 abcdefabcpqr 16852 1(2) Old 0 3 "abc" New 0 5 "<abc>" 16853 2(2) Old 6 9 "abc" New 8 13 "<abc>" 16854 2: <abc>def<abc>pqr 16855 abxyzpqrabcxyz 16856 1(1) Old 2 5 "xyz" New 2 7 "<xyz>" 16857 2(2) Old 8 11 "abc" New 10 15 "<abc>" 16858 3(1) Old 11 14 "xyz" New 15 20 "<xyz>" 16859 3: ab<xyz>pqr<abc><xyz> 16860 12abc34xyz99abc55\=substitute_stop=2 16861 1(2) Old 2 5 "abc" New 2 7 "<abc>" 16862 2(1) Old 7 10 "xyz" New 9 14 "<xyz> STOPPED" 16863 2: 12<abc>34xyz99abc55 16864 12abc34xyz99abc55\=substitute_skip=1 16865 1(2) Old 2 5 "abc" New 2 7 "<abc> SKIPPED" 16866 2(1) Old 7 10 "xyz" New 7 12 "<xyz>" 16867 3(2) Old 12 15 "abc" New 14 19 "<abc>" 16868 3: 12abc34<xyz>99<abc>55 16869 12abc34xyz99abc55\=substitute_skip=2 16870 1(2) Old 2 5 "abc" New 2 7 "<abc>" 16871 2(1) Old 7 10 "xyz" New 9 14 "<xyz> SKIPPED" 16872 3(2) Old 12 15 "abc" New 14 19 "<abc>" 16873 3: 12<abc>34xyz99<abc>55 16874 16875/a(b)c|xyz/g,replace=<$0> 16876 abcdefabcpqr 16877 2: <abc>def<abc>pqr 16878 abxyzpqrabcxyz 16879 3: ab<xyz>pqr<abc><xyz> 16880 12abc34xyz\=substitute_stop=2 16881 1(2) Old 2 5 "abc" New 2 7 "<abc>" 16882 2(1) Old 7 10 "xyz" New 9 14 "<xyz> STOPPED" 16883 2: 12<abc>34xyz 16884 12abc34xyz\=substitute_skip=1 16885 1(2) Old 2 5 "abc" New 2 7 "<abc> SKIPPED" 16886 2(1) Old 7 10 "xyz" New 7 12 "<xyz>" 16887 2: 12abc34<xyz> 16888 16889/a(b)c|xyz/replace=<$0> 16890 abcdefabcpqr 16891 1: <abc>defabcpqr 16892 12abc34xyz\=substitute_skip=1 16893 1(2) Old 2 5 "abc" New 2 7 "<abc> SKIPPED" 16894 1: 12abc34xyz 16895 12abc34xyz\=substitute_stop=1 16896 1(2) Old 2 5 "abc" New 2 7 "<abc> STOPPED" 16897 1: 12abc34xyz 16898 16899/abc\rdef/ 16900 abc\ndef 16901No match 16902 16903/abc\rdef\x{0d}xyz/escaped_cr_is_lf 16904 abc\ndef\rxyz 16905 0: abc\x0adef\x0dxyz 16906\= Expect no match 16907 abc\ndef\nxyz 16908No match 16909 16910/(?(*ACCEPT)xxx)/ 16911Failed: error 128 at offset 2: assertion expected after (?( or (?(?C) 16912 16913/(?(*atomic:xx)xxx)/ 16914Failed: error 128 at offset 10: assertion expected after (?( or (?(?C) 16915 16916/(?(*script_run:xxx)zzz)/ 16917Failed: error 128 at offset 14: assertion expected after (?( or (?(?C) 16918 16919/foobar/ 16920 the foobar thing\=copy_matched_subject 16921 0: foobar 16922 the foobar thing\=copy_matched_subject,zero_terminate 16923 0: foobar 16924 16925/foobar/g 16926 the foobar thing foobar again\=copy_matched_subject 16927 0: foobar 16928 0: foobar 16929 16930/(*:XX)^abc/I 16931Capture group count = 0 16932Compile options: <none> 16933Overall options: anchored 16934First code unit = 'a' 16935Subject length lower bound = 3 16936 16937/(*COMMIT:XX)^abc/I 16938Capture group count = 0 16939Compile options: <none> 16940Overall options: anchored 16941First code unit = 'a' 16942Subject length lower bound = 3 16943 16944/(*ACCEPT:XX)^abc/I 16945Capture group count = 0 16946May match empty string 16947Subject length lower bound = 0 16948 16949/abc/replace=xyz 16950 abc\=null_context 16951 1: xyz 16952 16953/abc/replace=xyz,substitute_callout 16954 abc 16955 1(1) Old 0 3 "abc" New 0 3 "xyz" 16956 1: xyz 16957\= Expect error message 16958 abc\=null_context 16959** Replacement callouts are not supported with null_context. 16960 16961/\[()]{65535}()/expand 16962Failed: error 197 at offset 131071: too many capturing groups (maximum 65535) 16963 16964/\[()]{65535}(?<A>)/expand 16965Failed: error 197 at offset 131075: too many capturing groups (maximum 65535) 16966 16967/a(?:(*ACCEPT))??bc/ 16968 abc 16969 0: abc 16970 axy 16971 0: a 16972 16973/a(*ACCEPT)??bc/ 16974 abc 16975 0: abc 16976 axy 16977 0: a 16978 16979/a(*ACCEPT:XX)??bc/mark 16980 abc 16981 0: abc 16982 axy 16983 0: a 16984MK: XX 16985 16986/(*:\)?/ 16987Failed: error 109 at offset 5: quantifier does not follow a repeatable item 16988 16989/(*:\Q \E){5}/alt_verbnames 16990Failed: error 109 at offset 11: quantifier does not follow a repeatable item 16991 16992/(?=abc)/I 16993Capture group count = 0 16994May match empty string 16995First code unit = 'a' 16996Last code unit = 'c' 16997Subject length lower bound = 2 16998 16999/(?|(X)|(XY))\1abc/I 17000Capture group count = 1 17001Max back reference = 1 17002First code unit = 'X' 17003Last code unit = 'c' 17004Subject length lower bound = 4 17005 17006/(?|(a)|(bcde))(c)\2/I 17007Capture group count = 2 17008Max back reference = 2 17009Starting code units: a b 17010Last code unit = 'c' 17011Subject length lower bound = 3 17012 17013/(?|(a)|(bcde))(c)\1/I 17014Capture group count = 2 17015Max back reference = 1 17016Starting code units: a b 17017Last code unit = 'c' 17018Subject length lower bound = 2 17019 17020/(?|(?'A'a)|(?'A'bcde))(?'B'c)\k'B'(?'A')/I,dupnames 17021Capture group count = 3 17022Max back reference = 2 17023Named capture groups: 17024 A 1 17025 A 3 17026 B 2 17027Options: dupnames 17028Starting code units: a b 17029Last code unit = 'c' 17030Subject length lower bound = 3 17031 17032/(?|(?'A'a)|(?'A'bcde))(?'B'c)\k'A'(?'A')/I,dupnames 17033Capture group count = 3 17034Max back reference = 3 17035Named capture groups: 17036 A 1 17037 A 3 17038 B 2 17039Options: dupnames 17040Starting code units: a b 17041Last code unit = 'c' 17042Subject length lower bound = 2 17043 17044/((a|)+)+Z/I 17045Capture group count = 2 17046Starting code units: Z a 17047Last code unit = 'Z' 17048Subject length lower bound = 1 17049 17050/((?=a))[abcd]/I 17051Capture group count = 1 17052First code unit = 'a' 17053Subject length lower bound = 1 17054 17055/A(?:(*ACCEPT))?B/info 17056Capture group count = 0 17057First code unit = 'A' 17058Subject length lower bound = 1 17059 17060/(A(*ACCEPT)??B)C/ 17061 ABC 17062 0: ABC 17063 1: AB 17064 AXY 17065 0: A 17066 1: A 17067 17068/(?<=(?<=a)b)c.*/I 17069Capture group count = 0 17070Max lookbehind = 1 17071First code unit = 'c' 17072Subject length lower bound = 1 17073 abc\=ph 17074Partial match: c 17075\= Expect no match 17076 xbc\=ph 17077No match 17078 17079/(?<=ab)c.*/I 17080Capture group count = 0 17081Max lookbehind = 2 17082First code unit = 'c' 17083Subject length lower bound = 1 17084 abc\=ph 17085Partial match: c 17086\= Expect no match 17087 xbc\=ph 17088No match 17089 17090/(?<=a(?<=a|a)c)/I 17091Capture group count = 0 17092Max lookbehind = 2 17093May match empty string 17094Subject length lower bound = 0 17095 17096/(?<=a(?<=a|ba)c)/I 17097Capture group count = 0 17098Max lookbehind = 2 17099May match empty string 17100Subject length lower bound = 0 17101 17102/(?<=(?<=a)b)(?<!abcd)/I 17103Capture group count = 0 17104Max lookbehind = 4 17105May match empty string 17106Subject length lower bound = 0 17107 17108/(?<=(?<=a)b)(?<!abcd)(?<=(?<=a)bcde)/I 17109Capture group count = 0 17110Max lookbehind = 4 17111May match empty string 17112Subject length lower bound = 0 17113 17114# Addition overflow 17115/( {32742} {42})(?<!\1{65481})/ 17116Failed: error 187 at offset 15: lookbehind assertion is too long 17117 17118# Multiplication overflow 17119/(X{65535})(?<=\1{32770})/ 17120Failed: error 187 at offset 10: lookbehind assertion is too long 17121 17122# ---- Non-atomic assertion tests ---- 17123 17124# Expect error: not allowed as a condition 17125/(?(*napla:xx)bc)/ 17126Failed: error 198 at offset 9: atomic assertion expected after (?( or (?(?C) 17127 17128/\A(*pla:.*\b(\w++))(?>.*?\b\1\b){3}/ 17129 word1 word3 word1 word2 word3 word2 word2 word1 word3 word4 17130No match 17131 17132/\A(*napla:.*\b(\w++))(?>.*?\b\1\b){3}/ 17133 word1 word3 word1 word2 word3 word2 word2 word1 word3 word4 17134 0: word1 word3 word1 word2 word3 word2 word2 word1 word3 17135 1: word3 17136 17137/\A(?*.*\b(\w++))(?>.*?\b\1\b){3}/ 17138 word1 word3 word1 word2 word3 word2 word2 word1 word3 word4 17139 0: word1 word3 word1 word2 word3 word2 word2 word1 word3 17140 1: word3 17141 17142/(*plb:(.)..|(.)...)(\1|\2)/ 17143 abcdb\=offset=4 17144 0: b 17145 1: b 17146 2: <unset> 17147 3: b 17148 abcda\=offset=4 17149No match 17150 17151/(*naplb:(.)..|(.)...)(\1|\2)/ 17152 abcdb\=offset=4 17153 0: b 17154 1: b 17155 2: <unset> 17156 3: b 17157 abcda\=offset=4 17158 0: a 17159 1: <unset> 17160 2: a 17161 3: a 17162 17163/(?<*(.)..|(.)...)(\1|\2)/ 17164 abcdb\=offset=4 17165 0: b 17166 1: b 17167 2: <unset> 17168 3: b 17169 abcda\=offset=4 17170 0: a 17171 1: <unset> 17172 2: a 17173 3: a 17174 17175/(*non_atomic_positive_lookahead:ab)/B 17176------------------------------------------------------------------ 17177 Bra 17178 Non-atomic assert 17179 ab 17180 Ket 17181 Ket 17182 End 17183------------------------------------------------------------------ 17184 17185/(*non_atomic_positive_lookbehind:ab)/B 17186------------------------------------------------------------------ 17187 Bra 17188 Non-atomic assert back 17189 Reverse 17190 ab 17191 Ket 17192 Ket 17193 End 17194------------------------------------------------------------------ 17195 17196/(*pla:ab+)/B 17197------------------------------------------------------------------ 17198 Bra 17199 Assert 17200 a 17201 b++ 17202 Ket 17203 Ket 17204 End 17205------------------------------------------------------------------ 17206 17207/(*napla:ab+)/B 17208------------------------------------------------------------------ 17209 Bra 17210 Non-atomic assert 17211 a 17212 b+ 17213 Ket 17214 Ket 17215 End 17216------------------------------------------------------------------ 17217 17218/(*napla:)+/ 17219 17220/(*naplb:)+/ 17221 17222/(*napla:^x|^y)/I 17223Capture group count = 0 17224May match empty string 17225Compile options: <none> 17226Overall options: anchored 17227Starting code units: x y 17228Subject length lower bound = 1 17229 17230/(*napla:abc|abd)/I 17231Capture group count = 0 17232May match empty string 17233First code unit = 'a' 17234Subject length lower bound = 1 17235 17236/(*napla:a|(.)(*ACCEPT)zz)\1../ 17237 abcd 17238 0: abc 17239 1: a 17240 17241/(*napla:a(*ACCEPT)zz|(.))\1../ 17242 abcd 17243 0: bcd 17244 1: b 17245 17246/(*napla:a|(*COMMIT)(.))\1\1/ 17247 aabc 17248 0: aa 17249 1: a 17250\= Expect no match 17251 abbc 17252No match 17253 17254/(*napla:a|(.))\1\1/ 17255 aabc 17256 0: aa 17257 1: a 17258 abbc 17259 0: bb 17260 1: b 17261 17262/(*naplb:ab?c|PQ).../g 17263 abcdefgacxyzPQR123 17264 0: def 17265 0: xyz 17266 0: R12 17267 17268# ---- 17269 17270# Expect error (recursion => not fixed length) 17271/(\2)((?=(?<=\1)))/ 17272Failed: error 125 at offset 8: length of lookbehind assertion is not limited 17273 17274/c*+(?<=[bc])/ 17275 abc\=ph 17276Partial match: c 17277 ab\=ph 17278Partial match: 17279 abc\=ps 17280 0: c 17281 ab\=ps 17282 0: 17283 17284/c++(?<=[bc])/ 17285 abc\=ph 17286Partial match: c 17287 ab\=ph 17288Partial match: 17289 17290/(?<=(?=.(?<=x)))/ 17291 abx 17292 0: 17293 ab\=ph 17294Partial match: 17295 bxyz 17296 0: 17297 xyz 17298 0: 17299 17300/\z/ 17301 abc\=ph 17302Partial match: 17303 abc\=ps 17304 0: 17305 17306/\Z/ 17307 abc\=ph 17308Partial match: 17309 abc\=ps 17310 0: 17311 abc\n\=ph 17312Partial match: \x0a 17313 abc\n\=ps 17314 0: 17315 17316/(?![ab]).*/ 17317 ab\=ph 17318Partial match: 17319 17320/c*+/ 17321 ab\=ph,offset=2 17322Partial match: 17323 17324/\A\s*(a|(?:[^`]{28500}){4})/I 17325Capture group count = 1 17326Max lookbehind = 1 17327Compile options: <none> 17328Overall options: anchored 17329Subject length lower bound = 1 17330 a 17331 0: a 17332 1: a 17333 17334/\A\s*((?:[^`]{28500}){4})/I 17335Capture group count = 1 17336Max lookbehind = 1 17337Compile options: <none> 17338Overall options: anchored 17339Subject length lower bound = 65535 17340 17341/\A\s*((?:[^`]{28500}){4}|a)/I 17342Capture group count = 1 17343Max lookbehind = 1 17344Compile options: <none> 17345Overall options: anchored 17346Subject length lower bound = 1 17347 a 17348 0: a 17349 1: a 17350 17351/(?<A>a)(?(<A>)b)((?<=b).*)/B 17352------------------------------------------------------------------ 17353 Bra 17354 CBra 1 17355 a 17356 Ket 17357 Cond 17358 1 Cond ref 17359 b 17360 Ket 17361 CBra 2 17362 Assert back 17363 Reverse 17364 b 17365 Ket 17366 Any*+ 17367 Ket 17368 Ket 17369 End 17370------------------------------------------------------------------ 17371 17372/(?(1)b)((?<=b).*)/B 17373------------------------------------------------------------------ 17374 Bra 17375 Cond 17376 1 Cond ref 17377 b 17378 Ket 17379 CBra 1 17380 Assert back 17381 Reverse 17382 b 17383 Ket 17384 Any*+ 17385 Ket 17386 Ket 17387 End 17388------------------------------------------------------------------ 17389 17390/(?(R1)b)((?<=b).*)/B 17391------------------------------------------------------------------ 17392 Bra 17393 Cond 17394 Cond recurse 1 17395 b 17396 Ket 17397 CBra 1 17398 Assert back 17399 Reverse 17400 b 17401 Ket 17402 Any*+ 17403 Ket 17404 Ket 17405 End 17406------------------------------------------------------------------ 17407 17408/(?(DEFINE)b)((?<=b).*)/B 17409------------------------------------------------------------------ 17410 Bra 17411 Cond 17412 Cond false 17413 b 17414 Ket 17415 CBra 1 17416 Assert back 17417 Reverse 17418 b 17419 Ket 17420 Any*+ 17421 Ket 17422 Ket 17423 End 17424------------------------------------------------------------------ 17425 17426/(?(VERSION=10.3)b)((?<=b).*)/B 17427------------------------------------------------------------------ 17428 Bra 17429 Cond 17430 Cond false 17431 b 17432 Ket 17433 CBra 1 17434 Assert back 17435 Reverse 17436 b 17437 Ket 17438 Any*+ 17439 Ket 17440 Ket 17441 End 17442------------------------------------------------------------------ 17443 17444/[aA]b[cC]/IB 17445------------------------------------------------------------------ 17446 Bra 17447 /i a 17448 b 17449 /i c 17450 Ket 17451 End 17452------------------------------------------------------------------ 17453Capture group count = 0 17454First code unit = 'a' (caseless) 17455Last code unit = 'c' (caseless) 17456Subject length lower bound = 3 17457 17458/[cc]abcd/I 17459Capture group count = 0 17460First code unit = 'c' 17461Last code unit = 'd' 17462Subject length lower bound = 5 17463 17464/[Cc]abcd/I 17465Capture group count = 0 17466First code unit = 'C' (caseless) 17467Last code unit = 'd' 17468Subject length lower bound = 5 17469 17470/[c]abcd/I 17471Capture group count = 0 17472First code unit = 'c' 17473Last code unit = 'd' 17474Subject length lower bound = 5 17475 17476/(?:c|C)abcd/I 17477Capture group count = 0 17478First code unit = 'C' (caseless) 17479Last code unit = 'd' 17480Subject length lower bound = 5 17481 17482/(a)?a/I 17483Capture group count = 1 17484Starting code units: a 17485Last code unit = 'a' 17486Subject length lower bound = 1 17487 manm 17488 0: a 17489 17490/^(?|(\*)(*napla:\S*_(\2?+.+))|(\w)(?=\S*_(\2?+\1)))+_\2$/ 17491 *abc_12345abc 17492 0: *abc_12345abc 17493 1: c 17494 2: 12345abc 17495 17496/^(?|(\*)(*napla:\S*_(\3?+.+))|(\w)(?=\S*_((\2?+\1))))+_\2$/ 17497 *abc_12345abc 17498 0: *abc_12345abc 17499 1: c 17500 2: 12345abc 17501 3: 12345abc 17502 17503/^((\1+)(?C)|\d)+133X$/ 17504 111133X\=callout_capture 17505Callout 0: last capture = 2 17506 1: 1 17507 2: 111 17508--->111133X 17509 ^ ^ | 17510Callout 0: last capture = 2 17511 1: 3 17512 2: 3 17513--->111133X 17514 ^ ^ | 17515Callout 0: last capture = 2 17516 1: 1 17517 2: 11 17518--->111133X 17519 ^ ^ | 17520Callout 0: last capture = 2 17521 1: 3 17522 2: 3 17523--->111133X 17524 ^ ^ | 17525 0: 111133X 17526 1: 11 17527 2: 11 17528 17529/abc/replace=xyz,substitute_replacement_only 17530 123abc456 17531 1: xyz 17532 17533/a(?<ONE>b)c(?<TWO>d)e/g,replace=X$ONE+${TWO}Z,substitute_replacement_only 17534 "abcde-abcde-" 17535 2: Xb+dZXb+dZ 17536 17537/a(b)c|xyz/g,replace=<$0>,substitute_callout,substitute_replacement_only 17538 abcdefabcpqr 17539 1(2) Old 0 3 "abc" New 0 5 "<abc>" 17540 2(2) Old 6 9 "abc" New 5 10 "<abc>" 17541 2: <abc><abc> 17542 abxyzpqrabcxyz 17543 1(1) Old 2 5 "xyz" New 0 5 "<xyz>" 17544 2(2) Old 8 11 "abc" New 5 10 "<abc>" 17545 3(1) Old 11 14 "xyz" New 10 15 "<xyz>" 17546 3: <xyz><abc><xyz> 17547 12abc34xyz99abc55\=substitute_stop=2 17548 1(2) Old 2 5 "abc" New 0 5 "<abc>" 17549 2(1) Old 7 10 "xyz" New 5 10 "<xyz> STOPPED" 17550 2: <abc> 17551 12abc34xyz99abc55\=substitute_skip=1 17552 1(2) Old 2 5 "abc" New 0 5 "<abc> SKIPPED" 17553 2(1) Old 7 10 "xyz" New 0 5 "<xyz>" 17554 3(2) Old 12 15 "abc" New 5 10 "<abc>" 17555 3: <xyz><abc> 17556 12abc34xyz99abc55\=substitute_skip=2 17557 1(2) Old 2 5 "abc" New 0 5 "<abc>" 17558 2(1) Old 7 10 "xyz" New 5 10 "<xyz> SKIPPED" 17559 3(2) Old 12 15 "abc" New 5 10 "<abc>" 17560 3: <abc><abc> 17561 17562/a(..)d/replace=>$1<,substitute_matched 17563 xyzabcdxyzabcdxyz 17564 1: xyz>bc<xyzabcdxyz 17565 xyzabcdxyzabcdxyz\=ovector=2 17566 1: xyz>bc<xyzabcdxyz 17567\= Expect error 17568 xyzabcdxyzabcdxyz\=ovector=1 17569Failed: error -54 at offset 3 in replacement: requested value is not available 17570 17571/a(..)d/g,replace=>$1<,substitute_matched 17572 xyzabcdxyzabcdxyz 17573 2: xyz>bc<xyz>bc<xyz 17574 xyzabcdxyzabcdxyz\=ovector=2 17575 2: xyz>bc<xyz>bc<xyz 17576\= Expect error 17577 xyzabcdxyzabcdxyz\=ovector=1 17578Failed: error -54 at offset 3 in replacement: requested value is not available 17579 xyzabcdxyzabcdxyz\=ovector=1,substitute_unset_empty 17580Failed: error -54 at offset 3 in replacement: requested value is not available 17581 17582/55|a(..)d/g,replace=>$1<,substitute_matched 17583 xyz55abcdxyzabcdxyz\=ovector=2,substitute_unset_empty 17584 3: xyz><>bc<xyz>bc<xyz 17585\= Expect error 17586 xyz55abcdxyzabcdxyz\=ovector=2 17587Failed: error -55 at offset 3 in replacement: requested value is not set 17588 17589/55|a(..)d/replace=>$1<,substitute_matched 17590 xyz55abcdxyzabcdxyz\=ovector=2,substitute_unset_empty 17591 1: xyz><abcdxyzabcdxyz 17592 17593/55|a(..)d/replace=>$1< 17594 xyz55abcdxyzabcdxyz\=ovector=2,substitute_unset_empty 17595 1: xyz><abcdxyzabcdxyz 17596 17597/55|a(..)d/g,replace=>$1< 17598 xyz55abcdxyzabcdxyz\=ovector=2,substitute_unset_empty 17599 3: xyz><>bc<xyz>bc<xyz 17600 17601/abc/replace=,caseless 17602 XabcY 17603 0: abc 17604 XABCY 17605 0: ABC 17606 17607/abc/replace=[4],caseless 17608 XabcY 17609 1: XY 17610 XABCY 17611 1: XY 17612 17613/abc/replace=*,caseless 17614 XabcY 17615 1: X*Y 17616 XABCY 17617 1: X*Y 17618 XabcY\=replace= 17619 0: abc 17620 17621# Expect non-fixed-length error 17622 17623"(?<=X(?(DEFINE)(.*))(?1))." 17624Failed: error 125 at offset 0: length of lookbehind assertion is not limited 17625 17626/\sxxx\s/tables=1 17627\= Expect no match 17628 AB\x{85}xxx\x{a0}XYZ 17629No match 17630 17631/\sxxx\s/tables=2 17632 AB\x{85}xxx\x{a0}XYZ 17633 0: \x85xxx\xa0 17634 17635/^\w+/tables=2 17636 École 17637 0: \xc3 17638 17639/^\w+/tables=3 17640** 'Tables = 3' is invalid: binary tables have not been loaded 17641 École 17642 17643#loadtables ./testbtables 17644 17645/^\w+/tables=3 17646 École 17647 0: \xc3 17648 17649/"(*MARK:>" 00 "<).."/hex,mark,no_start_optimize 17650 AB 17651 0: AB 17652MK: >\x00< 17653 A\=ph 17654Partial match, mark=>\x00<: A 17655\= Expect no match 17656 A 17657No match, mark = >\x00< 17658 17659/"(*MARK:>" 00 "<).(?C1)."/hex,mark,no_start_optimize 17660 AB 17661--->AB 17662 1 ^^ . 17663Latest Mark: >\x00< 17664 0: AB 17665MK: >\x00< 17666 17667/(?(VERSION=0.0/ 17668Failed: error 179 at offset 14: syntax error or number too big in (?(VERSION condition 17669 17670# Perl has made \K in lookarounds an error. PCRE2 now rejects as well, unless 17671# explicitly authorized. 17672 17673/(?=a\Kb)ab/ 17674Failed: error 199 at offset 10: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) 17675 17676/(?=a\Kb)ab/allow_lookaround_bsk 17677 ab 17678 0: b 17679 17680/(?!a\Kb)ac/ 17681Failed: error 199 at offset 10: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) 17682 17683/(?!a\Kb)ac/allow_lookaround_bsk 17684 ac 17685 0: ac 17686 17687/^abc(?<=b\Kc)d/ 17688Failed: error 199 at offset 14: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) 17689 17690/^abc(?<=b\Kc)d/allow_lookaround_bsk 17691 abcd 17692 0: cd 17693 17694/^abc(?<!b\Kq)d/ 17695Failed: error 199 at offset 14: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) 17696 17697/^abc(?<!b\Kq)d/,allow_lookaround_bsk 17698 abcd 17699 0: abcd 17700 17701# --------- 17702 17703# Tests for zero-length NULL to be treated as an empty string. 17704 17705// 17706 \=null_subject 17707 0: 17708\= Expect error 17709 abc\=null_subject 17710Failed: error -51: NULL argument passed with non-zero length 17711 17712//replace=[20] 17713 abc\=null_replacement 17714 1: abc 17715 \=null_subject 17716 1: 17717 \=null_replacement 17718 1: 17719 17720/X*/g,replace=xy 17721\= Expect error 17722 >X<\=null_replacement 17723Failed: error -51: NULL argument passed with non-zero length 17724 17725/X+/replace=[20] 17726 >XX<\=null_replacement 17727 1: >< 17728 17729# --------- 17730 17731/[Aa]{2}/BI 17732------------------------------------------------------------------ 17733 Bra 17734 /i A{2} 17735 Ket 17736 End 17737------------------------------------------------------------------ 17738Capture group count = 0 17739First code unit = 'A' (caseless) 17740Last code unit = 'A' (caseless) 17741Subject length lower bound = 2 17742 aabcd 17743 0: aa 17744 17745/A{2}/iBI 17746------------------------------------------------------------------ 17747 Bra 17748 /i A{2} 17749 Ket 17750 End 17751------------------------------------------------------------------ 17752Capture group count = 0 17753Options: caseless 17754First code unit = 'A' (caseless) 17755Last code unit = 'A' (caseless) 17756Subject length lower bound = 2 17757 aabcd 17758 0: aa 17759 17760/[Aa]{2,3}/BI 17761------------------------------------------------------------------ 17762 Bra 17763 /i A{2} 17764 /i A?+ 17765 Ket 17766 End 17767------------------------------------------------------------------ 17768Capture group count = 0 17769First code unit = 'A' (caseless) 17770Last code unit = 'A' (caseless) 17771Subject length lower bound = 2 17772 aabcd 17773 0: aa 17774 17775-- 17776 \[X]{-10} 17777** Zero or negative repeat not allowed 17778 17779# Check imposition of maximum by match_data_create(). 17780 17781/abcd/ 17782 abcd\=ovector=65536 17783 0: abcd 17784 17785# Use recurse to test \K and Mark in atomic scope. 17786/(?>this line\s*((?R)|)\K)/ 17787 this line this line this line 17788 0: 17789 1: this line this line 17790 17791/(?>this line\s*((?R)|)(*MARK:A))/ 17792 this line this line this line 17793 0: this line this line this line 17794 1: this line this line 17795 17796# Check use of NULL pattern with zero length. 17797 17798//null_pattern,use_length 17799 abc 17800 0: 17801 17802//null_pattern 17803Failed: error 116 at offset 0: pattern passed as NULL with non-zero length 17804 17805/bad null pattern/null_pattern,use_length 17806Failed: error 116 at offset 0: pattern passed as NULL with non-zero length 17807 17808/bad null pattern/null_pattern 17809Failed: error 116 at offset 0: pattern passed as NULL with non-zero length 17810 17811# -------- Variable length lookbehinds -------- 17812/12345(?<=\d{1,256})X/ 17813Failed: error 200 at offset 5: branch too long in variable-length lookbehind assertion 17814 17815/(?<=(\d{1,256}))X/max_varlookbehind=256 17816 12345XYZ 17817 0: X 17818 1: 12345 17819 17820/12345(?<=a?bc)X/max_varlookbehind=0 17821Failed: error 200 at offset 5: branch too long in variable-length lookbehind assertion 17822 17823/12345(?<=abc)X/max_varlookbehind=0 17824 17825/(?<!( {65054}){9,44965})/ 17826Failed: error 187 at offset 0: lookbehind assertion is too long 17827 17828/(?(?<!|(|a)))/ 17829 aaaa\=get=0 17830 0: 17831 0G (0) 17832 17833/(?(?<!|a?))/ 17834 aaaa\=get=0 17835 0: 17836 0G (0) 17837 17838# -------- 17839 17840/(?<=(()()()()()()()()()()()()()(()()()()(())()()()()(()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(())()()()()(()()()()()()(()()()()()()()()()()()()()()()()()()()()()(())()()()()(()()()()()()()()()()()()()(()()()()()()()()()()()()()(()())))))))))/ 17841 17842/(?<!( {65054}){0,44965})/auto_callout 17843Failed: error 187 at offset 0: lookbehind assertion is too long 17844 17845/A+{,3}/ 17846Failed: error 109 at offset 5: quantifier does not follow a repeatable item 17847 17848/(\g{+1}Z|(A))+/ 17849 BAAZCD 17850 0: AAZ 17851 1: AZ 17852 2: A 17853 ZAAAZAZAZAACD 17854 0: AAAZAZAZAA 17855 1: A 17856 2: A 17857 17858# This doesn't work in Perl (though I think it used to) 17859 17860/^(?=.*(?=(([A-Z]).*(?(1)\1)))(?!.+\2)){26}/i 17861 The quick brown fox jumps over the lazy dog. 17862 0: 17863 1: quick brown fox jumps over the lazy dog. 17864 2: q 17865 Jackdaws love my big sphinx of quartz. 17866 0: 17867 1: Jackdaws love my big sphinx of quartz. 17868 2: J 17869 Pack my box with five dozen liquor jugs. 17870 0: 17871 1: Pack my box with five dozen liquor jugs. 17872 2: P 17873\= Expect no match 17874 The quick brown fox jumps over the lazy cat. 17875No match 17876 Hackdaws love my big sphinx of quartz. 17877No match 17878 Pack my fox with five dozen liquor jugs. 17879No match 17880 17881# These are different to Perl because of the different capturing in repeating 17882# groups. 17883 17884/((foo)|(bar))*/ 17885 foobar 17886 0: foobar 17887 1: bar 17888 2: foo 17889 3: bar 17890 17891/(?:(f)(o)(o)|(b)(a)(r))*/ 17892 foobar 17893 0: foobar 17894 1: f 17895 2: o 17896 3: o 17897 4: b 17898 5: a 17899 6: r 17900 17901/((Z)+|A)*/ 17902 ZABCDEFG 17903 0: ZA 17904 1: A 17905 2: Z 17906 17907/(?:(?P=same)?(?:(?P<same>a)|(?P<same>b))(?P=same))+/g,dupnames 17908 bbbaaabaabb 17909 0: bbbaaaba 17910 1: a 17911 2: b 17912 0: bb 17913 1: <unset> 17914 2: b 17915 17916# -------- 17917 17918/ 17919/anchored, firstline 17920 \x0a 17921 0: \x0a 17922 17923/ 17924/anchored,firstline,no_start_optimize 17925 \x0a 17926 0: \x0a 17927 17928/ 17929/firstline 17930 \x0a 17931 0: \x0a 17932 abc\x0adef 17933 0: \x0a 17934 17935# This test is currently broken in the interpreter 17936# /|a(?0)/endanchored 17937# aaaa 17938 17939/A +/extended 17940 17941/(*ACCEPT)+/B,auto_callout 17942------------------------------------------------------------------ 17943 Bra 17944 Callout 255 0 10 17945 SBra 17946 *ACCEPT 17947 KetRmax 17948 Callout 255 10 0 17949 Ket 17950 End 17951------------------------------------------------------------------ 17952 17953/a\z/ 17954 a 17955 0: a 17956 a\=noteol 17957 0: a 17958 17959# This matches a character that only exists once in the subject, sort of like a 17960# hypothetical "(.)(?<!\1.+)(?!.*\1)". That has unlimited variable length 17961# lookbehind, so is invalid. This pattern doesn't work in Perl 5.38.0. 17962 17963/\G(?:(?=(\1.|)(.))){1,13}?(?!.*\2.*\2)\1\K\2/g 17964 aaabcccdeee 17965 0: b 17966 1: aaa 17967 2: b 17968 0: d 17969 1: ccc 17970 2: d 17971 17972/|(?0)./endanchored 17973 abcd 17974 0: abcd 17975 17976/|a(?0)/endanchored 17977 aaaa 17978 0: aaaa 17979 17980/(?:|(?0).)(?(R)|\z)/ 17981 abcd 17982 0: abcd 17983 17984/a?(?=b(*COMMIT)c|)d/I 17985Capture group count = 0 17986Starting code units: a d 17987Last code unit = 'd' 17988Subject length lower bound = 1 17989 bd 17990 0: d 17991 17992/(?=b(*COMMIT)c|)d/I 17993Capture group count = 0 17994First code unit = 'd' 17995Subject length lower bound = 1 17996 bd 17997 0: d 17998 17999/a?(?=b(*COMMIT)c|)d/I,no_start_optimize 18000Capture group count = 0 18001Options: no_start_optimize 18002 bd 18003No match 18004 18005/(?=b(*COMMIT)c|)d/I,no_start_optimize 18006Capture group count = 0 18007Options: no_start_optimize 18008 bd 18009No match 18010 18011/a?(?=bc|)d/I,auto_callout 18012Capture group count = 0 18013Options: auto_callout 18014Starting code units: a d 18015Last code unit = 'd' 18016Subject length lower bound = 1 18017 bd 18018--->bd 18019 +0 ^ a? 18020 +2 ^ (?= 18021 +5 ^ b 18022 +8 ^ ) 18023 +9 ^ d 18024+10 ^^ End of pattern 18025 0: d 18026 18027/a?(?=bc|)\bd/I 18028Capture group count = 0 18029Max lookbehind = 1 18030Starting code units: a d 18031Last code unit = 'd' 18032Subject length lower bound = 1 18033 bd 18034No match 18035 18036/(?0)/ 18037 abc\=disable_recurseloop_check,match_limit=100 18038Failed: error -47: match limit exceeded 18039 18040/(a(?1)z||(?1)++)$/ 18041 abcd\=disable_recurseloop_check 18042 0: 18043 1: 18044 18045/(((?<=123?456456|ABC)))(?<=\2)../ 18046 ABCDEFG 18047 0: DE 18048 1: 18049 2: 18050 12345645678910 18051 0: 78 18052 1: 18053 2: 18054 18055# This test is crashing Perl 5.38.2. 18056 18057/[^\S\W]{6}/ 18058 .abc def.. 18059No match 18060 18061# End of testinput2 18062Error -70: PCRE2_ERROR_BADDATA (unknown error number) 18063Error -62: bad serialized data 18064Error -2: partial match 18065Error -1: no match 18066Error 0: PCRE2_ERROR_BADDATA (unknown error number) 18067Error 100: no error 18068Error 101: \ at end of pattern 18069Error 191: PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES is not allowed in UTF-16 mode 18070Error 300: PCRE2_ERROR_BADDATA (unknown error number) 18071