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

Contents of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 450 - (hide annotations) (download)
Wed Sep 16 10:56:40 2009 UTC (5 years, 1 month ago) by ph10
File size: 195259 byte(s)
Minor doc fix; update tests by adding comments to each file, and generally 
tidying.

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