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 : 153 14Memory allocation - code portion : 17 15------------------------------------------------------------------ 16 0 13 Bra 17 3 7 CBra 1 18 8 /i b 19 10 7 Ket 20 13 13 Ket 21 16 End 22------------------------------------------------------------------ 23 24/(?s)(.*X|^B)/ 25Memory allocation - compiled block : 161 26Memory allocation - code portion : 25 27------------------------------------------------------------------ 28 0 21 Bra 29 3 9 CBra 1 30 8 AllAny* 31 10 X 32 12 6 Alt 33 15 ^ 34 16 B 35 18 15 Ket 36 21 21 Ket 37 24 End 38------------------------------------------------------------------ 39 40/(?s:.*X|^B)/ 41Memory allocation - compiled block : 159 42Memory allocation - code portion : 23 43------------------------------------------------------------------ 44 0 19 Bra 45 3 7 Bra 46 6 AllAny* 47 8 X 48 10 6 Alt 49 13 ^ 50 14 B 51 16 13 Ket 52 19 19 Ket 53 22 End 54------------------------------------------------------------------ 55 56/^[[:alnum:]]/ 57Memory allocation - compiled block : 177 58Memory allocation - code portion : 41 59------------------------------------------------------------------ 60 0 37 Bra 61 3 ^ 62 4 [0-9A-Za-z] 63 37 37 Ket 64 40 End 65------------------------------------------------------------------ 66 67/#/Ix 68Memory allocation - compiled block : 143 69Memory allocation - code portion : 7 70------------------------------------------------------------------ 71 0 3 Bra 72 3 3 Ket 73 6 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 : 145 82Memory allocation - code portion : 9 83------------------------------------------------------------------ 84 0 5 Bra 85 3 a 86 5 5 Ket 87 8 End 88------------------------------------------------------------------ 89Capture group count = 0 90Options: extended 91First code unit = 'a' 92Subject length lower bound = 1 93 94/x?+/ 95Memory allocation - compiled block : 145 96Memory allocation - code portion : 9 97------------------------------------------------------------------ 98 0 5 Bra 99 3 x?+ 100 5 5 Ket 101 8 End 102------------------------------------------------------------------ 103 104/x++/ 105Memory allocation - compiled block : 145 106Memory allocation - code portion : 9 107------------------------------------------------------------------ 108 0 5 Bra 109 3 x++ 110 5 5 Ket 111 8 End 112------------------------------------------------------------------ 113 114/x{1,3}+/ 115Memory allocation - compiled block : 149 116Memory allocation - code portion : 13 117------------------------------------------------------------------ 118 0 9 Bra 119 3 x 120 5 x{0,2}+ 121 9 9 Ket 122 12 End 123------------------------------------------------------------------ 124 125/(x)*+/ 126Memory allocation - compiled block : 154 127Memory allocation - code portion : 18 128------------------------------------------------------------------ 129 0 14 Bra 130 3 Braposzero 131 4 7 CBraPos 1 132 9 x 133 11 7 KetRpos 134 14 14 Ket 135 17 End 136------------------------------------------------------------------ 137 138/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ 139Memory allocation - compiled block : 256 140Memory allocation - code portion : 120 141------------------------------------------------------------------ 142 0 116 Bra 143 3 ^ 144 4 109 CBra 1 145 9 7 CBra 2 146 14 a+ 147 16 7 Ket 148 19 39 CBra 3 149 24 [ab]+? 150 58 39 Ket 151 61 39 CBra 4 152 66 [bc]+ 153100 39 Ket 154103 7 CBra 5 155108 \w*+ 156110 7 Ket 157113 109 Ket 158116 116 Ket 159119 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 : 962 164Memory allocation - code portion : 826 165------------------------------------------------------------------ 166 0 822 Bra 167 3 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 168821 \b 169822 822 Ket 170825 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 : 952 175Memory allocation - code portion : 816 176------------------------------------------------------------------ 177 0 812 Bra 178 3 $<.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 179811 \b 180812 812 Ket 181815 End 182------------------------------------------------------------------ 183 184/(a(?1)b)/ 185Memory allocation - compiled block : 158 186Memory allocation - code portion : 22 187------------------------------------------------------------------ 188 0 18 Bra 189 3 12 CBra 1 190 8 a 191 10 3 Recurse 192 13 b 193 15 12 Ket 194 18 18 Ket 195 21 End 196------------------------------------------------------------------ 197 198/(a(?1)+b)/ 199Memory allocation - compiled block : 164 200Memory allocation - code portion : 28 201------------------------------------------------------------------ 202 0 24 Bra 203 3 18 CBra 1 204 8 a 205 10 6 SBra 206 13 3 Recurse 207 16 6 KetRmax 208 19 b 209 21 18 Ket 210 24 24 Ket 211 27 End 212------------------------------------------------------------------ 213 214/a(?P<name1>b|c)d(?P<longername2>e)/ 215Memory allocation - compiled block : 200 216Memory allocation - code portion : 36 217------------------------------------------------------------------ 218 0 32 Bra 219 3 a 220 5 7 CBra 1 221 10 b 222 12 5 Alt 223 15 c 224 17 12 Ket 225 20 d 226 22 7 CBra 2 227 27 e 228 29 7 Ket 229 32 32 Ket 230 35 End 231------------------------------------------------------------------ 232 233/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/ 234Memory allocation - compiled block : 193 235Memory allocation - code portion : 45 236------------------------------------------------------------------ 237 0 41 Bra 238 3 25 Bra 239 6 a 240 8 17 CBra 1 241 13 c 242 15 7 CBra 2 243 20 d 244 22 7 Ket 245 25 17 Ket 246 28 25 Ket 247 31 7 CBra 3 248 36 a 249 38 7 Ket 250 41 41 Ket 251 44 End 252------------------------------------------------------------------ 253 254/(?P<a>a)...(?P=a)bbb(?P>a)d/ 255Memory allocation - compiled block : 174 256Memory allocation - code portion : 34 257------------------------------------------------------------------ 258 0 30 Bra 259 3 7 CBra 1 260 8 a 261 10 7 Ket 262 13 Any 263 14 Any 264 15 Any 265 16 \1 266 19 bbb 267 25 3 Recurse 268 28 d 269 30 30 Ket 270 33 End 271------------------------------------------------------------------ 272 273/abc(?C255)de(?C)f/ 274Memory allocation - compiled block : 167 275Memory allocation - code portion : 31 276------------------------------------------------------------------ 277 0 27 Bra 278 3 abc 279 9 Callout 255 10 1 280 15 de 281 19 Callout 0 16 1 282 25 f 283 27 27 Ket 284 30 End 285------------------------------------------------------------------ 286 287/abcde/auto_callout 288Memory allocation - compiled block : 189 289Memory allocation - code portion : 53 290------------------------------------------------------------------ 291 0 49 Bra 292 3 Callout 255 0 1 293 9 a 294 11 Callout 255 1 1 295 17 b 296 19 Callout 255 2 1 297 25 c 298 27 Callout 255 3 1 299 33 d 300 35 Callout 255 4 1 301 41 e 302 43 Callout 255 5 0 303 49 49 Ket 304 52 End 305------------------------------------------------------------------ 306 307/\x{100}/utf 308Memory allocation - compiled block : 146 309Memory allocation - code portion : 10 310------------------------------------------------------------------ 311 0 6 Bra 312 3 \x{100} 313 6 6 Ket 314 9 End 315------------------------------------------------------------------ 316 317/\x{1000}/utf 318Memory allocation - compiled block : 147 319Memory allocation - code portion : 11 320------------------------------------------------------------------ 321 0 7 Bra 322 3 \x{1000} 323 7 7 Ket 324 10 End 325------------------------------------------------------------------ 326 327/\x{10000}/utf 328Memory allocation - compiled block : 148 329Memory allocation - code portion : 12 330------------------------------------------------------------------ 331 0 8 Bra 332 3 \x{10000} 333 8 8 Ket 334 11 End 335------------------------------------------------------------------ 336 337/\x{100000}/utf 338Memory allocation - compiled block : 148 339Memory allocation - code portion : 12 340------------------------------------------------------------------ 341 0 8 Bra 342 3 \x{100000} 343 8 8 Ket 344 11 End 345------------------------------------------------------------------ 346 347/\x{10ffff}/utf 348Memory allocation - compiled block : 148 349Memory allocation - code portion : 12 350------------------------------------------------------------------ 351 0 8 Bra 352 3 \x{10ffff} 353 8 8 Ket 354 11 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 : 146 362Memory allocation - code portion : 10 363------------------------------------------------------------------ 364 0 6 Bra 365 3 \x{ff} 366 6 6 Ket 367 9 End 368------------------------------------------------------------------ 369 370/[\x{100}]/utf 371Memory allocation - compiled block : 146 372Memory allocation - code portion : 10 373------------------------------------------------------------------ 374 0 6 Bra 375 3 \x{100} 376 6 6 Ket 377 9 End 378------------------------------------------------------------------ 379 380/\x80/utf 381Memory allocation - compiled block : 146 382Memory allocation - code portion : 10 383------------------------------------------------------------------ 384 0 6 Bra 385 3 \x{80} 386 6 6 Ket 387 9 End 388------------------------------------------------------------------ 389 390/\xff/utf 391Memory allocation - compiled block : 146 392Memory allocation - code portion : 10 393------------------------------------------------------------------ 394 0 6 Bra 395 3 \x{ff} 396 6 6 Ket 397 9 End 398------------------------------------------------------------------ 399 400/\x{0041}\x{2262}\x{0391}\x{002e}/I,utf 401Memory allocation - compiled block : 154 402Memory allocation - code portion : 18 403------------------------------------------------------------------ 404 0 14 Bra 405 3 A\x{2262}\x{391}. 406 14 14 Ket 407 17 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 : 155 417Memory allocation - code portion : 19 418------------------------------------------------------------------ 419 0 15 Bra 420 3 \x{d55c}\x{ad6d}\x{c5b4} 421 15 15 Ket 422 18 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 : 155 432Memory allocation - code portion : 19 433------------------------------------------------------------------ 434 0 15 Bra 435 3 \x{65e5}\x{672c}\x{8a9e} 436 15 15 Ket 437 18 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 : 146 447Memory allocation - code portion : 10 448------------------------------------------------------------------ 449 0 6 Bra 450 3 \x{100} 451 6 6 Ket 452 9 End 453------------------------------------------------------------------ 454 455/[Z\x{100}]/utf 456Memory allocation - compiled block : 183 457Memory allocation - code portion : 47 458------------------------------------------------------------------ 459 0 43 Bra 460 3 [Z\x{100}] 461 43 43 Ket 462 46 End 463------------------------------------------------------------------ 464 465/^[\x{100}\E-\Q\E\x{150}]/utf 466Memory allocation - compiled block : 154 467Memory allocation - code portion : 18 468------------------------------------------------------------------ 469 0 14 Bra 470 3 ^ 471 4 [\x{100}-\x{150}] 472 14 14 Ket 473 17 End 474------------------------------------------------------------------ 475 476/^[\QĀ\E-\QŐ\E]/utf 477Memory allocation - compiled block : 154 478Memory allocation - code portion : 18 479------------------------------------------------------------------ 480 0 14 Bra 481 3 ^ 482 4 [\x{100}-\x{150}] 483 14 14 Ket 484 17 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 : 151 492Memory allocation - code portion : 15 493------------------------------------------------------------------ 494 0 11 Bra 495 3 [\p{L}] 496 11 11 Ket 497 14 End 498------------------------------------------------------------------ 499 500/[\p{^L}]/ 501Memory allocation - compiled block : 151 502Memory allocation - code portion : 15 503------------------------------------------------------------------ 504 0 11 Bra 505 3 [\P{L}] 506 11 11 Ket 507 14 End 508------------------------------------------------------------------ 509 510/[\P{L}]/ 511Memory allocation - compiled block : 151 512Memory allocation - code portion : 15 513------------------------------------------------------------------ 514 0 11 Bra 515 3 [\P{L}] 516 11 11 Ket 517 14 End 518------------------------------------------------------------------ 519 520/[\P{^L}]/ 521Memory allocation - compiled block : 151 522Memory allocation - code portion : 15 523------------------------------------------------------------------ 524 0 11 Bra 525 3 [\p{L}] 526 11 11 Ket 527 14 End 528------------------------------------------------------------------ 529 530/[abc\p{L}\x{0660}]/utf 531Memory allocation - compiled block : 186 532Memory allocation - code portion : 50 533------------------------------------------------------------------ 534 0 46 Bra 535 3 [a-c\p{L}\x{660}] 536 46 46 Ket 537 49 End 538------------------------------------------------------------------ 539 540/[\p{Nd}]/utf 541Memory allocation - compiled block : 151 542Memory allocation - code portion : 15 543------------------------------------------------------------------ 544 0 11 Bra 545 3 [\p{Nd}] 546 11 11 Ket 547 14 End 548------------------------------------------------------------------ 549 550/[\p{Nd}+-]+/utf 551Memory allocation - compiled block : 184 552Memory allocation - code portion : 48 553------------------------------------------------------------------ 554 0 44 Bra 555 3 [+\-\p{Nd}]++ 556 44 44 Ket 557 47 End 558------------------------------------------------------------------ 559 560/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf 561Memory allocation - compiled block : 161 562Memory allocation - code portion : 25 563------------------------------------------------------------------ 564 0 21 Bra 565 3 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} 566 21 21 Ket 567 24 End 568------------------------------------------------------------------ 569 570/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf 571Memory allocation - compiled block : 161 572Memory allocation - code portion : 25 573------------------------------------------------------------------ 574 0 21 Bra 575 3 A\x{391}\x{10427}\x{ff3a}\x{1fb0} 576 21 21 Ket 577 24 End 578------------------------------------------------------------------ 579 580/[\x{105}-\x{109}]/i,utf 581Memory allocation - compiled block : 153 582Memory allocation - code portion : 17 583------------------------------------------------------------------ 584 0 13 Bra 585 3 [\x{104}-\x{109}] 586 13 13 Ket 587 16 End 588------------------------------------------------------------------ 589 590/( ( (?(1)0|) )* )/x 591Memory allocation - compiled block : 174 592Memory allocation - code portion : 38 593------------------------------------------------------------------ 594 0 34 Bra 595 3 28 CBra 1 596 8 Brazero 597 9 19 SCBra 2 598 14 8 Cond 599 17 1 Cond ref 600 20 0 601 22 3 Alt 602 25 11 Ket 603 28 19 KetRmax 604 31 28 Ket 605 34 34 Ket 606 37 End 607------------------------------------------------------------------ 608 609/( (?(1)0|)* )/x 610Memory allocation - compiled block : 166 611Memory allocation - code portion : 30 612------------------------------------------------------------------ 613 0 26 Bra 614 3 20 CBra 1 615 8 Brazero 616 9 8 SCond 617 12 1 Cond ref 618 15 0 619 17 3 Alt 620 20 11 KetRmax 621 23 20 Ket 622 26 26 Ket 623 29 End 624------------------------------------------------------------------ 625 626/[a]/ 627Memory allocation - compiled block : 145 628Memory allocation - code portion : 9 629------------------------------------------------------------------ 630 0 5 Bra 631 3 a 632 5 5 Ket 633 8 End 634------------------------------------------------------------------ 635 636/[a]/utf 637Memory allocation - compiled block : 145 638Memory allocation - code portion : 9 639------------------------------------------------------------------ 640 0 5 Bra 641 3 a 642 5 5 Ket 643 8 End 644------------------------------------------------------------------ 645 646/[\xaa]/ 647Memory allocation - compiled block : 145 648Memory allocation - code portion : 9 649------------------------------------------------------------------ 650 0 5 Bra 651 3 \x{aa} 652 5 5 Ket 653 8 End 654------------------------------------------------------------------ 655 656/[\xaa]/utf 657Memory allocation - compiled block : 146 658Memory allocation - code portion : 10 659------------------------------------------------------------------ 660 0 6 Bra 661 3 \x{aa} 662 6 6 Ket 663 9 End 664------------------------------------------------------------------ 665 666/[^a]/ 667Memory allocation - compiled block : 145 668Memory allocation - code portion : 9 669------------------------------------------------------------------ 670 0 5 Bra 671 3 [^a] 672 5 5 Ket 673 8 End 674------------------------------------------------------------------ 675 676/[^a]/utf 677Memory allocation - compiled block : 145 678Memory allocation - code portion : 9 679------------------------------------------------------------------ 680 0 5 Bra 681 3 [^a] 682 5 5 Ket 683 8 End 684------------------------------------------------------------------ 685 686/[^\xaa]/ 687Memory allocation - compiled block : 145 688Memory allocation - code portion : 9 689------------------------------------------------------------------ 690 0 5 Bra 691 3 [^\x{aa}] 692 5 5 Ket 693 8 End 694------------------------------------------------------------------ 695 696/[^\xaa]/utf 697Memory allocation - compiled block : 146 698Memory allocation - code portion : 10 699------------------------------------------------------------------ 700 0 6 Bra 701 3 [^\x{aa}] 702 6 6 Ket 703 9 End 704------------------------------------------------------------------ 705 706#pattern -memory 707 708/[^\d]/utf,ucp 709------------------------------------------------------------------ 710 0 11 Bra 711 3 [^\p{Nd}] 712 11 11 Ket 713 14 End 714------------------------------------------------------------------ 715 716/[[:^alpha:][:^cntrl:]]+/utf,ucp 717------------------------------------------------------------------ 718 0 15 Bra 719 3 [\P{L}\P{Cc}]++ 720 15 15 Ket 721 18 End 722------------------------------------------------------------------ 723 724/[[:^cntrl:][:^alpha:]]+/utf,ucp 725------------------------------------------------------------------ 726 0 15 Bra 727 3 [\P{Cc}\P{L}]++ 728 15 15 Ket 729 18 End 730------------------------------------------------------------------ 731 732/[[:alpha:]]+/utf,ucp 733------------------------------------------------------------------ 734 0 12 Bra 735 3 [\p{L}]++ 736 12 12 Ket 737 15 End 738------------------------------------------------------------------ 739 740/[[:^alpha:]\S]+/utf,ucp 741------------------------------------------------------------------ 742 0 15 Bra 743 3 [\P{L}\P{Xsp}]++ 744 15 15 Ket 745 18 End 746------------------------------------------------------------------ 747 748/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/ 749------------------------------------------------------------------ 750 0 73 Bra 751 3 abc 752 9 7 CBra 1 753 14 d 754 16 5 Alt 755 19 e 756 21 12 Ket 757 24 *THEN 758 25 x 759 27 14 CBra 2 760 32 123 761 38 *THEN 762 39 4 763 41 29 Alt 764 44 567 765 50 7 CBra 3 766 55 b 767 57 5 Alt 768 60 q 769 62 12 Ket 770 65 *THEN 771 66 xx 772 70 43 Ket 773 73 73 Ket 774 76 End 775------------------------------------------------------------------ 776 777/(((a\2)|(a*)\g<-1>))*a?/ 778------------------------------------------------------------------ 779 0 51 Bra 780 3 Brazero 781 4 42 SCBra 1 782 9 18 CBra 2 783 14 10 CBra 3 784 19 a 785 21 \2 786 24 10 Ket 787 27 16 Alt 788 30 7 CBra 4 789 35 a* 790 37 7 Ket 791 40 30 Recurse 792 43 34 Ket 793 46 42 KetRmax 794 49 a?+ 795 51 51 Ket 796 54 End 797------------------------------------------------------------------ 798 799/((?+1)(\1))/ 800------------------------------------------------------------------ 801 0 25 Bra 802 3 19 CBra 1 803 8 11 Recurse 804 11 8 CBra 2 805 16 \1 806 19 8 Ket 807 22 19 Ket 808 25 25 Ket 809 28 End 810------------------------------------------------------------------ 811 812"(?1)(?#?'){2}(a)" 813------------------------------------------------------------------ 814 0 19 Bra 815 3 9 Recurse 816 6 9 Recurse 817 9 7 CBra 1 818 14 a 819 16 7 Ket 820 19 19 Ket 821 22 End 822------------------------------------------------------------------ 823 824/.((?2)(?R)|\1|$)()/ 825------------------------------------------------------------------ 826 0 36 Bra 827 3 Any 828 4 11 CBra 1 829 9 28 Recurse 830 12 0 Recurse 831 15 6 Alt 832 18 \1 833 21 4 Alt 834 24 $ 835 25 21 Ket 836 28 5 CBra 2 837 33 5 Ket 838 36 36 Ket 839 39 End 840------------------------------------------------------------------ 841 842/.((?3)(?R)()(?2)|\1|$)()/ 843------------------------------------------------------------------ 844 0 47 Bra 845 3 Any 846 4 22 CBra 1 847 9 39 Recurse 848 12 0 Recurse 849 15 5 CBra 2 850 20 5 Ket 851 23 15 Recurse 852 26 6 Alt 853 29 \1 854 32 4 Alt 855 35 $ 856 36 32 Ket 857 39 5 CBra 3 858 44 5 Ket 859 47 47 Ket 860 50 End 861------------------------------------------------------------------ 862 863/(?1)()((((((\1++))\x85)+)|))/ 864------------------------------------------------------------------ 865 0 77 Bra 866 3 6 Recurse 867 6 5 CBra 1 868 11 5 Ket 869 14 60 CBra 2 870 19 49 CBra 3 871 24 41 CBra 4 872 29 33 CBra 5 873 34 23 CBra 6 874 39 15 CBra 7 875 44 7 Once 876 47 \1+ 877 51 7 Ket 878 54 15 Ket 879 57 23 Ket 880 60 \x{85} 881 62 33 KetRmax 882 65 41 Ket 883 68 3 Alt 884 71 52 Ket 885 74 60 Ket 886 77 77 Ket 887 80 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 897Failed: error 184 at offset 1129: (?| and/or (?J: or (?x: parentheses are too deeply nested 898 899# Use "expand" to create some very long patterns with nested parentheses, in 900# order to test workspace overflow. Again, this varies with code unit width, 901# and even when it fails in two modes, the error offset differs. It also varies 902# with link size - hence multiple tests with different values. 903 904/(?'ABC'\[[bar](]{792}*THEN:\[A]{255}\[)]{793}/expand,-fullbincode,parens_nest_limit=1000 905 906/(?'ABC'\[[bar](]{793}*THEN:\[A]{255}\[)]{794}/expand,-fullbincode,parens_nest_limit=1000 907 908/(?'ABC'\[[bar](]{1793}*THEN:\[A]{255}\[)]{1794}/expand,-fullbincode,parens_nest_limit=2000 909Failed: error 186 at offset 12820: regular expression is too complicated 910 911/(?(1)(?1)){8,}+()/debug 912------------------------------------------------------------------ 913 0 119 Bra 914 3 105 Once 915 6 9 Cond 916 9 1 Cond ref 917 12 111 Recurse 918 15 9 Ket 919 18 9 Cond 920 21 1 Cond ref 921 24 111 Recurse 922 27 9 Ket 923 30 9 Cond 924 33 1 Cond ref 925 36 111 Recurse 926 39 9 Ket 927 42 9 Cond 928 45 1 Cond ref 929 48 111 Recurse 930 51 9 Ket 931 54 9 Cond 932 57 1 Cond ref 933 60 111 Recurse 934 63 9 Ket 935 66 9 Cond 936 69 1 Cond ref 937 72 111 Recurse 938 75 9 Ket 939 78 9 Cond 940 81 1 Cond ref 941 84 111 Recurse 942 87 9 Ket 943 90 15 SBraPos 944 93 9 SCond 945 96 1 Cond ref 946 99 111 Recurse 947102 9 Ket 948105 15 KetRpos 949108 105 Ket 950111 5 CBra 1 951116 5 Ket 952119 119 Ket 953122 End 954------------------------------------------------------------------ 955Capture group count = 1 956Max back reference = 1 957May match empty string 958Subject length lower bound = 0 959 abcd 960 0: 961 1: 962 963/(?(1)|a(?1)b){2,}+()/debug 964------------------------------------------------------------------ 965 0 61 Bra 966 3 47 Once 967 6 6 Cond 968 9 1 Cond ref 969 12 10 Alt 970 15 a 971 17 53 Recurse 972 20 b 973 22 16 Ket 974 25 22 SBraPos 975 28 6 SCond 976 31 1 Cond ref 977 34 10 Alt 978 37 a 979 39 53 Recurse 980 42 b 981 44 16 Ket 982 47 22 KetRpos 983 50 47 Ket 984 53 5 CBra 1 985 58 5 Ket 986 61 61 Ket 987 64 End 988------------------------------------------------------------------ 989Capture group count = 1 990Max back reference = 1 991May match empty string 992Subject length lower bound = 0 993 abcde 994No match 995 996/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug 997------------------------------------------------------------------ 998 0 205 Bra 999 3 62 CBra 1 1000 8 3 Recurse 1001 11 133 Recurse 1002 14 141 Recurse 1003 17 149 Recurse 1004 20 157 Recurse 1005 23 165 Recurse 1006 26 173 Recurse 1007 29 181 Recurse 1008 32 189 Recurse 1009 35 189 Recurse 1010 38 181 Recurse 1011 41 173 Recurse 1012 44 165 Recurse 1013 47 157 Recurse 1014 50 149 Recurse 1015 53 141 Recurse 1016 56 133 Recurse 1017 59 3 Recurse 1018 62 0 Recurse 1019 65 62 Ket 1020 68 62 SCBra 1 1021 73 3 Recurse 1022 76 133 Recurse 1023 79 141 Recurse 1024 82 149 Recurse 1025 85 157 Recurse 1026 88 165 Recurse 1027 91 173 Recurse 1028 94 181 Recurse 1029 97 189 Recurse 1030100 189 Recurse 1031103 181 Recurse 1032106 173 Recurse 1033109 165 Recurse 1034112 157 Recurse 1035115 149 Recurse 1036118 141 Recurse 1037121 133 Recurse 1038124 3 Recurse 1039127 0 Recurse 1040130 62 KetRmax 1041133 5 CBra 2 1042138 5 Ket 1043141 5 CBra 3 1044146 5 Ket 1045149 5 CBra 4 1046154 5 Ket 1047157 5 CBra 5 1048162 5 Ket 1049165 5 CBra 6 1050170 5 Ket 1051173 5 CBra 7 1052178 5 Ket 1053181 5 CBra 8 1054186 5 Ket 1055189 5 CBra 9 1056194 5 Ket 1057197 5 CBra 10 1058202 5 Ket 1059205 205 Ket 1060208 End 1061------------------------------------------------------------------ 1062Capture group count = 10 1063May match empty string 1064Subject length lower bound = 0 1065 1066/([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)/ 1067Failed: error 114 at offset 509: missing closing parenthesis 1068 1069/([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 1070 1071#pattern -fullbincode 1072 1073/\[()]{65535}/expand 1074Failed: error 120 at offset 131070: regular expression is too large 1075 1076# End of testinput8 1077