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

Contents of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 461 - (hide annotations) (download)
Mon Oct 5 10:59:35 2009 UTC (4 years, 11 months ago) by ph10
File size: 212968 byte(s)
Tidy up, remove trailing spaces, etc. for 8.00-RC1.

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