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

Contents of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 167 - (hide annotations) (download)
Wed May 9 15:53:54 2007 UTC (7 years, 2 months ago) by ph10
File size: 164102 byte(s)
Add (?(-n) and (?(+n) relative conditions.

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