1# There are two sorts of patterns in this test. A number of them are 2# representative patterns whose lengths and offsets are checked. This is just a 3# doublecheck test to ensure the sizes don't go horribly wrong when something 4# is changed. The operation of these patterns is checked in other tests. 5# 6# This file also contains tests whose output varies with code unit size and/or 7# link size. Unicode support is required for these tests. There are separate 8# output files for each code unit size and link size. 9 10#pattern fullbincode,memory 11 12/((?i)b)/ 13Memory allocation - compiled block : 161 14Memory allocation - code portion : 25 15------------------------------------------------------------------ 16 0 19 Bra 17 5 9 CBra 1 18 12 /i b 19 14 9 Ket 20 19 19 Ket 21 24 End 22------------------------------------------------------------------ 23 24/(?s)(.*X|^B)/ 25Memory allocation - compiled block : 171 26Memory allocation - code portion : 35 27------------------------------------------------------------------ 28 0 29 Bra 29 5 11 CBra 1 30 12 AllAny* 31 14 X 32 16 8 Alt 33 21 ^ 34 22 B 35 24 19 Ket 36 29 29 Ket 37 34 End 38------------------------------------------------------------------ 39 40/(?s:.*X|^B)/ 41Memory allocation - compiled block : 169 42Memory allocation - code portion : 33 43------------------------------------------------------------------ 44 0 27 Bra 45 5 9 Bra 46 10 AllAny* 47 12 X 48 14 8 Alt 49 19 ^ 50 20 B 51 22 17 Ket 52 27 27 Ket 53 32 End 54------------------------------------------------------------------ 55 56/^[[:alnum:]]/ 57Memory allocation - compiled block : 181 58Memory allocation - code portion : 45 59------------------------------------------------------------------ 60 0 39 Bra 61 5 ^ 62 6 [0-9A-Za-z] 63 39 39 Ket 64 44 End 65------------------------------------------------------------------ 66 67/#/Ix 68Memory allocation - compiled block : 147 69Memory allocation - code portion : 11 70------------------------------------------------------------------ 71 0 5 Bra 72 5 5 Ket 73 10 End 74------------------------------------------------------------------ 75Capture group count = 0 76May match empty string 77Options: extended 78Subject length lower bound = 0 79 80/a#/Ix 81Memory allocation - compiled block : 149 82Memory allocation - code portion : 13 83------------------------------------------------------------------ 84 0 7 Bra 85 5 a 86 7 7 Ket 87 12 End 88------------------------------------------------------------------ 89Capture group count = 0 90Options: extended 91First code unit = 'a' 92Subject length lower bound = 1 93 94/x?+/ 95Memory allocation - compiled block : 149 96Memory allocation - code portion : 13 97------------------------------------------------------------------ 98 0 7 Bra 99 5 x?+ 100 7 7 Ket 101 12 End 102------------------------------------------------------------------ 103 104/x++/ 105Memory allocation - compiled block : 149 106Memory allocation - code portion : 13 107------------------------------------------------------------------ 108 0 7 Bra 109 5 x++ 110 7 7 Ket 111 12 End 112------------------------------------------------------------------ 113 114/x{1,3}+/ 115Memory allocation - compiled block : 153 116Memory allocation - code portion : 17 117------------------------------------------------------------------ 118 0 11 Bra 119 5 x 120 7 x{0,2}+ 121 11 11 Ket 122 16 End 123------------------------------------------------------------------ 124 125/(x)*+/ 126Memory allocation - compiled block : 162 127Memory allocation - code portion : 26 128------------------------------------------------------------------ 129 0 20 Bra 130 5 Braposzero 131 6 9 CBraPos 1 132 13 x 133 15 9 KetRpos 134 20 20 Ket 135 25 End 136------------------------------------------------------------------ 137 138/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ 139Memory allocation - compiled block : 280 140Memory allocation - code portion : 144 141------------------------------------------------------------------ 142 0 138 Bra 143 5 ^ 144 6 127 CBra 1 145 13 9 CBra 2 146 20 a+ 147 22 9 Ket 148 27 41 CBra 3 149 34 [ab]+? 150 68 41 Ket 151 73 41 CBra 4 152 80 [bc]+ 153114 41 Ket 154119 9 CBra 5 155126 \w*+ 156128 9 Ket 157133 127 Ket 158138 138 Ket 159143 End 160------------------------------------------------------------------ 161 162"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" 163Memory allocation - compiled block : 966 164Memory allocation - code portion : 830 165------------------------------------------------------------------ 166 0 824 Bra 167 5 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 168823 \b 169824 824 Ket 170829 End 171------------------------------------------------------------------ 172 173"\$\<\.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" 174Memory allocation - compiled block : 956 175Memory allocation - code portion : 820 176------------------------------------------------------------------ 177 0 814 Bra 178 5 $<.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 179813 \b 180814 814 Ket 181819 End 182------------------------------------------------------------------ 183 184/(a(?1)b)/ 185Memory allocation - compiled block : 168 186Memory allocation - code portion : 32 187------------------------------------------------------------------ 188 0 26 Bra 189 5 16 CBra 1 190 12 a 191 14 5 Recurse 192 19 b 193 21 16 Ket 194 26 26 Ket 195 31 End 196------------------------------------------------------------------ 197 198/(a(?1)+b)/ 199Memory allocation - compiled block : 178 200Memory allocation - code portion : 42 201------------------------------------------------------------------ 202 0 36 Bra 203 5 26 CBra 1 204 12 a 205 14 10 SBra 206 19 5 Recurse 207 24 10 KetRmax 208 29 b 209 31 26 Ket 210 36 36 Ket 211 41 End 212------------------------------------------------------------------ 213 214/a(?P<name1>b|c)d(?P<longername2>e)/ 215Memory allocation - compiled block : 214 216Memory allocation - code portion : 50 217------------------------------------------------------------------ 218 0 44 Bra 219 5 a 220 7 9 CBra 1 221 14 b 222 16 7 Alt 223 21 c 224 23 16 Ket 225 28 d 226 30 9 CBra 2 227 37 e 228 39 9 Ket 229 44 44 Ket 230 49 End 231------------------------------------------------------------------ 232 233/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/ 234Memory allocation - compiled block : 213 235Memory allocation - code portion : 65 236------------------------------------------------------------------ 237 0 59 Bra 238 5 35 Bra 239 10 a 240 12 23 CBra 1 241 19 c 242 21 9 CBra 2 243 28 d 244 30 9 Ket 245 35 23 Ket 246 40 35 Ket 247 45 9 CBra 3 248 52 a 249 54 9 Ket 250 59 59 Ket 251 64 End 252------------------------------------------------------------------ 253 254/(?P<a>a)...(?P=a)bbb(?P>a)d/ 255Memory allocation - compiled block : 184 256Memory allocation - code portion : 44 257------------------------------------------------------------------ 258 0 38 Bra 259 5 9 CBra 1 260 12 a 261 14 9 Ket 262 19 Any 263 20 Any 264 21 Any 265 22 \1 266 25 bbb 267 31 5 Recurse 268 36 d 269 38 38 Ket 270 43 End 271------------------------------------------------------------------ 272 273/abc(?C255)de(?C)f/ 274Memory allocation - compiled block : 179 275Memory allocation - code portion : 43 276------------------------------------------------------------------ 277 0 37 Bra 278 5 abc 279 11 Callout 255 10 1 280 21 de 281 25 Callout 0 16 1 282 35 f 283 37 37 Ket 284 42 End 285------------------------------------------------------------------ 286 287/abcde/auto_callout 288Memory allocation - compiled block : 217 289Memory allocation - code portion : 81 290------------------------------------------------------------------ 291 0 75 Bra 292 5 Callout 255 0 1 293 15 a 294 17 Callout 255 1 1 295 27 b 296 29 Callout 255 2 1 297 39 c 298 41 Callout 255 3 1 299 51 d 300 53 Callout 255 4 1 301 63 e 302 65 Callout 255 5 0 303 75 75 Ket 304 80 End 305------------------------------------------------------------------ 306 307/\x{100}/utf 308Memory allocation - compiled block : 150 309Memory allocation - code portion : 14 310------------------------------------------------------------------ 311 0 8 Bra 312 5 \x{100} 313 8 8 Ket 314 13 End 315------------------------------------------------------------------ 316 317/\x{1000}/utf 318Memory allocation - compiled block : 151 319Memory allocation - code portion : 15 320------------------------------------------------------------------ 321 0 9 Bra 322 5 \x{1000} 323 9 9 Ket 324 14 End 325------------------------------------------------------------------ 326 327/\x{10000}/utf 328Memory allocation - compiled block : 152 329Memory allocation - code portion : 16 330------------------------------------------------------------------ 331 0 10 Bra 332 5 \x{10000} 333 10 10 Ket 334 15 End 335------------------------------------------------------------------ 336 337/\x{100000}/utf 338Memory allocation - compiled block : 152 339Memory allocation - code portion : 16 340------------------------------------------------------------------ 341 0 10 Bra 342 5 \x{100000} 343 10 10 Ket 344 15 End 345------------------------------------------------------------------ 346 347/\x{10ffff}/utf 348Memory allocation - compiled block : 152 349Memory allocation - code portion : 16 350------------------------------------------------------------------ 351 0 10 Bra 352 5 \x{10ffff} 353 10 10 Ket 354 15 End 355------------------------------------------------------------------ 356 357/\x{110000}/utf 358Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large 359 360/[\x{ff}]/utf 361Memory allocation - compiled block : 150 362Memory allocation - code portion : 14 363------------------------------------------------------------------ 364 0 8 Bra 365 5 \x{ff} 366 8 8 Ket 367 13 End 368------------------------------------------------------------------ 369 370/[\x{100}]/utf 371Memory allocation - compiled block : 150 372Memory allocation - code portion : 14 373------------------------------------------------------------------ 374 0 8 Bra 375 5 \x{100} 376 8 8 Ket 377 13 End 378------------------------------------------------------------------ 379 380/\x80/utf 381Memory allocation - compiled block : 150 382Memory allocation - code portion : 14 383------------------------------------------------------------------ 384 0 8 Bra 385 5 \x{80} 386 8 8 Ket 387 13 End 388------------------------------------------------------------------ 389 390/\xff/utf 391Memory allocation - compiled block : 150 392Memory allocation - code portion : 14 393------------------------------------------------------------------ 394 0 8 Bra 395 5 \x{ff} 396 8 8 Ket 397 13 End 398------------------------------------------------------------------ 399 400/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf 401Memory allocation - compiled block : 158 402Memory allocation - code portion : 22 403------------------------------------------------------------------ 404 0 16 Bra 405 5 A\x{2262}\x{391}. 406 16 16 Ket 407 21 End 408------------------------------------------------------------------ 409Capture group count = 0 410Options: utf 411First code unit = 'A' 412Last code unit = '.' 413Subject length lower bound = 4 414 415/\x{D55c}\x{ad6d}\x{C5B4}/I,utf 416Memory allocation - compiled block : 159 417Memory allocation - code portion : 23 418------------------------------------------------------------------ 419 0 17 Bra 420 5 \x{d55c}\x{ad6d}\x{c5b4} 421 17 17 Ket 422 22 End 423------------------------------------------------------------------ 424Capture group count = 0 425Options: utf 426First code unit = \xed 427Last code unit = \xb4 428Subject length lower bound = 3 429 430/\x{65e5}\x{672c}\x{8a9e}/I,utf 431Memory allocation - compiled block : 159 432Memory allocation - code portion : 23 433------------------------------------------------------------------ 434 0 17 Bra 435 5 \x{65e5}\x{672c}\x{8a9e} 436 17 17 Ket 437 22 End 438------------------------------------------------------------------ 439Capture group count = 0 440Options: utf 441First code unit = \xe6 442Last code unit = \x9e 443Subject length lower bound = 3 444 445/[\x{100}]/utf 446Memory allocation - compiled block : 150 447Memory allocation - code portion : 14 448------------------------------------------------------------------ 449 0 8 Bra 450 5 \x{100} 451 8 8 Ket 452 13 End 453------------------------------------------------------------------ 454 455/[Z\x{100}]/utf 456Memory allocation - compiled block : 189 457Memory allocation - code portion : 53 458------------------------------------------------------------------ 459 0 47 Bra 460 5 [Z\x{100}] 461 47 47 Ket 462 52 End 463------------------------------------------------------------------ 464 465/^[\x{100}\E-\Q\E\x{150}]/utf 466Memory allocation - compiled block : 160 467Memory allocation - code portion : 24 468------------------------------------------------------------------ 469 0 18 Bra 470 5 ^ 471 6 [\x{100}-\x{150}] 472 18 18 Ket 473 23 End 474------------------------------------------------------------------ 475 476/^[\QĀ\E-\QŐ\E]/utf 477Memory allocation - compiled block : 160 478Memory allocation - code portion : 24 479------------------------------------------------------------------ 480 0 18 Bra 481 5 ^ 482 6 [\x{100}-\x{150}] 483 18 18 Ket 484 23 End 485------------------------------------------------------------------ 486 487/^[\QĀ\E-\QŐ\E/utf 488Failed: error 106 at offset 15: missing terminating ] for character class 489 490/[\p{L}]/ 491Memory allocation - compiled block : 157 492Memory allocation - code portion : 21 493------------------------------------------------------------------ 494 0 15 Bra 495 5 [\p{L}] 496 15 15 Ket 497 20 End 498------------------------------------------------------------------ 499 500/[\p{^L}]/ 501Memory allocation - compiled block : 157 502Memory allocation - code portion : 21 503------------------------------------------------------------------ 504 0 15 Bra 505 5 [\P{L}] 506 15 15 Ket 507 20 End 508------------------------------------------------------------------ 509 510/[\P{L}]/ 511Memory allocation - compiled block : 157 512Memory allocation - code portion : 21 513------------------------------------------------------------------ 514 0 15 Bra 515 5 [\P{L}] 516 15 15 Ket 517 20 End 518------------------------------------------------------------------ 519 520/[\P{^L}]/ 521Memory allocation - compiled block : 157 522Memory allocation - code portion : 21 523------------------------------------------------------------------ 524 0 15 Bra 525 5 [\p{L}] 526 15 15 Ket 527 20 End 528------------------------------------------------------------------ 529 530/[abc\p{L}\x{0660}]/utf 531Memory allocation - compiled block : 192 532Memory allocation - code portion : 56 533------------------------------------------------------------------ 534 0 50 Bra 535 5 [a-c\p{L}\x{660}] 536 50 50 Ket 537 55 End 538------------------------------------------------------------------ 539 540/[\p{Nd}]/utf 541Memory allocation - compiled block : 157 542Memory allocation - code portion : 21 543------------------------------------------------------------------ 544 0 15 Bra 545 5 [\p{Nd}] 546 15 15 Ket 547 20 End 548------------------------------------------------------------------ 549 550/[\p{Nd}+-]+/utf 551Memory allocation - compiled block : 190 552Memory allocation - code portion : 54 553------------------------------------------------------------------ 554 0 48 Bra 555 5 [+\-\p{Nd}]++ 556 48 48 Ket 557 53 End 558------------------------------------------------------------------ 559 560/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf 561Memory allocation - compiled block : 165 562Memory allocation - code portion : 29 563------------------------------------------------------------------ 564 0 23 Bra 565 5 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} 566 23 23 Ket 567 28 End 568------------------------------------------------------------------ 569 570/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf 571Memory allocation - compiled block : 165 572Memory allocation - code portion : 29 573------------------------------------------------------------------ 574 0 23 Bra 575 5 A\x{391}\x{10427}\x{ff3a}\x{1fb0} 576 23 23 Ket 577 28 End 578------------------------------------------------------------------ 579 580/[\x{105}-\x{109}]/i,utf 581Memory allocation - compiled block : 159 582Memory allocation - code portion : 23 583------------------------------------------------------------------ 584 0 17 Bra 585 5 [\x{104}-\x{109}] 586 17 17 Ket 587 22 End 588------------------------------------------------------------------ 589 590/( ( (?(1)0|) )* )/x 591Memory allocation - compiled block : 192 592Memory allocation - code portion : 56 593------------------------------------------------------------------ 594 0 50 Bra 595 5 40 CBra 1 596 12 Brazero 597 13 27 SCBra 2 598 20 10 Cond 599 25 1 Cond ref 600 28 0 601 30 5 Alt 602 35 15 Ket 603 40 27 KetRmax 604 45 40 Ket 605 50 50 Ket 606 55 End 607------------------------------------------------------------------ 608 609/( (?(1)0|)* )/x 610Memory allocation - compiled block : 180 611Memory allocation - code portion : 44 612------------------------------------------------------------------ 613 0 38 Bra 614 5 28 CBra 1 615 12 Brazero 616 13 10 SCond 617 18 1 Cond ref 618 21 0 619 23 5 Alt 620 28 15 KetRmax 621 33 28 Ket 622 38 38 Ket 623 43 End 624------------------------------------------------------------------ 625 626/[a]/ 627Memory allocation - compiled block : 149 628Memory allocation - code portion : 13 629------------------------------------------------------------------ 630 0 7 Bra 631 5 a 632 7 7 Ket 633 12 End 634------------------------------------------------------------------ 635 636/[a]/utf 637Memory allocation - compiled block : 149 638Memory allocation - code portion : 13 639------------------------------------------------------------------ 640 0 7 Bra 641 5 a 642 7 7 Ket 643 12 End 644------------------------------------------------------------------ 645 646/[\xaa]/ 647Memory allocation - compiled block : 149 648Memory allocation - code portion : 13 649------------------------------------------------------------------ 650 0 7 Bra 651 5 \x{aa} 652 7 7 Ket 653 12 End 654------------------------------------------------------------------ 655 656/[\xaa]/utf 657Memory allocation - compiled block : 150 658Memory allocation - code portion : 14 659------------------------------------------------------------------ 660 0 8 Bra 661 5 \x{aa} 662 8 8 Ket 663 13 End 664------------------------------------------------------------------ 665 666/[^a]/ 667Memory allocation - compiled block : 149 668Memory allocation - code portion : 13 669------------------------------------------------------------------ 670 0 7 Bra 671 5 [^a] 672 7 7 Ket 673 12 End 674------------------------------------------------------------------ 675 676/[^a]/utf 677Memory allocation - compiled block : 149 678Memory allocation - code portion : 13 679------------------------------------------------------------------ 680 0 7 Bra 681 5 [^a] 682 7 7 Ket 683 12 End 684------------------------------------------------------------------ 685 686/[^\xaa]/ 687Memory allocation - compiled block : 149 688Memory allocation - code portion : 13 689------------------------------------------------------------------ 690 0 7 Bra 691 5 [^\x{aa}] 692 7 7 Ket 693 12 End 694------------------------------------------------------------------ 695 696/[^\xaa]/utf 697Memory allocation - compiled block : 150 698Memory allocation - code portion : 14 699------------------------------------------------------------------ 700 0 8 Bra 701 5 [^\x{aa}] 702 8 8 Ket 703 13 End 704------------------------------------------------------------------ 705 706#pattern -memory 707 708/[^\d]/utf,ucp 709------------------------------------------------------------------ 710 0 15 Bra 711 5 [^\p{Nd}] 712 15 15 Ket 713 20 End 714------------------------------------------------------------------ 715 716/[[:^alpha:][:^cntrl:]]+/utf,ucp 717------------------------------------------------------------------ 718 0 19 Bra 719 5 [\P{L}\P{Cc}]++ 720 19 19 Ket 721 24 End 722------------------------------------------------------------------ 723 724/[[:^cntrl:][:^alpha:]]+/utf,ucp 725------------------------------------------------------------------ 726 0 19 Bra 727 5 [\P{Cc}\P{L}]++ 728 19 19 Ket 729 24 End 730------------------------------------------------------------------ 731 732/[[:alpha:]]+/utf,ucp 733------------------------------------------------------------------ 734 0 16 Bra 735 5 [\p{L}]++ 736 16 16 Ket 737 21 End 738------------------------------------------------------------------ 739 740/[[:^alpha:]\S]+/utf,ucp 741------------------------------------------------------------------ 742 0 19 Bra 743 5 [\P{L}\P{Xsp}]++ 744 19 19 Ket 745 24 End 746------------------------------------------------------------------ 747 748/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/ 749------------------------------------------------------------------ 750 0 93 Bra 751 5 abc 752 11 9 CBra 1 753 18 d 754 20 7 Alt 755 25 e 756 27 16 Ket 757 32 *THEN 758 33 x 759 35 16 CBra 2 760 42 123 761 48 *THEN 762 49 4 763 51 37 Alt 764 56 567 765 62 9 CBra 3 766 69 b 767 71 7 Alt 768 76 q 769 78 16 Ket 770 83 *THEN 771 84 xx 772 88 53 Ket 773 93 93 Ket 774 98 End 775------------------------------------------------------------------ 776 777/(((a\2)|(a*)\g<-1>))*a?/ 778------------------------------------------------------------------ 779 0 73 Bra 780 5 Brazero 781 6 60 SCBra 1 782 13 24 CBra 2 783 20 12 CBra 3 784 27 a 785 29 \2 786 32 12 Ket 787 37 24 Alt 788 42 9 CBra 4 789 49 a* 790 51 9 Ket 791 56 42 Recurse 792 61 48 Ket 793 66 60 KetRmax 794 71 a?+ 795 73 73 Ket 796 78 End 797------------------------------------------------------------------ 798 799/((?+1)(\1))/ 800------------------------------------------------------------------ 801 0 37 Bra 802 5 27 CBra 1 803 12 17 Recurse 804 17 10 CBra 2 805 24 \1 806 27 10 Ket 807 32 27 Ket 808 37 37 Ket 809 42 End 810------------------------------------------------------------------ 811 812"(?1)(?#?'){2}(a)" 813------------------------------------------------------------------ 814 0 29 Bra 815 5 15 Recurse 816 10 15 Recurse 817 15 9 CBra 1 818 22 a 819 24 9 Ket 820 29 29 Ket 821 34 End 822------------------------------------------------------------------ 823 824/.((?2)(?R)|\1|$)()/ 825------------------------------------------------------------------ 826 0 54 Bra 827 5 Any 828 6 17 CBra 1 829 13 42 Recurse 830 18 0 Recurse 831 23 8 Alt 832 28 \1 833 31 6 Alt 834 36 $ 835 37 31 Ket 836 42 7 CBra 2 837 49 7 Ket 838 54 54 Ket 839 59 End 840------------------------------------------------------------------ 841 842/.((?3)(?R)()(?2)|\1|$)()/ 843------------------------------------------------------------------ 844 0 71 Bra 845 5 Any 846 6 34 CBra 1 847 13 59 Recurse 848 18 0 Recurse 849 23 7 CBra 2 850 30 7 Ket 851 35 23 Recurse 852 40 8 Alt 853 45 \1 854 48 6 Alt 855 53 $ 856 54 48 Ket 857 59 7 CBra 3 858 66 7 Ket 859 71 71 Ket 860 76 End 861------------------------------------------------------------------ 862 863/(?1)()((((((\1++))\x85)+)|))/ 864------------------------------------------------------------------ 865 0 115 Bra 866 5 10 Recurse 867 10 7 CBra 1 868 17 7 Ket 869 22 88 CBra 2 870 29 71 CBra 3 871 36 59 CBra 4 872 43 47 CBra 5 873 50 33 CBra 6 874 57 21 CBra 7 875 64 9 Once 876 69 \1+ 877 73 9 Ket 878 78 21 Ket 879 83 33 Ket 880 88 \x{85} 881 90 47 KetRmax 882 95 59 Ket 883100 5 Alt 884105 76 Ket 885110 88 Ket 886115 115 Ket 887120 End 888------------------------------------------------------------------ 889 890# Check the absolute limit on nesting (?| etc. This varies with code unit 891# width because the workspace is a different number of bytes. It will fail 892# with link size 2 in 8-bit and 16-bit but not in 32-bit. 893 894/(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?| 895))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) 896/parens_nest_limit=1000,-fullbincode 897 898# Use "expand" to create some very long patterns with nested parentheses, in 899# order to test workspace overflow. Again, this varies with code unit width, 900# and even when it fails in two modes, the error offset differs. It also varies 901# with link size - hence multiple tests with different values. 902 903/(?'ABC'\[[bar](]{792}*THEN:\[A]{255}\[)]{793}/expand,-fullbincode,parens_nest_limit=1000 904 905/(?'ABC'\[[bar](]{793}*THEN:\[A]{255}\[)]{794}/expand,-fullbincode,parens_nest_limit=1000 906 907/(?'ABC'\[[bar](]{1793}*THEN:\[A]{255}\[)]{1794}/expand,-fullbincode,parens_nest_limit=2000 908Failed: error 186 at offset 12820: regular expression is too complicated 909 910/(?(1)(?1)){8,}+()/debug 911------------------------------------------------------------------ 912 0 181 Bra 913 5 159 Once 914 10 13 Cond 915 15 1 Cond ref 916 18 169 Recurse 917 23 13 Ket 918 28 13 Cond 919 33 1 Cond ref 920 36 169 Recurse 921 41 13 Ket 922 46 13 Cond 923 51 1 Cond ref 924 54 169 Recurse 925 59 13 Ket 926 64 13 Cond 927 69 1 Cond ref 928 72 169 Recurse 929 77 13 Ket 930 82 13 Cond 931 87 1 Cond ref 932 90 169 Recurse 933 95 13 Ket 934100 13 Cond 935105 1 Cond ref 936108 169 Recurse 937113 13 Ket 938118 13 Cond 939123 1 Cond ref 940126 169 Recurse 941131 13 Ket 942136 23 SBraPos 943141 13 SCond 944146 1 Cond ref 945149 169 Recurse 946154 13 Ket 947159 23 KetRpos 948164 159 Ket 949169 7 CBra 1 950176 7 Ket 951181 181 Ket 952186 End 953------------------------------------------------------------------ 954Capture group count = 1 955Max back reference = 1 956May match empty string 957Subject length lower bound = 0 958 abcd 959 0: 960 1: 961 962/(?(1)|a(?1)b){2,}+()/debug 963------------------------------------------------------------------ 964 0 91 Bra 965 5 69 Once 966 10 8 Cond 967 15 1 Cond ref 968 18 14 Alt 969 23 a 970 25 79 Recurse 971 30 b 972 32 22 Ket 973 37 32 SBraPos 974 42 8 SCond 975 47 1 Cond ref 976 50 14 Alt 977 55 a 978 57 79 Recurse 979 62 b 980 64 22 Ket 981 69 32 KetRpos 982 74 69 Ket 983 79 7 CBra 1 984 86 7 Ket 985 91 91 Ket 986 96 End 987------------------------------------------------------------------ 988Capture group count = 1 989Max back reference = 1 990May match empty string 991Subject length lower bound = 0 992 abcde 993No match 994 995/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug 996------------------------------------------------------------------ 997 0 327 Bra 998 5 102 CBra 1 999 12 5 Recurse 1000 17 219 Recurse 1001 22 231 Recurse 1002 27 243 Recurse 1003 32 255 Recurse 1004 37 267 Recurse 1005 42 279 Recurse 1006 47 291 Recurse 1007 52 303 Recurse 1008 57 303 Recurse 1009 62 291 Recurse 1010 67 279 Recurse 1011 72 267 Recurse 1012 77 255 Recurse 1013 82 243 Recurse 1014 87 231 Recurse 1015 92 219 Recurse 1016 97 5 Recurse 1017102 0 Recurse 1018107 102 Ket 1019112 102 SCBra 1 1020119 5 Recurse 1021124 219 Recurse 1022129 231 Recurse 1023134 243 Recurse 1024139 255 Recurse 1025144 267 Recurse 1026149 279 Recurse 1027154 291 Recurse 1028159 303 Recurse 1029164 303 Recurse 1030169 291 Recurse 1031174 279 Recurse 1032179 267 Recurse 1033184 255 Recurse 1034189 243 Recurse 1035194 231 Recurse 1036199 219 Recurse 1037204 5 Recurse 1038209 0 Recurse 1039214 102 KetRmax 1040219 7 CBra 2 1041226 7 Ket 1042231 7 CBra 3 1043238 7 Ket 1044243 7 CBra 4 1045250 7 Ket 1046255 7 CBra 5 1047262 7 Ket 1048267 7 CBra 6 1049274 7 Ket 1050279 7 CBra 7 1051286 7 Ket 1052291 7 CBra 8 1053298 7 Ket 1054303 7 CBra 9 1055310 7 Ket 1056315 7 CBra 10 1057322 7 Ket 1058327 327 Ket 1059332 End 1060------------------------------------------------------------------ 1061Capture group count = 10 1062May match empty string 1063Subject length lower bound = 0 1064 1065/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ 1066Failed: error 114 at offset 509: missing closing parenthesis 1067 1068/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))/-fullbincode 1069 1070#pattern -fullbincode 1071 1072/\[()]{65535}/expand 1073 1074# End of testinput8 1075