/[pcre]/code/branches/pcre16/testdata/testoutput11
ViewVC logotype

Contents of /code/branches/pcre16/testdata/testoutput11

Parent Directory Parent Directory | Revision Log Revision Log


Revision 642 - (show annotations)
Thu Jul 28 18:59:40 2011 UTC (8 years, 11 months ago) by ph10
Original Path: code/trunk/testdata/testoutput11
File size: 15478 byte(s)
Error occurred while calculating annotation data.
Avoid false positive for infinite recursion by not checking conditionals at 
compile time, but add tests at runtime that also catch infinite mutual 
recursion.
1 /-- These tests are for the Perl >= 5.10 features that PCRE supports. --/
2
3 /\H\h\V\v/
4 X X\x0a
5 0: X X\x0a
6 X\x09X\x0b
7 0: X\x09X\x0b
8 ** Failers
9 No match
10 \xa0 X\x0a
11 No match
12
13 /\H*\h+\V?\v{3,4}/
14 \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
15 0: \x09 \xa0X\x0a\x0b\x0c\x0d
16 \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
17 0: \x09 \xa0\x0a\x0b\x0c\x0d
18 \x09\x20\xa0\x0a\x0b\x0c
19 0: \x09 \xa0\x0a\x0b\x0c
20 ** Failers
21 No match
22 \x09\x20\xa0\x0a\x0b
23 No match
24
25 /\H{3,4}/
26 XY ABCDE
27 0: ABCD
28 XY PQR ST
29 0: PQR
30
31 /.\h{3,4}./
32 XY AB PQRS
33 0: B P
34
35 /\h*X\h?\H+Y\H?Z/
36 >XNNNYZ
37 0: XNNNYZ
38 > X NYQZ
39 0: X NYQZ
40 ** Failers
41 No match
42 >XYZ
43 No match
44 > X NY Z
45 No match
46
47 /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
48 >XY\x0aZ\x0aA\x0bNN\x0c
49 0: XY\x0aZ\x0aA\x0bNN\x0c
50 >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
51 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
52
53 /(foo)\Kbar/
54 foobar
55 0: bar
56 1: foo
57
58 /(foo)(\Kbar|baz)/
59 foobar
60 0: bar
61 1: foo
62 2: bar
63 foobaz
64 0: foobaz
65 1: foo
66 2: baz
67
68 /(foo\Kbar)baz/
69 foobarbaz
70 0: barbaz
71 1: foobar
72
73 /abc\K|def\K/g+
74 Xabcdefghi
75 0:
76 0+ defghi
77 0:
78 0+ ghi
79
80 /ab\Kc|de\Kf/g+
81 Xabcdefghi
82 0: c
83 0+ defghi
84 0: f
85 0+ ghi
86
87 /(?=C)/g+
88 ABCDECBA
89 0:
90 0+ CDECBA
91 0:
92 0+ CBA
93
94 /^abc\K/+
95 abcdef
96 0:
97 0+ def
98 ** Failers
99 No match
100 defabcxyz
101 No match
102
103 /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
104 ababababbbabZXXXX
105 0: ababababbbabZ
106 1: ab
107 2: b
108
109 /(?<A>tom|bon)-\g{A}/
110 tom-tom
111 0: tom-tom
112 1: tom
113 bon-bon
114 0: bon-bon
115 1: bon
116
117 /(^(a|b\g{-1}))/
118 bacxxx
119 No match
120
121 /(?|(abc)|(xyz))\1/
122 abcabc
123 0: abcabc
124 1: abc
125 xyzxyz
126 0: xyzxyz
127 1: xyz
128 ** Failers
129 No match
130 abcxyz
131 No match
132 xyzabc
133 No match
134
135 /(?|(abc)|(xyz))(?1)/
136 abcabc
137 0: abcabc
138 1: abc
139 xyzabc
140 0: xyzabc
141 1: xyz
142 ** Failers
143 No match
144 xyzxyz
145 No match
146
147 /^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/
148 XYabcdY
149 0: XYabcdY
150 1: a
151 2: b
152 3: c
153 4: d
154 5: Y
155
156 /^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/
157 XYabcdY
158 0: XYabcdY
159 1: a
160 2: b
161 3: <unset>
162 4: <unset>
163 5: c
164 6: d
165 7: Y
166
167 /^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/
168 XYabcdY
169 0: XYabcdY
170 1: a
171 2: b
172 3: <unset>
173 4: <unset>
174 5: c
175 6: d
176 7: Y
177
178 /(?'abc'\w+):\k<abc>{2}/
179 a:aaxyz
180 0: a:aa
181 1: a
182 ab:ababxyz
183 0: ab:abab
184 1: ab
185 ** Failers
186 No match
187 a:axyz
188 No match
189 ab:abxyz
190 No match
191
192 /(?'abc'\w+):\g{abc}{2}/
193 a:aaxyz
194 0: a:aa
195 1: a
196 ab:ababxyz
197 0: ab:abab
198 1: ab
199 ** Failers
200 No match
201 a:axyz
202 No match
203 ab:abxyz
204 No match
205
206 /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
207 abd
208 0: abd
209 1: a
210 ce
211 0: ce
212
213 /^(a.)\g-1Z/
214 aXaXZ
215 0: aXaXZ
216 1: aX
217
218 /^(a.)\g{-1}Z/
219 aXaXZ
220 0: aXaXZ
221 1: aX
222
223 /^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
224 abcd
225 0: ab
226
227 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
228 (?(DEFINE)
229 (?<NAME_PAT>[a-z]+)
230 (?<ADDRESS_PAT>\d+)
231 )/x
232 metcalfe 33
233 0: metcalfe 33
234 1: metcalfe
235 2: 33
236
237 /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
238 1.2.3.4
239 0: 1.2.3.4
240 1: <unset>
241 2: .4
242 131.111.10.206
243 0: 131.111.10.206
244 1: <unset>
245 2: .206
246 10.0.0.0
247 0: 10.0.0.0
248 1: <unset>
249 2: .0
250 ** Failers
251 No match
252 10.6
253 No match
254 455.3.4.5
255 No match
256
257 /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
258 1.2.3.4
259 0: 1.2.3.4
260 1: .4
261 131.111.10.206
262 0: 131.111.10.206
263 1: .206
264 10.0.0.0
265 0: 10.0.0.0
266 1: .0
267 ** Failers
268 No match
269 10.6
270 No match
271 455.3.4.5
272 No match
273
274 /^(\w++|\s++)*$/
275 now is the time for all good men to come to the aid of the party
276 0: now is the time for all good men to come to the aid of the party
277 1: party
278 *** Failers
279 No match
280 this is not a line with only words and spaces!
281 No match
282
283 /(\d++)(\w)/
284 12345a
285 0: 12345a
286 1: 12345
287 2: a
288 *** Failers
289 No match
290 12345+
291 No match
292
293 /a++b/
294 aaab
295 0: aaab
296
297 /(a++b)/
298 aaab
299 0: aaab
300 1: aaab
301
302 /(a++)b/
303 aaab
304 0: aaab
305 1: aaa
306
307 /([^()]++|\([^()]*\))+/
308 ((abc(ade)ufh()()x
309 0: abc(ade)ufh()()x
310 1: x
311
312 /\(([^()]++|\([^()]+\))+\)/
313 (abc)
314 0: (abc)
315 1: abc
316 (abc(def)xyz)
317 0: (abc(def)xyz)
318 1: xyz
319 *** Failers
320 No match
321 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
322 No match
323
324 /^([^()]|\((?1)*\))*$/
325 abc
326 0: abc
327 1: c
328 a(b)c
329 0: a(b)c
330 1: c
331 a(b(c))d
332 0: a(b(c))d
333 1: d
334 *** Failers)
335 No match
336 a(b(c)d
337 No match
338
339 /^>abc>([^()]|\((?1)*\))*<xyz<$/
340 >abc>123<xyz<
341 0: >abc>123<xyz<
342 1: 3
343 >abc>1(2)3<xyz<
344 0: >abc>1(2)3<xyz<
345 1: 3
346 >abc>(1(2)3)<xyz<
347 0: >abc>(1(2)3)<xyz<
348 1: (1(2)3)
349
350 /^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
351 1221
352 0: 1221
353 1: 1221
354 2: 1
355 Satanoscillatemymetallicsonatas
356 0: Satanoscillatemymetallicsonatas
357 1: <unset>
358 2: <unset>
359 3: Satanoscillatemymetallicsonatas
360 4: S
361 AmanaplanacanalPanama
362 0: AmanaplanacanalPanama
363 1: <unset>
364 2: <unset>
365 3: AmanaplanacanalPanama
366 4: A
367 AblewasIereIsawElba
368 0: AblewasIereIsawElba
369 1: <unset>
370 2: <unset>
371 3: AblewasIereIsawElba
372 4: A
373 *** Failers
374 No match
375 Thequickbrownfox
376 No match
377
378 /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
379 12
380 0: 12
381 1: 12
382 (((2+2)*-3)-7)
383 0: (((2+2)*-3)-7)
384 1: (((2+2)*-3)-7)
385 2: -
386 -12
387 0: -12
388 1: -12
389 *** Failers
390 No match
391 ((2+2)*-3)-7)
392 No match
393
394 /^(x(y|(?1){2})z)/
395 xyz
396 0: xyz
397 1: xyz
398 2: y
399 xxyzxyzz
400 0: xxyzxyzz
401 1: xxyzxyzz
402 2: xyzxyz
403 *** Failers
404 No match
405 xxyzz
406 No match
407 xxyzxyzxyzz
408 No match
409
410 /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
411 <>
412 0: <>
413 1: <>
414 2: <>
415 <abcd>
416 0: <abcd>
417 1: <abcd>
418 2: <abcd>
419 <abc <123> hij>
420 0: <abc <123> hij>
421 1: <abc <123> hij>
422 2: <abc <123> hij>
423 <abc <def> hij>
424 0: <def>
425 1: <def>
426 2: <def>
427 <abc<>def>
428 0: <abc<>def>
429 1: <abc<>def>
430 2: <abc<>def>
431 <abc<>
432 0: <>
433 1: <>
434 2: <>
435 *** Failers
436 No match
437 <abc
438 No match
439
440 /^a+(*FAIL)/
441 aaaaaa
442 No match
443
444 /a+b?c+(*FAIL)/
445 aaabccc
446 No match
447
448 /a+b?(*PRUNE)c+(*FAIL)/
449 aaabccc
450 No match
451
452 /a+b?(*COMMIT)c+(*FAIL)/
453 aaabccc
454 No match
455
456 /a+b?(*SKIP)c+(*FAIL)/
457 aaabcccaaabccc
458 No match
459
460 /^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
461 aaaxxxxxx
462 0: aaaxxxxxx
463 aaa++++++
464 0: aaa
465 bbbxxxxx
466 0: bbbxxxxx
467 bbb+++++
468 0: bbb
469 cccxxxx
470 0: cccxxxx
471 ccc++++
472 0: ccc
473 dddddddd
474 0: ddd
475
476 /^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
477 aaaxxxxxx
478 0: aaaxxxxxx
479 1: aaaxxxxxx
480 aaa++++++
481 0: aaa
482 1: aaa
483 bbbxxxxx
484 0: bbbxxxxx
485 1: bbbxxxxx
486 bbb+++++
487 0: bbb
488 1: bbb
489 cccxxxx
490 0: cccxxxx
491 1: cccxxxx
492 ccc++++
493 0: ccc
494 1: ccc
495 dddddddd
496 0: ddd
497 1: ddd
498
499 /a+b?(*THEN)c+(*FAIL)/
500 aaabccc
501 No match
502
503 /(A (A|B(*ACCEPT)|C) D)(E)/x
504 AB
505 0: AB
506 1: AB
507 2: B
508 ABX
509 0: AB
510 1: AB
511 2: B
512 AADE
513 0: AADE
514 1: AAD
515 2: A
516 3: E
517 ACDE
518 0: ACDE
519 1: ACD
520 2: C
521 3: E
522 ** Failers
523 No match
524 AD
525 No match
526
527 /^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$/i
528 1221
529 0: 1221
530 1: 1221
531 2: 1
532 Satan, oscillate my metallic sonatas!
533 0: Satan, oscillate my metallic sonatas!
534 1: <unset>
535 2: <unset>
536 3: Satan, oscillate my metallic sonatas
537 4: S
538 A man, a plan, a canal: Panama!
539 0: A man, a plan, a canal: Panama!
540 1: <unset>
541 2: <unset>
542 3: A man, a plan, a canal: Panama
543 4: A
544 Able was I ere I saw Elba.
545 0: Able was I ere I saw Elba.
546 1: <unset>
547 2: <unset>
548 3: Able was I ere I saw Elba
549 4: A
550 *** Failers
551 No match
552 The quick brown fox
553 No match
554
555 /^((.)(?1)\2|.)$/
556 a
557 0: a
558 1: a
559 aba
560 0: aba
561 1: aba
562 2: a
563 aabaa
564 0: aabaa
565 1: aabaa
566 2: a
567 abcdcba
568 0: abcdcba
569 1: abcdcba
570 2: a
571 pqaabaaqp
572 0: pqaabaaqp
573 1: pqaabaaqp
574 2: p
575 ablewasiereisawelba
576 0: ablewasiereisawelba
577 1: ablewasiereisawelba
578 2: a
579 rhubarb
580 No match
581 the quick brown fox
582 No match
583
584 /(a)(?<=b(?1))/
585 baz
586 0: a
587 1: a
588 ** Failers
589 No match
590 caz
591 No match
592
593 /(?<=b(?1))(a)/
594 zbaaz
595 0: a
596 1: a
597 ** Failers
598 No match
599 aaa
600 No match
601
602 /(?<X>a)(?<=b(?&X))/
603 baz
604 0: a
605 1: a
606
607 /^(?|(abc)|(def))\1/
608 abcabc
609 0: abcabc
610 1: abc
611 defdef
612 0: defdef
613 1: def
614 ** Failers
615 No match
616 abcdef
617 No match
618 defabc
619 No match
620
621 /^(?|(abc)|(def))(?1)/
622 abcabc
623 0: abcabc
624 1: abc
625 defabc
626 0: defabc
627 1: def
628 ** Failers
629 No match
630 defdef
631 No match
632 abcdef
633 No match
634
635 /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
636 a\"aaaaa
637 0: a"aaaaa
638 1: "
639 2: <unset>
640 3: "
641 b\"aaaaa
642 0: b"aaaaa
643 1: <unset>
644 2: <unset>
645 3: <unset>
646 4: "
647 5: <unset>
648 6: "
649 ** Failers
650 No match
651 b\"11111
652 No match
653
654 /(?:(?1)|B)(A(*F)|C)/
655 ABCD
656 0: BC
657 1: C
658 CCD
659 0: CC
660 1: C
661 ** Failers
662 No match
663 CAD
664 No match
665
666 /^(?:(?1)|B)(A(*F)|C)/
667 CCD
668 0: CC
669 1: C
670 BCD
671 0: BC
672 1: C
673 ** Failers
674 No match
675 ABCD
676 No match
677 CAD
678 No match
679 BAD
680 No match
681
682 /(?:(?1)|B)(A(*ACCEPT)XX|C)D/
683 AAD
684 0: AA
685 1: A
686 ACD
687 0: ACD
688 1: C
689 BAD
690 0: BA
691 1: A
692 BCD
693 0: BCD
694 1: C
695 BAX
696 0: BA
697 1: A
698 ** Failers
699 No match
700 ACX
701 No match
702 ABC
703 No match
704
705 /(?(DEFINE)(A))B(?1)C/
706 BAC
707 0: BAC
708
709 /(?(DEFINE)((A)\2))B(?1)C/
710 BAAC
711 0: BAAC
712
713 /(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
714 (ab(cd)ef)
715 0: (ab(cd)ef)
716 1: (ab(cd)ef)
717 2: ef
718
719 /^(?!a(*SKIP)b)/
720 ac
721 0:
722
723 /^(?=a(*SKIP)b|ac)/
724 ** Failers
725 No match
726 ac
727 No match
728
729 /^(?=a(*THEN)b|ac)/
730 ac
731 0:
732
733 /^(?=a(*PRUNE)b)/
734 ab
735 0:
736 ** Failers
737 No match
738 ac
739 No match
740
741 /^(?=a(*ACCEPT)b)/
742 ac
743 0:
744
745 /^(?(?!a(*SKIP)b))/
746 ac
747 0:
748
749 /(?>a\Kb)/
750 ab
751 0: b
752
753 /((?>a\Kb))/
754 ab
755 0: b
756 1: ab
757
758 /(a\Kb)/
759 ab
760 0: b
761 1: ab
762
763 /^a\Kcz|ac/
764 ac
765 0: ac
766
767 /(?>a\Kbz|ab)/
768 ab
769 0: ab
770
771 /^(?&t)(?(DEFINE)(?<t>a\Kb))$/
772 ab
773 0: b
774
775 /^([^()]|\((?1)*\))*$/
776 a(b)c
777 0: a(b)c
778 1: c
779 a(b(c)d)e
780 0: a(b(c)d)e
781 1: e
782
783 /(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
784 0
785 0: 0
786 1: 0
787 00
788 0: 00
789 1: 00
790 2: 0
791 0000
792 0: 0000
793 1: 0000
794 2: 0
795
796 /(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
797 0
798 0: 0
799 1: 0
800 2: 0
801 00
802 0: 0
803 1: 0
804 2: 0
805 0000
806 0: 0
807 1: 0
808 2: 0
809
810 /--- This one does fail, as expected, in Perl. It needs the complex item at the
811 end of the pattern. A single letter instead of (B|D) makes it not fail,
812 which I think is a Perl bug. --- /
813
814 /A(*COMMIT)(B|D)/
815 ACABX
816 No match
817
818 /--- Check the use of names for failure ---/
819
820 /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
821 ** Failers
822 No match
823 AC
824 No match, mark = A
825 CB
826 No match, mark = B
827
828 /--- Force no study, otherwise mark is not seen. The studied version is in
829 test 2 because it isn't Perl-compatible. ---/
830
831 /(*MARK:A)(*SKIP:B)(C|X)/KSS
832 C
833 0: C
834 1: C
835 MK: A
836 D
837 No match, mark = A
838
839 /^(A(*THEN:A)B|C(*THEN:B)D)/K
840 ** Failers
841 No match
842 CB
843 No match, mark = B
844
845 /^(?:A(*THEN:A)B|C(*THEN:B)D)/K
846 CB
847 No match, mark = B
848
849 /^(?>A(*THEN:A)B|C(*THEN:B)D)/K
850 CB
851 No match, mark = B
852
853 /--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
854 that we have to have something complicated such as (B|Z) at the end because,
855 for Perl, a simple character somehow causes an unwanted optimization to mess
856 with the handling of backtracking verbs. ---/
857
858 /A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
859 AAAC
860 0: AC
861
862 /--- Test skipping over a non-matching mark. ---/
863
864 /A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
865 AAAC
866 0: AC
867
868 /--- Check shorthand for MARK ---/
869
870 /A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
871 AAAC
872 0: AC
873
874 /--- Don't loop! Force no study, otherwise mark is not seen. ---/
875
876 /(*:A)A+(*SKIP:A)(B|Z)/KSS
877 AAAC
878 No match, mark = A
879
880 /--- This should succeed, as a non-existent skip name disables the skip ---/
881
882 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
883 AAAC
884 0: AC
885
886 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
887 AAAC
888 0: AC
889 MK: B
890
891 /--- We use something more complicated than individual letters here, because
892 that causes different behaviour in Perl. Perhaps it disables some optimization;
893 anyway, the result now matches PCRE in that no tag is passed back for the
894 failures. ---/
895
896 /(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
897 AABC
898 0: AB
899 1: A
900 2: B
901 MK: A
902 XXYZ
903 0: XXY
904 1: <unset>
905 2: <unset>
906 3: X
907 4: X
908 5: Y
909 MK: B
910 ** Failers
911 No match
912 XAQQ
913 No match
914 XAQQXZZ
915 No match
916 AXQQQ
917 No match
918 AXXQQQ
919 No match
920
921 /--- COMMIT at the start of a pattern should act like an anchor. Again,
922 however, we need the complication for Perl. ---/
923
924 /(*COMMIT)(A|P)(B|P)(C|P)/
925 ABCDEFG
926 0: ABC
927 1: A
928 2: B
929 3: C
930 ** Failers
931 No match
932 DEFGABC
933 No match
934
935 /--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
936
937 /(\w+)(?>b(*COMMIT))\w{2}/
938 abbb
939 0: abbb
940 1: a
941
942 /(\w+)b(*COMMIT)\w{2}/
943 abbb
944 No match
945
946 /--- Check opening parens in comment when seeking forward reference. ---/
947
948 /(?&t)(?#()(?(DEFINE)(?<t>a))/
949 bac
950 0: a
951
952 /--- COMMIT should override THEN ---/
953
954 /(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/
955 yes
956 No match
957
958 /(?>(*COMMIT)(yes|no)(*THEN)(*F))?/
959 yes
960 No match
961
962 /^((yes|no)(*THEN)(*F))?/
963 yes
964 0:
965
966 /b?(*SKIP)c/
967 bc
968 0: bc
969 abc
970 0: bc
971
972 /(*SKIP)bc/
973 a
974 No match
975
976 /(*SKIP)b/
977 a
978 No match
979
980 /(?P<abn>(?P=abn)xxx|)+/
981 xxx
982 0:
983 1:
984
985 /(?i:([^b]))(?1)/
986 aa
987 0: aa
988 1: a
989 aA
990 0: aA
991 1: a
992 ** Failers
993 0: **
994 1: *
995 ab
996 No match
997 aB
998 No match
999 Ba
1000 No match
1001 ba
1002 No match
1003
1004 /^(?&t)*+(?(DEFINE)(?<t>a))\w$/
1005 aaaaaaX
1006 0: aaaaaaX
1007 ** Failers
1008 No match
1009 aaaaaa
1010 No match
1011
1012 /^(?&t)*(?(DEFINE)(?<t>a))\w$/
1013 aaaaaaX
1014 0: aaaaaaX
1015 aaaaaa
1016 0: aaaaaa
1017
1018 /^(a)*+(\w)/
1019 aaaaX
1020 0: aaaaX
1021 1: a
1022 2: X
1023 YZ
1024 0: Y
1025 1: <unset>
1026 2: Y
1027 ** Failers
1028 No match
1029 aaaa
1030 No match
1031
1032 /^(?:a)*+(\w)/
1033 aaaaX
1034 0: aaaaX
1035 1: X
1036 YZ
1037 0: Y
1038 1: Y
1039 ** Failers
1040 No match
1041 aaaa
1042 No match
1043
1044 /^(a)++(\w)/
1045 aaaaX
1046 0: aaaaX
1047 1: a
1048 2: X
1049 ** Failers
1050 No match
1051 aaaa
1052 No match
1053 YZ
1054 No match
1055
1056 /^(?:a)++(\w)/
1057 aaaaX
1058 0: aaaaX
1059 1: X
1060 ** Failers
1061 No match
1062 aaaa
1063 No match
1064 YZ
1065 No match
1066
1067 /^(a)?+(\w)/
1068 aaaaX
1069 0: aa
1070 1: a
1071 2: a
1072 YZ
1073 0: Y
1074 1: <unset>
1075 2: Y
1076
1077 /^(?:a)?+(\w)/
1078 aaaaX
1079 0: aa
1080 1: a
1081 YZ
1082 0: Y
1083 1: Y
1084
1085 /^(a){2,}+(\w)/
1086 aaaaX
1087 0: aaaaX
1088 1: a
1089 2: X
1090 ** Failers
1091 No match
1092 aaa
1093 No match
1094 YZ
1095 No match
1096
1097 /^(?:a){2,}+(\w)/
1098 aaaaX
1099 0: aaaaX
1100 1: X
1101 ** Failers
1102 No match
1103 aaa
1104 No match
1105 YZ
1106 No match
1107
1108 /(a|)*(?1)b/
1109 b
1110 0: b
1111 1:
1112 ab
1113 0: ab
1114 1:
1115 aab
1116 0: aab
1117 1:
1118
1119 /(a)++(?1)b/
1120 ** Failers
1121 No match
1122 ab
1123 No match
1124 aab
1125 No match
1126
1127 /(a)*+(?1)b/
1128 ** Failers
1129 No match
1130 ab
1131 No match
1132 aab
1133 No match
1134
1135 /(?1)(?:(b)){0}/
1136 b
1137 0: b
1138
1139 /(foo ( \( ((?:(?> [^()]+ )|(?2))*) \) ) )/x
1140 foo(bar(baz)+baz(bop))
1141 0: foo(bar(baz)+baz(bop))
1142 1: foo(bar(baz)+baz(bop))
1143 2: (bar(baz)+baz(bop))
1144 3: bar(baz)+baz(bop)
1145
1146 /(A (A|B(*ACCEPT)|C) D)(E)/x
1147 AB
1148 0: AB
1149 1: AB
1150 2: B
1151
1152 /\A.*?(?:a|b(*THEN)c)/
1153 ba
1154 0: ba
1155
1156 /\A.*?(?:a|bc)/
1157 ba
1158 0: ba
1159
1160 /\A.*?(a|b(*THEN)c)/
1161 ba
1162 0: ba
1163 1: a
1164
1165 /\A.*?(a|bc)/
1166 ba
1167 0: ba
1168 1: a
1169
1170 /\A.*?(?:a|b(*THEN)c)++/
1171 ba
1172 0: ba
1173
1174 /\A.*?(?:a|bc)++/
1175 ba
1176 0: ba
1177
1178 /\A.*?(a|b(*THEN)c)++/
1179 ba
1180 0: ba
1181 1: a
1182
1183 /\A.*?(a|bc)++/
1184 ba
1185 0: ba
1186 1: a
1187
1188 /\A.*?(?:a|b(*THEN)c|d)/
1189 ba
1190 0: ba
1191
1192 /\A.*?(?:a|bc|d)/
1193 ba
1194 0: ba
1195
1196 /(?:(b))++/
1197 beetle
1198 0: b
1199 1: b
1200
1201 /(?(?=(a(*ACCEPT)z))a)/
1202 a
1203 0: a
1204 1: a
1205
1206 /^(a)(?1)+ab/
1207 aaaab
1208 0: aaaab
1209 1: a
1210
1211 /^(a)(?1)++ab/
1212 aaaab
1213 No match
1214
1215 /^(?=a(*:M))aZ/K
1216 aZbc
1217 0: aZ
1218 MK: M
1219
1220 /^(?!(*:M)b)aZ/K
1221 aZbc
1222 0: aZ
1223
1224 /(?(DEFINE)(a))?b(?1)/
1225 backgammon
1226 0: ba
1227
1228 /^\N+/
1229 abc\ndef
1230 0: abc
1231
1232 /^\N{1,}/
1233 abc\ndef
1234 0: abc
1235
1236 /(?(R)a+|(?R)b)/
1237 aaaabcde
1238 0: aaaab
1239
1240 /(?(R)a+|((?R))b)/
1241 aaaabcde
1242 0: aaaab
1243 1: aaaa
1244
1245 /((?(R)a+|(?1)b))/
1246 aaaabcde
1247 0: aaaab
1248 1: aaaab
1249
1250 /((?(R1)a+|(?1)b))/
1251 aaaabcde
1252 0: aaaab
1253 1: aaaab
1254
1255 /-- End of testinput11 --/

  ViewVC Help
Powered by ViewVC 1.1.5