/[pcre]/code/trunk/testdata/testoutput2
ViewVC logotype

Contents of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 77 - (hide annotations) (download)
Sat Feb 24 21:40:45 2007 UTC (7 years, 8 months ago) by nigel
File size: 117464 byte(s)
Load pcre-6.0 into code/trunk.

1 nigel 77 PCRE version 6.0 07-Jun-2005
2 nigel 41
3     /(a)b|/
4 nigel 43 Capturing subpattern count = 1
5 nigel 41 No options
6     No first char
7 nigel 43 No need char
8 nigel 41
9     /abc/
10 nigel 43 Capturing subpattern count = 0
11 nigel 41 No options
12     First char = 'a'
13 nigel 43 Need char = 'c'
14 nigel 41 abc
15     0: abc
16     defabc
17     0: abc
18     \Aabc
19     0: abc
20     *** Failers
21     No match
22     \Adefabc
23     No match
24     ABC
25     No match
26    
27     /^abc/
28 nigel 43 Capturing subpattern count = 0
29 nigel 41 Options: anchored
30     No first char
31 nigel 65 No need char
32 nigel 41 abc
33     0: abc
34     \Aabc
35     0: abc
36     *** Failers
37     No match
38     defabc
39     No match
40     \Adefabc
41     No match
42    
43     /a+bc/
44 nigel 43 Capturing subpattern count = 0
45 nigel 75 Partial matching not supported
46 nigel 41 No options
47     First char = 'a'
48 nigel 43 Need char = 'c'
49 nigel 41
50     /a*bc/
51 nigel 43 Capturing subpattern count = 0
52 nigel 75 Partial matching not supported
53 nigel 41 No options
54     No first char
55 nigel 43 Need char = 'c'
56 nigel 41
57     /a{3}bc/
58 nigel 43 Capturing subpattern count = 0
59 nigel 75 Partial matching not supported
60 nigel 41 No options
61     First char = 'a'
62 nigel 43 Need char = 'c'
63 nigel 41
64     /(abc|a+z)/
65 nigel 43 Capturing subpattern count = 1
66 nigel 75 Partial matching not supported
67 nigel 41 No options
68     First char = 'a'
69 nigel 43 No need char
70 nigel 41
71     /^abc$/
72 nigel 43 Capturing subpattern count = 0
73 nigel 41 Options: anchored
74     No first char
75 nigel 65 No need char
76 nigel 41 abc
77     0: abc
78     *** Failers
79     No match
80     def\nabc
81     No match
82    
83     /ab\gdef/X
84     Failed: unrecognized character follows \ at offset 3
85    
86     /(?X)ab\gdef/X
87     Failed: unrecognized character follows \ at offset 7
88    
89     /x{5,4}/
90     Failed: numbers out of order in {} quantifier at offset 5
91    
92     /z{65536}/
93     Failed: number too big in {} quantifier at offset 7
94    
95     /[abcd/
96     Failed: missing terminating ] for character class at offset 5
97    
98 nigel 63 /(?X)[\B]/
99     Failed: invalid escape sequence in character class at offset 6
100 nigel 41
101     /[z-a]/
102     Failed: range out of order in character class at offset 3
103    
104     /^*/
105     Failed: nothing to repeat at offset 1
106    
107     /(abc/
108     Failed: missing ) at offset 4
109    
110     /(?# abc/
111     Failed: missing ) after comment at offset 7
112    
113     /(?z)abc/
114     Failed: unrecognized character after (? at offset 2
115    
116     /.*b/
117 nigel 43 Capturing subpattern count = 0
118 nigel 75 Partial matching not supported
119 nigel 41 No options
120     First char at start or follows \n
121 nigel 43 Need char = 'b'
122 nigel 41
123     /.*?b/
124 nigel 43 Capturing subpattern count = 0
125 nigel 75 Partial matching not supported
126 nigel 41 No options
127     First char at start or follows \n
128 nigel 43 Need char = 'b'
129 nigel 41
130     /cat|dog|elephant/
131 nigel 43 Capturing subpattern count = 0
132 nigel 41 No options
133     No first char
134 nigel 43 No need char
135 nigel 41 this sentence eventually mentions a cat
136     0: cat
137     this sentences rambles on and on for a while and then reaches elephant
138     0: elephant
139    
140     /cat|dog|elephant/S
141 nigel 43 Capturing subpattern count = 0
142 nigel 41 No options
143     No first char
144 nigel 43 No need char
145 nigel 75 Starting byte set: c d e
146 nigel 41 this sentence eventually mentions a cat
147     0: cat
148     this sentences rambles on and on for a while and then reaches elephant
149     0: elephant
150    
151     /cat|dog|elephant/iS
152 nigel 43 Capturing subpattern count = 0
153 nigel 41 Options: caseless
154     No first char
155 nigel 43 No need char
156 nigel 75 Starting byte set: C D E c d e
157 nigel 41 this sentence eventually mentions a CAT cat
158     0: CAT
159     this sentences rambles on and on for a while to elephant ElePhant
160     0: elephant
161    
162     /a|[bcd]/S
163 nigel 43 Capturing subpattern count = 0
164 nigel 41 No options
165     No first char
166 nigel 43 No need char
167 nigel 75 Starting byte set: a b c d
168 nigel 41
169     /(a|[^\dZ])/S
170 nigel 43 Capturing subpattern count = 1
171 nigel 41 No options
172     No first char
173 nigel 43 No need char
174 nigel 75 Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
175 nigel 41 \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
176     \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
177     ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y [ \ ] ^ _ ` a b c d
178     e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \x80 \x81 \x82 \x83
179     \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92
180     \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1
181     \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0
182     \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf
183     \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce
184     \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd
185     \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec
186     \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb
187     \xfc \xfd \xfe \xff
188    
189     /(a|b)*[\s]/S
190 nigel 43 Capturing subpattern count = 1
191 nigel 41 No options
192     No first char
193 nigel 43 No need char
194 nigel 75 Starting byte set: \x09 \x0a \x0c \x0d \x20 a b
195 nigel 41
196     /(ab\2)/
197 nigel 63 Failed: reference to non-existent subpattern at offset 6
198 nigel 41
199     /{4,5}abc/
200     Failed: nothing to repeat at offset 4
201    
202     /(a)(b)(c)\2/
203 nigel 43 Capturing subpattern count = 3
204     Max back reference = 2
205 nigel 41 No options
206     First char = 'a'
207 nigel 43 Need char = 'c'
208 nigel 41 abcb
209     0: abcb
210     1: a
211     2: b
212     3: c
213     \O0abcb
214     Matched, but too many substrings
215     \O3abcb
216     Matched, but too many substrings
217     0: abcb
218     \O6abcb
219     Matched, but too many substrings
220     0: abcb
221     1: a
222     \O9abcb
223     Matched, but too many substrings
224     0: abcb
225     1: a
226     2: b
227     \O12abcb
228     0: abcb
229     1: a
230     2: b
231     3: c
232    
233     /(a)bc|(a)(b)\2/
234 nigel 43 Capturing subpattern count = 3
235     Max back reference = 2
236 nigel 41 No options
237     First char = 'a'
238 nigel 43 No need char
239 nigel 41 abc
240     0: abc
241     1: a
242     \O0abc
243     Matched, but too many substrings
244     \O3abc
245     Matched, but too many substrings
246     0: abc
247     \O6abc
248     0: abc
249     1: a
250     aba
251     0: aba
252     1: <unset>
253     2: a
254     3: b
255     \O0aba
256     Matched, but too many substrings
257     \O3aba
258     Matched, but too many substrings
259     0: aba
260     \O6aba
261     Matched, but too many substrings
262     0: aba
263     1: <unset>
264     \O9aba
265     Matched, but too many substrings
266     0: aba
267     1: <unset>
268     2: a
269     \O12aba
270     0: aba
271     1: <unset>
272     2: a
273     3: b
274    
275     /abc$/E
276 nigel 43 Capturing subpattern count = 0
277 nigel 41 Options: dollar_endonly
278     First char = 'a'
279 nigel 43 Need char = 'c'
280 nigel 41 abc
281     0: abc
282     *** Failers
283     No match
284     abc\n
285     No match
286     abc\ndef
287     No match
288    
289     /(a)(b)(c)(d)(e)\6/
290 nigel 63 Failed: reference to non-existent subpattern at offset 17
291 nigel 41
292     /the quick brown fox/
293 nigel 43 Capturing subpattern count = 0
294 nigel 41 No options
295     First char = 't'
296 nigel 43 Need char = 'x'
297 nigel 41 the quick brown fox
298     0: the quick brown fox
299     this is a line with the quick brown fox
300     0: the quick brown fox
301    
302     /the quick brown fox/A
303 nigel 43 Capturing subpattern count = 0
304 nigel 41 Options: anchored
305     No first char
306 nigel 65 No need char
307 nigel 41 the quick brown fox
308     0: the quick brown fox
309     *** Failers
310     No match
311     this is a line with the quick brown fox
312     No match
313    
314     /ab(?z)cd/
315     Failed: unrecognized character after (? at offset 4
316    
317     /^abc|def/
318 nigel 43 Capturing subpattern count = 0
319 nigel 41 No options
320     No first char
321 nigel 43 No need char
322 nigel 41 abcdef
323     0: abc
324     abcdef\B
325     0: def
326    
327     /.*((abc)$|(def))/
328 nigel 43 Capturing subpattern count = 3
329 nigel 75 Partial matching not supported
330 nigel 41 No options
331     First char at start or follows \n
332 nigel 43 No need char
333 nigel 41 defabc
334     0: defabc
335     1: abc
336     2: abc
337     \Zdefabc
338     0: def
339     1: def
340     2: <unset>
341     3: def
342    
343     /abc/P
344     abc
345     0: abc
346     *** Failers
347     No match: POSIX code 17: match failed
348    
349     /^abc|def/P
350     abcdef
351     0: abc
352     abcdef\B
353     0: def
354    
355     /.*((abc)$|(def))/P
356     defabc
357     0: defabc
358     1: abc
359     2: abc
360     \Zdefabc
361     0: def
362     1: def
363     3: def
364    
365     /the quick brown fox/P
366     the quick brown fox
367     0: the quick brown fox
368     *** Failers
369     No match: POSIX code 17: match failed
370     The Quick Brown Fox
371     No match: POSIX code 17: match failed
372    
373     /the quick brown fox/Pi
374     the quick brown fox
375     0: the quick brown fox
376     The Quick Brown Fox
377     0: The Quick Brown Fox
378    
379     /abc.def/P
380     *** Failers
381     No match: POSIX code 17: match failed
382     abc\ndef
383     No match: POSIX code 17: match failed
384    
385     /abc$/P
386     abc
387     0: abc
388     abc\n
389     0: abc
390    
391     /(abc)\2/P
392     Failed: POSIX code 15: bad back reference at offset 7
393    
394     /(abc\1)/P
395     abc
396     No match: POSIX code 17: match failed
397    
398     /)/
399     Failed: unmatched parentheses at offset 0
400    
401     /a[]b/
402     Failed: missing terminating ] for character class at offset 4
403    
404     /[^aeiou ]{3,}/
405 nigel 43 Capturing subpattern count = 0
406 nigel 75 Partial matching not supported
407 nigel 41 No options
408     No first char
409 nigel 43 No need char
410 nigel 41 co-processors, and for
411     0: -pr
412    
413     /<.*>/
414 nigel 43 Capturing subpattern count = 0
415 nigel 75 Partial matching not supported
416 nigel 41 No options
417     First char = '<'
418 nigel 43 Need char = '>'
419 nigel 41 abc<def>ghi<klm>nop
420     0: <def>ghi<klm>
421    
422     /<.*?>/
423 nigel 43 Capturing subpattern count = 0
424 nigel 75 Partial matching not supported
425 nigel 41 No options
426     First char = '<'
427 nigel 43 Need char = '>'
428 nigel 41 abc<def>ghi<klm>nop
429     0: <def>
430    
431     /<.*>/U
432 nigel 43 Capturing subpattern count = 0
433 nigel 75 Partial matching not supported
434 nigel 41 Options: ungreedy
435     First char = '<'
436 nigel 43 Need char = '>'
437 nigel 41 abc<def>ghi<klm>nop
438     0: <def>
439    
440 nigel 63 /(?U)<.*>/
441 nigel 43 Capturing subpattern count = 0
442 nigel 75 Partial matching not supported
443 nigel 41 Options: ungreedy
444     First char = '<'
445 nigel 43 Need char = '>'
446 nigel 41 abc<def>ghi<klm>nop
447     0: <def>
448    
449     /<.*?>/U
450 nigel 43 Capturing subpattern count = 0
451 nigel 75 Partial matching not supported
452 nigel 41 Options: ungreedy
453     First char = '<'
454 nigel 43 Need char = '>'
455 nigel 41 abc<def>ghi<klm>nop
456     0: <def>ghi<klm>
457    
458     /={3,}/U
459 nigel 43 Capturing subpattern count = 0
460 nigel 75 Partial matching not supported
461 nigel 41 Options: ungreedy
462     First char = '='
463 nigel 43 Need char = '='
464 nigel 41 abc========def
465     0: ===
466    
467     /(?U)={3,}?/
468 nigel 43 Capturing subpattern count = 0
469 nigel 75 Partial matching not supported
470 nigel 41 Options: ungreedy
471     First char = '='
472 nigel 43 Need char = '='
473 nigel 41 abc========def
474     0: ========
475    
476     /(?<!bar|cattle)foo/
477 nigel 43 Capturing subpattern count = 0
478 nigel 41 No options
479     First char = 'f'
480 nigel 43 Need char = 'o'
481 nigel 41 foo
482     0: foo
483     catfoo
484     0: foo
485     *** Failers
486     No match
487     the barfoo
488     No match
489     and cattlefoo
490     No match
491    
492     /(?<=a+)b/
493     Failed: lookbehind assertion is not fixed length at offset 6
494    
495     /(?<=aaa|b{0,3})b/
496     Failed: lookbehind assertion is not fixed length at offset 14
497    
498     /(?<!(foo)a\1)bar/
499     Failed: lookbehind assertion is not fixed length at offset 12
500    
501     /(?i)abc/
502 nigel 43 Capturing subpattern count = 0
503 nigel 41 Options: caseless
504 nigel 63 First char = 'a' (caseless)
505     Need char = 'c' (caseless)
506 nigel 41
507     /(a|(?m)a)/
508 nigel 43 Capturing subpattern count = 1
509 nigel 41 No options
510     First char = 'a'
511 nigel 43 No need char
512 nigel 41
513     /(?i)^1234/
514 nigel 43 Capturing subpattern count = 0
515 nigel 41 Options: anchored caseless
516     No first char
517 nigel 65 No need char
518 nigel 41
519     /(^b|(?i)^d)/
520 nigel 43 Capturing subpattern count = 1
521 nigel 41 Options: anchored
522     Case state changes
523     No first char
524 nigel 43 No need char
525 nigel 41
526     /(?s).*/
527 nigel 43 Capturing subpattern count = 0
528 nigel 75 Partial matching not supported
529 nigel 41 Options: anchored dotall
530     No first char
531 nigel 43 No need char
532 nigel 41
533     /[abcd]/S
534 nigel 43 Capturing subpattern count = 0
535 nigel 41 No options
536     No first char
537 nigel 43 No need char
538 nigel 75 Starting byte set: a b c d
539 nigel 41
540     /(?i)[abcd]/S
541 nigel 43 Capturing subpattern count = 0
542 nigel 41 Options: caseless
543     No first char
544 nigel 43 No need char
545 nigel 75 Starting byte set: A B C D a b c d
546 nigel 41
547     /(?m)[xy]|(b|c)/S
548 nigel 43 Capturing subpattern count = 1
549 nigel 41 Options: multiline
550     No first char
551 nigel 43 No need char
552 nigel 75 Starting byte set: b c x y
553 nigel 41
554     /(^a|^b)/m
555 nigel 43 Capturing subpattern count = 1
556 nigel 41 Options: multiline
557     First char at start or follows \n
558 nigel 43 No need char
559 nigel 41
560     /(?i)(^a|^b)/m
561 nigel 43 Capturing subpattern count = 1
562 nigel 41 Options: caseless multiline
563     First char at start or follows \n
564 nigel 43 No need char
565 nigel 41
566     /(a)(?(1)a|b|c)/
567     Failed: conditional group contains more than two branches at offset 13
568    
569     /(?(?=a)a|b|c)/
570     Failed: conditional group contains more than two branches at offset 12
571    
572     /(?(1a)/
573     Failed: malformed number after (?( at offset 4
574    
575     /(?(?i))/
576     Failed: assertion expected after (?( at offset 3
577    
578     /(?(abc))/
579     Failed: assertion expected after (?( at offset 3
580    
581     /(?(?<ab))/
582 nigel 63 Failed: unrecognized character after (?< at offset 5
583 nigel 41
584     /((?s)blah)\s+\1/
585 nigel 43 Capturing subpattern count = 1
586     Max back reference = 1
587 nigel 75 Partial matching not supported
588 nigel 41 No options
589     First char = 'b'
590 nigel 43 Need char = 'h'
591 nigel 41
592     /((?i)blah)\s+\1/
593 nigel 43 Capturing subpattern count = 1
594     Max back reference = 1
595 nigel 75 Partial matching not supported
596 nigel 41 No options
597     Case state changes
598 nigel 63 First char = 'b' (caseless)
599     Need char = 'h' (caseless)
600 nigel 41
601     /((?i)b)/DS
602     ------------------------------------------------------------------
603 nigel 75 0 15 Bra 0
604     3 7 Bra 1
605 nigel 41 6 01 Opt
606 nigel 75 8 NC b
607     10 7 Ket
608     13 00 Opt
609     15 15 Ket
610     18 End
611 nigel 41 ------------------------------------------------------------------
612 nigel 43 Capturing subpattern count = 1
613 nigel 41 No options
614     Case state changes
615 nigel 63 First char = 'b' (caseless)
616     No need char
617     Study returned NULL
618 nigel 41
619     /(a*b|(?i:c*(?-i)d))/S
620 nigel 43 Capturing subpattern count = 1
621 nigel 75 Partial matching not supported
622 nigel 41 No options
623     Case state changes
624     No first char
625 nigel 43 No need char
626 nigel 75 Starting byte set: C a b c d
627 nigel 41
628     /a$/
629 nigel 43 Capturing subpattern count = 0
630 nigel 41 No options
631     First char = 'a'
632 nigel 43 No need char
633 nigel 41 a
634     0: a
635     a\n
636     0: a
637     *** Failers
638     No match
639     \Za
640     No match
641     \Za\n
642     No match
643    
644     /a$/m
645 nigel 43 Capturing subpattern count = 0
646 nigel 41 Options: multiline
647     First char = 'a'
648 nigel 43 No need char
649 nigel 41 a
650     0: a
651     a\n
652     0: a
653     \Za\n
654     0: a
655     *** Failers
656     No match
657     \Za
658     No match
659    
660     /\Aabc/m
661 nigel 43 Capturing subpattern count = 0
662 nigel 41 Options: anchored multiline
663     No first char
664 nigel 65 No need char
665 nigel 41
666     /^abc/m
667 nigel 43 Capturing subpattern count = 0
668 nigel 41 Options: multiline
669     First char at start or follows \n
670 nigel 43 Need char = 'c'
671 nigel 41
672     /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
673 nigel 43 Capturing subpattern count = 5
674 nigel 75 Partial matching not supported
675 nigel 41 Options: anchored
676     No first char
677 nigel 65 No need char
678 nigel 41 aaaaabbbbbcccccdef
679     0: aaaaabbbbbcccccdef
680     1: aaaaabbbbbcccccdef
681     2: aaaaa
682     3: b
683     4: bbbbccccc
684     5: def
685    
686     /(?<=foo)[ab]/S
687 nigel 43 Capturing subpattern count = 0
688 nigel 41 No options
689     No first char
690 nigel 43 No need char
691 nigel 75 Starting byte set: a b
692 nigel 41
693     /(?<!foo)(alpha|omega)/S
694 nigel 43 Capturing subpattern count = 1
695 nigel 41 No options
696     No first char
697 nigel 43 Need char = 'a'
698 nigel 75 Starting byte set: a o
699 nigel 41
700     /(?!alphabet)[ab]/S
701 nigel 43 Capturing subpattern count = 0
702 nigel 41 No options
703     No first char
704 nigel 43 No need char
705 nigel 75 Starting byte set: a b
706 nigel 41
707     /(?<=foo\n)^bar/m
708 nigel 43 Capturing subpattern count = 0
709 nigel 41 Options: multiline
710 nigel 75 No first char
711     Need char = 'r'
712     foo\nbarbar
713     0: bar
714     ***Failers
715     No match
716     rhubarb
717     No match
718     barbell
719     No match
720     abc\nbarton
721     No match
722    
723     /^(?<=foo\n)bar/m
724     Capturing subpattern count = 0
725     Options: multiline
726 nigel 41 First char at start or follows \n
727 nigel 43 Need char = 'r'
728 nigel 75 foo\nbarbar
729     0: bar
730     ***Failers
731     No match
732     rhubarb
733     No match
734     barbell
735     No match
736     abc\nbarton
737     No match
738 nigel 41
739     /(?>^abc)/m
740 nigel 43 Capturing subpattern count = 0
741 nigel 41 Options: multiline
742     First char at start or follows \n
743 nigel 43 Need char = 'c'
744 nigel 41 abc
745     0: abc
746     def\nabc
747     0: abc
748     *** Failers
749     No match
750     defabc
751     No match
752    
753     /(?<=ab(c+)d)ef/
754     Failed: lookbehind assertion is not fixed length at offset 11
755    
756     /(?<=ab(?<=c+)d)ef/
757     Failed: lookbehind assertion is not fixed length at offset 12
758    
759     /(?<=ab(c|de)f)g/
760     Failed: lookbehind assertion is not fixed length at offset 13
761    
762     /The next three are in testinput2 because they have variable length branches/
763 nigel 43 Capturing subpattern count = 0
764 nigel 41 No options
765     First char = 'T'
766 nigel 43 Need char = 's'
767 nigel 41
768     /(?<=bullock|donkey)-cart/
769 nigel 43 Capturing subpattern count = 0
770 nigel 41 No options
771     First char = '-'
772 nigel 43 Need char = 't'
773 nigel 41 the bullock-cart
774     0: -cart
775     a donkey-cart race
776     0: -cart
777     *** Failers
778     No match
779     cart
780     No match
781     horse-and-cart
782     No match
783    
784     /(?<=ab(?i)x|y|z)/
785 nigel 43 Capturing subpattern count = 0
786 nigel 41 No options
787     Case state changes
788     No first char
789 nigel 43 No need char
790 nigel 41
791     /(?>.*)(?<=(abcd)|(xyz))/
792 nigel 43 Capturing subpattern count = 2
793 nigel 75 Partial matching not supported
794 nigel 41 No options
795     First char at start or follows \n
796 nigel 43 No need char
797 nigel 41 alphabetabcd
798     0: alphabetabcd
799     1: abcd
800     endingxyz
801     0: endingxyz
802     1: <unset>
803     2: xyz
804    
805     /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/
806 nigel 43 Capturing subpattern count = 0
807 nigel 41 No options
808     Case state changes
809     First char = 'Z'
810 nigel 43 Need char = 'Z'
811 nigel 41 abxyZZ
812     0: ZZ
813     abXyZZ
814     0: ZZ
815     ZZZ
816     0: ZZ
817     zZZ
818     0: ZZ
819     bZZ
820     0: ZZ
821     BZZ
822     0: ZZ
823     *** Failers
824     No match
825     ZZ
826     No match
827     abXYZZ
828     No match
829     zzz
830     No match
831     bzz
832     No match
833    
834     /(?<!(foo)a)bar/
835 nigel 43 Capturing subpattern count = 1
836 nigel 41 No options
837     First char = 'b'
838 nigel 43 Need char = 'r'
839 nigel 41 bar
840     0: bar
841     foobbar
842     0: bar
843     *** Failers
844     No match
845     fooabar
846     No match
847    
848     /This one is here because Perl 5.005_02 doesn't fail it/
849 nigel 43 Capturing subpattern count = 0
850 nigel 41 No options
851     First char = 'T'
852 nigel 43 Need char = 't'
853 nigel 41
854     /^(a)?(?(1)a|b)+$/
855 nigel 43 Capturing subpattern count = 1
856 nigel 41 Options: anchored
857     No first char
858 nigel 43 No need char
859 nigel 41 *** Failers
860     No match
861     a
862     No match
863    
864     /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/
865 nigel 43 Capturing subpattern count = 0
866 nigel 41 No options
867     First char = 'T'
868 nigel 43 Need char = 'g'
869 nigel 41
870     /^(a\1?){4}$/
871 nigel 43 Capturing subpattern count = 1
872     Max back reference = 1
873 nigel 41 Options: anchored
874     No first char
875 nigel 65 No need char
876 nigel 41 aaaaaa
877     0: aaaaaa
878     1: aa
879    
880     /These are syntax tests from Perl 5.005/
881 nigel 43 Capturing subpattern count = 0
882 nigel 41 No options
883     First char = 'T'
884 nigel 43 Need char = '5'
885 nigel 41
886     /a[b-a]/
887     Failed: range out of order in character class at offset 4
888    
889     /a[]b/
890     Failed: missing terminating ] for character class at offset 4
891    
892     /a[/
893     Failed: missing terminating ] for character class at offset 2
894    
895     /*a/
896     Failed: nothing to repeat at offset 0
897    
898     /(*)b/
899     Failed: nothing to repeat at offset 1
900    
901     /abc)/
902     Failed: unmatched parentheses at offset 3
903    
904     /(abc/
905     Failed: missing ) at offset 4
906    
907     /a**/
908     Failed: nothing to repeat at offset 2
909    
910     /)(/
911     Failed: unmatched parentheses at offset 0
912    
913     /\1/
914 nigel 63 Failed: reference to non-existent subpattern at offset 2
915 nigel 41
916     /\2/
917 nigel 63 Failed: reference to non-existent subpattern at offset 2
918 nigel 41
919     /(a)|\2/
920 nigel 63 Failed: reference to non-existent subpattern at offset 6
921 nigel 41
922     /a[b-a]/i
923     Failed: range out of order in character class at offset 4
924    
925     /a[]b/i
926     Failed: missing terminating ] for character class at offset 4
927    
928     /a[/i
929     Failed: missing terminating ] for character class at offset 2
930    
931     /*a/i
932     Failed: nothing to repeat at offset 0
933    
934     /(*)b/i
935     Failed: nothing to repeat at offset 1
936    
937     /abc)/i
938     Failed: unmatched parentheses at offset 3
939    
940     /(abc/i
941     Failed: missing ) at offset 4
942    
943     /a**/i
944     Failed: nothing to repeat at offset 2
945    
946     /)(/i
947     Failed: unmatched parentheses at offset 0
948    
949     /:(?:/
950     Failed: missing ) at offset 4
951    
952     /(?<%)b/
953 nigel 63 Failed: unrecognized character after (?< at offset 3
954 nigel 41
955     /a(?{)b/
956     Failed: unrecognized character after (? at offset 3
957    
958     /a(?{{})b/
959     Failed: unrecognized character after (? at offset 3
960    
961     /a(?{}})b/
962     Failed: unrecognized character after (? at offset 3
963    
964     /a(?{"{"})b/
965     Failed: unrecognized character after (? at offset 3
966    
967     /a(?{"{"}})b/
968     Failed: unrecognized character after (? at offset 3
969    
970     /(?(1?)a|b)/
971     Failed: malformed number after (?( at offset 4
972    
973     /(?(1)a|b|c)/
974     Failed: conditional group contains more than two branches at offset 10
975    
976     /[a[:xyz:/
977     Failed: missing terminating ] for character class at offset 8
978    
979     /(?<=x+)y/
980     Failed: lookbehind assertion is not fixed length at offset 6
981    
982     /a{37,17}/
983     Failed: numbers out of order in {} quantifier at offset 7
984    
985     /abc/\
986     Failed: \ at end of pattern at offset 4
987    
988     /abc/\P
989     Failed: POSIX code 9: bad escape sequence at offset 4
990    
991     /abc/\i
992     Failed: \ at end of pattern at offset 4
993    
994     /(a)bc(d)/
995 nigel 43 Capturing subpattern count = 2
996 nigel 41 No options
997     First char = 'a'
998 nigel 43 Need char = 'd'
999 nigel 41 abcd
1000     0: abcd
1001     1: a
1002     2: d
1003     abcd\C2
1004     0: abcd
1005     1: a
1006     2: d
1007     2C d (1)
1008     abcd\C5
1009     0: abcd
1010     1: a
1011     2: d
1012     copy substring 5 failed -7
1013    
1014     /(.{20})/
1015 nigel 43 Capturing subpattern count = 1
1016 nigel 75 Partial matching not supported
1017 nigel 41 No options
1018     No first char
1019 nigel 43 No need char
1020 nigel 41 abcdefghijklmnopqrstuvwxyz
1021     0: abcdefghijklmnopqrst
1022     1: abcdefghijklmnopqrst
1023     abcdefghijklmnopqrstuvwxyz\C1
1024     0: abcdefghijklmnopqrst
1025     1: abcdefghijklmnopqrst
1026     copy substring 1 failed -6
1027     abcdefghijklmnopqrstuvwxyz\G1
1028     0: abcdefghijklmnopqrst
1029     1: abcdefghijklmnopqrst
1030     1G abcdefghijklmnopqrst (20)
1031    
1032     /(.{15})/
1033 nigel 43 Capturing subpattern count = 1
1034 nigel 75 Partial matching not supported
1035 nigel 41 No options
1036     No first char
1037 nigel 43 No need char
1038 nigel 41 abcdefghijklmnopqrstuvwxyz
1039     0: abcdefghijklmno
1040     1: abcdefghijklmno
1041     abcdefghijklmnopqrstuvwxyz\C1\G1
1042     0: abcdefghijklmno
1043     1: abcdefghijklmno
1044     1C abcdefghijklmno (15)
1045     1G abcdefghijklmno (15)
1046    
1047     /(.{16})/
1048 nigel 43 Capturing subpattern count = 1
1049 nigel 75 Partial matching not supported
1050 nigel 41 No options
1051     No first char
1052 nigel 43 No need char
1053 nigel 41 abcdefghijklmnopqrstuvwxyz
1054     0: abcdefghijklmnop
1055     1: abcdefghijklmnop
1056     abcdefghijklmnopqrstuvwxyz\C1\G1\L
1057     0: abcdefghijklmnop
1058     1: abcdefghijklmnop
1059     copy substring 1 failed -6
1060     1G abcdefghijklmnop (16)
1061     0L abcdefghijklmnop
1062     1L abcdefghijklmnop
1063    
1064     /^(a|(bc))de(f)/
1065 nigel 43 Capturing subpattern count = 3
1066 nigel 41 Options: anchored
1067     No first char
1068 nigel 65 No need char
1069 nigel 41 adef\G1\G2\G3\G4\L
1070     0: adef
1071     1: a
1072     2: <unset>
1073     3: f
1074     1G a (1)
1075     2G (0)
1076     3G f (1)
1077     get substring 4 failed -7
1078     0L adef
1079     1L a
1080     2L
1081     3L f
1082     bcdef\G1\G2\G3\G4\L
1083     0: bcdef
1084     1: bc
1085     2: bc
1086     3: f
1087     1G bc (2)
1088     2G bc (2)
1089     3G f (1)
1090     get substring 4 failed -7
1091     0L bcdef
1092     1L bc
1093     2L bc
1094     3L f
1095     adefghijk\C0
1096     0: adef
1097     1: a
1098     2: <unset>
1099     3: f
1100     0C adef (4)
1101    
1102     /^abc\00def/
1103 nigel 43 Capturing subpattern count = 0
1104 nigel 41 Options: anchored
1105     No first char
1106 nigel 65 No need char
1107 nigel 41 abc\00def\L\C0
1108     0: abc\x00def
1109     0C abc (7)
1110     0L abc
1111    
1112     /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
1113     )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
1114     )?)?)?)?)?)?)?)?)?otherword/M
1115 nigel 75 Memory allocation (code space): 432
1116 nigel 43 Capturing subpattern count = 8
1117 nigel 75 Partial matching not supported
1118 nigel 41 No options
1119     First char = 'w'
1120 nigel 43 Need char = 'd'
1121 nigel 41
1122     /.*X/D
1123     ------------------------------------------------------------------
1124 nigel 75 0 7 Bra 0
1125 nigel 41 3 Any*
1126 nigel 75 5 X
1127     7 7 Ket
1128     10 End
1129 nigel 41 ------------------------------------------------------------------
1130 nigel 43 Capturing subpattern count = 0
1131 nigel 75 Partial matching not supported
1132 nigel 41 No options
1133     First char at start or follows \n
1134 nigel 43 Need char = 'X'
1135 nigel 41
1136     /.*X/Ds
1137     ------------------------------------------------------------------
1138 nigel 75 0 7 Bra 0
1139 nigel 41 3 Any*
1140 nigel 75 5 X
1141     7 7 Ket
1142     10 End
1143 nigel 41 ------------------------------------------------------------------
1144 nigel 43 Capturing subpattern count = 0
1145 nigel 75 Partial matching not supported
1146 nigel 41 Options: anchored dotall
1147     No first char
1148 nigel 43 Need char = 'X'
1149 nigel 41
1150     /(.*X|^B)/D
1151     ------------------------------------------------------------------
1152 nigel 75 0 19 Bra 0
1153     3 7 Bra 1
1154 nigel 41 6 Any*
1155 nigel 75 8 X
1156     10 6 Alt
1157     13 ^
1158     14 B
1159     16 13 Ket
1160     19 19 Ket
1161     22 End
1162 nigel 41 ------------------------------------------------------------------
1163 nigel 43 Capturing subpattern count = 1
1164 nigel 75 Partial matching not supported
1165 nigel 41 No options
1166     First char at start or follows \n
1167 nigel 43 No need char
1168 nigel 41
1169     /(.*X|^B)/Ds
1170     ------------------------------------------------------------------
1171 nigel 75 0 19 Bra 0
1172     3 7 Bra 1
1173 nigel 41 6 Any*
1174 nigel 75 8 X
1175     10 6 Alt
1176     13 ^
1177     14 B
1178     16 13 Ket
1179     19 19 Ket
1180     22 End
1181 nigel 41 ------------------------------------------------------------------
1182 nigel 43 Capturing subpattern count = 1
1183 nigel 75 Partial matching not supported
1184 nigel 41 Options: anchored dotall
1185     No first char
1186 nigel 43 No need char
1187 nigel 41
1188     /(?s)(.*X|^B)/D
1189     ------------------------------------------------------------------
1190 nigel 75 0 19 Bra 0
1191     3 7 Bra 1
1192 nigel 41 6 Any*
1193 nigel 75 8 X
1194     10 6 Alt
1195     13 ^
1196     14 B
1197     16 13 Ket
1198     19 19 Ket
1199     22 End
1200 nigel 41 ------------------------------------------------------------------
1201 nigel 43 Capturing subpattern count = 1
1202 nigel 75 Partial matching not supported
1203 nigel 41 Options: anchored dotall
1204     No first char
1205 nigel 43 No need char
1206 nigel 41
1207     /(?s:.*X|^B)/D
1208     ------------------------------------------------------------------
1209 nigel 75 0 25 Bra 0
1210     3 9 Bra 0
1211 nigel 41 6 04 Opt
1212     8 Any*
1213 nigel 75 10 X
1214     12 8 Alt
1215     15 04 Opt
1216     17 ^
1217     18 B
1218     20 17 Ket
1219     23 00 Opt
1220     25 25 Ket
1221     28 End
1222 nigel 41 ------------------------------------------------------------------
1223 nigel 43 Capturing subpattern count = 0
1224 nigel 75 Partial matching not supported
1225 nigel 41 No options
1226     First char at start or follows \n
1227 nigel 43 No need char
1228 nigel 41
1229     /\Biss\B/+
1230 nigel 43 Capturing subpattern count = 0
1231 nigel 41 No options
1232     First char = 'i'
1233 nigel 43 Need char = 's'
1234 nigel 41 Mississippi
1235     0: iss
1236     0+ issippi
1237    
1238     /\Biss\B/+P
1239     Mississippi
1240     0: iss
1241     0+ issippi
1242    
1243     /iss/G+
1244 nigel 43 Capturing subpattern count = 0
1245 nigel 41 No options
1246     First char = 'i'
1247 nigel 43 Need char = 's'
1248 nigel 41 Mississippi
1249     0: iss
1250     0+ issippi
1251     0: iss
1252     0+ ippi
1253    
1254     /\Biss\B/G+
1255 nigel 43 Capturing subpattern count = 0
1256 nigel 41 No options
1257     First char = 'i'
1258 nigel 43 Need char = 's'
1259 nigel 41 Mississippi
1260     0: iss
1261     0+ issippi
1262    
1263     /\Biss\B/g+
1264 nigel 43 Capturing subpattern count = 0
1265 nigel 41 No options
1266     First char = 'i'
1267 nigel 43 Need char = 's'
1268 nigel 41 Mississippi
1269     0: iss
1270     0+ issippi
1271     0: iss
1272     0+ ippi
1273     *** Failers
1274     No match
1275     Mississippi\A
1276     No match
1277    
1278     /(?<=[Ms])iss/g+
1279 nigel 43 Capturing subpattern count = 0
1280 nigel 41 No options
1281     First char = 'i'
1282 nigel 43 Need char = 's'
1283 nigel 41 Mississippi
1284     0: iss
1285     0+ issippi
1286     0: iss
1287     0+ ippi
1288    
1289     /(?<=[Ms])iss/G+
1290 nigel 43 Capturing subpattern count = 0
1291 nigel 41 No options
1292     First char = 'i'
1293 nigel 43 Need char = 's'
1294 nigel 41 Mississippi
1295     0: iss
1296     0+ issippi
1297    
1298     /^iss/g+
1299 nigel 43 Capturing subpattern count = 0
1300 nigel 41 Options: anchored
1301     No first char
1302 nigel 65 No need char
1303 nigel 41 ississippi
1304     0: iss
1305     0+ issippi
1306    
1307     /.*iss/g+
1308 nigel 43 Capturing subpattern count = 0
1309 nigel 75 Partial matching not supported
1310 nigel 41 No options
1311     First char at start or follows \n
1312 nigel 43 Need char = 's'
1313 nigel 41 abciss\nxyzisspqr
1314     0: abciss
1315     0+ \x0axyzisspqr
1316     0: xyziss
1317     0+ pqr
1318    
1319     /.i./+g
1320 nigel 43 Capturing subpattern count = 0
1321 nigel 41 No options
1322     No first char
1323 nigel 43 Need char = 'i'
1324 nigel 41 Mississippi
1325     0: Mis
1326     0+ sissippi
1327     0: sis
1328     0+ sippi
1329     0: sip
1330     0+ pi
1331     Mississippi\A
1332     0: Mis
1333     0+ sissippi
1334     0: sis
1335     0+ sippi
1336     0: sip
1337     0+ pi
1338     Missouri river
1339     0: Mis
1340     0+ souri river
1341     0: ri
1342     0+ river
1343     0: riv
1344     0+ er
1345     Missouri river\A
1346     0: Mis
1347     0+ souri river
1348    
1349     /^.is/+g
1350 nigel 43 Capturing subpattern count = 0
1351 nigel 41 Options: anchored
1352     No first char
1353 nigel 65 No need char
1354 nigel 41 Mississippi
1355     0: Mis
1356     0+ sissippi
1357    
1358     /^ab\n/g+
1359 nigel 43 Capturing subpattern count = 0
1360 nigel 41 Options: anchored
1361     No first char
1362 nigel 65 No need char
1363 nigel 41 ab\nab\ncd
1364     0: ab\x0a
1365     0+ ab\x0acd
1366    
1367     /^ab\n/mg+
1368 nigel 43 Capturing subpattern count = 0
1369 nigel 41 Options: multiline
1370     First char at start or follows \n
1371 nigel 43 Need char = 10
1372 nigel 41 ab\nab\ncd
1373     0: ab\x0a
1374     0+ ab\x0acd
1375     0: ab\x0a
1376     0+ cd
1377    
1378     /abc/
1379 nigel 43 Capturing subpattern count = 0
1380 nigel 41 No options
1381     First char = 'a'
1382 nigel 43 Need char = 'c'
1383 nigel 41
1384     /abc|bac/
1385 nigel 43 Capturing subpattern count = 0
1386 nigel 41 No options
1387     No first char
1388 nigel 43 Need char = 'c'
1389 nigel 41
1390     /(abc|bac)/
1391 nigel 43 Capturing subpattern count = 1
1392 nigel 41 No options
1393     No first char
1394 nigel 43 Need char = 'c'
1395 nigel 41
1396     /(abc|(c|dc))/
1397 nigel 43 Capturing subpattern count = 2
1398 nigel 41 No options
1399     No first char
1400 nigel 43 Need char = 'c'
1401 nigel 41
1402     /(abc|(d|de)c)/
1403 nigel 43 Capturing subpattern count = 2
1404 nigel 41 No options
1405     No first char
1406 nigel 43 Need char = 'c'
1407 nigel 41
1408     /a*/
1409 nigel 43 Capturing subpattern count = 0
1410 nigel 75 Partial matching not supported
1411 nigel 41 No options
1412     No first char
1413 nigel 43 No need char
1414 nigel 41
1415     /a+/
1416 nigel 43 Capturing subpattern count = 0
1417 nigel 75 Partial matching not supported
1418 nigel 41 No options
1419     First char = 'a'
1420 nigel 43 No need char
1421 nigel 41
1422     /(baa|a+)/
1423 nigel 43 Capturing subpattern count = 1
1424 nigel 75 Partial matching not supported
1425 nigel 41 No options
1426     No first char
1427 nigel 43 Need char = 'a'
1428 nigel 41
1429     /a{0,3}/
1430 nigel 43 Capturing subpattern count = 0
1431 nigel 75 Partial matching not supported
1432 nigel 41 No options
1433     No first char
1434 nigel 43 No need char
1435 nigel 41
1436     /baa{3,}/
1437 nigel 43 Capturing subpattern count = 0
1438 nigel 75 Partial matching not supported
1439 nigel 41 No options
1440     First char = 'b'
1441 nigel 43 Need char = 'a'
1442 nigel 41
1443     /"([^\\"]+|\\.)*"/
1444 nigel 43 Capturing subpattern count = 1
1445 nigel 75 Partial matching not supported
1446 nigel 41 No options
1447     First char = '"'
1448 nigel 43 Need char = '"'
1449 nigel 41
1450     /(abc|ab[cd])/
1451 nigel 43 Capturing subpattern count = 1
1452 nigel 41 No options
1453     First char = 'a'
1454 nigel 43 No need char
1455 nigel 41
1456     /(a|.)/
1457 nigel 43 Capturing subpattern count = 1
1458 nigel 41 No options
1459     No first char
1460 nigel 43 No need char
1461 nigel 41
1462     /a|ba|\w/
1463 nigel 43 Capturing subpattern count = 0
1464 nigel 41 No options
1465     No first char
1466 nigel 43 No need char
1467 nigel 41
1468     /abc(?=pqr)/
1469 nigel 43 Capturing subpattern count = 0
1470 nigel 41 No options
1471     First char = 'a'
1472 nigel 43 Need char = 'r'
1473 nigel 41
1474     /...(?<=abc)/
1475 nigel 43 Capturing subpattern count = 0
1476 nigel 41 No options
1477     No first char
1478 nigel 43 No need char
1479 nigel 41
1480     /abc(?!pqr)/
1481 nigel 43 Capturing subpattern count = 0
1482 nigel 41 No options
1483     First char = 'a'
1484 nigel 43 Need char = 'c'
1485 nigel 41
1486     /ab./
1487 nigel 43 Capturing subpattern count = 0
1488 nigel 41 No options
1489     First char = 'a'
1490 nigel 43 Need char = 'b'
1491 nigel 41
1492     /ab[xyz]/
1493 nigel 43 Capturing subpattern count = 0
1494 nigel 41 No options
1495     First char = 'a'
1496 nigel 43 Need char = 'b'
1497 nigel 41
1498     /abc*/
1499 nigel 43 Capturing subpattern count = 0
1500 nigel 75 Partial matching not supported
1501 nigel 41 No options
1502     First char = 'a'
1503 nigel 43 Need char = 'b'
1504 nigel 41
1505     /ab.c*/
1506 nigel 43 Capturing subpattern count = 0
1507 nigel 75 Partial matching not supported
1508 nigel 41 No options
1509     First char = 'a'
1510 nigel 43 Need char = 'b'
1511 nigel 41
1512     /a.c*/
1513 nigel 43 Capturing subpattern count = 0
1514 nigel 75 Partial matching not supported
1515 nigel 41 No options
1516     First char = 'a'
1517 nigel 43 No need char
1518 nigel 41
1519     /.c*/
1520 nigel 43 Capturing subpattern count = 0
1521 nigel 75 Partial matching not supported
1522 nigel 41 No options
1523     No first char
1524 nigel 43 No need char
1525 nigel 41
1526     /ac*/
1527 nigel 43 Capturing subpattern count = 0
1528 nigel 75 Partial matching not supported
1529 nigel 41 No options
1530     First char = 'a'
1531 nigel 43 No need char
1532 nigel 41
1533     /(a.c*|b.c*)/
1534 nigel 43 Capturing subpattern count = 1
1535 nigel 75 Partial matching not supported
1536 nigel 41 No options
1537     No first char
1538 nigel 43 No need char
1539 nigel 41
1540     /a.c*|aba/
1541 nigel 43 Capturing subpattern count = 0
1542 nigel 75 Partial matching not supported
1543 nigel 41 No options
1544     First char = 'a'
1545 nigel 43 No need char
1546 nigel 41
1547     /.+a/
1548 nigel 43 Capturing subpattern count = 0
1549 nigel 75 Partial matching not supported
1550 nigel 41 No options
1551     No first char
1552 nigel 43 Need char = 'a'
1553 nigel 41
1554     /(?=abcda)a.*/
1555 nigel 43 Capturing subpattern count = 0
1556 nigel 75 Partial matching not supported
1557 nigel 41 No options
1558     First char = 'a'
1559 nigel 63 Need char = 'a'
1560 nigel 41
1561     /(?=a)a.*/
1562 nigel 43 Capturing subpattern count = 0
1563 nigel 75 Partial matching not supported
1564 nigel 41 No options
1565     First char = 'a'
1566 nigel 43 No need char
1567 nigel 41
1568     /a(b)*/
1569 nigel 43 Capturing subpattern count = 1
1570 nigel 41 No options
1571     First char = 'a'
1572 nigel 43 No need char
1573 nigel 41
1574     /a\d*/
1575 nigel 43 Capturing subpattern count = 0
1576 nigel 75 Partial matching not supported
1577 nigel 41 No options
1578     First char = 'a'
1579 nigel 43 No need char
1580 nigel 41
1581     /ab\d*/
1582 nigel 43 Capturing subpattern count = 0
1583 nigel 75 Partial matching not supported
1584 nigel 41 No options
1585     First char = 'a'
1586 nigel 43 Need char = 'b'
1587 nigel 41
1588     /a(\d)*/
1589 nigel 43 Capturing subpattern count = 1
1590 nigel 41 No options
1591     First char = 'a'
1592 nigel 43 No need char
1593 nigel 41
1594     /abcde{0,0}/
1595 nigel 43 Capturing subpattern count = 0
1596 nigel 41 No options
1597     First char = 'a'
1598 nigel 43 Need char = 'd'
1599 nigel 41
1600     /ab\d+/
1601 nigel 43 Capturing subpattern count = 0
1602 nigel 75 Partial matching not supported
1603 nigel 41 No options
1604     First char = 'a'
1605 nigel 43 Need char = 'b'
1606 nigel 41
1607     /a(?(1)b)/
1608 nigel 43 Capturing subpattern count = 0
1609 nigel 41 No options
1610     First char = 'a'
1611 nigel 43 No need char
1612 nigel 41
1613     /a(?(1)bag|big)/
1614 nigel 43 Capturing subpattern count = 0
1615 nigel 41 No options
1616     First char = 'a'
1617 nigel 43 Need char = 'g'
1618 nigel 41
1619     /a(?(1)bag|big)*/
1620 nigel 43 Capturing subpattern count = 0
1621 nigel 41 No options
1622     First char = 'a'
1623 nigel 43 No need char
1624 nigel 41
1625     /a(?(1)bag|big)+/
1626 nigel 43 Capturing subpattern count = 0
1627 nigel 41 No options
1628     First char = 'a'
1629 nigel 43 Need char = 'g'
1630 nigel 41
1631     /a(?(1)b..|b..)/
1632 nigel 43 Capturing subpattern count = 0
1633 nigel 41 No options
1634     First char = 'a'
1635 nigel 43 Need char = 'b'
1636 nigel 41
1637     /ab\d{0}e/
1638 nigel 43 Capturing subpattern count = 0
1639 nigel 41 No options
1640     First char = 'a'
1641 nigel 43 Need char = 'e'
1642 nigel 41
1643     /a?b?/
1644 nigel 43 Capturing subpattern count = 0
1645 nigel 41 No options
1646     No first char
1647 nigel 43 No need char
1648 nigel 41 a
1649     0: a
1650     b
1651     0: b
1652     ab
1653     0: ab
1654     \
1655     0:
1656     *** Failers
1657     0:
1658     \N
1659     No match
1660    
1661     /|-/
1662 nigel 43 Capturing subpattern count = 0
1663 nigel 41 No options
1664     No first char
1665 nigel 43 No need char
1666 nigel 41 abcd
1667     0:
1668     -abc
1669     0:
1670     \Nab-c
1671     0: -
1672     *** Failers
1673     0:
1674     \Nabc
1675     No match
1676    
1677     /a*(b+)(z)(z)/P
1678     aaaabbbbzzzz
1679     0: aaaabbbbzz
1680     1: bbbb
1681     2: z
1682     3: z
1683     aaaabbbbzzzz\O0
1684     aaaabbbbzzzz\O1
1685     0: aaaabbbbzz
1686     aaaabbbbzzzz\O2
1687     0: aaaabbbbzz
1688     1: bbbb
1689     aaaabbbbzzzz\O3
1690     0: aaaabbbbzz
1691     1: bbbb
1692     2: z
1693     aaaabbbbzzzz\O4
1694     0: aaaabbbbzz
1695     1: bbbb
1696     2: z
1697     3: z
1698     aaaabbbbzzzz\O5
1699     0: aaaabbbbzz
1700     1: bbbb
1701     2: z
1702     3: z
1703 nigel 43
1704     /^.?abcd/S
1705     Capturing subpattern count = 0
1706     Options: anchored
1707     No first char
1708     Need char = 'd'
1709     Study returned NULL
1710 nigel 41
1711 nigel 43 /\( # ( at start
1712     (?: # Non-capturing bracket
1713     (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
1714     | # Or
1715     (?R) # Recurse - i.e. nested bracketed string
1716     )* # Zero or more contents
1717     \) # Closing )
1718     /x
1719     Capturing subpattern count = 0
1720 nigel 75 Partial matching not supported
1721 nigel 43 Options: extended
1722     First char = '('
1723     Need char = ')'
1724     (abcd)
1725     0: (abcd)
1726     (abcd)xyz
1727     0: (abcd)
1728     xyz(abcd)
1729     0: (abcd)
1730     (ab(xy)cd)pqr
1731     0: (ab(xy)cd)
1732     (ab(xycd)pqr
1733     0: (xycd)
1734     () abc ()
1735     0: ()
1736     12(abcde(fsh)xyz(foo(bar))lmno)89
1737     0: (abcde(fsh)xyz(foo(bar))lmno)
1738     *** Failers
1739     No match
1740     abcd
1741     No match
1742     abcd)
1743     No match
1744     (abcd
1745     No match
1746    
1747     /\( ( (?>[^()]+) | (?R) )* \) /xg
1748     Capturing subpattern count = 1
1749 nigel 75 Partial matching not supported
1750 nigel 43 Options: extended
1751     First char = '('
1752     Need char = ')'
1753     (ab(xy)cd)pqr
1754     0: (ab(xy)cd)
1755     1: cd
1756     1(abcd)(x(y)z)pqr
1757     0: (abcd)
1758     1: abcd
1759     0: (x(y)z)
1760     1: z
1761    
1762     /\( (?: (?>[^()]+) | (?R) ) \) /x
1763     Capturing subpattern count = 0
1764 nigel 75 Partial matching not supported
1765 nigel 43 Options: extended
1766     First char = '('
1767     Need char = ')'
1768     (abcd)
1769     0: (abcd)
1770     (ab(xy)cd)
1771     0: (xy)
1772     (a(b(c)d)e)
1773     0: (c)
1774     ((ab))
1775     0: ((ab))
1776     *** Failers
1777     No match
1778     ()
1779     No match
1780    
1781     /\( (?: (?>[^()]+) | (?R) )? \) /x
1782     Capturing subpattern count = 0
1783 nigel 75 Partial matching not supported
1784 nigel 43 Options: extended
1785     First char = '('
1786     Need char = ')'
1787     ()
1788     0: ()
1789     12(abcde(fsh)xyz(foo(bar))lmno)89
1790     0: (fsh)
1791    
1792     /\( ( (?>[^()]+) | (?R) )* \) /x
1793     Capturing subpattern count = 1
1794 nigel 75 Partial matching not supported
1795 nigel 43 Options: extended
1796     First char = '('
1797     Need char = ')'
1798     (ab(xy)cd)
1799     0: (ab(xy)cd)
1800     1: cd
1801    
1802     /\( ( ( (?>[^()]+) | (?R) )* ) \) /x
1803     Capturing subpattern count = 2
1804 nigel 75 Partial matching not supported
1805 nigel 43 Options: extended
1806     First char = '('
1807     Need char = ')'
1808     (ab(xy)cd)
1809     0: (ab(xy)cd)
1810     1: ab(xy)cd
1811     2: cd
1812    
1813     /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x
1814     Capturing subpattern count = 3
1815 nigel 75 Partial matching not supported
1816 nigel 43 Options: extended
1817     First char = '('
1818     Need char = ')'
1819     (ab(xy)cd)
1820     0: (ab(xy)cd)
1821     1: <unset>
1822     2: ab(xy)cd
1823     3: cd
1824     (123ab(xy)cd)
1825     0: (123ab(xy)cd)
1826     1: 123
1827     2: ab(xy)cd
1828     3: cd
1829    
1830     /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x
1831     Capturing subpattern count = 3
1832 nigel 75 Partial matching not supported
1833 nigel 43 Options: extended
1834     First char = '('
1835     Need char = ')'
1836     (ab(xy)cd)
1837     0: (ab(xy)cd)
1838     1: ab(xy)cd
1839     2: <unset>
1840     3: cd
1841     (123ab(xy)cd)
1842     0: (123ab(xy)cd)
1843     1: 123ab(xy)cd
1844     2: 123
1845     3: cd
1846    
1847     /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x
1848     Capturing subpattern count = 11
1849 nigel 75 Partial matching not supported
1850 nigel 43 Options: extended
1851     First char = '('
1852     Need char = ')'
1853     (ab(xy)cd)
1854     0: (ab(xy)cd)
1855     1: ab(xy)cd
1856     2: ab(xy)cd
1857     3: ab(xy)cd
1858     4: ab(xy)cd
1859     5: ab(xy)cd
1860     6: ab(xy)cd
1861     7: ab(xy)cd
1862     8: ab(xy)cd
1863     9: ab(xy)cd
1864     10: ab(xy)cd
1865     11: cd
1866    
1867     /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x
1868     Capturing subpattern count = 3
1869 nigel 75 Partial matching not supported
1870 nigel 43 Options: extended
1871     First char = '('
1872     Need char = ')'
1873     (abcd(xyz<p>qrs)123)
1874     0: (abcd(xyz<p>qrs)123)
1875     1: abcd(xyz<p>qrs)123
1876     2: 123
1877 nigel 63 3: <unset>
1878 nigel 43
1879     /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x
1880     Capturing subpattern count = 3
1881 nigel 75 Partial matching not supported
1882 nigel 43 Options: extended
1883     First char = '('
1884     Need char = ')'
1885     (ab(cd)ef)
1886     0: (ab(cd)ef)
1887     1: ab(cd)ef
1888     2: ef
1889     3: (cd)
1890     (ab(cd(ef)gh)ij)
1891     0: (ab(cd(ef)gh)ij)
1892     1: ab(cd(ef)gh)ij
1893     2: ij
1894     3: (cd(ef)gh)
1895    
1896     /^[[:alnum:]]/D
1897     ------------------------------------------------------------------
1898     0 37 Bra 0
1899     3 ^
1900     4 [0-9A-Za-z]
1901     37 37 Ket
1902     40 End
1903     ------------------------------------------------------------------
1904     Capturing subpattern count = 0
1905     Options: anchored
1906     No first char
1907     No need char
1908    
1909 nigel 75 /^[[:^alnum:]]/D
1910     ------------------------------------------------------------------
1911     0 37 Bra 0
1912     3 ^
1913     4 [\x00-/:-@[-`{-\xff]
1914     37 37 Ket
1915     40 End
1916     ------------------------------------------------------------------
1917     Capturing subpattern count = 0
1918     Options: anchored
1919     No first char
1920     No need char
1921    
1922 nigel 43 /^[[:alpha:]]/D
1923     ------------------------------------------------------------------
1924     0 37 Bra 0
1925     3 ^
1926     4 [A-Za-z]
1927     37 37 Ket
1928     40 End
1929     ------------------------------------------------------------------
1930     Capturing subpattern count = 0
1931     Options: anchored
1932     No first char
1933     No need char
1934 nigel 75
1935     /^[[:^alpha:]]/D
1936     ------------------------------------------------------------------
1937     0 37 Bra 0
1938     3 ^
1939     4 [\x00-@[-`{-\xff]
1940     37 37 Ket
1941     40 End
1942     ------------------------------------------------------------------
1943     Capturing subpattern count = 0
1944     Options: anchored
1945     No first char
1946     No need char
1947 nigel 43
1948     /^[[:ascii:]]/D
1949     ------------------------------------------------------------------
1950     0 37 Bra 0
1951     3 ^
1952     4 [\x00-\x7f]
1953     37 37 Ket
1954     40 End
1955     ------------------------------------------------------------------
1956     Capturing subpattern count = 0
1957     Options: anchored
1958     No first char
1959     No need char
1960    
1961 nigel 75 /^[[:^ascii:]]/D
1962     ------------------------------------------------------------------
1963     0 37 Bra 0
1964     3 ^
1965     4 [\x80-\xff]
1966     37 37 Ket
1967     40 End
1968     ------------------------------------------------------------------
1969     Capturing subpattern count = 0
1970     Options: anchored
1971     No first char
1972     No need char
1973    
1974 nigel 63 /^[[:blank:]]/D
1975     ------------------------------------------------------------------
1976     0 37 Bra 0
1977     3 ^
1978     4 [\x09 ]
1979     37 37 Ket
1980     40 End
1981     ------------------------------------------------------------------
1982     Capturing subpattern count = 0
1983     Options: anchored
1984     No first char
1985     No need char
1986    
1987 nigel 43 /^[[:cntrl:]]/D
1988     ------------------------------------------------------------------
1989     0 37 Bra 0
1990     3 ^
1991     4 [\x00-\x1f\x7f]
1992     37 37 Ket
1993     40 End
1994     ------------------------------------------------------------------
1995     Capturing subpattern count = 0
1996     Options: anchored
1997     No first char
1998     No need char
1999    
2000     /^[[:digit:]]/D
2001     ------------------------------------------------------------------
2002     0 37 Bra 0
2003     3 ^
2004     4 [0-9]
2005     37 37 Ket
2006     40 End
2007     ------------------------------------------------------------------
2008     Capturing subpattern count = 0
2009     Options: anchored
2010     No first char
2011     No need char
2012    
2013     /^[[:graph:]]/D
2014     ------------------------------------------------------------------
2015     0 37 Bra 0
2016     3 ^
2017     4 [!-~]
2018     37 37 Ket
2019     40 End
2020     ------------------------------------------------------------------
2021     Capturing subpattern count = 0
2022     Options: anchored
2023     No first char
2024     No need char
2025    
2026     /^[[:lower:]]/D
2027     ------------------------------------------------------------------
2028     0 37 Bra 0
2029     3 ^
2030     4 [a-z]
2031     37 37 Ket
2032     40 End
2033     ------------------------------------------------------------------
2034     Capturing subpattern count = 0
2035     Options: anchored
2036     No first char
2037     No need char
2038    
2039     /^[[:print:]]/D
2040     ------------------------------------------------------------------
2041     0 37 Bra 0
2042     3 ^
2043     4 [ -~]
2044     37 37 Ket
2045     40 End
2046     ------------------------------------------------------------------
2047     Capturing subpattern count = 0
2048     Options: anchored
2049     No first char
2050     No need char
2051    
2052     /^[[:punct:]]/D
2053     ------------------------------------------------------------------
2054     0 37 Bra 0
2055     3 ^
2056     4 [!-/:-@[-`{-~]
2057     37 37 Ket
2058     40 End
2059     ------------------------------------------------------------------
2060     Capturing subpattern count = 0
2061     Options: anchored
2062     No first char
2063     No need char
2064    
2065     /^[[:space:]]/D
2066     ------------------------------------------------------------------
2067     0 37 Bra 0
2068     3 ^
2069     4 [\x09-\x0d ]
2070     37 37 Ket
2071     40 End
2072     ------------------------------------------------------------------
2073     Capturing subpattern count = 0
2074     Options: anchored
2075     No first char
2076     No need char
2077    
2078     /^[[:upper:]]/D
2079     ------------------------------------------------------------------
2080     0 37 Bra 0
2081     3 ^
2082     4 [A-Z]
2083     37 37 Ket
2084     40 End
2085     ------------------------------------------------------------------
2086     Capturing subpattern count = 0
2087     Options: anchored
2088     No first char
2089     No need char
2090    
2091     /^[[:xdigit:]]/D
2092     ------------------------------------------------------------------
2093     0 37 Bra 0
2094     3 ^
2095     4 [0-9A-Fa-f]
2096     37 37 Ket
2097     40 End
2098     ------------------------------------------------------------------
2099     Capturing subpattern count = 0
2100     Options: anchored
2101     No first char
2102     No need char
2103    
2104     /^[[:word:]]/D
2105     ------------------------------------------------------------------
2106     0 37 Bra 0
2107     3 ^
2108     4 [0-9A-Z_a-z]
2109     37 37 Ket
2110     40 End
2111     ------------------------------------------------------------------
2112     Capturing subpattern count = 0
2113     Options: anchored
2114     No first char
2115     No need char
2116    
2117     /^[[:^cntrl:]]/D
2118     ------------------------------------------------------------------
2119     0 37 Bra 0
2120     3 ^
2121     4 [ -~\x80-\xff]
2122     37 37 Ket
2123     40 End
2124     ------------------------------------------------------------------
2125     Capturing subpattern count = 0
2126     Options: anchored
2127     No first char
2128     No need char
2129    
2130     /^[12[:^digit:]]/D
2131     ------------------------------------------------------------------
2132     0 37 Bra 0
2133     3 ^
2134 nigel 75 4 [\x00-/12:-\xff]
2135 nigel 43 37 37 Ket
2136     40 End
2137     ------------------------------------------------------------------
2138     Capturing subpattern count = 0
2139     Options: anchored
2140     No first char
2141     No need char
2142    
2143 nigel 63 /^[[:^blank:]]/D
2144     ------------------------------------------------------------------
2145     0 37 Bra 0
2146     3 ^
2147     4 [\x00-\x08\x0a-\x1f!-\xff]
2148     37 37 Ket
2149     40 End
2150     ------------------------------------------------------------------
2151     Capturing subpattern count = 0
2152     Options: anchored
2153     No first char
2154     No need char
2155    
2156 nigel 43 /[01[:alpha:]%]/D
2157     ------------------------------------------------------------------
2158     0 36 Bra 0
2159 nigel 75 3 [%01A-Za-z]
2160 nigel 43 36 36 Ket
2161     39 End
2162     ------------------------------------------------------------------
2163     Capturing subpattern count = 0
2164     No options
2165     No first char
2166     No need char
2167    
2168     /[[.ch.]]/
2169     Failed: POSIX collating elements are not supported at offset 1
2170    
2171     /[[=ch=]]/
2172     Failed: POSIX collating elements are not supported at offset 1
2173    
2174     /[[:rhubarb:]]/
2175     Failed: unknown POSIX class name at offset 3
2176    
2177     /[[:upper:]]/i
2178     Capturing subpattern count = 0
2179     Options: caseless
2180     No first char
2181     No need char
2182     A
2183     0: A
2184     a
2185     0: a
2186    
2187     /[[:lower:]]/i
2188     Capturing subpattern count = 0
2189     Options: caseless
2190     No first char
2191     No need char
2192     A
2193     0: A
2194     a
2195     0: a
2196    
2197     /((?-i)[[:lower:]])[[:lower:]]/i
2198     Capturing subpattern count = 1
2199     Options: caseless
2200     Case state changes
2201     No first char
2202     No need char
2203     ab
2204     0: ab
2205     1: a
2206     aB
2207     0: aB
2208     1: a
2209     *** Failers
2210     0: ai
2211     1: a
2212     Ab
2213     No match
2214     AB
2215     No match
2216    
2217 nigel 49 /[\200-\410]/
2218     Failed: range out of order in character class at offset 9
2219    
2220 nigel 51 /^(?(0)f|b)oo/
2221     Failed: invalid condition (?(0) at offset 5
2222    
2223 nigel 53 /This one's here because of the large output vector needed/
2224     Capturing subpattern count = 0
2225     No options
2226     First char = 'T'
2227     Need char = 'd'
2228    
2229     /(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/
2230     Capturing subpattern count = 271
2231     Max back reference = 270
2232 nigel 75 Partial matching not supported
2233 nigel 53 No options
2234     No first char
2235     No need char
2236     \O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC
2237     0: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC
2238     1: 1
2239     2: 2
2240     3: 3
2241     4: 4
2242     5: 5
2243     6: 6
2244     7: 7
2245     8: 8
2246     9: 9
2247     10: 10
2248     11: 11
2249     12: 12
2250     13: 13
2251     14: 14
2252     15: 15
2253     16: 16
2254     17: 17
2255     18: 18
2256     19: 19
2257     20: 20
2258     21: 21
2259     22: 22
2260     23: 23
2261     24: 24
2262     25: 25
2263     26: 26
2264     27: 27
2265     28: 28
2266     29: 29
2267     30: 30
2268     31: 31
2269     32: 32
2270     33: 33
2271     34: 34
2272     35: 35
2273     36: 36
2274     37: 37
2275     38: 38
2276     39: 39
2277     40: 40
2278     41: 41
2279     42: 42
2280     43: 43
2281     44: 44
2282     45: 45
2283     46: 46
2284     47: 47
2285     48: 48
2286     49: 49
2287     50: 50
2288     51: 51
2289     52: 52
2290     53: 53
2291     54: 54
2292     55: 55
2293     56: 56
2294     57: 57
2295     58: 58
2296     59: 59
2297     60: 60
2298     61: 61
2299     62: 62
2300     63: 63
2301     64: 64
2302     65: 65
2303     66: 66
2304     67: 67
2305     68: 68
2306     69: 69
2307     70: 70
2308     71: 71
2309     72: 72
2310     73: 73
2311     74: 74
2312     75: 75
2313     76: 76
2314     77: 77
2315     78: 78
2316     79: 79
2317     80: 80
2318     81: 81
2319     82: 82
2320     83: 83
2321     84: 84
2322     85: 85
2323     86: 86
2324     87: 87
2325     88: 88
2326     89: 89
2327     90: 90
2328     91: 91
2329     92: 92
2330     93: 93
2331     94: 94
2332     95: 95
2333     96: 96
2334     97: 97
2335     98: 98
2336     99: 99
2337     100: 100
2338     101: 101
2339     102: 102
2340     103: 103
2341     104: 104
2342     105: 105
2343     106: 106
2344     107: 107
2345     108: 108
2346     109: 109
2347     110: 110
2348     111: 111
2349     112: 112
2350     113: 113
2351     114: 114
2352     115: 115
2353     116: 116
2354     117: 117
2355     118: 118
2356     119: 119
2357     120: 120
2358     121: 121
2359     122: 122
2360     123: 123
2361     124: 124
2362     125: 125
2363     126: 126
2364     127: 127
2365     128: 128
2366     129: 129
2367     130: 130
2368     131: 131
2369     132: 132
2370     133: 133
2371     134: 134
2372     135: 135
2373     136: 136
2374     137: 137
2375     138: 138
2376     139: 139
2377     140: 140
2378     141: 141
2379     142: 142
2380     143: 143
2381     144: 144
2382     145: 145
2383     146: 146
2384     147: 147
2385     148: 148
2386     149: 149
2387     150: 150
2388     151: 151
2389     152: 152
2390     153: 153
2391     154: 154
2392     155: 155
2393     156: 156
2394     157: 157
2395     158: 158
2396     159: 159
2397     160: 160
2398     161: 161
2399     162: 162
2400     163: 163
2401     164: 164
2402     165: 165
2403     166: 166
2404     167: 167
2405     168: 168
2406     169: 169
2407     170: 170
2408     171: 171
2409     172: 172
2410     173: 173
2411     174: 174
2412     175: 175
2413     176: 176
2414     177: 177
2415     178: 178
2416     179: 179
2417     180: 180
2418     181: 181
2419     182: 182
2420     183: 183
2421     184: 184
2422     185: 185
2423     186: 186
2424     187: 187
2425     188: 188
2426     189: 189
2427     190: 190
2428     191: 191
2429     192: 192
2430     193: 193
2431     194: 194
2432     195: 195
2433     196: 196
2434     197: 197
2435     198: 198
2436     199: 199
2437     200: 200
2438     201: 201
2439     202: 202
2440     203: 203
2441     204: 204
2442     205: 205
2443     206: 206
2444     207: 207
2445     208: 208
2446     209: 209
2447     210: 210
2448     211: 211
2449     212: 212
2450     213: 213
2451     214: 214
2452     215: 215
2453     216: 216
2454     217: 217
2455     218: 218
2456     219: 219
2457     220: 220
2458     221: 221
2459     222: 222
2460     223: 223
2461     224: 224
2462     225: 225
2463     226: 226
2464     227: 227
2465     228: 228
2466     229: 229
2467     230: 230
2468     231: 231
2469     232: 232
2470     233: 233
2471     234: 234
2472     235: 235
2473     236: 236
2474     237: 237
2475     238: 238
2476     239: 239
2477     240: 240
2478     241: 241
2479     242: 242
2480     243: 243
2481     244: 244
2482     245: 245
2483     246: 246
2484     247: 247
2485     248: 248
2486     249: 249
2487     250: 250
2488     251: 251
2489     252: 252
2490     253: 253
2491     254: 254
2492     255: 255
2493     256: 256
2494     257: 257
2495     258: 258
2496     259: 259
2497     260: 260
2498     261: 261
2499     262: 262
2500     263: 263
2501     264: 264
2502     265: 265
2503     266: 266
2504     267: 267
2505     268: 268
2506     269: 269
2507     270: ABC
2508     271: ABC
2509    
2510     /This one's here because Perl does this differently and PCRE can't at present/
2511     Capturing subpattern count = 0
2512     No options
2513     First char = 'T'
2514     Need char = 't'
2515    
2516     /(main(O)?)+/
2517     Capturing subpattern count = 2
2518     No options
2519     First char = 'm'
2520     Need char = 'n'
2521     mainmain
2522     0: mainmain
2523     1: main
2524     mainOmain
2525     0: mainOmain
2526     1: main
2527     2: O
2528    
2529 nigel 63 /These are all cases where Perl does it differently (nested captures)/
2530     Capturing subpattern count = 1
2531     No options
2532     First char = 'T'
2533     Need char = 's'
2534    
2535     /^(a(b)?)+$/
2536     Capturing subpattern count = 2
2537     Options: anchored
2538     No first char
2539 nigel 65 No need char
2540 nigel 63 aba
2541     0: aba
2542     1: a
2543     2: b
2544    
2545     /^(aa(bb)?)+$/
2546     Capturing subpattern count = 2
2547     Options: anchored
2548     No first char
2549 nigel 65 No need char
2550 nigel 63 aabbaa
2551     0: aabbaa
2552     1: aa
2553     2: bb
2554    
2555     /^(aa|aa(bb))+$/
2556     Capturing subpattern count = 2
2557     Options: anchored
2558     No first char
2559 nigel 65 No need char
2560 nigel 63 aabbaa
2561     0: aabbaa
2562     1: aa
2563     2: bb
2564    
2565     /^(aa(bb)??)+$/
2566     Capturing subpattern count = 2
2567     Options: anchored
2568     No first char
2569 nigel 65 No need char
2570 nigel 63 aabbaa
2571     0: aabbaa
2572     1: aa
2573     2: bb
2574    
2575     /^(?:aa(bb)?)+$/
2576     Capturing subpattern count = 1
2577     Options: anchored
2578     No first char
2579 nigel 65 No need char
2580 nigel 63 aabbaa
2581     0: aabbaa
2582     1: bb
2583    
2584     /^(aa(b(b))?)+$/
2585     Capturing subpattern count = 3
2586     Options: anchored
2587     No first char
2588 nigel 65 No need char
2589 nigel 63 aabbaa
2590     0: aabbaa
2591     1: aa
2592     2: bb
2593     3: b
2594    
2595     /^(?:aa(b(b))?)+$/
2596     Capturing subpattern count = 2
2597     Options: anchored
2598     No first char
2599 nigel 65 No need char
2600 nigel 63 aabbaa
2601     0: aabbaa
2602     1: bb
2603     2: b
2604    
2605     /^(?:aa(b(?:b))?)+$/
2606     Capturing subpattern count = 1
2607     Options: anchored
2608     No first char
2609 nigel 65 No need char
2610 nigel 63 aabbaa
2611     0: aabbaa
2612     1: bb
2613    
2614     /^(?:aa(bb(?:b))?)+$/
2615     Capturing subpattern count = 1
2616     Options: anchored
2617     No first char
2618 nigel 65 No need char
2619 nigel 63 aabbbaa
2620     0: aabbbaa
2621     1: bbb
2622    
2623     /^(?:aa(b(?:bb))?)+$/
2624     Capturing subpattern count = 1
2625     Options: anchored
2626     No first char
2627 nigel 65 No need char
2628 nigel 63 aabbbaa
2629     0: aabbbaa
2630     1: bbb
2631    
2632     /^(?:aa(?:b(b))?)+$/
2633     Capturing subpattern count = 1
2634     Options: anchored
2635     No first char
2636 nigel 65 No need char
2637 nigel 63 aabbaa
2638     0: aabbaa
2639     1: b
2640    
2641     /^(?:aa(?:b(bb))?)+$/
2642     Capturing subpattern count = 1
2643     Options: anchored
2644     No first char
2645 nigel 65 No need char
2646 nigel 63 aabbbaa
2647     0: aabbbaa
2648     1: bb
2649    
2650     /^(aa(b(bb))?)+$/
2651     Capturing subpattern count = 3
2652     Options: anchored
2653     No first char
2654 nigel 65 No need char
2655 nigel 63 aabbbaa
2656     0: aabbbaa
2657     1: aa
2658     2: bbb
2659     3: bb
2660    
2661     /^(aa(bb(bb))?)+$/
2662     Capturing subpattern count = 3
2663     Options: anchored
2664     No first char
2665 nigel 65 No need char
2666 nigel 63 aabbbbaa
2667     0: aabbbbaa
2668     1: aa
2669     2: bbbb
2670     3: bb
2671    
2672     /--------------------------------------------------------------------/
2673     Capturing subpattern count = 0
2674     No options
2675     First char = '-'
2676     Need char = '-'
2677    
2678     /#/xMD
2679     Memory allocation (code space): 7
2680     ------------------------------------------------------------------
2681     0 3 Bra 0
2682     3 3 Ket
2683     6 End
2684     ------------------------------------------------------------------
2685     Capturing subpattern count = 0
2686     Options: extended
2687     No first char
2688     No need char
2689    
2690     /a#/xMD
2691 nigel 75 Memory allocation (code space): 9
2692 nigel 63 ------------------------------------------------------------------
2693 nigel 75 0 5 Bra 0
2694     3 a
2695     5 5 Ket
2696     8 End
2697 nigel 63 ------------------------------------------------------------------
2698     Capturing subpattern count = 0
2699     Options: extended
2700     First char = 'a'
2701     No need char
2702    
2703     /[\s]/D
2704     ------------------------------------------------------------------
2705     0 36 Bra 0
2706 nigel 75 3 [\x09\x0a\x0c\x0d ]
2707 nigel 63 36 36 Ket
2708     39 End
2709     ------------------------------------------------------------------
2710     Capturing subpattern count = 0
2711     No options
2712     No first char
2713     No need char
2714    
2715     /[\S]/D
2716     ------------------------------------------------------------------
2717     0 36 Bra 0
2718     3 [\x00-\x08\x0b\x0e-\x1f!-\xff]
2719     36 36 Ket
2720     39 End
2721     ------------------------------------------------------------------
2722     Capturing subpattern count = 0
2723     No options
2724     No first char
2725     No need char
2726    
2727     /a(?i)b/D
2728     ------------------------------------------------------------------
2729 nigel 75 0 9 Bra 0
2730     3 a
2731     5 01 Opt
2732     7 NC b
2733     9 9 Ket
2734     12 End
2735 nigel 63 ------------------------------------------------------------------
2736     Capturing subpattern count = 0
2737     No options
2738     Case state changes
2739     First char = 'a'
2740     Need char = 'b' (caseless)
2741     ab
2742     0: ab
2743     aB
2744     0: aB
2745     *** Failers
2746     No match
2747     AB
2748     No match
2749    
2750     /(a(?i)b)/D
2751     ------------------------------------------------------------------
2752 nigel 75 0 17 Bra 0
2753     3 9 Bra 1
2754     6 a
2755     8 01 Opt
2756     10 NC b
2757     12 9 Ket
2758     15 00 Opt
2759     17 17 Ket
2760     20 End
2761 nigel 63 ------------------------------------------------------------------
2762     Capturing subpattern count = 1
2763     No options
2764     Case state changes
2765     First char = 'a'
2766     Need char = 'b' (caseless)
2767     ab
2768     0: ab
2769     1: ab
2770     aB
2771     0: aB
2772     1: aB
2773     *** Failers
2774     No match
2775     AB
2776     No match
2777    
2778     / (?i)abc/xD
2779     ------------------------------------------------------------------
2780 nigel 75 0 9 Bra 0
2781     3 NC abc
2782     9 9 Ket
2783     12 End
2784 nigel 63 ------------------------------------------------------------------
2785     Capturing subpattern count = 0
2786     Options: caseless extended
2787     First char = 'a' (caseless)
2788     Need char = 'c' (caseless)
2789    
2790     /#this is a comment
2791     (?i)abc/xD
2792     ------------------------------------------------------------------
2793 nigel 75 0 9 Bra 0
2794     3 NC abc
2795     9 9 Ket
2796     12 End
2797 nigel 63 ------------------------------------------------------------------
2798     Capturing subpattern count = 0
2799     Options: caseless extended
2800     First char = 'a' (caseless)
2801     Need char = 'c' (caseless)
2802    
2803     /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
2804     ------------------------------------------------------------------
2805 nigel 75 0 603 Bra 0
2806     3 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2807     603 603 Ket
2808     606 End
2809 nigel 63 ------------------------------------------------------------------
2810     Capturing subpattern count = 0
2811     No options
2812     First char = '1'
2813     Need char = '0'
2814    
2815     /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
2816     ------------------------------------------------------------------
2817 nigel 75 0 603 Bra 0
2818     3 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2819     603 603 Ket
2820     606 End
2821 nigel 63 ------------------------------------------------------------------
2822     Capturing subpattern count = 0
2823     No options
2824     First char = '1'
2825     Need char = '0'
2826    
2827     /\Q\E/D
2828     ------------------------------------------------------------------
2829     0 3 Bra 0
2830     3 3 Ket
2831     6 End
2832     ------------------------------------------------------------------
2833     Capturing subpattern count = 0
2834     No options
2835     No first char
2836     No need char
2837     \
2838     0:
2839    
2840     /\Q\Ex/D
2841     ------------------------------------------------------------------
2842 nigel 75 0 5 Bra 0
2843     3 x
2844     5 5 Ket
2845     8 End
2846 nigel 63 ------------------------------------------------------------------
2847     Capturing subpattern count = 0
2848     No options
2849     First char = 'x'
2850     No need char
2851    
2852     / \Q\E/D
2853     ------------------------------------------------------------------
2854 nigel 75 0 5 Bra 0
2855     3
2856     5 5 Ket
2857     8 End
2858 nigel 63 ------------------------------------------------------------------
2859     Capturing subpattern count = 0
2860     No options
2861     First char = ' '
2862     No need char
2863    
2864     /a\Q\E/D
2865     ------------------------------------------------------------------
2866 nigel 75 0 5 Bra 0
2867     3 a
2868     5 5 Ket
2869     8 End
2870 nigel 63 ------------------------------------------------------------------
2871     Capturing subpattern count = 0
2872     No options
2873     First char = 'a'
2874     No need char
2875     abc
2876     0: a
2877     bca
2878     0: a
2879     bac
2880     0: a
2881    
2882     /a\Q\Eb/D
2883     ------------------------------------------------------------------
2884 nigel 75 0 7 Bra 0
2885     3 ab
2886     7 7 Ket
2887     10 End
2888 nigel 63 ------------------------------------------------------------------
2889     Capturing subpattern count = 0
2890     No options
2891     First char = 'a'
2892     Need char = 'b'
2893     abc
2894     0: ab
2895    
2896     /\Q\Eabc/D
2897     ------------------------------------------------------------------
2898 nigel 75 0 9 Bra 0
2899     3 abc
2900     9 9 Ket
2901     12 End
2902 nigel 63 ------------------------------------------------------------------
2903     Capturing subpattern count = 0
2904     No options
2905     First char = 'a'
2906     Need char = 'c'
2907    
2908     /x*+\w/D
2909     ------------------------------------------------------------------
2910     0 12 Bra 0
2911     3 5 Once
2912     6 x*
2913     8 5 Ket
2914     11 \w
2915     12 12 Ket
2916     15 End
2917     ------------------------------------------------------------------
2918     Capturing subpattern count = 0
2919 nigel 75 Partial matching not supported
2920 nigel 63 No options
2921     No first char
2922     No need char
2923     *** Failers
2924     0: F
2925     xxxxx
2926     No match
2927    
2928     /x?+/D
2929     ------------------------------------------------------------------
2930     0 11 Bra 0
2931     3 5 Once
2932     6 x?
2933     8 5 Ket
2934     11 11 Ket
2935     14 End
2936     ------------------------------------------------------------------
2937     Capturing subpattern count = 0
2938     No options
2939     No first char
2940     No need char
2941    
2942     /x++/D
2943     ------------------------------------------------------------------
2944     0 11 Bra 0
2945     3 5 Once
2946     6 x+
2947     8 5 Ket
2948     11 11 Ket
2949     14 End
2950     ------------------------------------------------------------------
2951     Capturing subpattern count = 0
2952 nigel 75 Partial matching not supported
2953 nigel 63 No options
2954     First char = 'x'
2955     No need char
2956    
2957     /x{1,3}+/D
2958     ------------------------------------------------------------------
2959 nigel 75 0 15 Bra 0
2960     3 9 Once
2961     6 x
2962     8 x{,2}
2963     12 9 Ket
2964     15 15 Ket
2965     18 End
2966 nigel 63 ------------------------------------------------------------------
2967     Capturing subpattern count = 0
2968 nigel 75 Partial matching not supported
2969 nigel 63 No options
2970     First char = 'x'
2971     No need char
2972    
2973     /(x)*+/D
2974     ------------------------------------------------------------------
2975 nigel 75 0 18 Bra 0
2976     3 12 Once
2977 nigel 63 6 Brazero
2978 nigel 75 7 5 Bra 1
2979     10 x
2980     12 5 KetRmax
2981     15 12 Ket
2982     18 18 Ket
2983     21 End
2984 nigel 63 ------------------------------------------------------------------
2985     Capturing subpattern count = 1
2986     No options
2987     No first char
2988     No need char
2989    
2990     /^(\w++|\s++)*$/
2991     Capturing subpattern count = 1
2992 nigel 75 Partial matching not supported
2993 nigel 63 Options: anchored
2994     No first char
2995     No need char
2996     now is the time for all good men to come to the aid of the party
2997     0: now is the time for all good men to come to the aid of the party
2998     1: party
2999     *** Failers
3000     No match
3001     this is not a line with only words and spaces!
3002     No match
3003    
3004     /(\d++)(\w)/
3005     Capturing subpattern count = 2
3006 nigel 75 Partial matching not supported
3007 nigel 63 No options
3008     No first char
3009     No need char
3010     12345a
3011     0: 12345a
3012     1: 12345
3013     2: a
3014     *** Failers
3015     No match
3016     12345+
3017     No match
3018    
3019     /a++b/
3020     Capturing subpattern count = 0
3021 nigel 75 Partial matching not supported
3022 nigel 63 No options
3023     First char = 'a'
3024     Need char = 'b'
3025     aaab
3026     0: aaab
3027    
3028     /(a++b)/
3029     Capturing subpattern count = 1
3030 nigel 75 Partial matching not supported
3031 nigel 63 No options
3032     First char = 'a'
3033     Need char = 'b'
3034     aaab
3035     0: aaab
3036     1: aaab
3037    
3038     /(a++)b/
3039     Capturing subpattern count = 1
3040 nigel 75 Partial matching not supported
3041 nigel 63 No options
3042     First char = 'a'
3043     Need char = 'b'
3044     aaab
3045     0: aaab
3046     1: aaa
3047    
3048     /([^()]++|\([^()]*\))+/
3049     Capturing subpattern count = 1
3050 nigel 75 Partial matching not supported
3051 nigel 63 No options
3052     No first char
3053     No need char
3054     ((abc(ade)ufh()()x
3055     0: abc(ade)ufh()()x
3056     1: x
3057    
3058     /\(([^()]++|\([^()]+\))+\)/
3059     Capturing subpattern count = 1
3060 nigel 75 Partial matching not supported
3061 nigel 63 No options
3062     First char = '('
3063     Need char = ')'
3064     (abc)
3065     0: (abc)
3066     1: abc
3067     (abc(def)xyz)
3068     0: (abc(def)xyz)
3069     1: xyz
3070     *** Failers
3071     No match
3072     ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3073     No match
3074    
3075     /(abc){1,3}+/D
3076     ------------------------------------------------------------------
3077 nigel 75 0 53 Bra 0
3078     3 47 Once
3079     6 9 Bra 1
3080     9 abc
3081     15 9 Ket
3082     18 Brazero
3083     19 28 Bra 0
3084     22 9 Bra 1
3085     25 abc
3086     31 9 Ket
3087     34 Brazero
3088     35 9 Bra 1
3089     38 abc
3090     44 9 Ket
3091     47 28 Ket
3092     50 47 Ket
3093     53 53 Ket
3094     56 End
3095 nigel 63 ------------------------------------------------------------------
3096     Capturing subpattern count = 1
3097     No options
3098     First char = 'a'
3099     Need char = 'c'
3100    
3101     /a+?+/
3102     Failed: nothing to repeat at offset 3
3103    
3104     /a{2,3}?+b/
3105     Failed: nothing to repeat at offset 7
3106    
3107     /(?U)a+?+/
3108     Failed: nothing to repeat at offset 7
3109    
3110     /a{2,3}?+b/U
3111     Failed: nothing to repeat at offset 7
3112    
3113     /x(?U)a++b/D
3114     ------------------------------------------------------------------
3115 nigel 75 0 15 Bra 0
3116     3 x
3117     5 5 Once
3118     8 a+
3119     10 5 Ket
3120     13 b
3121     15 15 Ket
3122     18 End
3123 nigel 63 ------------------------------------------------------------------
3124     Capturing subpattern count = 0
3125 nigel 75 Partial matching not supported
3126 nigel 63 No options
3127     First char = 'x'
3128     Need char = 'b'
3129     xaaaab
3130     0: xaaaab
3131    
3132     /(?U)xa++b/D
3133     ------------------------------------------------------------------
3134 nigel 75 0 15 Bra 0
3135     3 x
3136     5 5 Once
3137     8 a+
3138     10 5 Ket
3139     13 b
3140     15 15 Ket
3141     18 End
3142 nigel 63 ------------------------------------------------------------------
3143     Capturing subpattern count = 0
3144 nigel 75 Partial matching not supported
3145 nigel 63 Options: ungreedy
3146     First char = 'x'
3147     Need char = 'b'
3148     xaaaab
3149     0: xaaaab
3150    
3151     /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/D
3152     ------------------------------------------------------------------
3153     0 106 Bra 0
3154     3 ^
3155     4 99 Bra 1
3156     7 5 Bra 2
3157     10 a+
3158     12 5 Ket
3159     15 37 Bra 3
3160 nigel 75 18 [ab]+?
3161 nigel 63 52 37 Ket
3162     55 37 Bra 4
3163 nigel 75 58 [bc]+
3164 nigel 63 92 37 Ket
3165     95 5 Bra 5
3166     98 \w*
3167     100 5 Ket
3168     103 99 Ket
3169     106 106 Ket
3170     109 End
3171     ------------------------------------------------------------------
3172     Capturing subpattern count = 5
3173 nigel 75 Partial matching not supported
3174 nigel 63 Options: anchored
3175     No first char
3176 nigel 65 No need char
3177 nigel 63
3178     /^x(?U)a+b/D
3179     ------------------------------------------------------------------
3180 nigel 75 0 10 Bra 0
3181 nigel 63 3 ^
3182 nigel 75 4 x
3183     6 a+?
3184     8 b
3185     10 10 Ket
3186     13 End
3187 nigel 63 ------------------------------------------------------------------
3188     Capturing subpattern count = 0
3189 nigel 75 Partial matching not supported
3190 nigel 63 Options: anchored
3191     No first char
3192     Need char = 'b'
3193    
3194     /^x(?U)(a+)b/D
3195     ------------------------------------------------------------------
3196 nigel 75 0 16 Bra 0
3197 nigel 63 3 ^
3198 nigel 75 4 x
3199     6 5 Bra 1
3200     9 a+?
3201     11 5 Ket
3202     14 b
3203     16 16 Ket
3204     19 End
3205 nigel 63 ------------------------------------------------------------------
3206     Capturing subpattern count = 1
3207 nigel 75 Partial matching not supported
3208 nigel 63 Options: anchored
3209     No first char
3210     Need char = 'b'
3211    
3212     /[.x.]/
3213     Failed: POSIX collating elements are not supported at offset 0
3214    
3215     /[=x=]/
3216     Failed: POSIX collating elements are not supported at offset 0
3217    
3218     /[:x:]/
3219     Failed: POSIX named classes are supported only within a class at offset 0
3220    
3221     /\l/
3222 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3223 nigel 63
3224     /\L/
3225 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3226 nigel 63
3227     /\N{name}/
3228 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3229 nigel 63
3230     /\u/
3231 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3232 nigel 63
3233     /\U/
3234 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3235 nigel 63
3236     /[/
3237     Failed: missing terminating ] for character class at offset 1
3238    
3239     /[a-/
3240     Failed: missing terminating ] for character class at offset 3
3241    
3242     /[[:space:]/
3243     Failed: missing terminating ] for character class at offset 10
3244    
3245     /[\s]/DM
3246     Memory allocation (code space): 40
3247     ------------------------------------------------------------------
3248     0 36 Bra 0
3249 nigel 75 3 [\x09\x0a\x0c\x0d ]
3250 nigel 63 36 36 Ket
3251     39 End
3252     ------------------------------------------------------------------
3253     Capturing subpattern count = 0
3254     No options
3255     No first char
3256     No need char
3257    
3258     /[[:space:]]/DM
3259     Memory allocation (code space): 40
3260     ------------------------------------------------------------------
3261     0 36 Bra 0
3262     3 [\x09-\x0d ]
3263     36 36 Ket
3264     39 End
3265     ------------------------------------------------------------------
3266     Capturing subpattern count = 0
3267     No options
3268     No first char
3269     No need char
3270    
3271     /[[:space:]abcde]/DM
3272     Memory allocation (code space): 40
3273     ------------------------------------------------------------------
3274     0 36 Bra 0
3275     3 [\x09-\x0d a-e]
3276     36 36 Ket
3277     39 End
3278     ------------------------------------------------------------------
3279     Capturing subpattern count = 0
3280     No options
3281     No first char
3282     No need char
3283    
3284     /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
3285     Capturing subpattern count = 0
3286 nigel 75 Partial matching not supported
3287 nigel 63 Options: extended
3288     First char = '<'
3289     Need char = '>'
3290     <>
3291     0: <>
3292     <abcd>
3293     0: <abcd>
3294     <abc <123> hij>
3295     0: <abc <123> hij>
3296     <abc <def> hij>
3297     0: <def>
3298     <abc<>def>
3299     0: <abc<>def>
3300     <abc<>
3301     0: <>
3302     *** Failers
3303     No match
3304     <abc
3305     No match
3306    
3307     |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|DM
3308 nigel 75 Memory allocation (code space): 826
3309 nigel 63 ------------------------------------------------------------------
3310 nigel 75 0 822 Bra 0
3311     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
3312     821 \b
3313     822 822 Ket
3314     825 End
3315 nigel 63 ------------------------------------------------------------------
3316     Capturing subpattern count = 0
3317     No options
3318     First char = '8'
3319     Need char = 'X'
3320    
3321     |\$\<\.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|DM
3322 nigel 75 Memory allocation (code space): 816
3323 nigel 63 ------------------------------------------------------------------
3324 nigel 75 0 812 Bra 0
3325     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
3326     811 \b
3327     812 812 Ket
3328     815 End
3329 nigel 63 ------------------------------------------------------------------
3330     Capturing subpattern count = 0
3331     No options
3332     First char = '$'
3333     Need char = 'X'
3334    
3335     /(.*)\d+\1/I
3336     Capturing subpattern count = 1
3337     Max back reference = 1
3338 nigel 75 Partial matching not supported
3339 nigel 63 No options
3340     No first char
3341     No need char
3342    
3343     /(.*)\d+/I
3344     Capturing subpattern count = 1
3345 nigel 75 Partial matching not supported
3346 nigel 63 No options
3347     First char at start or follows \n
3348     No need char
3349    
3350     /(.*)\d+\1/Is
3351     Capturing subpattern count = 1
3352     Max back reference = 1
3353 nigel 75 Partial matching not supported
3354 nigel 63 Options: dotall
3355     No first char
3356     No need char
3357    
3358     /(.*)\d+/Is
3359     Capturing subpattern count = 1
3360 nigel 75 Partial matching not supported
3361 nigel 63 Options: anchored dotall
3362     No first char
3363     No need char
3364    
3365     /(.*(xyz))\d+\2/I
3366     Capturing subpattern count = 2
3367     Max back reference = 2
3368 nigel 75 Partial matching not supported
3369 nigel 63 No options
3370     First char at start or follows \n
3371     Need char = 'z'
3372    
3373     /((.*))\d+\1/I
3374     Capturing subpattern count = 2
3375     Max back reference = 1
3376 nigel 75 Partial matching not supported
3377 nigel 63 No options
3378     No first char
3379     No need char
3380     abc123bc
3381     0: bc123bc
3382     1: bc
3383     2: bc
3384    
3385     /a[b]/I
3386     Capturing subpattern count = 0
3387     No options
3388     First char = 'a'
3389     Need char = 'b'
3390    
3391     /(?=a).*/I
3392     Capturing subpattern count = 0
3393 nigel 75 Partial matching not supported
3394 nigel 63 No options
3395     First char = 'a'
3396     No need char
3397    
3398     /(?=abc).xyz/iI
3399     Capturing subpattern count = 0
3400     Options: caseless
3401     First char = 'a' (caseless)
3402     Need char = 'z' (caseless)
3403    
3404     /(?=abc)(?i).xyz/I
3405     Capturing subpattern count = 0
3406     No options
3407     Case state changes
3408     First char = 'a'
3409     Need char = 'z' (caseless)
3410    
3411     /(?=a)(?=b)/I
3412     Capturing subpattern count = 0
3413     No options
3414     First char = 'a'
3415     No need char
3416    
3417     /(?=.)a/I
3418     Capturing subpattern count = 0
3419     No options
3420     First char = 'a'
3421     No need char
3422    
3423     /((?=abcda)a)/I
3424     Capturing subpattern count = 1
3425     No options
3426     First char = 'a'
3427     Need char = 'a'
3428    
3429     /((?=abcda)ab)/I
3430     Capturing subpattern count = 1
3431     No options
3432     First char = 'a'
3433     Need char = 'b'
3434    
3435     /()a/I
3436     Capturing subpattern count = 1
3437     No options
3438     No first char
3439     Need char = 'a'
3440    
3441     /(?(1)ab|ac)/I
3442     Capturing subpattern count = 0
3443     No options
3444     First char = 'a'
3445     No need char
3446    
3447     /(?(1)abz|acz)/I
3448     Capturing subpattern count = 0
3449     No options
3450     First char = 'a'
3451     Need char = 'z'
3452    
3453     /(?(1)abz)/I
3454     Capturing subpattern count = 0
3455     No options
3456     No first char
3457     No need char
3458    
3459     /(?(1)abz)123/I
3460     Capturing subpattern count = 0
3461     No options
3462     No first char
3463     Need char = '3'
3464    
3465     /(a)+/I
3466     Capturing subpattern count = 1
3467     No options
3468     First char = 'a'
3469     No need char
3470    
3471     /(a){2,3}/I
3472     Capturing subpattern count = 1
3473     No options
3474     First char = 'a'
3475     Need char = 'a'
3476    
3477     /(a)*/I
3478     Capturing subpattern count = 1
3479     No options
3480     No first char
3481     No need char
3482    
3483     /[a]/I
3484     Capturing subpattern count = 0
3485     No options
3486     First char = 'a'
3487     No need char
3488    
3489     /[ab]/I
3490     Capturing subpattern count = 0
3491     No options
3492     No first char
3493     No need char
3494    
3495     /[ab]/IS
3496     Capturing subpattern count = 0
3497     No options
3498     No first char
3499     No need char
3500 nigel 75 Starting byte set: a b
3501 nigel 63
3502     /[^a]/I
3503     Capturing subpattern count = 0
3504     No options
3505     No first char
3506     No need char
3507    
3508     /\d456/I
3509     Capturing subpattern count = 0
3510     No options
3511     No first char
3512     Need char = '6'
3513    
3514     /\d456/IS
3515     Capturing subpattern count = 0
3516     No options
3517     No first char
3518     Need char = '6'
3519 nigel 75 Starting byte set: 0 1 2 3 4 5 6 7 8 9
3520 nigel 63
3521     /a^b/I
3522     Capturing subpattern count = 0
3523     No options
3524     First char = 'a'
3525     Need char = 'b'
3526    
3527     /^a/mI
3528     Capturing subpattern count = 0
3529     Options: multiline
3530     First char at start or follows \n
3531     Need char = 'a'
3532     abcde
3533     0: a
3534     xy\nabc
3535     0: a
3536     *** Failers
3537     No match
3538     xyabc
3539     No match
3540    
3541     /c|abc/I
3542     Capturing subpattern count = 0
3543     No options
3544     No first char
3545     Need char = 'c'
3546    
3547     /(?i)[ab]/IS
3548     Capturing subpattern count = 0
3549     Options: caseless
3550     No first char
3551     No need char
3552 nigel 75 Starting byte set: A B a b
3553 nigel 63
3554     /[ab](?i)cd/IS
3555     Capturing subpattern count = 0
3556     No options
3557     Case state changes
3558     No first char
3559     Need char = 'd' (caseless)
3560 nigel 75 Starting byte set: a b
3561 nigel 63
3562     /abc(?C)def/
3563     Capturing subpattern count = 0
3564     No options
3565     First char = 'a'
3566     Need char = 'f'
3567     abcdef
3568     --->abcdef
3569 nigel 75 0 ^ ^ d
3570 nigel 63 0: abcdef
3571     1234abcdef
3572     --->1234abcdef
3573 nigel 75 0 ^ ^ d
3574 nigel 63 0: abcdef
3575     *** Failers
3576     No match
3577     abcxyz
3578     No match
3579     abcxyzf
3580     --->abcxyzf
3581 nigel 75 0 ^ ^ d
3582 nigel 63 No match
3583    
3584     /abc(?C)de(?C1)f/
3585     Capturing subpattern count = 0
3586     No options
3587     First char = 'a'
3588     Need char = 'f'
3589     123abcdef
3590     --->123abcdef
3591 nigel 75 0 ^ ^ d
3592     1 ^ ^ f
3593 nigel 63 0: abcdef
3594    
3595     /(?C1)\dabc(?C2)def/
3596     Capturing subpattern count = 0
3597     No options
3598     No first char
3599     Need char = 'f'
3600     1234abcdef
3601     --->1234abcdef
3602 nigel 75 1 ^ \d
3603     1 ^ \d
3604     1 ^ \d
3605     1 ^ \d
3606     2 ^ ^ d
3607 nigel 63 0: 4abcdef
3608     *** Failers
3609     No match
3610     abcdef
3611     --->abcdef
3612 nigel 75 1 ^ \d
3613     1 ^ \d
3614     1 ^ \d
3615     1 ^ \d
3616     1 ^ \d
3617     1 ^ \d
3618 nigel 63 No match
3619    
3620     /(?C255)ab/
3621     Capturing subpattern count = 0
3622     No options
3623     First char = 'a'
3624     Need char = 'b'
3625    
3626     /(?C256)ab/
3627     Failed: number after (?C is > 255 at offset 6
3628    
3629     /(?Cab)xx/
3630     Failed: closing ) for (?C expected at offset 3
3631    
3632     /(?C12vr)x/
3633     Failed: closing ) for (?C expected at offset 5
3634    
3635     /abc(?C)def/
3636     Capturing subpattern count = 0
3637     No options
3638     First char = 'a'
3639     Need char = 'f'
3640     *** Failers
3641     No match
3642     \x83\x0\x61bcdef
3643     --->\x83\x00abcdef
3644 nigel 75 0 ^ ^ d
3645 nigel 63 0: abcdef
3646    
3647     /(abc)(?C)de(?C1)f/
3648     Capturing subpattern count = 1
3649     No options
3650     First char = 'a'
3651     Need char = 'f'
3652     123abcdef
3653     --->123abcdef
3654 nigel 75 0 ^ ^ d
3655     1 ^ ^ f
3656 nigel 63 0: abcdef
3657     1: abc
3658     123abcdef\C+
3659     Callout 0: last capture = 1
3660     0: <unset>
3661     1: abc
3662     --->123abcdef
3663 nigel 75 ^ ^ d
3664 nigel 63 Callout 1: last capture = 1
3665     0: <unset>
3666     1: abc
3667     --->123abcdef
3668 nigel 75 ^ ^ f
3669 nigel 63 0: abcdef
3670     1: abc
3671     123abcdef\C-
3672     0: abcdef
3673     1: abc
3674     *** Failers
3675     No match
3676     123abcdef\C!1
3677     --->123abcdef
3678 nigel 75 0 ^ ^ d
3679     1 ^ ^ f
3680 nigel 63 No match
3681    
3682     /(?C0)(abc(?C1))*/
3683     Capturing subpattern count = 1
3684     No options
3685     No first char
3686     No need char
3687     abcabcabc
3688     --->abcabcabc
3689 nigel 75 0 ^ (abc(?C1))*
3690     1 ^ ^ )
3691     1 ^ ^ )
3692     1 ^ ^ )
3693 nigel 63 0: abcabcabc
3694     1: abc
3695     abcabc\C!1!3
3696     --->abcabc
3697 nigel 75 0 ^ (abc(?C1))*
3698     1 ^ ^ )
3699     1 ^ ^ )
3700 nigel 63 0: abcabc
3701     1: abc
3702     *** Failers
3703     --->*** Failers
3704 nigel 75 0 ^ (abc(?C1))*
3705 nigel 63 0:
3706     abcabcabc\C!1!3
3707     --->abcabcabc
3708 nigel 75 0 ^ (abc(?C1))*
3709     1 ^ ^ )
3710     1 ^ ^ )
3711     1 ^ ^ )
3712 nigel 63 0: abcabc
3713     1: abc
3714    
3715     /(\d{3}(?C))*/
3716     Capturing subpattern count = 1
3717 nigel 75 Partial matching not supported
3718 nigel 63 No options
3719     No first char
3720     No need char
3721     123\C+
3722     Callout 0: last capture = -1
3723     0: <unset>
3724     --->123
3725 nigel 75 ^ ^ )
3726 nigel 63 0: 123
3727     1: 123
3728     123456\C+
3729     Callout 0: last capture = -1
3730     0: <unset>
3731     --->123456
3732 nigel 75 ^ ^ )
3733 nigel 63 Callout 0: last capture = 1
3734     0: <unset>
3735     1: 123
3736     --->123456
3737 nigel 75 ^ ^ )
3738 nigel 63 0: 123456
3739     1: 456
3740     123456789\C+
3741     Callout 0: last capture = -1
3742     0: <unset>
3743     --->123456789
3744 nigel 75 ^ ^ )
3745 nigel 63 Callout 0: last capture = 1
3746     0: <unset>
3747     1: 123
3748     --->123456789
3749 nigel 75 ^ ^ )
3750 nigel 63 Callout 0: last capture = 1
3751     0: <unset>
3752     1: 456
3753     --->123456789
3754 nigel 75 ^ ^ )
3755 nigel 63 0: 123456789
3756     1: 789
3757    
3758     /((xyz)(?C)p|(?C1)xyzabc)/
3759     Capturing subpattern count = 2
3760     No options
3761     First char = 'x'
3762     No need char
3763     xyzabc\C+
3764     Callout 0: last capture = 2
3765     0: <unset>
3766     1: <unset>
3767     2: xyz
3768     --->xyzabc
3769 nigel 75 ^ ^ p
3770 nigel 63 Callout 1: last capture = -1
3771     0: <unset>
3772     --->xyzabc
3773 nigel 75 ^ x
3774 nigel 63 0: xyzabc
3775     1: xyzabc
3776    
3777     /(X)((xyz)(?C)p|(?C1)xyzabc)/
3778     Capturing subpattern count = 3
3779     No options
3780     First char = 'X'
3781     Need char = 'x'
3782     Xxyzabc\C+
3783     Callout 0: last capture = 3
3784     0: <unset>
3785     1: X
3786     2: <unset>
3787     3: xyz
3788     --->Xxyzabc
3789 nigel 75 ^ ^ p
3790 nigel 63 Callout 1: last capture = 1
3791     0: <unset>
3792     1: X
3793     --->Xxyzabc
3794 nigel 75 ^^ x
3795 nigel 63 0: Xxyzabc
3796     1: X
3797     2: xyzabc
3798    
3799     /(?=(abc))(?C)abcdef/
3800     Capturing subpattern count = 1
3801     No options
3802     First char = 'a'
3803     Need char = 'f'
3804     abcdef\C+
3805     Callout 0: last capture = 1
3806     0: <unset>
3807     1: abc
3808     --->abcdef
3809 nigel 75 ^ a
3810 nigel 63 0: abcdef
3811     1: abc
3812    
3813     /(?!(abc)(?C1)d)(?C2)abcxyz/
3814     Capturing subpattern count = 1
3815     No options
3816     First char = 'a'
3817     Need char = 'z'
3818     abcxyz\C+
3819     Callout 1: last capture = 1
3820     0: <unset>
3821     1: abc
3822     --->abcxyz
3823 nigel 75 ^ ^ d
3824 nigel 63 Callout 2: last capture = -1
3825     0: <unset>
3826     --->abcxyz
3827 nigel 75 ^ a
3828 nigel 63 0: abcxyz
3829    
3830     /(?<=(abc)(?C))xyz/
3831     Capturing subpattern count = 1
3832     No options
3833     First char = 'x'
3834     Need char = 'z'
3835     abcxyz\C+
3836     Callout 0: last capture = 1
3837     0: <unset>
3838     1: abc
3839     --->abcxyz
3840 nigel 75 ^ )
3841 nigel 63 0: xyz
3842     1: abc
3843    
3844 nigel 77 /a(b+)(c*)(?C1)/
3845     Capturing subpattern count = 2
3846     Partial matching not supported
3847     No options
3848     First char = 'a'
3849     Need char = 'b'
3850     abbbbbccc\C*1
3851     --->abbbbbccc
3852     1 ^ ^
3853     Callout data = 1
3854     1 ^ ^
3855     Callout data = 1
3856     1 ^ ^
3857     Callout data = 1
3858     1 ^ ^
3859     Callout data = 1
3860     1 ^ ^
3861     Callout data = 1
3862     1 ^ ^
3863     Callout data = 1
3864     1 ^ ^
3865     Callout data = 1
3866     1 ^ ^
3867     Callout data = 1
3868     No match
3869    
3870     /a(b+?)(c*?)(?C1)/
3871     Capturing subpattern count = 2
3872     Partial matching not supported
3873     No options
3874     First char = 'a'
3875     Need char = 'b'
3876     abbbbbccc\C*1
3877     --->abbbbbccc
3878     1 ^ ^
3879     Callout data = 1
3880     1 ^ ^
3881     Callout data = 1
3882     1 ^ ^
3883     Callout data = 1
3884     1 ^ ^
3885     Callout data = 1
3886     1 ^ ^
3887     Callout data = 1
3888     1 ^ ^
3889     Callout data = 1
3890     1 ^ ^
3891     Callout data = 1
3892     1 ^ ^
3893     Callout data = 1
3894     No match
3895    
3896 nigel 63 /(?C)abc/
3897     Capturing subpattern count = 0
3898     No options
3899     First char = 'a'
3900     Need char = 'c'
3901    
3902     /(?C)^abc/
3903     Capturing subpattern count = 0
3904     Options: anchored
3905     No first char
3906 nigel 65 No need char
3907 nigel 63
3908     /(?C)a|b/S
3909     Capturing subpattern count = 0
3910     No options
3911     No first char
3912     No need char
3913 nigel 75 Starting byte set: a b
3914 nigel 63
3915     /(?R)/
3916     Failed: recursive call could loop indefinitely at offset 3
3917    
3918     /(a|(?R))/
3919     Failed: recursive call could loop indefinitely at offset 6
3920    
3921     /(ab|(bc|(de|(?R))))/
3922     Failed: recursive call could loop indefinitely at offset 15
3923    
3924     /x(ab|(bc|(de|(?R))))/
3925     Capturing subpattern count = 3
3926     No options
3927     First char = 'x'
3928     No need char
3929     xab
3930     0: xab
3931     1: ab
3932     xbc
3933     0: xbc
3934     1: bc
3935     2: bc
3936     xde
3937     0: xde
3938     1: de
3939     2: de
3940     3: de
3941     xxab
3942     0: xxab
3943     1: xab
3944     2: xab
3945     3: xab
3946     xxxab
3947     0: xxxab
3948     1: xxab
3949     2: xxab
3950     3: xxab
3951     *** Failers
3952     No match
3953     xyab
3954     No match
3955    
3956     /(ab|(bc|(de|(?1))))/
3957     Failed: recursive call could loop indefinitely at offset 15
3958    
3959     /x(ab|(bc|(de|(?1)x)x)x)/
3960     Failed: recursive call could loop indefinitely at offset 16
3961    
3962     /^([^()]|\((?1)*\))*$/
3963     Capturing subpattern count = 1
3964     Options: anchored
3965     No first char
3966     No need char
3967     abc
3968     0: abc
3969     1: c
3970     a(b)c
3971     0: a(b)c
3972     1: c
3973     a(b(c))d
3974     0: a(b(c))d
3975     1: d
3976     *** Failers)
3977     No match
3978     a(b(c)d
3979     No match
3980    
3981     /^>abc>([^()]|\((?1)*\))*<xyz<$/
3982     Capturing subpattern count = 1
3983     Options: anchored
3984     No first char
3985     Need char = '<'
3986     >abc>123<xyz<
3987     0: >abc>123<xyz<
3988     1: 3
3989     >abc>1(2)3<xyz<
3990     0: >abc>1(2)3<xyz<
3991     1: 3
3992     >abc>(1(2)3)<xyz<
3993     0: >abc>(1(2)3)<xyz<
3994     1: (1(2)3)
3995    
3996     /(a(?1)b)/D
3997     ------------------------------------------------------------------
3998 nigel 75 0 16 Bra 0
3999     3 10 Bra 1
4000     6 a
4001     8 3 Recurse
4002     11 b
4003     13 10 Ket
4004     16 16 Ket
4005     19 End
4006 nigel 63 ------------------------------------------------------------------
4007     Capturing subpattern count = 1
4008     No options
4009     First char = 'a'
4010     Need char = 'b'
4011    
4012     /(a(?1)+b)/D
4013     ------------------------------------------------------------------
4014 nigel 75 0 22 Bra 0
4015     3 16 Bra 1
4016     6 a
4017     8 6 Bra 0
4018     11 3 Recurse
4019     14 6 KetRmax
4020     17 b
4021     19 16 Ket
4022     22 22 Ket
4023     25 End
4024 nigel 63 ------------------------------------------------------------------
4025     Capturing subpattern count = 1
4026     No options
4027     First char = 'a'
4028     Need char = 'b'
4029    
4030     /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/i
4031     Capturing subpattern count = 4
4032     Max back reference = 4
4033 nigel 75 Partial matching not supported
4034 nigel 63 Options: anchored caseless
4035     No first char
4036     No need char
4037     1221
4038     0: 1221
4039     1: 1221
4040     2: 1
4041     Satan, oscillate my metallic sonatas!
4042     0: Satan, oscillate my metallic sonatas!
4043     1: <unset>
4044     2: <unset>
4045     3: Satan, oscillate my metallic sonatas
4046     4: S
4047     A man, a plan, a canal: Panama!
4048     0: A man, a plan, a canal: Panama!
4049     1: <unset>
4050     2: <unset>
4051     3: A man, a plan, a canal: Panama
4052     4: A
4053     Able was I ere I saw Elba.
4054     0: Able was I ere I saw Elba.
4055     1: <unset>
4056     2: <unset>
4057     3: Able was I ere I saw Elba
4058     4: A
4059     *** Failers
4060     No match
4061     The quick brown fox
4062     No match
4063    
4064     /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
4065     Capturing subpattern count = 2
4066 nigel 75 Partial matching not supported
4067 nigel 63 Options: anchored
4068     No first char
4069     No need char
4070     12
4071     0: 12
4072     1: 12
4073     (((2+2)*-3)-7)
4074     0: (((2+2)*-3)-7)
4075     1: (((2+2)*-3)-7)
4076     2: -
4077     -12
4078     0: -12
4079     1: -12
4080     *** Failers
4081     No match
4082     ((2+2)*-3)-7)
4083     No match
4084    
4085     /^(x(y|(?1){2})z)/
4086     Capturing subpattern count = 2
4087     Options: anchored
4088     No first char
4089 nigel 65 No need char
4090 nigel 63 xyz
4091     0: xyz
4092     1: xyz
4093     2: y
4094     xxyzxyzz
4095     0: xxyzxyzz
4096     1: xxyzxyzz
4097     2: xyzxyz
4098     *** Failers
4099     No match
4100     xxyzz
4101     No match
4102     xxyzxyzxyzz
4103     No match
4104    
4105     /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
4106     Capturing subpattern count = 2
4107 nigel 75 Partial matching not supported
4108 nigel 63 Options: extended
4109     First char = '<'
4110     Need char = '>'
4111     <>
4112     0: <>
4113     1: <>
4114     2: <>
4115     <abcd>
4116     0: <abcd>
4117     1: <abcd>
4118     2: <abcd>
4119     <abc <123> hij>
4120     0: <abc <123> hij>
4121     1: <abc <123> hij>
4122     2: <abc <123> hij>
4123     <abc <def> hij>
4124     0: <def>
4125     1: <def>
4126     2: <def>
4127     <abc<>def>
4128     0: <abc<>def>
4129     1: <abc<>def>
4130     2: <abc<>def>
4131     <abc<>
4132     0: <>
4133     1: <>
4134     2: <>
4135     *** Failers
4136     No match
4137     <abc
4138     No match
4139    
4140     /(?1)/
4141     Failed: reference to non-existent subpattern at offset 3
4142    
4143     /((?2)(abc)/
4144     Failed: reference to non-existent subpattern at offset 4
4145    
4146     /^(abc)def(?1)/
4147     Capturing subpattern count = 1
4148     Options: anchored
4149     No first char
4150 nigel 65 No need char
4151 nigel 63 abcdefabc
4152     0: abcdefabc
4153     1: abc
4154    
4155     /^(a|b|c)=(?1)+/
4156     Capturing subpattern count = 1
4157     Options: anchored
4158     No first char
4159 nigel 65 No need char
4160 nigel 63 a=a
4161     0: a=a
4162     1: a
4163     a=b
4164     0: a=b
4165     1: a
4166     a=bc
4167     0: a=bc
4168     1: a
4169    
4170     /^(a|b|c)=((?1))+/
4171     Capturing subpattern count = 2
4172     Options: anchored
4173     No first char
4174 nigel 65 No need char
4175 nigel 63 a=a
4176     0: a=a
4177     1: a
4178     2: a
4179     a=b
4180     0: a=b
4181     1: a
4182     2: b
4183     a=bc
4184     0: a=bc
4185     1: a
4186     2: c
4187    
4188     /a(?P<name1>b|c)d(?P<longername2>e)/D
4189     ------------------------------------------------------------------
4190 nigel 75 0 28 Bra 0
4191     3 a
4192     5 5 Bra 1
4193     8 b
4194     10 5 Alt
4195     13 c
4196     15 10 Ket
4197     18 d
4198     20 5 Bra 2
4199     23 e
4200     25 5 Ket
4201     28 28 Ket
4202     31 End
4203 nigel 63 ------------------------------------------------------------------
4204     Capturing subpattern count = 2
4205     Named capturing subpatterns:
4206     longername2 2
4207     name1 1
4208     No options
4209     First char = 'a'
4210     Need char = 'e'
4211     abde
4212     0: abde
4213     1: b
4214     2: e
4215     acde
4216     0: acde
4217     1: c
4218     2: e
4219    
4220     /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/D
4221     ------------------------------------------------------------------
4222 nigel 75 0 35 Bra 0
4223     3 21 Bra 0
4224     6 a
4225     8 13 Bra 1
4226     11 c
4227     13 5 Bra 2
4228     16 d
4229     18 5 Ket
4230     21 13 Ket
4231     24 21 Ket
4232     27 5 Bra 3
4233     30 a
4234     32 5 Ket
4235     35 35 Ket
4236     38 End
4237 nigel 63 ------------------------------------------------------------------
4238     Capturing subpattern count = 3
4239     Named capturing subpatterns:
4240     a 3
4241     c 1
4242     d 2
4243     No options
4244     First char = 'a'
4245     Need char = 'a'
4246    
4247     /(?P<a>a)...(?P=a)bbb(?P>a)d/D
4248     ------------------------------------------------------------------
4249 nigel 75 0 28 Bra 0
4250     3 5 Bra 1
4251     6 a
4252     8 5 Ket
4253     11 Any