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