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

Contents of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 226 - (hide annotations) (download)
Tue Aug 21 11:46:08 2007 UTC (6 years, 7 months ago) by ph10
File size: 186971 byte(s)
Don't advance by 2 if explicit \r or \n in the pattern. Add 
PCRE_INFO_HASCRORLF.

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