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

Contents of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 63 - (hide annotations) (download)
Sat Feb 24 21:40:03 2007 UTC (7 years, 6 months ago) by nigel
File size: 82707 byte(s)
Load pcre-4.0 into code/trunk.

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