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

Contents of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 264 - (hide annotations) (download)
Tue Nov 13 11:07:16 2007 UTC (7 years ago) by ph10
File size: 189174 byte(s)
Fix [\S] etc. bug in UTF-8 mode with characters > 255.

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