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

Contents of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 511 - (hide annotations) (download)
Mon Mar 29 09:25:38 2010 UTC (4 years, 7 months ago) by ph10
File size: 222786 byte(s)
Make (*ACCEPT) work inside an atomic group.

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 ph10 488 /This one is here because Perl behaves differently; see also the following/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 ph10 488 aaaa
873     No match
874 nigel 41 aaaaaa
875 ph10 488 No match
876    
877     /Perl does not fail these two for the final subjects. Neither did PCRE until/
878     /release 8.01. The problem is in backtracking into a subpattern that contains/
879     No match
880     /a recursive reference to itself. PCRE has now made these into atomic patterns./
881     No match
882 ph10 102
883 ph10 488 /^(xa|=?\1a){2}$/
884     xa=xaa
885     0: xa=xaa
886     1: =xaa
887     ** Failers
888     No match
889     xa=xaaa
890     No match
891    
892     /^(xa|=?\1a)+$/
893     xa=xaa
894     0: xa=xaa
895     1: =xaa
896     ** Failers
897     No match
898     xa=xaaa
899     No match
900    
901 nigel 93 /These are syntax tests from Perl 5.005/I
902 nigel 43 Capturing subpattern count = 0
903 nigel 41 No options
904     First char = 'T'
905 nigel 43 Need char = '5'
906 nigel 41
907     /a[b-a]/
908     Failed: range out of order in character class at offset 4
909    
910     /a[]b/
911     Failed: missing terminating ] for character class at offset 4
912    
913     /a[/
914     Failed: missing terminating ] for character class at offset 2
915    
916     /*a/
917     Failed: nothing to repeat at offset 0
918    
919     /(*)b/
920     Failed: nothing to repeat at offset 1
921    
922     /abc)/
923     Failed: unmatched parentheses at offset 3
924    
925     /(abc/
926     Failed: missing ) at offset 4
927    
928     /a**/
929     Failed: nothing to repeat at offset 2
930    
931     /)(/
932     Failed: unmatched parentheses at offset 0
933    
934     /\1/
935 nigel 63 Failed: reference to non-existent subpattern at offset 2
936 nigel 41
937     /\2/
938 nigel 63 Failed: reference to non-existent subpattern at offset 2
939 nigel 41
940     /(a)|\2/
941 nigel 63 Failed: reference to non-existent subpattern at offset 6
942 nigel 41
943 nigel 93 /a[b-a]/Ii
944 nigel 41 Failed: range out of order in character class at offset 4
945    
946 nigel 93 /a[]b/Ii
947 nigel 41 Failed: missing terminating ] for character class at offset 4
948    
949 nigel 93 /a[/Ii
950 nigel 41 Failed: missing terminating ] for character class at offset 2
951    
952 nigel 93 /*a/Ii
953 nigel 41 Failed: nothing to repeat at offset 0
954    
955 nigel 93 /(*)b/Ii
956 nigel 41 Failed: nothing to repeat at offset 1
957    
958 nigel 93 /abc)/Ii
959 nigel 41 Failed: unmatched parentheses at offset 3
960    
961 nigel 93 /(abc/Ii
962 nigel 41 Failed: missing ) at offset 4
963    
964 nigel 93 /a**/Ii
965 nigel 41 Failed: nothing to repeat at offset 2
966    
967 nigel 93 /)(/Ii
968 nigel 41 Failed: unmatched parentheses at offset 0
969    
970     /:(?:/
971     Failed: missing ) at offset 4
972    
973     /(?<%)b/
974 nigel 63 Failed: unrecognized character after (?< at offset 3
975 nigel 41
976     /a(?{)b/
977 ph10 269 Failed: unrecognized character after (? or (?- at offset 3
978 nigel 41
979     /a(?{{})b/
980 ph10 269 Failed: unrecognized character after (? or (?- at offset 3
981 nigel 41
982     /a(?{}})b/
983 ph10 269 Failed: unrecognized character after (? or (?- at offset 3
984 nigel 41
985     /a(?{"{"})b/
986 ph10 269 Failed: unrecognized character after (? or (?- at offset 3
987 nigel 41
988     /a(?{"{"}})b/
989 ph10 269 Failed: unrecognized character after (? or (?- at offset 3
990 nigel 41
991     /(?(1?)a|b)/
992 nigel 91 Failed: malformed number or name after (?( at offset 4
993 nigel 41
994     /[a[:xyz:/
995     Failed: missing terminating ] for character class at offset 8
996    
997     /(?<=x+)y/
998     Failed: lookbehind assertion is not fixed length at offset 6
999    
1000     /a{37,17}/
1001     Failed: numbers out of order in {} quantifier at offset 7
1002    
1003     /abc/\
1004     Failed: \ at end of pattern at offset 4
1005    
1006     /abc/\P
1007     Failed: POSIX code 9: bad escape sequence at offset 4
1008    
1009     /abc/\i
1010     Failed: \ at end of pattern at offset 4
1011    
1012 nigel 93 /(a)bc(d)/I
1013 nigel 43 Capturing subpattern count = 2
1014 nigel 41 No options
1015     First char = 'a'
1016 nigel 43 Need char = 'd'
1017 nigel 41 abcd
1018     0: abcd
1019     1: a
1020     2: d
1021     abcd\C2
1022     0: abcd
1023     1: a
1024     2: d
1025     2C d (1)
1026     abcd\C5
1027     0: abcd
1028     1: a
1029     2: d
1030     copy substring 5 failed -7
1031 ph10 102
1032 nigel 93 /(.{20})/I
1033 nigel 43 Capturing subpattern count = 1
1034 nigel 41 No options
1035     No first char
1036 nigel 43 No need char
1037 nigel 41 abcdefghijklmnopqrstuvwxyz
1038     0: abcdefghijklmnopqrst
1039     1: abcdefghijklmnopqrst
1040     abcdefghijklmnopqrstuvwxyz\C1
1041     0: abcdefghijklmnopqrst
1042     1: abcdefghijklmnopqrst
1043 nigel 91 1C abcdefghijklmnopqrst (20)
1044 nigel 41 abcdefghijklmnopqrstuvwxyz\G1
1045     0: abcdefghijklmnopqrst
1046     1: abcdefghijklmnopqrst
1047     1G abcdefghijklmnopqrst (20)
1048 ph10 102
1049 nigel 93 /(.{15})/I
1050 nigel 43 Capturing subpattern count = 1
1051 nigel 41 No options
1052     No first char
1053 nigel 43 No need char
1054 nigel 41 abcdefghijklmnopqrstuvwxyz
1055     0: abcdefghijklmno
1056     1: abcdefghijklmno
1057     abcdefghijklmnopqrstuvwxyz\C1\G1
1058     0: abcdefghijklmno
1059     1: abcdefghijklmno
1060     1C abcdefghijklmno (15)
1061     1G abcdefghijklmno (15)
1062    
1063 nigel 93 /(.{16})/I
1064 nigel 43 Capturing subpattern count = 1
1065 nigel 41 No options
1066     No first char
1067 nigel 43 No need char
1068 nigel 41 abcdefghijklmnopqrstuvwxyz
1069     0: abcdefghijklmnop
1070     1: abcdefghijklmnop
1071     abcdefghijklmnopqrstuvwxyz\C1\G1\L
1072     0: abcdefghijklmnop
1073     1: abcdefghijklmnop
1074 nigel 91 1C abcdefghijklmnop (16)
1075 nigel 41 1G abcdefghijklmnop (16)
1076     0L abcdefghijklmnop
1077     1L abcdefghijklmnop
1078 ph10 102
1079 nigel 93 /^(a|(bc))de(f)/I
1080 nigel 43 Capturing subpattern count = 3
1081 nigel 41 Options: anchored
1082     No first char
1083 nigel 65 No need char
1084 ph10 102 adef\G1\G2\G3\G4\L
1085 nigel 41 0: adef
1086     1: a
1087     2: <unset>
1088     3: f
1089     1G a (1)
1090     2G (0)
1091     3G f (1)
1092     get substring 4 failed -7
1093     0L adef
1094     1L a
1095     2L
1096     3L f
1097 ph10 102 bcdef\G1\G2\G3\G4\L
1098 nigel 41 0: bcdef
1099     1: bc
1100     2: bc
1101     3: f
1102     1G bc (2)
1103     2G bc (2)
1104     3G f (1)
1105     get substring 4 failed -7
1106     0L bcdef
1107     1L bc
1108     2L bc
1109     3L f
1110 ph10 102 adefghijk\C0
1111 nigel 41 0: adef
1112     1: a
1113     2: <unset>
1114     3: f
1115     0C adef (4)
1116 ph10 102
1117 nigel 93 /^abc\00def/I
1118 nigel 43 Capturing subpattern count = 0
1119 nigel 41 Options: anchored
1120     No first char
1121 nigel 65 No need char
1122 ph10 102 abc\00def\L\C0
1123 nigel 41 0: abc\x00def
1124     0C abc (7)
1125     0L abc
1126 ph10 102
1127     /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
1128     )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
1129 ph10 162 )?)?)?)?)?)?)?)?)?otherword/I
1130 nigel 43 Capturing subpattern count = 8
1131 ph10 226 Contains explicit CR or LF match
1132 nigel 41 No options
1133     First char = 'w'
1134 nigel 43 Need char = 'd'
1135 nigel 41
1136 ph10 161 /.*X/IDZ
1137 nigel 41 ------------------------------------------------------------------
1138 ph10 192 Bra
1139 ph10 161 Any*
1140     X
1141     Ket
1142     End
1143 nigel 41 ------------------------------------------------------------------
1144 nigel 43 Capturing subpattern count = 0
1145 nigel 41 No options
1146 nigel 91 First char at start or follows newline
1147 nigel 43 Need char = 'X'
1148 nigel 41
1149 ph10 161 /.*X/IDZs
1150 nigel 41 ------------------------------------------------------------------
1151 ph10 192 Bra
1152 ph10 342 AllAny*
1153 ph10 161 X
1154     Ket
1155     End
1156 nigel 41 ------------------------------------------------------------------
1157 nigel 43 Capturing subpattern count = 0
1158 nigel 41 Options: anchored dotall
1159     No first char
1160 nigel 43 Need char = 'X'
1161 nigel 41
1162 ph10 161 /(.*X|^B)/IDZ
1163 nigel 41 ------------------------------------------------------------------
1164 ph10 192 Bra
1165     CBra 1
1166 ph10 161 Any*
1167     X
1168     Alt
1169     ^
1170     B
1171     Ket
1172     Ket
1173     End
1174 nigel 41 ------------------------------------------------------------------
1175 nigel 43 Capturing subpattern count = 1
1176 nigel 41 No options
1177 nigel 91 First char at start or follows newline
1178 nigel 43 No need char
1179 nigel 41
1180 ph10 161 /(.*X|^B)/IDZs
1181 nigel 41 ------------------------------------------------------------------
1182 ph10 192 Bra
1183     CBra 1
1184 ph10 342 AllAny*
1185 ph10 161 X
1186     Alt
1187     ^
1188     B
1189     Ket
1190     Ket
1191     End
1192 nigel 41 ------------------------------------------------------------------
1193 nigel 43 Capturing subpattern count = 1
1194 nigel 41 Options: anchored dotall
1195     No first char
1196 nigel 43 No need char
1197 ph10 102
1198 ph10 161 /(?s)(.*X|^B)/IDZ
1199 nigel 41 ------------------------------------------------------------------
1200 ph10 192 Bra
1201     CBra 1
1202 ph10 342 AllAny*
1203 ph10 161 X
1204     Alt
1205     ^
1206     B
1207     Ket
1208     Ket
1209     End
1210 nigel 41 ------------------------------------------------------------------
1211 nigel 43 Capturing subpattern count = 1
1212 nigel 41 Options: anchored dotall
1213     No first char
1214 nigel 43 No need char
1215 nigel 41
1216 ph10 161 /(?s:.*X|^B)/IDZ
1217 nigel 41 ------------------------------------------------------------------
1218 ph10 192 Bra
1219     Bra
1220 ph10 161 04 Opt
1221 ph10 342 AllAny*
1222 ph10 161 X
1223     Alt
1224     04 Opt
1225     ^
1226     B
1227     Ket
1228     00 Opt
1229     Ket
1230     End
1231 nigel 41 ------------------------------------------------------------------
1232 nigel 43 Capturing subpattern count = 0
1233 ph10 342 Options: anchored
1234     No first char
1235 nigel 43 No need char
1236 nigel 41
1237 nigel 93 /\Biss\B/I+
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/I+P
1247 nigel 41 Mississippi
1248     0: iss
1249     0+ issippi
1250    
1251 nigel 93 /iss/IG+
1252 nigel 43 Capturing subpattern count = 0
1253 nigel 41 No options
1254     First char = 'i'
1255 nigel 43 Need char = 's'
1256 nigel 41 Mississippi
1257     0: iss
1258     0+ issippi
1259     0: iss
1260     0+ ippi
1261    
1262 nigel 93 /\Biss\B/IG+
1263 nigel 43 Capturing subpattern count = 0
1264 nigel 41 No options
1265     First char = 'i'
1266 nigel 43 Need char = 's'
1267 nigel 41 Mississippi
1268     0: iss
1269     0+ issippi
1270    
1271 nigel 93 /\Biss\B/Ig+
1272 nigel 43 Capturing subpattern count = 0
1273 nigel 41 No options
1274     First char = 'i'
1275 nigel 43 Need char = 's'
1276 nigel 41 Mississippi
1277     0: iss
1278     0+ issippi
1279     0: iss
1280     0+ ippi
1281     *** Failers
1282     No match
1283     Mississippi\A
1284     No match
1285    
1286 nigel 93 /(?<=[Ms])iss/Ig+
1287 nigel 43 Capturing subpattern count = 0
1288 nigel 41 No options
1289     First char = 'i'
1290 nigel 43 Need char = 's'
1291 nigel 41 Mississippi
1292     0: iss
1293     0+ issippi
1294     0: iss
1295     0+ ippi
1296    
1297 nigel 93 /(?<=[Ms])iss/IG+
1298 nigel 43 Capturing subpattern count = 0
1299 nigel 41 No options
1300     First char = 'i'
1301 nigel 43 Need char = 's'
1302 nigel 41 Mississippi
1303     0: iss
1304     0+ issippi
1305    
1306 nigel 93 /^iss/Ig+
1307 nigel 43 Capturing subpattern count = 0
1308 nigel 41 Options: anchored
1309     No first char
1310 nigel 65 No need char
1311 nigel 41 ississippi
1312     0: iss
1313     0+ issippi
1314 ph10 102
1315 nigel 93 /.*iss/Ig+
1316 nigel 43 Capturing subpattern count = 0
1317 nigel 41 No options
1318 nigel 91 First char at start or follows newline
1319 nigel 43 Need char = 's'
1320 ph10 102 abciss\nxyzisspqr
1321 nigel 41 0: abciss
1322     0+ \x0axyzisspqr
1323     0: xyziss
1324     0+ pqr
1325    
1326 nigel 93 /.i./I+g
1327 nigel 43 Capturing subpattern count = 0
1328 nigel 41 No options
1329     No first char
1330 nigel 43 Need char = 'i'
1331 nigel 41 Mississippi
1332     0: Mis
1333     0+ sissippi
1334     0: sis
1335     0+ sippi
1336     0: sip
1337     0+ pi
1338     Mississippi\A
1339     0: Mis
1340     0+ sissippi
1341     0: sis
1342     0+ sippi
1343     0: sip
1344     0+ pi
1345     Missouri river
1346     0: Mis
1347     0+ souri river
1348     0: ri
1349     0+ river
1350     0: riv
1351     0+ er
1352 ph10 102 Missouri river\A
1353 nigel 41 0: Mis
1354     0+ souri river
1355    
1356 nigel 93 /^.is/I+g
1357 nigel 43 Capturing subpattern count = 0
1358 nigel 41 Options: anchored
1359     No first char
1360 nigel 65 No need char
1361 nigel 41 Mississippi
1362     0: Mis
1363     0+ sissippi
1364    
1365 nigel 93 /^ab\n/Ig+
1366 nigel 43 Capturing subpattern count = 0
1367 ph10 226 Contains explicit CR or LF match
1368 nigel 41 Options: anchored
1369     No first char
1370 nigel 65 No need char
1371 nigel 41 ab\nab\ncd
1372     0: ab\x0a
1373     0+ ab\x0acd
1374    
1375 nigel 93 /^ab\n/Img+
1376 nigel 43 Capturing subpattern count = 0
1377 ph10 226 Contains explicit CR or LF match
1378 nigel 41 Options: multiline
1379 nigel 91 First char at start or follows newline
1380 nigel 43 Need char = 10
1381 nigel 41 ab\nab\ncd
1382     0: ab\x0a
1383     0+ ab\x0acd
1384     0: ab\x0a
1385     0+ cd
1386    
1387 nigel 93 /abc/I
1388 nigel 43 Capturing subpattern count = 0
1389 nigel 41 No options
1390     First char = 'a'
1391 nigel 43 Need char = 'c'
1392 nigel 41
1393 nigel 93 /abc|bac/I
1394 nigel 43 Capturing subpattern count = 0
1395 nigel 41 No options
1396     No first char
1397 nigel 43 Need char = 'c'
1398 nigel 41
1399 nigel 93 /(abc|bac)/I
1400 nigel 43 Capturing subpattern count = 1
1401 nigel 41 No options
1402     No first char
1403 nigel 43 Need char = 'c'
1404 nigel 41
1405 nigel 93 /(abc|(c|dc))/I
1406 nigel 43 Capturing subpattern count = 2
1407 nigel 41 No options
1408     No first char
1409 nigel 43 Need char = 'c'
1410 nigel 41
1411 nigel 93 /(abc|(d|de)c)/I
1412 nigel 43 Capturing subpattern count = 2
1413 nigel 41 No options
1414     No first char
1415 nigel 43 Need char = 'c'
1416 nigel 41
1417 nigel 93 /a*/I
1418 nigel 43 Capturing subpattern count = 0
1419 nigel 41 No options
1420     No first char
1421 nigel 43 No need char
1422 nigel 41
1423 nigel 93 /a+/I
1424 nigel 43 Capturing subpattern count = 0
1425 nigel 41 No options
1426     First char = 'a'
1427 nigel 43 No need char
1428 nigel 41
1429 nigel 93 /(baa|a+)/I
1430 nigel 43 Capturing subpattern count = 1
1431 nigel 41 No options
1432     No first char
1433 nigel 43 Need char = 'a'
1434 nigel 41
1435 nigel 93 /a{0,3}/I
1436 nigel 43 Capturing subpattern count = 0
1437 nigel 41 No options
1438     No first char
1439 nigel 43 No need char
1440 nigel 41
1441 nigel 93 /baa{3,}/I
1442 nigel 43 Capturing subpattern count = 0
1443 nigel 41 No options
1444     First char = 'b'
1445 nigel 43 Need char = 'a'
1446 nigel 41
1447 nigel 93 /"([^\\"]+|\\.)*"/I
1448 nigel 43 Capturing subpattern count = 1
1449 nigel 41 No options
1450     First char = '"'
1451 nigel 43 Need char = '"'
1452 nigel 41
1453 nigel 93 /(abc|ab[cd])/I
1454 nigel 43 Capturing subpattern count = 1
1455 nigel 41 No options
1456     First char = 'a'
1457 nigel 43 No need char
1458 nigel 41
1459 nigel 93 /(a|.)/I
1460 nigel 43 Capturing subpattern count = 1
1461 nigel 41 No options
1462     No first char
1463 nigel 43 No need char
1464 nigel 41
1465 nigel 93 /a|ba|\w/I
1466 nigel 43 Capturing subpattern count = 0
1467 nigel 41 No options
1468     No first char
1469 nigel 43 No need char
1470 nigel 41
1471 nigel 93 /abc(?=pqr)/I
1472 nigel 43 Capturing subpattern count = 0
1473 nigel 41 No options
1474     First char = 'a'
1475 nigel 43 Need char = 'r'
1476 nigel 41
1477 nigel 93 /...(?<=abc)/I
1478 nigel 43 Capturing subpattern count = 0
1479 nigel 41 No options
1480     No first char
1481 nigel 43 No need char
1482 nigel 41
1483 nigel 93 /abc(?!pqr)/I
1484 nigel 43 Capturing subpattern count = 0
1485 nigel 41 No options
1486     First char = 'a'
1487 nigel 43 Need char = 'c'
1488 nigel 41
1489 nigel 93 /ab./I
1490 nigel 43 Capturing subpattern count = 0
1491 nigel 41 No options
1492     First char = 'a'
1493 nigel 43 Need char = 'b'
1494 nigel 41
1495 nigel 93 /ab[xyz]/I
1496 nigel 43 Capturing subpattern count = 0
1497 nigel 41 No options
1498     First char = 'a'
1499 nigel 43 Need char = 'b'
1500 nigel 41
1501 nigel 93 /abc*/I
1502 nigel 43 Capturing subpattern count = 0
1503 nigel 41 No options
1504     First char = 'a'
1505 nigel 43 Need char = 'b'
1506 nigel 41
1507 nigel 93 /ab.c*/I
1508 nigel 43 Capturing subpattern count = 0
1509 nigel 41 No options
1510     First char = 'a'
1511 nigel 43 Need char = 'b'
1512 nigel 41
1513 nigel 93 /a.c*/I
1514 nigel 43 Capturing subpattern count = 0
1515 nigel 41 No options
1516     First char = 'a'
1517 nigel 43 No need char
1518 nigel 41
1519 nigel 93 /.c*/I
1520 nigel 43 Capturing subpattern count = 0
1521 nigel 41 No options
1522     No first char
1523 nigel 43 No need char
1524 nigel 41
1525 nigel 93 /ac*/I
1526 nigel 43 Capturing subpattern count = 0
1527 nigel 41 No options
1528     First char = 'a'
1529 nigel 43 No need char
1530 nigel 41
1531 nigel 93 /(a.c*|b.c*)/I
1532 nigel 43 Capturing subpattern count = 1
1533 nigel 41 No options
1534     No first char
1535 nigel 43 No need char
1536 nigel 41
1537 nigel 93 /a.c*|aba/I
1538 nigel 43 Capturing subpattern count = 0
1539 nigel 41 No options
1540     First char = 'a'
1541 nigel 43 No need char
1542 nigel 41
1543 nigel 93 /.+a/I
1544 nigel 43 Capturing subpattern count = 0
1545 nigel 41 No options
1546     No first char
1547 nigel 43 Need char = 'a'
1548 nigel 41
1549 nigel 93 /(?=abcda)a.*/I
1550 nigel 43 Capturing subpattern count = 0
1551 nigel 41 No options
1552     First char = 'a'
1553 nigel 63 Need char = 'a'
1554 nigel 41
1555 nigel 93 /(?=a)a.*/I
1556 nigel 43 Capturing subpattern count = 0
1557 nigel 41 No options
1558     First char = 'a'
1559 nigel 43 No need char
1560 nigel 41
1561 nigel 93 /a(b)*/I
1562 nigel 43 Capturing subpattern count = 1
1563 nigel 41 No options
1564     First char = 'a'
1565 nigel 43 No need char
1566 nigel 41
1567 nigel 93 /a\d*/I
1568 nigel 43 Capturing subpattern count = 0
1569 nigel 41 No options
1570     First char = 'a'
1571 nigel 43 No need char
1572 nigel 41
1573 nigel 93 /ab\d*/I
1574 nigel 43 Capturing subpattern count = 0
1575 nigel 41 No options
1576     First char = 'a'
1577 nigel 43 Need char = 'b'
1578 nigel 41
1579 nigel 93 /a(\d)*/I
1580 nigel 43 Capturing subpattern count = 1
1581 nigel 41 No options
1582     First char = 'a'
1583 nigel 43 No need char
1584 nigel 41
1585 nigel 93 /abcde{0,0}/I
1586 nigel 43 Capturing subpattern count = 0
1587 nigel 41 No options
1588     First char = 'a'
1589 nigel 43 Need char = 'd'
1590 nigel 41
1591 nigel 93 /ab\d+/I
1592 nigel 43 Capturing subpattern count = 0
1593 nigel 41 No options
1594     First char = 'a'
1595 nigel 43 Need char = 'b'
1596 nigel 41
1597 ph10 270 /a(?(1)b)(.)/I
1598     Capturing subpattern count = 1
1599 nigel 41 No options
1600     First char = 'a'
1601 nigel 43 No need char
1602 nigel 41
1603 ph10 270 /a(?(1)bag|big)(.)/I
1604     Capturing subpattern count = 1
1605 nigel 41 No options
1606     First char = 'a'
1607 nigel 43 Need char = 'g'
1608 nigel 41
1609 ph10 270 /a(?(1)bag|big)*(.)/I
1610     Capturing subpattern count = 1
1611 nigel 41 No options
1612     First char = 'a'
1613 nigel 43 No need char
1614 nigel 41
1615 ph10 270 /a(?(1)bag|big)+(.)/I
1616     Capturing subpattern count = 1
1617 nigel 41 No options
1618     First char = 'a'
1619 nigel 43 Need char = 'g'
1620 nigel 41
1621 ph10 270 /a(?(1)b..|b..)(.)/I
1622     Capturing subpattern count = 1
1623 nigel 41 No options
1624     First char = 'a'
1625 nigel 43 Need char = 'b'
1626 nigel 41
1627 nigel 93 /ab\d{0}e/I
1628 nigel 43 Capturing subpattern count = 0
1629 nigel 41 No options
1630     First char = 'a'
1631 nigel 43 Need char = 'e'
1632 nigel 41
1633 nigel 93 /a?b?/I
1634 nigel 43 Capturing subpattern count = 0
1635 nigel 41 No options
1636     No first char
1637 nigel 43 No need char
1638 nigel 41 a
1639     0: a
1640     b
1641     0: b
1642     ab
1643     0: ab
1644     \
1645     0:
1646     *** Failers
1647     0:
1648 ph10 102 \N
1649 nigel 41 No match
1650 ph10 102
1651 nigel 93 /|-/I
1652 nigel 43 Capturing subpattern count = 0
1653 nigel 41 No options
1654     No first char
1655 nigel 43 No need char
1656 nigel 41 abcd
1657     0:
1658     -abc
1659     0:
1660     \Nab-c
1661     0: -
1662     *** Failers
1663     0:
1664 ph10 102 \Nabc
1665 nigel 41 No match
1666    
1667 ph10 432 /a*(b+)(z)(z)/P
1668 nigel 41 aaaabbbbzzzz
1669     0: aaaabbbbzz
1670     1: bbbb
1671     2: z
1672     3: z
1673     aaaabbbbzzzz\O0
1674     aaaabbbbzzzz\O1
1675     0: aaaabbbbzz
1676     aaaabbbbzzzz\O2
1677     0: aaaabbbbzz
1678     1: bbbb
1679     aaaabbbbzzzz\O3
1680     0: aaaabbbbzz
1681     1: bbbb
1682     2: z
1683     aaaabbbbzzzz\O4
1684     0: aaaabbbbzz
1685     1: bbbb
1686     2: z
1687     3: z
1688     aaaabbbbzzzz\O5
1689     0: aaaabbbbzz
1690     1: bbbb
1691     2: z
1692     3: z
1693 ph10 102
1694     /^.?abcd/IS
1695 nigel 43 Capturing subpattern count = 0
1696     Options: anchored
1697     No first char
1698     Need char = 'd'
1699 ph10 455 Subject length lower bound = 4
1700     No set of starting bytes
1701 nigel 41
1702 nigel 43 /\( # ( at start
1703     (?: # Non-capturing bracket
1704     (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
1705     | # Or
1706     (?R) # Recurse - i.e. nested bracketed string
1707     )* # Zero or more contents
1708     \) # Closing )
1709 nigel 93 /Ix
1710 nigel 43 Capturing subpattern count = 0
1711     Options: extended
1712     First char = '('
1713     Need char = ')'
1714     (abcd)
1715     0: (abcd)
1716     (abcd)xyz
1717     0: (abcd)
1718     xyz(abcd)
1719     0: (abcd)
1720 ph10 102 (ab(xy)cd)pqr
1721 nigel 43 0: (ab(xy)cd)
1722 ph10 102 (ab(xycd)pqr
1723 nigel 43 0: (xycd)
1724 ph10 102 () abc ()
1725 nigel 43 0: ()
1726     12(abcde(fsh)xyz(foo(bar))lmno)89
1727     0: (abcde(fsh)xyz(foo(bar))lmno)
1728     *** Failers
1729     No match
1730 ph10 102 abcd
1731 nigel 43 No match
1732     abcd)
1733     No match
1734 ph10 102 (abcd
1735 nigel 43 No match
1736    
1737 nigel 93 /\( ( (?>[^()]+) | (?R) )* \) /Ixg
1738 nigel 43 Capturing subpattern count = 1
1739     Options: extended
1740     First char = '('
1741     Need char = ')'
1742 ph10 102 (ab(xy)cd)pqr
1743 nigel 43 0: (ab(xy)cd)
1744     1: cd
1745     1(abcd)(x(y)z)pqr
1746     0: (abcd)
1747     1: abcd
1748     0: (x(y)z)
1749     1: z
1750    
1751 nigel 93 /\( (?: (?>[^()]+) | (?R) ) \) /Ix
1752 nigel 43 Capturing subpattern count = 0
1753     Options: extended
1754     First char = '('
1755     Need char = ')'
1756     (abcd)
1757     0: (abcd)
1758     (ab(xy)cd)
1759     0: (xy)
1760 ph10 102 (a(b(c)d)e)
1761 nigel 43 0: (c)
1762 ph10 102 ((ab))
1763 nigel 43 0: ((ab))
1764     *** Failers
1765     No match
1766 ph10 102 ()
1767 nigel 43 No match
1768    
1769 nigel 93 /\( (?: (?>[^()]+) | (?R) )? \) /Ix
1770 nigel 43 Capturing subpattern count = 0
1771     Options: extended
1772     First char = '('
1773     Need char = ')'
1774     ()
1775     0: ()
1776     12(abcde(fsh)xyz(foo(bar))lmno)89
1777     0: (fsh)
1778    
1779 nigel 93 /\( ( (?>[^()]+) | (?R) )* \) /Ix
1780 nigel 43 Capturing subpattern count = 1
1781     Options: extended
1782     First char = '('
1783     Need char = ')'
1784     (ab(xy)cd)
1785     0: (ab(xy)cd)
1786     1: cd
1787    
1788 nigel 93 /\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
1789 nigel 43 Capturing subpattern count = 2
1790     Options: extended
1791     First char = '('
1792     Need char = ')'
1793     (ab(xy)cd)
1794     0: (ab(xy)cd)
1795     1: ab(xy)cd
1796     2: cd
1797    
1798 nigel 93 /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
1799 nigel 43 Capturing subpattern count = 3
1800     Options: extended
1801     First char = '('
1802     Need char = ')'
1803     (ab(xy)cd)
1804     0: (ab(xy)cd)
1805     1: <unset>
1806     2: ab(xy)cd
1807     3: cd
1808     (123ab(xy)cd)
1809     0: (123ab(xy)cd)
1810     1: 123
1811     2: ab(xy)cd
1812     3: cd
1813    
1814 nigel 93 /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
1815 nigel 43 Capturing subpattern count = 3
1816     Options: extended
1817     First char = '('
1818     Need char = ')'
1819     (ab(xy)cd)
1820     0: (ab(xy)cd)
1821     1: ab(xy)cd
1822     2: <unset>
1823     3: cd
1824     (123ab(xy)cd)
1825     0: (123ab(xy)cd)
1826     1: 123ab(xy)cd
1827     2: 123
1828     3: cd
1829    
1830 nigel 93 /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
1831 nigel 43 Capturing subpattern count = 11
1832     Options: extended
1833     First char = '('
1834     Need char = ')'
1835     (ab(xy)cd)
1836     0: (ab(xy)cd)
1837     1: ab(xy)cd
1838     2: ab(xy)cd
1839     3: ab(xy)cd
1840     4: ab(xy)cd
1841     5: ab(xy)cd
1842     6: ab(xy)cd
1843     7: ab(xy)cd
1844     8: ab(xy)cd
1845     9: ab(xy)cd
1846     10: ab(xy)cd
1847     11: cd
1848    
1849 nigel 93 /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
1850 nigel 43 Capturing subpattern count = 3
1851     Options: extended
1852     First char = '('
1853     Need char = ')'
1854     (abcd(xyz<p>qrs)123)
1855     0: (abcd(xyz<p>qrs)123)
1856     1: abcd(xyz<p>qrs)123
1857     2: 123
1858    
1859 nigel 93 /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
1860 nigel 43 Capturing subpattern count = 3
1861     Options: extended
1862     First char = '('
1863     Need char = ')'
1864     (ab(cd)ef)
1865     0: (ab(cd)ef)
1866     1: ab(cd)ef
1867     2: ef
1868     3: (cd)
1869     (ab(cd(ef)gh)ij)
1870     0: (ab(cd(ef)gh)ij)
1871     1: ab(cd(ef)gh)ij
1872     2: ij
1873     3: (cd(ef)gh)
1874    
1875 ph10 161 /^[[:alnum:]]/DZ
1876 nigel 43 ------------------------------------------------------------------
1877 ph10 192 Bra
1878 ph10 161 ^
1879     [0-9A-Za-z]
1880     Ket
1881     End
1882 nigel 43 ------------------------------------------------------------------
1883     Capturing subpattern count = 0
1884     Options: anchored
1885     No first char
1886     No need char
1887    
1888 ph10 161 /^[[:^alnum:]]/DZ
1889 nigel 75 ------------------------------------------------------------------
1890 ph10 192 Bra
1891 ph10 161 ^
1892 ph10 265 [\x00-/:-@[-`{-\xff] (neg)
1893 ph10 161 Ket
1894     End
1895 nigel 75 ------------------------------------------------------------------
1896     Capturing subpattern count = 0
1897     Options: anchored
1898     No first char
1899     No need char
1900    
1901 ph10 161 /^[[:alpha:]]/DZ
1902 nigel 43 ------------------------------------------------------------------
1903 ph10 192 Bra
1904 ph10 161 ^
1905     [A-Za-z]
1906     Ket
1907     End
1908 nigel 43 ------------------------------------------------------------------
1909     Capturing subpattern count = 0
1910     Options: anchored
1911     No first char
1912     No need char
1913 nigel 75
1914 ph10 161 /^[[:^alpha:]]/DZ
1915 nigel 75 ------------------------------------------------------------------
1916 ph10 192 Bra
1917 ph10 161 ^
1918 ph10 265 [\x00-@[-`{-\xff] (neg)
1919 ph10 161 Ket
1920     End
1921 nigel 75 ------------------------------------------------------------------
1922     Capturing subpattern count = 0
1923     Options: anchored
1924     No first char
1925     No need char
1926 ph10 102
1927 nigel 87 /[_[:alpha:]]/IS
1928     Capturing subpattern count = 0
1929     No options
1930     No first char
1931     No need char
1932 ph10 455 Subject length lower bound = 1
1933 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
1934     _ 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
1935    
1936 ph10 161 /^[[:ascii:]]/DZ
1937 nigel 43 ------------------------------------------------------------------
1938 ph10 192 Bra
1939 ph10 161 ^
1940     [\x00-\x7f]
1941     Ket
1942     End
1943 nigel 43 ------------------------------------------------------------------
1944     Capturing subpattern count = 0
1945     Options: anchored
1946     No first char
1947     No need char
1948    
1949 ph10 161 /^[[:^ascii:]]/DZ
1950 nigel 75 ------------------------------------------------------------------
1951 ph10 192 Bra
1952 ph10 161 ^
1953 ph10 265 [\x80-\xff] (neg)
1954 ph10 161 Ket
1955     End
1956 nigel 75 ------------------------------------------------------------------
1957     Capturing subpattern count = 0
1958     Options: anchored
1959     No first char
1960     No need char
1961    
1962 ph10 161 /^[[:blank:]]/DZ
1963 nigel 63 ------------------------------------------------------------------
1964 ph10 192 Bra
1965 ph10 161 ^
1966     [\x09 ]
1967     Ket
1968     End
1969 nigel 63 ------------------------------------------------------------------
1970     Capturing subpattern count = 0
1971     Options: anchored
1972     No first char
1973     No need char
1974    
1975 ph10 161 /^[[:^blank:]]/DZ
1976 nigel 87 ------------------------------------------------------------------
1977 ph10 192 Bra
1978 ph10 161 ^
1979 ph10 265 [\x00-\x08\x0a-\x1f!-\xff] (neg)
1980 ph10 161 Ket
1981     End
1982 nigel 87 ------------------------------------------------------------------
1983     Capturing subpattern count = 0
1984     Options: anchored
1985     No first char
1986     No need char
1987    
1988     /[\n\x0b\x0c\x0d[:blank:]]/IS
1989     Capturing subpattern count = 0
1990 ph10 226 Contains explicit CR or LF match
1991 nigel 87 No options
1992     No first char
1993     No need char
1994 ph10 455 Subject length lower bound = 1
1995 nigel 87 Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
1996    
1997 ph10 161 /^[[:cntrl:]]/DZ
1998 nigel 43 ------------------------------------------------------------------
1999 ph10 192 Bra
2000 ph10 161 ^
2001     [\x00-\x1f\x7f]
2002     Ket
2003     End
2004 nigel 43 ------------------------------------------------------------------
2005     Capturing subpattern count = 0
2006     Options: anchored
2007     No first char
2008     No need char
2009    
2010 ph10 161 /^[[:digit:]]/DZ
2011 nigel 43 ------------------------------------------------------------------
2012 ph10 192 Bra
2013 ph10 161 ^
2014     [0-9]
2015     Ket
2016     End
2017 nigel 43 ------------------------------------------------------------------
2018     Capturing subpattern count = 0
2019     Options: anchored
2020     No first char
2021     No need char
2022    
2023 ph10 161 /^[[:graph:]]/DZ
2024 nigel 43 ------------------------------------------------------------------
2025 ph10 192 Bra
2026 ph10 161 ^
2027     [!-~]
2028     Ket
2029     End
2030 nigel 43 ------------------------------------------------------------------
2031     Capturing subpattern count = 0
2032     Options: anchored
2033     No first char
2034     No need char
2035    
2036 ph10 161 /^[[:lower:]]/DZ
2037 nigel 43 ------------------------------------------------------------------
2038 ph10 192 Bra
2039 ph10 161 ^
2040     [a-z]
2041     Ket
2042     End
2043 nigel 43 ------------------------------------------------------------------
2044     Capturing subpattern count = 0
2045     Options: anchored
2046     No first char
2047     No need char
2048    
2049 ph10 161 /^[[:print:]]/DZ
2050 nigel 43 ------------------------------------------------------------------
2051 ph10 192 Bra
2052 ph10 161 ^
2053     [ -~]
2054     Ket
2055     End
2056 nigel 43 ------------------------------------------------------------------
2057     Capturing subpattern count = 0
2058     Options: anchored
2059     No first char
2060     No need char
2061    
2062 ph10 161 /^[[:punct:]]/DZ
2063 nigel 43 ------------------------------------------------------------------
2064 ph10 192 Bra
2065 ph10 161 ^
2066     [!-/:-@[-`{-~]
2067     Ket
2068     End
2069 nigel 43 ------------------------------------------------------------------
2070     Capturing subpattern count = 0
2071     Options: anchored
2072     No first char
2073     No need char
2074    
2075 ph10 161 /^[[:space:]]/DZ
2076 nigel 43 ------------------------------------------------------------------
2077 ph10 192 Bra
2078 ph10 161 ^
2079     [\x09-\x0d ]
2080     Ket
2081     End
2082 nigel 43 ------------------------------------------------------------------
2083     Capturing subpattern count = 0
2084     Options: anchored
2085     No first char
2086     No need char
2087    
2088 ph10 161 /^[[:upper:]]/DZ
2089 nigel 43 ------------------------------------------------------------------
2090 ph10 192 Bra
2091 ph10 161 ^
2092     [A-Z]
2093     Ket
2094     End
2095 nigel 43 ------------------------------------------------------------------
2096     Capturing subpattern count = 0
2097     Options: anchored
2098     No first char
2099     No need char
2100    
2101 ph10 161 /^[[:xdigit:]]/DZ
2102 nigel 43 ------------------------------------------------------------------
2103 ph10 192 Bra
2104 ph10 161 ^
2105     [0-9A-Fa-f]
2106     Ket
2107     End
2108 nigel 43 ------------------------------------------------------------------
2109     Capturing subpattern count = 0
2110     Options: anchored
2111     No first char
2112     No need char
2113    
2114 ph10 161 /^[[:word:]]/DZ
2115 nigel 43 ------------------------------------------------------------------
2116 ph10 192 Bra
2117 ph10 161 ^
2118     [0-9A-Z_a-z]
2119     Ket
2120     End
2121 nigel 43 ------------------------------------------------------------------
2122     Capturing subpattern count = 0
2123     Options: anchored
2124     No first char
2125     No need char
2126    
2127 ph10 161 /^[[:^cntrl:]]/DZ
2128 nigel 43 ------------------------------------------------------------------
2129 ph10 192 Bra
2130 ph10 161 ^
2131 ph10 265 [ -~\x80-\xff] (neg)
2132 ph10 161 Ket
2133     End
2134 nigel 43 ------------------------------------------------------------------
2135     Capturing subpattern count = 0
2136     Options: anchored
2137     No first char
2138     No need char
2139    
2140 ph10 161 /^[12[:^digit:]]/DZ
2141 nigel 43 ------------------------------------------------------------------
2142 ph10 192 Bra
2143 ph10 161 ^
2144 ph10 265 [\x00-/12:-\xff] (neg)
2145 ph10 161 Ket
2146     End
2147 nigel 43 ------------------------------------------------------------------
2148     Capturing subpattern count = 0
2149     Options: anchored
2150     No first char
2151     No need char
2152    
2153 ph10 161 /^[[:^blank:]]/DZ
2154 nigel 63 ------------------------------------------------------------------
2155 ph10 192 Bra
2156 ph10 161 ^
2157 ph10 265 [\x00-\x08\x0a-\x1f!-\xff] (neg)
2158 ph10 161 Ket
2159     End
2160 nigel 63 ------------------------------------------------------------------
2161     Capturing subpattern count = 0
2162     Options: anchored
2163     No first char
2164     No need char
2165    
2166 ph10 161 /[01[:alpha:]%]/DZ
2167 nigel 43 ------------------------------------------------------------------
2168 ph10 192 Bra
2169 ph10 161 [%01A-Za-z]
2170     Ket
2171     End
2172 nigel 43 ------------------------------------------------------------------
2173     Capturing subpattern count = 0
2174     No options
2175     No first char
2176     No need char
2177    
2178 nigel 93 /[[.ch.]]/I
2179 nigel 43 Failed: POSIX collating elements are not supported at offset 1
2180    
2181 nigel 93 /[[=ch=]]/I
2182 nigel 43 Failed: POSIX collating elements are not supported at offset 1
2183    
2184 nigel 93 /[[:rhubarb:]]/I
2185 nigel 43 Failed: unknown POSIX class name at offset 3
2186    
2187 nigel 93 /[[:upper:]]/Ii
2188 nigel 43 Capturing subpattern count = 0
2189     Options: caseless
2190     No first char
2191     No need char
2192     A
2193     0: A
2194 ph10 102 a
2195 nigel 43 0: a
2196 ph10 102
2197 nigel 93 /[[:lower:]]/Ii
2198 nigel 43 Capturing subpattern count = 0
2199     Options: caseless
2200     No first char
2201     No need char
2202     A
2203     0: A
2204 ph10 102 a
2205 nigel 43 0: a
2206    
2207 nigel 93 /((?-i)[[:lower:]])[[:lower:]]/Ii
2208 nigel 43 Capturing subpattern count = 1
2209     Options: caseless
2210     No first char
2211     No need char
2212     ab
2213     0: ab
2214     1: a
2215     aB
2216     0: aB
2217     1: a
2218     *** Failers
2219     0: ai
2220     1: a
2221     Ab
2222     No match
2223 ph10 102 AB
2224 nigel 43 No match
2225    
2226 nigel 93 /[\200-\110]/I
2227 nigel 49 Failed: range out of order in character class at offset 9
2228    
2229 nigel 93 /^(?(0)f|b)oo/I
2230 nigel 91 Failed: invalid condition (?(0) at offset 6
2231 nigel 51
2232 nigel 93 /This one's here because of the large output vector needed/I
2233 nigel 53 Capturing subpattern count = 0
2234     No options
2235     First char = 'T'
2236     Need char = 'd'
2237    
2238 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
2239 nigel 53 Capturing subpattern count = 271
2240     Max back reference = 270
2241     No options
2242     No first char
2243     No need char
2244     \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
2245     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
2246     1: 1
2247     2: 2
2248     3: 3
2249     4: 4
2250     5: 5
2251     6: 6
2252     7: 7
2253     8: 8
2254     9: 9
2255     10: 10
2256     11: 11
2257     12: 12
2258     13: 13
2259     14: 14
2260     15: 15
2261     16: 16
2262     17: 17
2263     18: 18
2264     19: 19
2265     20: 20
2266     21: 21
2267     22: 22
2268     23: 23
2269     24: 24
2270     25: 25
2271     26: 26
2272     27: 27
2273     28: 28
2274     29: 29
2275     30: 30
2276     31: 31
2277     32: 32
2278     33: 33
2279     34: 34
2280     35: 35
2281     36: 36
2282     37: 37
2283     38: 38
2284     39: 39
2285     40: 40
2286     41: 41
2287     42: 42
2288     43: 43
2289     44: 44
2290     45: 45
2291     46: 46
2292     47: 47
2293     48: 48
2294     49: 49
2295     50: 50
2296     51: 51
2297     52: 52
2298     53: 53
2299     54: 54
2300     55: 55
2301     56: 56
2302     57: 57
2303     58: 58
2304     59: 59
2305     60: 60
2306     61: 61
2307     62: 62
2308     63: 63
2309     64: 64
2310     65: 65
2311     66: 66
2312     67: 67
2313     68: 68
2314     69: 69
2315     70: 70
2316     71: 71
2317     72: 72
2318     73: 73
2319     74: 74
2320     75: 75
2321     76: 76
2322     77: 77
2323     78: 78
2324     79: 79
2325     80: 80
2326     81: 81
2327     82: 82
2328     83: 83
2329     84: 84
2330     85: 85
2331     86: 86
2332     87: 87
2333     88: 88
2334     89: 89
2335     90: 90
2336     91: 91
2337     92: 92
2338     93: 93
2339     94: 94
2340     95: 95
2341     96: 96
2342     97: 97
2343     98: 98
2344     99: 99
2345     100: 100
2346     101: 101
2347     102: 102
2348     103: 103
2349     104: 104
2350     105: 105
2351     106: 106
2352     107: 107
2353     108: 108
2354     109: 109
2355     110: 110
2356     111: 111
2357     112: 112
2358     113: 113
2359     114: 114
2360     115: 115
2361     116: 116
2362     117: 117
2363     118: 118
2364     119: 119
2365     120: 120
2366     121: 121
2367     122: 122
2368     123: 123
2369     124: 124
2370     125: 125
2371     126: 126
2372     127: 127
2373     128: 128
2374     129: 129
2375     130: 130
2376     131: 131
2377     132: 132
2378     133: 133
2379     134: 134
2380     135: 135
2381     136: 136
2382     137: 137
2383     138: 138
2384     139: 139
2385     140: 140
2386     141: 141
2387     142: 142
2388     143: 143
2389     144: 144
2390     145: 145
2391     146: 146
2392     147: 147
2393     148: 148
2394     149: 149
2395     150: 150
2396     151: 151
2397     152: 152
2398     153: 153
2399     154: 154
2400     155: 155
2401     156: 156
2402     157: 157
2403     158: 158
2404     159: 159
2405     160: 160
2406     161: 161
2407     162: 162
2408     163: 163
2409     164: 164
2410     165: 165
2411     166: 166
2412     167: 167
2413     168: 168
2414     169: 169
2415     170: 170
2416     171: 171
2417     172: 172
2418     173: 173
2419     174: 174
2420     175: 175
2421     176: 176
2422     177: 177
2423     178: 178
2424     179: 179
2425     180: 180
2426     181: 181
2427     182: 182
2428     183: 183
2429     184: 184
2430     185: 185
2431     186: 186
2432     187: 187
2433     188: 188
2434     189: 189
2435     190: 190
2436     191: 191
2437     192: 192
2438     193: 193
2439     194: 194
2440     195: 195
2441     196: 196
2442     197: 197
2443     198: 198
2444     199: 199
2445     200: 200
2446     201: 201
2447     202: 202
2448     203: 203
2449     204: 204
2450     205: 205
2451     206: 206
2452     207: 207
2453     208: 208
2454     209: 209
2455     210: 210
2456     211: 211
2457     212: 212
2458     213: 213
2459     214: 214
2460     215: 215
2461     216: 216
2462     217: 217
2463     218: 218
2464     219: 219
2465     220: 220
2466     221: 221
2467     222: 222
2468     223: 223
2469     224: 224
2470     225: 225
2471     226: 226
2472     227: 227
2473     228: 228
2474     229: 229
2475     230: 230
2476     231: 231
2477     232: 232
2478     233: 233
2479     234: 234
2480     235: 235
2481     236: 236
2482     237: 237
2483     238: 238
2484     239: 239
2485     240: 240
2486     241: 241
2487     242: 242
2488     243: 243
2489     244: 244
2490     245: 245
2491     246: 246
2492     247: 247
2493     248: 248
2494     249: 249
2495     250: 250
2496     251: 251
2497     252: 252
2498     253: 253
2499     254: 254
2500     255: 255
2501     256: 256
2502     257: 257
2503     258: 258
2504     259: 259
2505     260: 260
2506     261: 261
2507     262: 262
2508     263: 263
2509     264: 264
2510     265: 265
2511     266: 266
2512     267: 267
2513     268: 268
2514     269: 269
2515     270: ABC
2516     271: ABC
2517    
2518 nigel 93 /This one's here because Perl does this differently and PCRE can't at present/I
2519 nigel 53 Capturing subpattern count = 0
2520     No options
2521     First char = 'T'
2522     Need char = 't'
2523    
2524 nigel 93 /(main(O)?)+/I
2525 nigel 53 Capturing subpattern count = 2
2526     No options
2527     First char = 'm'
2528     Need char = 'n'
2529     mainmain
2530     0: mainmain
2531     1: main
2532     mainOmain
2533     0: mainOmain
2534     1: main
2535     2: O
2536 ph10 102
2537 nigel 93 /These are all cases where Perl does it differently (nested captures)/I
2538 nigel 63 Capturing subpattern count = 1
2539     No options
2540     First char = 'T'
2541     Need char = 's'
2542    
2543 nigel 93 /^(a(b)?)+$/I
2544 nigel 63 Capturing subpattern count = 2
2545     Options: anchored
2546     No first char
2547 nigel 65 No need char
2548 nigel 63 aba
2549     0: aba
2550     1: a
2551     2: b
2552 ph10 102
2553 nigel 93 /^(aa(bb)?)+$/I
2554 nigel 63 Capturing subpattern count = 2
2555     Options: anchored
2556     No first char
2557 nigel 65 No need char
2558 ph10 102 aabbaa
2559 nigel 63 0: aabbaa
2560     1: aa
2561     2: bb
2562 ph10 102
2563 nigel 93 /^(aa|aa(bb))+$/I
2564 nigel 63 Capturing subpattern count = 2
2565     Options: anchored
2566     No first char
2567 nigel 65 No need char
2568 ph10 102 aabbaa
2569 nigel 63 0: aabbaa
2570     1: aa
2571     2: bb
2572 ph10 102
2573 nigel 93 /^(aa(bb)??)+$/I
2574 nigel 63 Capturing subpattern count = 2
2575     Options: anchored
2576     No first char
2577 nigel 65 No need char
2578 ph10 102 aabbaa
2579 nigel 63 0: aabbaa
2580     1: aa
2581     2: bb
2582 ph10 102
2583 nigel 93 /^(?:aa(bb)?)+$/I
2584 nigel 63 Capturing subpattern count = 1
2585     Options: anchored
2586     No first char
2587 nigel 65 No need char
2588 ph10 102 aabbaa
2589 nigel 63 0: aabbaa
2590     1: bb
2591 ph10 102
2592 nigel 93 /^(aa(b(b))?)+$/I
2593 nigel 63 Capturing subpattern count = 3
2594     Options: anchored
2595     No first char
2596 nigel 65 No need char
2597 ph10 102 aabbaa
2598 nigel 63 0: aabbaa
2599     1: aa
2600     2: bb
2601     3: b
2602    
2603 nigel 93 /^(?:aa(b(b))?)+$/I
2604 nigel 63 Capturing subpattern count = 2
2605     Options: anchored
2606     No first char
2607 nigel 65 No need char
2608 ph10 102 aabbaa
2609 nigel 63 0: aabbaa
2610     1: bb
2611     2: b
2612    
2613 nigel 93 /^(?:aa(b(?:b))?)+$/I
2614 nigel 63 Capturing subpattern count = 1
2615     Options: anchored
2616     No first char
2617 nigel 65 No need char
2618 ph10 102 aabbaa
2619 nigel 63 0: aabbaa
2620     1: bb
2621    
2622 nigel 93 /^(?:aa(bb(?:b))?)+$/I
2623 nigel 63 Capturing subpattern count = 1
2624     Options: anchored
2625     No first char
2626 nigel 65 No need char
2627 ph10 102 aabbbaa
2628 nigel 63 0: aabbbaa
2629     1: bbb
2630 ph10 102
2631 nigel 93 /^(?:aa(b(?:bb))?)+$/I
2632 nigel 63 Capturing subpattern count = 1
2633     Options: anchored
2634     No first char
2635 nigel 65 No need char
2636 ph10 102 aabbbaa
2637 nigel 63 0: aabbbaa
2638     1: bbb
2639    
2640 nigel 93 /^(?:aa(?:b(b))?)+$/I
2641 nigel 63 Capturing subpattern count = 1
2642     Options: anchored
2643     No first char
2644 nigel 65 No need char
2645 ph10 102 aabbaa
2646 nigel 63 0: aabbaa
2647     1: b
2648    
2649 nigel 93 /^(?:aa(?:b(bb))?)+$/I
2650 nigel 63 Capturing subpattern count = 1
2651     Options: anchored
2652     No first char
2653 nigel 65 No need char
2654 ph10 102 aabbbaa
2655 nigel 63 0: aabbbaa
2656     1: bb
2657    
2658 nigel 93 /^(aa(b(bb))?)+$/I
2659 nigel 63 Capturing subpattern count = 3
2660     Options: anchored
2661     No first char
2662 nigel 65 No need char
2663 ph10 102 aabbbaa
2664 nigel 63 0: aabbbaa
2665     1: aa
2666     2: bbb
2667     3: bb
2668    
2669 nigel 93 /^(aa(bb(bb))?)+$/I
2670 nigel 63 Capturing subpattern count = 3
2671     Options: anchored
2672     No first char
2673 nigel 65 No need char
2674 ph10 102 aabbbbaa
2675 nigel 63 0: aabbbbaa
2676     1: aa
2677     2: bbbb
2678     3: bb
2679    
2680 ph10 102 /--------------------------------------------------------------------/I
2681 nigel 63 Capturing subpattern count = 0
2682     No options
2683     First char = '-'
2684     Need char = '-'
2685 ph10 102
2686 ph10 162 /#/IxDZ
2687 nigel 63 ------------------------------------------------------------------
2688 ph10 192 Bra
2689 ph10 161 Ket
2690     End
2691 nigel 63 ------------------------------------------------------------------
2692     Capturing subpattern count = 0
2693     Options: extended
2694     No first char
2695     No need char
2696    
2697 ph10 162 /a#/IxDZ
2698 nigel 63 ------------------------------------------------------------------
2699 ph10 192 Bra
2700 ph10 161 a
2701     Ket
2702     End
2703 nigel 63 ------------------------------------------------------------------
2704     Capturing subpattern count = 0
2705     Options: extended
2706     First char = 'a'
2707     No need char
2708    
2709 ph10 161 /[\s]/DZ
2710 nigel 63 ------------------------------------------------------------------
2711 ph10 192 Bra
2712 ph10 161 [\x09\x0a\x0c\x0d ]
2713     Ket
2714     End
2715 nigel 63 ------------------------------------------------------------------
2716     Capturing subpattern count = 0
2717     No options
2718     No first char
2719     No need char
2720    
2721 ph10 161 /[\S]/DZ
2722 nigel 63 ------------------------------------------------------------------
2723 ph10 192 Bra
2724 ph10 264 [\x00-\x08\x0b\x0e-\x1f!-\xff] (neg)
2725 ph10 161 Ket
2726     End
2727 nigel 63 ------------------------------------------------------------------
2728     Capturing subpattern count = 0
2729     No options
2730     No first char
2731     No need char
2732    
2733 ph10 161 /a(?i)b/DZ
2734 nigel 63 ------------------------------------------------------------------
2735 ph10 192 Bra
2736 ph10 161 a
2737     01 Opt
2738     NC b
2739     Ket
2740     End
2741 nigel 63 ------------------------------------------------------------------
2742     Capturing subpattern count = 0
2743     No options
2744     First char = 'a'
2745     Need char = 'b' (caseless)
2746     ab
2747     0: ab
2748     aB
2749     0: aB
2750 ph10 102 *** Failers
2751 nigel 63 No match
2752 ph10 102 AB
2753 nigel 63 No match
2754    
2755 ph10 161 /(a(?i)b)/DZ
2756 nigel 63 ------------------------------------------------------------------
2757 ph10 192 Bra
2758     CBra 1
2759 ph10 161 a
2760     01 Opt
2761     NC b
2762     Ket
2763     00 Opt
2764     Ket
2765     End
2766 nigel 63 ------------------------------------------------------------------
2767     Capturing subpattern count = 1
2768     No options
2769     First char = 'a'
2770     Need char = 'b' (caseless)
2771     ab
2772     0: ab
2773     1: ab
2774     aB
2775     0: aB
2776     1: aB
2777 ph10 102 *** Failers
2778 nigel 63 No match
2779 ph10 102 AB
2780 nigel 63 No match
2781 ph10 102
2782 ph10 161 / (?i)abc/IxDZ
2783 nigel 63 ------------------------------------------------------------------
2784 ph10 192 Bra
2785 ph10 161 NC abc
2786     Ket
2787     End
2788 nigel 63 ------------------------------------------------------------------
2789     Capturing subpattern count = 0
2790     Options: caseless extended
2791     First char = 'a' (caseless)
2792     Need char = 'c' (caseless)
2793    
2794     /#this is a comment
2795 ph10 161 (?i)abc/IxDZ
2796 nigel 63 ------------------------------------------------------------------
2797 ph10 192 Bra
2798 ph10 161 NC abc
2799     Ket
2800     End
2801 nigel 63 ------------------------------------------------------------------
2802     Capturing subpattern count = 0
2803     Options: caseless extended
2804     First char = 'a' (caseless)
2805     Need char = 'c' (caseless)
2806    
2807 ph10 161 /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
2808 nigel 63 ------------------------------------------------------------------
2809 ph10 192 Bra
2810 ph10 161 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2811     Ket
2812     End
2813 nigel 63 ------------------------------------------------------------------
2814     Capturing subpattern count = 0
2815     No options
2816     First char = '1'
2817     Need char = '0'
2818    
2819 ph10 161 /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
2820 nigel 63 ------------------------------------------------------------------
2821 ph10 192 Bra
2822 ph10 161 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
2823     Ket
2824     End
2825 nigel 63 ------------------------------------------------------------------
2826     Capturing subpattern count = 0
2827     No options
2828     First char = '1'
2829     Need char = '0'
2830    
2831 ph10 161 /\Q\E/DZ
2832 nigel 63 ------------------------------------------------------------------
2833 ph10 192 Bra
2834 ph10 161 Ket
2835     End
2836 nigel 63 ------------------------------------------------------------------
2837     Capturing subpattern count = 0
2838     No options
2839     No first char
2840     No need char
2841     \
2842     0:
2843    
2844 ph10 161 /\Q\Ex/DZ
2845 nigel 63 ------------------------------------------------------------------
2846 ph10 192 Bra
2847 ph10 161 x
2848     Ket
2849     End
2850 nigel 63 ------------------------------------------------------------------
2851     Capturing subpattern count = 0
2852     No options
2853     First char = 'x'
2854     No need char
2855    
2856 ph10 161 / \Q\E/DZ
2857 nigel 63 ------------------------------------------------------------------
2858 ph10 192 Bra
2859 ph10 161
2860     Ket
2861     End
2862 nigel 63 ------------------------------------------------------------------
2863     Capturing subpattern count = 0
2864     No options
2865     First char = ' '
2866     No need char
2867    
2868 ph10 161 /a\Q\E/DZ
2869 nigel 63 ------------------------------------------------------------------
2870 ph10 192 Bra
2871 ph10 161 a
2872     Ket
2873     End
2874 nigel 63 ------------------------------------------------------------------
2875     Capturing subpattern count = 0
2876     No options
2877     First char = 'a'
2878     No need char
2879     abc
2880     0: a
2881     bca
2882     0: a
2883 ph10 102 bac
2884 nigel 63 0: a
2885    
2886 ph10 161 /a\Q\Eb/DZ
2887 nigel 63 ------------------------------------------------------------------
2888 ph10 192 Bra
2889 ph10 161 ab
2890     Ket
2891     End
2892 nigel 63 ------------------------------------------------------------------
2893     Capturing subpattern count = 0
2894     No options
2895     First char = 'a'
2896     Need char = 'b'
2897     abc
2898     0: ab
2899    
2900 ph10 161 /\Q\Eabc/DZ
2901 nigel 63 ------------------------------------------------------------------
2902 ph10 192 Bra
2903 ph10 161 abc
2904     Ket
2905     End
2906 nigel 63 ------------------------------------------------------------------
2907     Capturing subpattern count = 0
2908     No options
2909     First char = 'a'
2910     Need char = 'c'
2911    
2912 ph10 161 /x*+\w/DZ
2913 nigel 63 ------------------------------------------------------------------
2914 ph10 192 Bra
2915 ph10 161 x*+
2916     \w
2917     Ket
2918     End
2919 nigel 63 ------------------------------------------------------------------
2920     Capturing subpattern count = 0
2921     No options
2922     No first char
2923     No need char
2924     *** Failers
2925     0: F
2926     xxxxx
2927     No match
2928 ph10 102
2929 ph10 161 /x?+/DZ
2930 nigel 63 ------------------------------------------------------------------
2931 ph10 192 Bra
2932 ph10 161 x?+
2933     Ket
2934     End
2935 nigel 63 ------------------------------------------------------------------
2936     Capturing subpattern count = 0
2937     No options
2938     No first char
2939     No need char
2940    
2941 ph10 161 /x++/DZ
2942 nigel 63 ------------------------------------------------------------------
2943 ph10 192 Bra
2944 ph10 161 x++
2945     Ket
2946     End
2947 nigel 63 ------------------------------------------------------------------
2948     Capturing subpattern count = 0
2949     No options
2950     First char = 'x'
2951     No need char
2952    
2953 ph10 161 /x{1,3}+/DZ
2954 nigel 63 ------------------------------------------------------------------
2955 ph10 192 Bra
2956 ph10 161 Once
2957     x
2958     x{0,2}
2959     Ket
2960     Ket
2961     End
2962 nigel 63 ------------------------------------------------------------------
2963     Capturing subpattern count = 0
2964     No options
2965     First char = 'x'
2966     No need char
2967    
2968 ph10 161 /(x)*+/DZ
2969 nigel 63 ------------------------------------------------------------------
2970 ph10 192 Bra
2971 ph10 161 Once
2972     Brazero
2973 ph10 192 CBra 1
2974 ph10 161 x
2975     KetRmax
2976     Ket
2977     Ket
2978     End
2979 nigel 63 ------------------------------------------------------------------
2980     Capturing subpattern count = 1
2981     No options
2982     No first char
2983     No need char
2984    
2985 nigel 93 /^(\w++|\s++)*$/I
2986 nigel 63 Capturing subpattern count = 1
2987     Options: anchored
2988     No first char
2989     No need char
2990     now is the time for all good men to come to the aid of the party
2991     0: now is the time for all good men to come to the aid of the party
2992     1: party
2993     *** Failers
2994     No match
2995     this is not a line with only words and spaces!
2996     No match
2997 ph10 102
2998 nigel 93 /(\d++)(\w)/I
2999 nigel 63 Capturing subpattern count = 2
3000     No options
3001     No first char
3002     No need char
3003     12345a
3004     0: 12345a
3005     1: 12345
3006     2: a
3007     *** Failers
3008     No match
3009 ph10 102 12345+
3010 nigel 63 No match
3011    
3012 nigel 93 /a++b/I
3013 nigel 63 Capturing subpattern count = 0
3014     No options
3015     First char = 'a'
3016     Need char = 'b'
3017     aaab
3018     0: aaab
3019    
3020 nigel 93 /(a++b)/I
3021 nigel 63 Capturing subpattern count = 1
3022     No options
3023     First char = 'a'
3024     Need char = 'b'
3025     aaab
3026     0: aaab
3027     1: aaab
3028    
3029 nigel 93 /(a++)b/I
3030 nigel 63 Capturing subpattern count = 1
3031     No options
3032     First char = 'a'
3033     Need char = 'b'
3034     aaab
3035     0: aaab
3036     1: aaa
3037    
3038 nigel 93 /([^()]++|\([^()]*\))+/I
3039 nigel 63 Capturing subpattern count = 1
3040     No options
3041     No first char
3042     No need char
3043     ((abc(ade)ufh()()x
3044     0: abc(ade)ufh()()x
3045     1: x
3046 ph10 102
3047     /\(([^()]++|\([^()]+\))+\)/I
3048 nigel 63 Capturing subpattern count = 1
3049     No options
3050     First char = '('
3051     Need char = ')'
3052     (abc)
3053     0: (abc)
3054     1: abc
3055     (abc(def)xyz)
3056     0: (abc(def)xyz)
3057     1: xyz
3058     *** Failers
3059     No match
3060 ph10 102 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3061 nigel 63 No match
3062    
3063 ph10 161 /(abc){1,3}+/DZ
3064 nigel 63 ------------------------------------------------------------------
3065 ph10 192 Bra
3066 ph10 161 Once
3067 ph10 192 CBra 1
3068 ph10 161 abc
3069     Ket
3070     Brazero
3071 ph10 192 Bra
3072     CBra 1
3073 ph10 161 abc
3074     Ket
3075     Brazero
3076 ph10 192 CBra 1
3077 ph10 161 abc
3078     Ket
3079     Ket
3080     Ket
3081     Ket
3082     End
3083 nigel 63 ------------------------------------------------------------------
3084     Capturing subpattern count = 1
3085     No options
3086     First char = 'a'
3087     Need char = 'c'
3088    
3089 nigel 93 /a+?+/I
3090 nigel 63 Failed: nothing to repeat at offset 3
3091    
3092 nigel 93 /a{2,3}?+b/I
3093 nigel 63 Failed: nothing to repeat at offset 7
3094    
3095 nigel 93 /(?U)a+?+/I
3096 nigel 63 Failed: nothing to repeat at offset 7
3097    
3098 nigel 93 /a{2,3}?+b/IU
3099 nigel 63 Failed: nothing to repeat at offset 7
3100    
3101 ph10 161 /x(?U)a++b/DZ
3102 nigel 63 ------------------------------------------------------------------
3103 ph10 192 Bra
3104 ph10 161 x
3105     a++
3106     b
3107     Ket
3108     End
3109 nigel 63 ------------------------------------------------------------------
3110     Capturing subpattern count = 0
3111     No options
3112     First char = 'x'
3113     Need char = 'b'
3114     xaaaab
3115     0: xaaaab
3116    
3117 ph10 161 /(?U)xa++b/DZ
3118 nigel 63 ------------------------------------------------------------------
3119 ph10 192 Bra
3120 ph10 161 x
3121     a++
3122     b
3123     Ket
3124     End
3125 nigel 63 ------------------------------------------------------------------
3126     Capturing subpattern count = 0
3127     Options: ungreedy
3128     First char = 'x'
3129     Need char = 'b'
3130     xaaaab
3131     0: xaaaab
3132    
3133 ph10 161 /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
3134 nigel 63 ------------------------------------------------------------------
3135 ph10 192 Bra
3136 ph10 161 ^
3137 ph10 192 CBra 1
3138     CBra 2
3139 ph10 161 a+
3140     Ket
3141 ph10 192 CBra 3
3142 ph10 161 [ab]+?
3143     Ket
3144 ph10 192 CBra 4
3145 ph10 161 [bc]+
3146     Ket
3147 ph10 192 CBra 5
3148 ph10 161 \w*
3149     Ket
3150     Ket
3151     Ket
3152     End
3153 nigel 63 ------------------------------------------------------------------
3154     Capturing subpattern count = 5
3155     Options: anchored
3156     No first char
3157 nigel 65 No need char
3158 nigel 63
3159 ph10 161 /^x(?U)a+b/DZ
3160 nigel 63 ------------------------------------------------------------------
3161 ph10 192 Bra
3162 ph10 161 ^
3163     x
3164     a++
3165     b
3166     Ket
3167     End
3168 nigel 63 ------------------------------------------------------------------
3169     Capturing subpattern count = 0
3170     Options: anchored
3171     No first char
3172     Need char = 'b'
3173    
3174 ph10 161 /^x(?U)(a+)b/DZ
3175 nigel 63 ------------------------------------------------------------------
3176 ph10 192 Bra
3177 ph10 161 ^
3178     x
3179 ph10 192 CBra 1
3180 ph10 161 a+?
3181     Ket
3182     b
3183     Ket
3184     End
3185 nigel 63 ------------------------------------------------------------------
3186     Capturing subpattern count = 1
3187     Options: anchored
3188     No first char
3189     Need char = 'b'
3190    
3191 nigel 93 /[.x.]/I
3192 nigel 63 Failed: POSIX collating elements are not supported at offset 0
3193    
3194 nigel 93 /[=x=]/I
3195 nigel 63 Failed: POSIX collating elements are not supported at offset 0
3196    
3197 nigel 93 /[:x:]/I
3198 nigel 63 Failed: POSIX named classes are supported only within a class at offset 0
3199    
3200 nigel 93 /\l/I
3201 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3202 nigel 63
3203 nigel 93 /\L/I
3204 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3205 nigel 63
3206 nigel 93 /\N{name}/I
3207 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3208 nigel 63
3209 nigel 93 /\u/I
3210 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3211 nigel 63
3212 nigel 93 /\U/I
3213 nigel 75 Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
3214 nigel 63
3215 nigel 93 /[/I
3216 nigel 63 Failed: missing terminating ] for character class at offset 1
3217    
3218 nigel 93 /[a-/I
3219 nigel 63 Failed: missing terminating ] for character class at offset 3
3220    
3221 nigel 93 /[[:space:]/I
3222 nigel 63 Failed: missing terminating ] for character class at offset 10
3223    
3224 ph10 162 /[\s]/IDZ
3225 nigel 63 ------------------------------------------------------------------
3226 ph10 192 Bra
3227 ph10 161 [\x09\x0a\x0c\x0d ]
3228     Ket
3229     End
3230 nigel 63 ------------------------------------------------------------------
3231     Capturing subpattern count = 0
3232     No options
3233     No first char
3234     No need char
3235    
3236 ph10 162 /[[:space:]]/IDZ
3237 nigel 63 ------------------------------------------------------------------
3238 ph10 192 Bra
3239 ph10 161 [\x09-\x0d ]
3240     Ket
3241     End
3242 nigel 63 ------------------------------------------------------------------
3243     Capturing subpattern count = 0
3244     No options
3245     No first char
3246     No need char
3247    
3248 ph10 162 /[[:space:]abcde]/IDZ
3249 nigel 63 ------------------------------------------------------------------
3250 ph10 192 Bra
3251 ph10 161 [\x09-\x0d a-e]
3252     Ket
3253     End
3254 nigel 63 ------------------------------------------------------------------
3255     Capturing subpattern count = 0
3256     No options
3257     No first char
3258     No need char
3259    
3260 nigel 93 /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix
3261 nigel 63 Capturing subpattern count = 0
3262     Options: extended
3263     First char = '<'
3264     Need char = '>'
3265     <>
3266     0: <>
3267     <abcd>
3268     0: <abcd>
3269     <abc <123> hij>
3270     0: <abc <123> hij>
3271     <abc <def> hij>
3272     0: <def>
3273 ph10 102 <abc<>def>
3274 nigel 63 0: <abc<>def>
3275 ph10 102 <abc<>
3276 nigel 63 0: <>
3277     *** Failers
3278     No match
3279     <abc
3280     No match
3281    
3282 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
3283 nigel 63 ------------------------------------------------------------------
3284 ph10 192 Bra
3285 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
3286     \b
3287     Ket
3288     End
3289 nigel 63 ------------------------------------------------------------------
3290     Capturing subpattern count = 0
3291     No options
3292     First char = '8'
3293     Need char = 'X'
3294    
3295 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
3296 nigel 63 ------------------------------------------------------------------
3297 ph10 192 Bra
3298 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
3299     \b
3300     Ket
3301     End
3302 nigel 63 ------------------------------------------------------------------
3303     Capturing subpattern count = 0
3304     No options
3305     First char = '$'
3306     Need char = 'X'
3307    
3308     /(.*)\d+\1/I
3309     Capturing subpattern count = 1
3310     Max back reference = 1
3311     No options
3312     No first char
3313     No need char
3314    
3315     /(.*)\d+/I
3316     Capturing subpattern count = 1
3317     No options
3318 nigel 91 First char at start or follows newline
3319 nigel 63 No need char
3320 ph10 102
3321 nigel 63 /(.*)\d+\1/Is
3322     Capturing subpattern count = 1
3323     Max back reference = 1
3324     Options: dotall
3325     No first char
3326     No need char
3327    
3328     /(.*)\d+/Is
3329     Capturing subpattern count = 1
3330     Options: anchored dotall
3331     No first char
3332     No need char
3333    
3334     /(.*(xyz))\d+\2/I
3335     Capturing subpattern count = 2
3336     Max back reference = 2
3337     No options
3338 nigel 91 First char at start or follows newline
3339 nigel 63 Need char = 'z'
3340    
3341     /((.*))\d+\1/I
3342     Capturing subpattern count = 2
3343     Max back reference = 1
3344     No options
3345     No first char
3346     No need char
3347     abc123bc
3348     0: bc123bc
3349     1: bc
3350     2: bc
3351 ph10 102
3352 nigel 63 /a[b]/I
3353     Capturing subpattern count = 0
3354     No options
3355     First char = 'a'
3356     Need char = 'b'
3357    
3358     /(?=a).*/I
3359     Capturing subpattern count = 0
3360     No options
3361     First char = 'a'
3362     No need char
3363    
3364 nigel 93 /(?=abc).xyz/IiI
3365 nigel 63 Capturing subpattern count = 0
3366     Options: caseless
3367     First char = 'a' (caseless)
3368     Need char = 'z' (caseless)
3369    
3370     /(?=abc)(?i).xyz/I
3371     Capturing subpattern count = 0
3372     No options
3373     First char = 'a'
3374     Need char = 'z' (caseless)
3375    
3376     /(?=a)(?=b)/I
3377     Capturing subpattern count = 0
3378     No options
3379     First char = 'a'
3380     No need char
3381    
3382     /(?=.)a/I
3383     Capturing subpattern count = 0
3384     No options
3385     First char = 'a'
3386     No need char
3387    
3388     /((?=abcda)a)/I
3389     Capturing subpattern count = 1
3390     No options
3391     First char = 'a'
3392     Need char = 'a'
3393    
3394     /((?=abcda)ab)/I
3395     Capturing subpattern count = 1
3396     No options
3397     First char = 'a'
3398     Need char = 'b'
3399    
3400     /()a/I
3401     Capturing subpattern count = 1
3402     No options
3403     No first char
3404     Need char = 'a'
3405    
3406 ph10 270 /(?(1)ab|ac)(.)/I
3407     Capturing subpattern count = 1
3408 nigel 63 No options
3409     First char = 'a'
3410     No need char
3411    
3412 ph10 270 /(?(1)abz|acz)(.)/I
3413     Capturing subpattern count = 1
3414 nigel 63 No options
3415     First char = 'a'
3416     Need char = 'z'
3417    
3418 ph10 270 /(?(1)abz)(.)/I
3419     Capturing subpattern count = 1
3420 nigel 63 No options
3421     No first char
3422     No need char
3423    
3424 ph10 270 /(?(1)abz)(1)23/I
3425     Capturing subpattern count = 1
3426 nigel 63 No options
3427     No first char
3428     Need char = '3'
3429    
3430     /(a)+/I
3431     Capturing subpattern count = 1
3432     No options
3433     First char = 'a'
3434     No need char
3435    
3436     /(a){2,3}/I
3437     Capturing subpattern count = 1
3438     No options
3439     First char = 'a'
3440     Need char = 'a'
3441    
3442     /(a)*/I
3443     Capturing subpattern count = 1
3444     No options
3445     No first char
3446     No need char
3447    
3448     /[a]/I
3449     Capturing subpattern count = 0
3450     No options
3451     First char = 'a'
3452     No need char
3453    
3454     /[ab]/I
3455     Capturing subpattern count = 0
3456     No options
3457     No first char
3458     No need char
3459    
3460     /[ab]/IS
3461     Capturing subpattern count = 0
3462     No options
3463     No first char
3464     No need char
3465 ph10 455 Subject length lower bound = 1
3466 nigel 75 Starting byte set: a b
3467 nigel 63
3468     /[^a]/I
3469     Capturing subpattern count = 0
3470     No options
3471     No first char
3472     No need char
3473    
3474     /\d456/I
3475     Capturing subpattern count = 0
3476     No options
3477     No first char
3478     Need char = '6'
3479    
3480     /\d456/IS
3481     Capturing subpattern count = 0
3482     No options
3483     No first char
3484     Need char = '6'
3485 ph10 455 Subject length lower bound = 4
3486 nigel 75 Starting byte set: 0 1 2 3 4 5 6 7 8 9
3487 nigel 63
3488     /a^b/I
3489     Capturing subpattern count = 0
3490     No options
3491     First char = 'a'
3492     Need char = 'b'
3493    
3494 nigel 93 /^a/Im
3495 nigel 63 Capturing subpattern count = 0
3496     Options: multiline
3497 nigel 91 First char at start or follows newline
3498 nigel 63 Need char = 'a'
3499     abcde
3500     0: a
3501 ph10 102 xy\nabc
3502 nigel 63 0: a
3503 ph10 102 *** Failers
3504 nigel 63 No match
3505 ph10 102 xyabc
3506 nigel 63 No match
3507    
3508     /c|abc/I
3509     Capturing subpattern count = 0
3510     No options
3511     No first char
3512     Need char = 'c'
3513    
3514     /(?i)[ab]/IS
3515     Capturing subpattern count = 0
3516     Options: caseless
3517     No first char
3518     No need char
3519 ph10 455 Subject length lower bound = 1
3520 nigel 75 Starting byte set: A B a b
3521 nigel 63
3522     /[ab](?i)cd/IS
3523     Capturing subpattern count = 0
3524     No options
3525     No first char
3526     Need char = 'd' (caseless)
3527 ph10 455 Subject length lower bound = 3
3528 nigel 75 Starting byte set: a b
3529 nigel 63
3530 nigel 93 /abc(?C)def/I
3531 nigel 63 Capturing subpattern count = 0
3532     No options
3533     First char = 'a'
3534     Need char = 'f'
3535     abcdef
3536     --->abcdef
3537 nigel 75 0 ^ ^ d
3538 nigel 63 0: abcdef
3539 ph10 102 1234abcdef
3540 nigel 63 --->1234abcdef
3541 nigel 75 0 ^ ^ d
3542 nigel 63 0: abcdef
3543     *** Failers
3544     No match
3545     abcxyz
3546     No match
3547 ph10 102 abcxyzf
3548 nigel 63 --->abcxyzf
3549 nigel 75 0 ^ ^ d
3550 nigel 63 No match
3551    
3552 nigel 93 /abc(?C)de(?C1)f/I
3553 nigel 63 Capturing subpattern count = 0
3554     No options
3555     First char = 'a'
3556     Need char = 'f'
3557     123abcdef
3558     --->123abcdef
3559 nigel 75 0 ^ ^ d
3560     1 ^ ^ f
3561 nigel 63 0: abcdef
3562 ph10 102
3563     /(?C1)\dabc(?C2)def/I
3564 nigel 63 Capturing subpattern count = 0
3565     No options
3566     No first char
3567     Need char = 'f'
3568     1234abcdef
3569     --->1234abcdef
3570 nigel 75 1 ^ \d
3571     1 ^ \d
3572     1 ^ \d
3573     1 ^ \d
3574     2 ^ ^ d
3575 nigel 63 0: 4abcdef
3576     *** Failers
3577     No match
3578 ph10 102 abcdef
3579 nigel 63 --->abcdef
3580 nigel 75 1 ^ \d
3581     1 ^ \d
3582     1 ^ \d
3583     1 ^ \d
3584     1 ^ \d
3585     1 ^ \d
3586 nigel 63 No match
3587 ph10 102
3588 nigel 93 /(?C255)ab/I
3589 nigel 63 Capturing subpattern count = 0
3590     No options
3591     First char = 'a'
3592     Need char = 'b'
3593    
3594 nigel 93 /(?C256)ab/I
3595 nigel 63 Failed: number after (?C is > 255 at offset 6
3596    
3597 ph10 102 /(?Cab)xx/I
3598 nigel 63 Failed: closing ) for (?C expected at offset 3
3599    
3600 nigel 93 /(?C12vr)x/I
3601 nigel 63 Failed: closing ) for (?C expected at offset 5
3602    
3603 nigel 93 /abc(?C)def/I
3604 nigel 63 Capturing subpattern count = 0
3605     No options
3606     First char = 'a'
3607     Need char = 'f'
3608     *** Failers
3609     No match
3610     \x83\x0\x61bcdef
3611     --->\x83\x00abcdef
3612 nigel 75 0 ^ ^ d
3613 nigel 63 0: abcdef
3614    
3615 nigel 93 /(abc)(?C)de(?C1)f/I
3616 nigel 63 Capturing subpattern count = 1
3617     No options
3618     First char = 'a'
3619     Need char = 'f'
3620     123abcdef
3621     --->123abcdef
3622 nigel 75 0 ^ ^ d
3623     1 ^ ^ f
3624 nigel 63 0: abcdef
3625     1: abc
3626 ph10 102 123abcdef\C+
3627 nigel 63 Callout 0: last capture = 1
3628     0: <unset>
3629     1: abc
3630     --->123abcdef
3631 nigel 75 ^ ^ d
3632 nigel 63 Callout 1: last capture = 1
3633     0: <unset>
3634     1: abc
3635     --->123abcdef
3636 nigel 75 ^ ^ f
3637 nigel 63 0: abcdef
3638     1: abc
3639 ph10 102 123abcdef\C-
3640 nigel 63 0: abcdef
3641     1: abc
3642     *** Failers
3643     No match
3644 ph10 102 123abcdef\C!1
3645 nigel 63 --->123abcdef
3646 nigel 75 0 ^ ^ d
3647     1 ^ ^ f
3648 nigel 63 No match
3649 ph10 102
3650 nigel 93 /(?C0)(abc(?C1))*/I
3651 nigel 63 Capturing subpattern count = 1
3652     No options
3653     No first char
3654     No need char
3655     abcabcabc
3656     --->abcabcabc
3657 nigel 75 0 ^ (abc(?C1))*
3658     1 ^ ^ )
3659     1 ^ ^ )
3660     1 ^ ^ )
3661 nigel 63 0: abcabcabc
3662     1: abc
3663 ph10 102 abcabc\C!1!3
3664 nigel 63 --->abcabc
3665 nigel 75 0 ^ (abc(?C1))*
3666     1 ^ ^ )
3667     1 ^ ^ )
3668 nigel 63 0: abcabc
3669     1: abc
3670     *** Failers
3671     --->*** Failers
3672 nigel 75 0 ^ (abc(?C1))*
3673 nigel 63 0:
3674 ph10 102 abcabcabc\C!1!3
3675 nigel 63 --->abcabcabc
3676 nigel 75 0 ^ (abc(?C1))*
3677     1 ^ ^ )
3678     1 ^ ^ )
3679     1 ^ ^ )
3680 nigel 63 0: abcabc
3681     1: abc
3682    
3683 nigel 93 /(\d{3}(?C))*/I
3684 nigel 63 Capturing subpattern count = 1
3685     No options
3686     No first char
3687     No need char
3688     123\C+
3689     Callout 0: last capture = -1
3690     0: <unset>
3691     --->123
3692 nigel 75 ^ ^ )
3693 nigel 63 0: 123
3694     1: 123
3695     123456\C+
3696     Callout 0: last capture = -1
3697     0: <unset>
3698     --->123456
3699 nigel 75 ^ ^ )
3700 nigel 63 Callout 0: last capture = 1
3701     0: <unset>
3702     1: 123
3703     --->123456
3704 nigel 75 ^ ^ )
3705 nigel 63 0: 123456
3706     1: 456
3707 ph10 102 123456789\C+
3708 nigel 63 Callout 0: last capture = -1
3709     0: <unset>
3710     --->123456789
3711 nigel 75 ^ ^ )
3712 nigel 63 Callout 0: last capture = 1
3713     0: <unset>
3714     1: 123
3715     --->123456789
3716 nigel 75 ^ ^ )
3717 nigel 63 Callout 0: last capture = 1
3718     0: <unset>
3719     1: 456
3720     --->123456789
3721 nigel 75 ^ ^ )
3722 nigel 63 0: 123456789
3723     1: 789
3724    
3725 nigel 93 /((xyz)(?C)p|(?C1)xyzabc)/I
3726 nigel 63 Capturing subpattern count = 2
3727     No options
3728     First char = 'x'
3729     No need char
3730     xyzabc\C+
3731     Callout 0: last capture = 2
3732     0: <unset>
3733     1: <unset>
3734     2: xyz
3735     --->xyzabc
3736 nigel 75 ^ ^ p
3737 nigel 63 Callout 1: last capture = -1
3738     0: <unset>
3739     --->xyzabc
3740 nigel 75 ^ x
3741 nigel 63 0: xyzabc
3742     1: xyzabc
3743    
3744 nigel 93 /(X)((xyz)(?C)p|(?C1)xyzabc)/I
3745 nigel 63 Capturing subpattern count = 3
3746     No options
3747     First char = 'X'
3748     Need char = 'x'
3749     Xxyzabc\C+
3750     Callout 0: last capture = 3
3751     0: <unset>
3752     1: X
3753     2: <unset>
3754     3: xyz
3755     --->Xxyzabc
3756 nigel 75 ^ ^ p
3757 nigel 63 Callout 1: last capture = 1
3758     0: <unset>
3759     1: X
3760     --->Xxyzabc
3761 nigel 75 ^^ x
3762 nigel 63 0: Xxyzabc
3763     1: X
3764     2: xyzabc
3765    
3766 nigel 93 /(?=(abc))(?C)abcdef/I
3767 nigel 63 Capturing subpattern count = 1
3768     No options
3769     First char = 'a'
3770     Need char = 'f'
3771     abcdef\C+
3772     Callout 0: last capture = 1
3773     0: <unset>
3774     1: abc
3775     --->abcdef
3776 nigel 75 ^ a
3777 nigel 63 0: abcdef
3778     1: abc
3779 ph10 102
3780 nigel 93 /(?!(abc)(?C1)d)(?C2)abcxyz/I
3781 nigel 63 Capturing subpattern count = 1
3782     No options
3783     First char = 'a'
3784     Need char = 'z'
3785 ph10 102 abcxyz\C+
3786 nigel 63 Callout 1: last capture = 1
3787     0: <unset>
3788     1: abc
3789     --->abcxyz
3790 nigel 75 ^ ^ d
3791 nigel 63 Callout 2: last capture = -1
3792     0: <unset>
3793     --->abcxyz
3794 nigel 75 ^ a
3795 nigel 63 0: abcxyz
3796    
3797 nigel 93 /(?<=(abc)(?C))xyz/I
3798 nigel 63 Capturing subpattern count = 1
3799     No options
3800     First char = 'x'
3801     Need char = 'z'
3802     abcxyz\C+
3803     Callout 0: last capture = 1
3804     0: <unset>
3805     1: abc
3806     --->abcxyz
3807 nigel 75 ^ )
3808 nigel 63 0: xyz
3809     1: abc
3810 ph10 102
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    
3836 nigel 93 /a(b+?)(c*?)(?C1)/I
3837 nigel 77 Capturing subpattern count = 2
3838     No options
3839     First char = 'a'
3840     Need char = 'b'
3841     abbbbbccc\C*1
3842     --->abbbbbccc
3843     1 ^ ^
3844     Callout data = 1
3845     1 ^ ^
3846     Callout data = 1
3847     1 ^ ^
3848     Callout data = 1
3849     1 ^ ^
3850     Callout data = 1
3851     1 ^ ^
3852     Callout data = 1
3853     1 ^ ^
3854     Callout data = 1
3855     1 ^ ^
3856     Callout data = 1
3857     1 ^ ^
3858     Callout data = 1
3859     No match
3860 ph10 102
3861     /(?C)abc/I
3862 nigel 63 Capturing subpattern count = 0
3863     No options
3864     First char = 'a'
3865     Need char = 'c'
3866    
3867 nigel 93 /(?C)^abc/I
3868 nigel 63 Capturing subpattern count = 0
3869     Options: anchored
3870     No first char
3871 nigel 65 No need char
3872 nigel 63
3873 nigel 93 /(?C)a|b/IS
3874 nigel 63 Capturing subpattern count = 0
3875     No options
3876     No first char
3877     No need char
3878 ph10 455 Subject length lower bound = 1
3879 nigel 75 Starting byte set: a b
3880 nigel 63
3881 nigel 93 /(?R)/I
3882 nigel 63 Failed: recursive call could loop indefinitely at offset 3
3883    
3884 nigel 93 /(a|(?R))/I
3885 nigel 63 Failed: recursive call could loop indefinitely at offset 6
3886    
3887 nigel 93 /(ab|(bc|(de|(?R))))/I
3888 nigel 63 Failed: recursive call could loop indefinitely at offset 15
3889    
3890 nigel 93 /x(ab|(bc|(de|(?R))))/I
3891 nigel 63 Capturing subpattern count = 3
3892     No options
3893     First char = 'x'
3894     No need char
3895     xab
3896     0: xab
3897     1: ab
3898     xbc
3899     0: xbc
3900     1: bc
3901     2: bc
3902     xde
3903     0: xde
3904     1: de
3905     2: de
3906     3: de
3907     xxab
3908     0: xxab
3909     1: xab
3910     2: xab
3911     3: xab
3912     xxxab
3913     0: xxxab
3914     1: xxab
3915     2: xxab
3916     3: xxab
3917     *** Failers
3918     No match
3919 ph10 102 xyab
3920 nigel 63 No match
3921    
3922 nigel 93 /(ab|(bc|(de|(?1))))/I
3923 nigel 63 Failed: recursive call could loop indefinitely at offset 15
3924    
3925 nigel 93 /x(ab|(bc|(de|(?1)x)x)x)/I
3926 nigel 63 Failed: recursive call could loop indefinitely at offset 16
3927    
3928 nigel 93 /^([^()]|\((?1)*\))*$/I
3929 nigel 63 Capturing subpattern count = 1
3930     Options: anchored
3931     No first char
3932     No need char
3933     abc
3934     0: abc
3935     1: c
3936     a(b)c
3937     0: a(b)c
3938     1: c
3939 ph10 102 a(b(c))d
3940 nigel 63 0: a(b(c))d
3941     1: d
3942     *** Failers)
3943     No match
3944 ph10 102 a(b(c)d
3945 nigel 63 No match
3946    
3947 nigel 93 /^>abc>([^()]|\((?1)*\))*<xyz<$/I
3948 nigel 63 Capturing subpattern count = 1
3949     Options: anchored
3950     No first char
3951     Need char = '<'
3952     >abc>123<xyz<
3953     0: >abc>123<xyz<
3954     1: 3
3955     >abc>1(2)3<xyz<
3956     0: >abc>1(2)3<xyz<
3957     1: 3
3958     >abc>(1(2)3)<xyz<
3959     0: >abc>(1(2)3)<xyz<
3960     1: (1(2)3)
3961    
3962 ph10 161 /(a(?1)b)/DZ
3963 nigel 63 ------------------------------------------------------------------
3964 ph10 192 Bra
3965     CBra 1
3966 ph10 161 a
3967     Once
3968     Recurse
3969     Ket
3970     b
3971     Ket
3972     Ket
3973     End
3974 nigel 63 ------------------------------------------------------------------
3975     Capturing subpattern count = 1
3976     No options
3977     First char = 'a'
3978     Need char = 'b'
3979    
3980 ph10 161 /(a(?1)+b)/DZ
3981 nigel 63 ------------------------------------------------------------------
3982 ph10 192 Bra
3983     CBra 1
3984 ph10 161 a
3985     Once
3986     Recurse
3987     KetRmax
3988     b
3989     Ket
3990     Ket
3991     End
3992 nigel 63 ------------------------------------------------------------------
3993     Capturing subpattern count = 1
3994     No options
3995     First char = 'a'
3996     Need char = 'b'
3997    
3998 nigel 93 /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
3999 nigel 63 Capturing subpattern count = 2
4000     Options: anchored
4001     No first char
4002     No need char
4003     12
4004     0: 12
4005     1: 12
4006     (((2+2)*-3)-7)
4007     0: (((2+2)*-3)-7)
4008     1: (((2+2)*-3)-7)
4009     2: -
4010     -12
4011     0: -12
4012     1: -12
4013     *** Failers
4014     No match
4015     ((2+2)*-3)-7)
4016     No match
4017 ph10 102
4018 nigel 93 /^(x(y|(?1){2})z)/I
4019 nigel 63 Capturing subpattern count = 2
4020     Options: anchored
4021     No first char
4022