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