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

Diff of /code/trunk/testdata/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by nigel, Sat Feb 24 21:39:17 2007 UTC revision 43 by nigel, Sat Feb 24 21:39:21 2007 UTC
# Line 1  Line 1 
1  PCRE version 2.08 31-Aug-1999  PCRE version 3.0 01-Feb-2000
2    
3  /(a)b|/  /(a)b|/
4  Identifying subpattern count = 1  Capturing subpattern count = 1
5  No options  No options
6  No first char  No first char
7  No req char  No need char
8    
9  /abc/  /abc/
10  Identifying subpattern count = 0  Capturing subpattern count = 0
11  No options  No options
12  First char = 'a'  First char = 'a'
13  Req char = 'c'  Need char = 'c'
14      abc      abc
15   0: abc   0: abc
16      defabc      defabc
# Line 25  No match Line 25  No match
25  No match  No match
26    
27  /^abc/  /^abc/
28  Identifying subpattern count = 0  Capturing subpattern count = 0
29  Options: anchored  Options: anchored
30  No first char  No first char
31  Req char = 'c'  Need char = 'c'
32      abc      abc
33   0: abc   0: abc
34      \Aabc      \Aabc
# Line 41  No match Line 41  No match
41  No match  No match
42    
43  /a+bc/  /a+bc/
44  Identifying subpattern count = 0  Capturing subpattern count = 0
45  No options  No options
46  First char = 'a'  First char = 'a'
47  Req char = 'c'  Need char = 'c'
48    
49  /a*bc/  /a*bc/
50  Identifying subpattern count = 0  Capturing subpattern count = 0
51  No options  No options
52  No first char  No first char
53  Req char = 'c'  Need char = 'c'
54    
55  /a{3}bc/  /a{3}bc/
56  Identifying subpattern count = 0  Capturing subpattern count = 0
57  No options  No options
58  First char = 'a'  First char = 'a'
59  Req char = 'c'  Need char = 'c'
60    
61  /(abc|a+z)/  /(abc|a+z)/
62  Identifying subpattern count = 1  Capturing subpattern count = 1
63  No options  No options
64  First char = 'a'  First char = 'a'
65  No req char  No need char
66    
67  /^abc$/  /^abc$/
68  Identifying subpattern count = 0  Capturing subpattern count = 0
69  Options: anchored  Options: anchored
70  No first char  No first char
71  Req char = 'c'  Need char = 'c'
72      abc      abc
73   0: abc   0: abc
74      *** Failers      *** Failers
# Line 113  Failed: missing ) after comment at offse Line 113  Failed: missing ) after comment at offse
113  Failed: unrecognized character after (? at offset 2  Failed: unrecognized character after (? at offset 2
114    
115  /.*b/  /.*b/
116  Identifying subpattern count = 0  Capturing subpattern count = 0
117  No options  No options
118  First char at start or follows \n  First char at start or follows \n
119  Req char = 'b'  Need char = 'b'
120    
121  /.*?b/  /.*?b/
122  Identifying subpattern count = 0  Capturing subpattern count = 0
123  No options  No options
124  First char at start or follows \n  First char at start or follows \n
125  Req char = 'b'  Need char = 'b'
126    
127  /cat|dog|elephant/  /cat|dog|elephant/
128  Identifying subpattern count = 0  Capturing subpattern count = 0
129  No options  No options
130  No first char  No first char
131  No req char  No need char
132      this sentence eventually mentions a cat      this sentence eventually mentions a cat
133   0: cat   0: cat
134      this sentences rambles on and on for a while and then reaches elephant      this sentences rambles on and on for a while and then reaches elephant
135   0: elephant   0: elephant
136    
137  /cat|dog|elephant/S  /cat|dog|elephant/S
138  Identifying subpattern count = 0  Capturing subpattern count = 0
139  No options  No options
140  No first char  No first char
141  No req char  No need char
142  Starting character set: c d e  Starting character set: c d e
143      this sentence eventually mentions a cat      this sentence eventually mentions a cat
144   0: cat   0: cat
# Line 146  Starting character set: c d e Line 146  Starting character set: c d e
146   0: elephant   0: elephant
147    
148  /cat|dog|elephant/iS  /cat|dog|elephant/iS
149  Identifying subpattern count = 0  Capturing subpattern count = 0
150  Options: caseless  Options: caseless
151  No first char  No first char
152  No req char  No need char
153  Starting character set: C D E c d e  Starting character set: C D E c d e
154      this sentence eventually mentions a CAT cat      this sentence eventually mentions a CAT cat
155   0: CAT   0: CAT
# Line 157  Starting character set: C D E c d e Line 157  Starting character set: C D E c d e
157   0: elephant   0: elephant
158    
159  /a|[bcd]/S  /a|[bcd]/S
160  Identifying subpattern count = 0  Capturing subpattern count = 0
161  No options  No options
162  No first char  No first char
163  No req char  No need char
164  Starting character set: a b c d  Starting character set: a b c d
165    
166  /(a|[^\dZ])/S  /(a|[^\dZ])/S
167  Identifying subpattern count = 1  Capturing subpattern count = 1
168  No options  No options
169  No first char  No first char
170  No req char  No need char
171  Starting character set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a  Starting character set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
172    \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19    \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
173    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >    \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
# Line 184  Starting character set: \x00 \x01 \x02 \ Line 184  Starting character set: \x00 \x01 \x02 \
184    \xfc \xfd \xfe \xff    \xfc \xfd \xfe \xff
185    
186  /(a|b)*[\s]/S  /(a|b)*[\s]/S
187  Identifying subpattern count = 1  Capturing subpattern count = 1
188  No options  No options
189  No first char  No first char
190  No req char  No need char
191  Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b  Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b
192    
193  /(ab\2)/  /(ab\2)/
# Line 197  Failed: back reference to non-existent s Line 197  Failed: back reference to non-existent s
197  Failed: nothing to repeat at offset 4  Failed: nothing to repeat at offset 4
198    
199  /(a)(b)(c)\2/  /(a)(b)(c)\2/
200  Identifying subpattern count = 3  Capturing subpattern count = 3
201    Max back reference = 2
202  No options  No options
203  First char = 'a'  First char = 'a'
204  Req char = 'c'  Need char = 'c'
205      abcb      abcb
206   0: abcb   0: abcb
207   1: a   1: a
# Line 227  Matched, but too many substrings Line 228  Matched, but too many substrings
228   3: c   3: c
229    
230  /(a)bc|(a)(b)\2/  /(a)bc|(a)(b)\2/
231  Identifying subpattern count = 3  Capturing subpattern count = 3
232    Max back reference = 2
233  No options  No options
234  First char = 'a'  First char = 'a'
235  No req char  No need char
236      abc      abc
237   0: abc   0: abc
238   1: a   1: a
# Line 268  Matched, but too many substrings Line 270  Matched, but too many substrings
270   3: b   3: b
271    
272  /abc$/E  /abc$/E
273  Identifying subpattern count = 0  Capturing subpattern count = 0
274  Options: dollar_endonly  Options: dollar_endonly
275  First char = 'a'  First char = 'a'
276  Req char = 'c'  Need char = 'c'
277      abc      abc
278   0: abc   0: abc
279      *** Failers      *** Failers
# Line 285  No match Line 287  No match
287  Failed: back reference to non-existent subpattern at offset 17  Failed: back reference to non-existent subpattern at offset 17
288    
289  /the quick brown fox/  /the quick brown fox/
290  Identifying subpattern count = 0  Capturing subpattern count = 0
291  No options  No options
292  First char = 't'  First char = 't'
293  Req char = 'x'  Need char = 'x'
294      the quick brown fox      the quick brown fox
295   0: the quick brown fox   0: the quick brown fox
296      this is a line with the quick brown fox      this is a line with the quick brown fox
297   0: the quick brown fox   0: the quick brown fox
298    
299  /the quick brown fox/A  /the quick brown fox/A
300  Identifying subpattern count = 0  Capturing subpattern count = 0
301  Options: anchored  Options: anchored
302  No first char  No first char
303  Req char = 'x'  Need char = 'x'
304      the quick brown fox      the quick brown fox
305   0: the quick brown fox   0: the quick brown fox
306      *** Failers      *** Failers
# Line 310  No match Line 312  No match
312  Failed: unrecognized character after (? at offset 4  Failed: unrecognized character after (? at offset 4
313    
314  /^abc|def/  /^abc|def/
315  Identifying subpattern count = 0  Capturing subpattern count = 0
316  No options  No options
317  No first char  No first char
318  No req char  No need char
319      abcdef      abcdef
320   0: abc   0: abc
321      abcdef\B      abcdef\B
322   0: def   0: def
323    
324  /.*((abc)$|(def))/  /.*((abc)$|(def))/
325  Identifying subpattern count = 3  Capturing subpattern count = 3
326  No options  No options
327  First char at start or follows \n  First char at start or follows \n
328  No req char  No need char
329      defabc      defabc
330   0: defabc   0: defabc
331   1: abc   1: abc
# Line 396  Failed: unmatched parentheses at offset Line 398  Failed: unmatched parentheses at offset
398  Failed: missing terminating ] for character class at offset 4  Failed: missing terminating ] for character class at offset 4
399    
400  /[^aeiou ]{3,}/  /[^aeiou ]{3,}/
401  Identifying subpattern count = 0  Capturing subpattern count = 0
402  No options  No options
403  No first char  No first char
404  No req char  No need char
405      co-processors, and for      co-processors, and for
406   0: -pr   0: -pr
407    
408  /<.*>/  /<.*>/
409  Identifying subpattern count = 0  Capturing subpattern count = 0
410  No options  No options
411  First char = '<'  First char = '<'
412  Req char = '>'  Need char = '>'
413      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
414   0: <def>ghi<klm>   0: <def>ghi<klm>
415    
416  /<.*?>/  /<.*?>/
417  Identifying subpattern count = 0  Capturing subpattern count = 0
418  No options  No options
419  First char = '<'  First char = '<'
420  Req char = '>'  Need char = '>'
421      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
422   0: <def>   0: <def>
423    
424  /<.*>/U  /<.*>/U
425  Identifying subpattern count = 0  Capturing subpattern count = 0
426  Options: ungreedy  Options: ungreedy
427  First char = '<'  First char = '<'
428  Req char = '>'  Need char = '>'
429      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
430   0: <def>   0: <def>
431    
432  /<.*>(?U)/  /<.*>(?U)/
433  Identifying subpattern count = 0  Capturing subpattern count = 0
434  Options: ungreedy  Options: ungreedy
435  First char = '<'  First char = '<'
436  Req char = '>'  Need char = '>'
437      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
438   0: <def>   0: <def>
439    
440  /<.*?>/U  /<.*?>/U
441  Identifying subpattern count = 0  Capturing subpattern count = 0
442  Options: ungreedy  Options: ungreedy
443  First char = '<'  First char = '<'
444  Req char = '>'  Need char = '>'
445      abc<def>ghi<klm>nop      abc<def>ghi<klm>nop
446   0: <def>ghi<klm>   0: <def>ghi<klm>
447    
448  /={3,}/U  /={3,}/U
449  Identifying subpattern count = 0  Capturing subpattern count = 0
450  Options: ungreedy  Options: ungreedy
451  First char = '='  First char = '='
452  Req char = '='  Need char = '='
453      abc========def      abc========def
454   0: ===   0: ===
455    
456  /(?U)={3,}?/  /(?U)={3,}?/
457  Identifying subpattern count = 0  Capturing subpattern count = 0
458  Options: ungreedy  Options: ungreedy
459  First char = '='  First char = '='
460  Req char = '='  Need char = '='
461      abc========def      abc========def
462   0: ========   0: ========
463    
464  /(?<!bar|cattle)foo/  /(?<!bar|cattle)foo/
465  Identifying subpattern count = 0  Capturing subpattern count = 0
466  No options  No options
467  First char = 'f'  First char = 'f'
468  Req char = 'o'  Need char = 'o'
469      foo      foo
470   0: foo   0: foo
471      catfoo      catfoo
# Line 485  Failed: lookbehind assertion is not fixe Line 487  Failed: lookbehind assertion is not fixe
487  Failed: lookbehind assertion is not fixed length at offset 12  Failed: lookbehind assertion is not fixed length at offset 12
488    
489  /(?i)abc/  /(?i)abc/
490  Identifying subpattern count = 0  Capturing subpattern count = 0
491  Options: caseless  Options: caseless
492  First char = 'a'  First char = 'a'
493  Req char = 'c'  Need char = 'c'
494    
495  /(a|(?m)a)/  /(a|(?m)a)/
496  Identifying subpattern count = 1  Capturing subpattern count = 1
497  No options  No options
498  First char = 'a'  First char = 'a'
499  No req char  No need char
500    
501  /(?i)^1234/  /(?i)^1234/
502  Identifying subpattern count = 0  Capturing subpattern count = 0
503  Options: anchored caseless  Options: anchored caseless
504  No first char  No first char
505  Req char = '4'  Need char = '4'
506    
507  /(^b|(?i)^d)/  /(^b|(?i)^d)/
508  Identifying subpattern count = 1  Capturing subpattern count = 1
509  Options: anchored  Options: anchored
510  Case state changes  Case state changes
511  No first char  No first char
512  No req char  No need char
513    
514  /(?s).*/  /(?s).*/
515  Identifying subpattern count = 0  Capturing subpattern count = 0
516  Options: anchored dotall  Options: anchored dotall
517  No first char  No first char
518  No req char  No need char
519    
520  /[abcd]/S  /[abcd]/S
521  Identifying subpattern count = 0  Capturing subpattern count = 0
522  No options  No options
523  No first char  No first char
524  No req char  No need char
525  Starting character set: a b c d  Starting character set: a b c d
526    
527  /(?i)[abcd]/S  /(?i)[abcd]/S
528  Identifying subpattern count = 0  Capturing subpattern count = 0
529  Options: caseless  Options: caseless
530  No first char  No first char
531  No req char  No need char
532  Starting character set: A B C D a b c d  Starting character set: A B C D a b c d
533    
534  /(?m)[xy]|(b|c)/S  /(?m)[xy]|(b|c)/S
535  Identifying subpattern count = 1  Capturing subpattern count = 1
536  Options: multiline  Options: multiline
537  No first char  No first char
538  No req char  No need char
539  Starting character set: b c x y  Starting character set: b c x y
540    
541  /(^a|^b)/m  /(^a|^b)/m
542  Identifying subpattern count = 1  Capturing subpattern count = 1
543  Options: multiline  Options: multiline
544  First char at start or follows \n  First char at start or follows \n
545  No req char  No need char
546    
547  /(?i)(^a|^b)/m  /(?i)(^a|^b)/m
548  Identifying subpattern count = 1  Capturing subpattern count = 1
549  Options: caseless multiline  Options: caseless multiline
550  First char at start or follows \n  First char at start or follows \n
551  No req char  No need char
552    
553  /(a)(?(1)a|b|c)/  /(a)(?(1)a|b|c)/
554  Failed: conditional group contains more than two branches at offset 13  Failed: conditional group contains more than two branches at offset 13
# Line 567  Failed: assertion expected after (?( at Line 569  Failed: assertion expected after (?( at
569  Failed: unrecognized character after (?< at offset 2  Failed: unrecognized character after (?< at offset 2
570    
571  /((?s)blah)\s+\1/  /((?s)blah)\s+\1/
572  Identifying subpattern count = 1  Capturing subpattern count = 1
573    Max back reference = 1
574  No options  No options
575  First char = 'b'  First char = 'b'
576  Req char = 'h'  Need char = 'h'
577    
578  /((?i)blah)\s+\1/  /((?i)blah)\s+\1/
579  Identifying subpattern count = 1  Capturing subpattern count = 1
580    Max back reference = 1
581  No options  No options
582  Case state changes  Case state changes
583  No first char  No first char
584  Req char = 'h'  Need char = 'h'
585    
586  /((?i)b)/DS  /((?i)b)/DS
587  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 590  Req char = 'h' Line 594  Req char = 'h'
594   16  16 Ket   16  16 Ket
595   19     End   19     End
596  ------------------------------------------------------------------  ------------------------------------------------------------------
597  Identifying subpattern count = 1  Capturing subpattern count = 1
598  No options  No options
599  Case state changes  Case state changes
600  No first char  No first char
601  Req char = 'b'  Need char = 'b'
602  Starting character set: B b  Starting character set: B b
603    
604  /(a*b|(?i:c*(?-i)d))/S  /(a*b|(?i:c*(?-i)d))/S
605  Identifying subpattern count = 1  Capturing subpattern count = 1
606  No options  No options
607  Case state changes  Case state changes
608  No first char  No first char
609  No req char  No need char
610  Starting character set: C a b c d  Starting character set: C a b c d
611    
612  /a$/  /a$/
613  Identifying subpattern count = 0  Capturing subpattern count = 0
614  No options  No options
615  First char = 'a'  First char = 'a'
616  No req char  No need char
617      a      a
618   0: a   0: a
619      a\n      a\n
# Line 622  No match Line 626  No match
626  No match  No match
627    
628  /a$/m  /a$/m
629  Identifying subpattern count = 0  Capturing subpattern count = 0
630  Options: multiline  Options: multiline
631  First char = 'a'  First char = 'a'
632  No req char  No need char
633      a      a
634   0: a   0: a
635      a\n      a\n
# Line 638  No match Line 642  No match
642  No match  No match
643    
644  /\Aabc/m  /\Aabc/m
645  Identifying subpattern count = 0  Capturing subpattern count = 0
646  Options: anchored multiline  Options: anchored multiline
647  No first char  No first char
648  Req char = 'c'  Need char = 'c'
649    
650  /^abc/m  /^abc/m
651  Identifying subpattern count = 0  Capturing subpattern count = 0
652  Options: multiline  Options: multiline
653  First char at start or follows \n  First char at start or follows \n
654  Req char = 'c'  Need char = 'c'
655    
656  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/  /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
657  Identifying subpattern count = 5  Capturing subpattern count = 5
658  Options: anchored  Options: anchored
659  No first char  No first char
660  Req char = 'a'  Need char = 'a'
661    aaaaabbbbbcccccdef    aaaaabbbbbcccccdef
662   0: aaaaabbbbbcccccdef   0: aaaaabbbbbcccccdef
663   1: aaaaabbbbbcccccdef   1: aaaaabbbbbcccccdef
# Line 663  Req char = 'a' Line 667  Req char = 'a'
667   5: def   5: def
668    
669  /(?<=foo)[ab]/S  /(?<=foo)[ab]/S
670  Identifying subpattern count = 0  Capturing subpattern count = 0
671  No options  No options
672  No first char  No first char
673  No req char  No need char
674  Starting character set: a b  Starting character set: a b
675    
676  /(?<!foo)(alpha|omega)/S  /(?<!foo)(alpha|omega)/S
677  Identifying subpattern count = 1  Capturing subpattern count = 1
678  No options  No options
679  No first char  No first char
680  Req char = 'a'  Need char = 'a'
681  Starting character set: a o  Starting character set: a o
682    
683  /(?!alphabet)[ab]/S  /(?!alphabet)[ab]/S
684  Identifying subpattern count = 0  Capturing subpattern count = 0
685  No options  No options
686  No first char  No first char
687  No req char  No need char
688  Starting character set: a b  Starting character set: a b
689    
690  /(?<=foo\n)^bar/m  /(?<=foo\n)^bar/m
691  Identifying subpattern count = 0  Capturing subpattern count = 0
692  Options: multiline  Options: multiline
693  First char at start or follows \n  First char at start or follows \n
694  Req char = 'r'  Need char = 'r'
695    
696  /(?>^abc)/m  /(?>^abc)/m
697  Identifying subpattern count = 0  Capturing subpattern count = 0
698  Options: multiline  Options: multiline
699  First char at start or follows \n  First char at start or follows \n
700  Req char = 'c'  Need char = 'c'
701      abc      abc
702   0: abc   0: abc
703      def\nabc      def\nabc
# Line 713  Failed: lookbehind assertion is not fixe Line 717  Failed: lookbehind assertion is not fixe
717  Failed: lookbehind assertion is not fixed length at offset 13  Failed: lookbehind assertion is not fixed length at offset 13
718    
719  /The next three are in testinput2 because they have variable length branches/  /The next three are in testinput2 because they have variable length branches/
720  Identifying subpattern count = 0  Capturing subpattern count = 0
721  No options  No options
722  First char = 'T'  First char = 'T'
723  Req char = 's'  Need char = 's'
724    
725  /(?<=bullock|donkey)-cart/  /(?<=bullock|donkey)-cart/
726  Identifying subpattern count = 0  Capturing subpattern count = 0
727  No options  No options
728  First char = '-'  First char = '-'
729  Req char = 't'  Need char = 't'
730      the bullock-cart      the bullock-cart
731   0: -cart   0: -cart
732      a donkey-cart race      a donkey-cart race
# Line 735  No match Line 739  No match
739  No match  No match
740    
741  /(?<=ab(?i)x|y|z)/  /(?<=ab(?i)x|y|z)/
742  Identifying subpattern count = 0  Capturing subpattern count = 0
743  No options  No options
744  Case state changes  Case state changes
745  No first char  No first char
746  No req char  No need char
747    
748  /(?>.*)(?<=(abcd)|(xyz))/  /(?>.*)(?<=(abcd)|(xyz))/
749  Identifying subpattern count = 2  Capturing subpattern count = 2
750  No options  No options
751  First char at start or follows \n  First char at start or follows \n
752  No req char  No need char
753      alphabetabcd      alphabetabcd
754   0: alphabetabcd   0: alphabetabcd
755   1: abcd   1: abcd
# Line 755  No req char Line 759  No req char
759   2: xyz   2: xyz
760    
761  /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/  /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/
762  Identifying subpattern count = 0  Capturing subpattern count = 0
763  No options  No options
764  Case state changes  Case state changes
765  First char = 'Z'  First char = 'Z'
766  Req char = 'Z'  Need char = 'Z'
767      abxyZZ      abxyZZ
768   0: ZZ   0: ZZ
769      abXyZZ      abXyZZ
# Line 784  No match Line 788  No match
788  No match  No match
789    
790  /(?<!(foo)a)bar/  /(?<!(foo)a)bar/
791  Identifying subpattern count = 1  Capturing subpattern count = 1
792  No options  No options
793  First char = 'b'  First char = 'b'
794  Req char = 'r'  Need char = 'r'
795      bar      bar
796   0: bar   0: bar
797      foobbar      foobbar
# Line 798  No match Line 802  No match
802  No match  No match
803    
804  /This one is here because Perl 5.005_02 doesn't fail it/  /This one is here because Perl 5.005_02 doesn't fail it/
805  Identifying subpattern count = 0  Capturing subpattern count = 0
806  No options  No options
807  First char = 'T'  First char = 'T'
808  Req char = 't'  Need char = 't'
809    
810  /^(a)?(?(1)a|b)+$/  /^(a)?(?(1)a|b)+$/
811  Identifying subpattern count = 1  Capturing subpattern count = 1
812  Options: anchored  Options: anchored
813  No first char  No first char
814  No req char  No need char
815      *** Failers      *** Failers
816  No match  No match
817      a      a
818  No match  No match
819    
820  /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/  /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/
821  Identifying subpattern count = 0  Capturing subpattern count = 0
822  No options  No options
823  First char = 'T'  First char = 'T'
824  Req char = 'g'  Need char = 'g'
825    
826  /^(a\1?){4}$/  /^(a\1?){4}$/
827  Identifying subpattern count = 1  Capturing subpattern count = 1
828    Max back reference = 1
829  Options: anchored  Options: anchored
830  No first char  No first char
831  Req char = 'a'  Need char = 'a'
832      aaaaaa      aaaaaa
833   0: aaaaaa   0: aaaaaa
834   1: aa   1: aa
835    
836  /These are syntax tests from Perl 5.005/  /These are syntax tests from Perl 5.005/
837  Identifying subpattern count = 0  Capturing subpattern count = 0
838  No options  No options
839  First char = 'T'  First char = 'T'
840  Req char = '5'  Need char = '5'
841    
842  /a[b-a]/  /a[b-a]/
843  Failed: range out of order in character class at offset 4  Failed: range out of order in character class at offset 4
# Line 943  Failed: POSIX code 9: bad escape sequenc Line 948  Failed: POSIX code 9: bad escape sequenc
948  Failed: \ at end of pattern at offset 4  Failed: \ at end of pattern at offset 4
949    
950  /(a)bc(d)/  /(a)bc(d)/
951  Identifying subpattern count = 2  Capturing subpattern count = 2
952  No options  No options
953  First char = 'a'  First char = 'a'
954  Req char = 'd'  Need char = 'd'
955      abcd      abcd
956   0: abcd   0: abcd
957   1: a   1: a
# Line 963  Req char = 'd' Line 968  Req char = 'd'
968  copy substring 5 failed -7  copy substring 5 failed -7
969    
970  /(.{20})/  /(.{20})/
971  Identifying subpattern count = 1  Capturing subpattern count = 1
972  No options  No options
973  No first char  No first char
974  No req char  No need char
975      abcdefghijklmnopqrstuvwxyz      abcdefghijklmnopqrstuvwxyz
976   0: abcdefghijklmnopqrst   0: abcdefghijklmnopqrst
977   1: abcdefghijklmnopqrst   1: abcdefghijklmnopqrst
# Line 980  copy substring 1 failed -6 Line 985  copy substring 1 failed -6
985   1G abcdefghijklmnopqrst (20)   1G abcdefghijklmnopqrst (20)
986    
987  /(.{15})/  /(.{15})/
988  Identifying subpattern count = 1  Capturing subpattern count = 1
989  No options  No options
990  No first char  No first char
991  No req char  No need char
992      abcdefghijklmnopqrstuvwxyz      abcdefghijklmnopqrstuvwxyz
993   0: abcdefghijklmno   0: abcdefghijklmno
994   1: abcdefghijklmno   1: abcdefghijklmno
# Line 994  No req char Line 999  No req char
999   1G abcdefghijklmno (15)   1G abcdefghijklmno (15)
1000    
1001  /(.{16})/  /(.{16})/
1002  Identifying subpattern count = 1  Capturing subpattern count = 1
1003  No options  No options
1004  No first char  No first char
1005  No req char  No need char
1006      abcdefghijklmnopqrstuvwxyz      abcdefghijklmnopqrstuvwxyz
1007   0: abcdefghijklmnop   0: abcdefghijklmnop
1008   1: abcdefghijklmnop   1: abcdefghijklmnop
# Line 1010  copy substring 1 failed -6 Line 1015  copy substring 1 failed -6
1015   1L abcdefghijklmnop   1L abcdefghijklmnop
1016    
1017  /^(a|(bc))de(f)/  /^(a|(bc))de(f)/
1018  Identifying subpattern count = 3  Capturing subpattern count = 3
1019  Options: anchored  Options: anchored
1020  No first char  No first char
1021  Req char = 'f'  Need char = 'f'
1022      adef\G1\G2\G3\G4\L      adef\G1\G2\G3\G4\L
1023   0: adef   0: adef
1024   1: a   1: a
# Line 1048  get substring 4 failed -7 Line 1053  get substring 4 failed -7
1053   0C adef (4)   0C adef (4)
1054    
1055  /^abc\00def/  /^abc\00def/
1056  Identifying subpattern count = 0  Capturing subpattern count = 0
1057  Options: anchored  Options: anchored
1058  No first char  No first char
1059  Req char = 'f'  Need char = 'f'
1060      abc\00def\L\C0      abc\00def\L\C0
1061   0: abc\x00def   0: abc\x00def
1062   0C abc (7)   0C abc (7)
# Line 1061  Req char = 'f' Line 1066  Req char = 'f'
1066  )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+  )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
1067  )?)?)?)?)?)?)?)?)?otherword/M  )?)?)?)?)?)?)?)?)?otherword/M
1068  Memory allocation (code space): 428  Memory allocation (code space): 428
1069  Identifying subpattern count = 8  Capturing subpattern count = 8
1070  No options  No options
1071  First char = 'w'  First char = 'w'
1072  Req char = 'd'  Need char = 'd'
1073    
1074  /.*X/D  /.*X/D
1075  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1074  Req char = 'd' Line 1079  Req char = 'd'
1079    8   8 Ket    8   8 Ket
1080   11     End   11     End
1081  ------------------------------------------------------------------  ------------------------------------------------------------------
1082  Identifying subpattern count = 0  Capturing subpattern count = 0
1083  No options  No options
1084  First char at start or follows \n  First char at start or follows \n
1085  Req char = 'X'  Need char = 'X'
1086    
1087  /.*X/Ds  /.*X/Ds
1088  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1087  Req char = 'X' Line 1092  Req char = 'X'
1092    8   8 Ket    8   8 Ket
1093   11     End   11     End
1094  ------------------------------------------------------------------  ------------------------------------------------------------------
1095  Identifying subpattern count = 0  Capturing subpattern count = 0
1096  Options: anchored dotall  Options: anchored dotall
1097  No first char  No first char
1098  Req char = 'X'  Need char = 'X'
1099    
1100  /(.*X|^B)/D  /(.*X|^B)/D
1101  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1105  Req char = 'X' Line 1110  Req char = 'X'
1110   21  21 Ket   21  21 Ket
1111   24     End   24     End
1112  ------------------------------------------------------------------  ------------------------------------------------------------------
1113  Identifying subpattern count = 1  Capturing subpattern count = 1
1114  No options  No options
1115  First char at start or follows \n  First char at start or follows \n
1116  No req char  No need char
1117    
1118  /(.*X|^B)/Ds  /(.*X|^B)/Ds
1119  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1123  No req char Line 1128  No req char
1128   21  21 Ket   21  21 Ket
1129   24     End   24     End
1130  ------------------------------------------------------------------  ------------------------------------------------------------------
1131  Identifying subpattern count = 1  Capturing subpattern count = 1
1132  Options: anchored dotall  Options: anchored dotall
1133  No first char  No first char
1134  No req char  No need char
1135    
1136  /(?s)(.*X|^B)/D  /(?s)(.*X|^B)/D
1137  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1141  No req char Line 1146  No req char
1146   21  21 Ket   21  21 Ket
1147   24     End   24     End
1148  ------------------------------------------------------------------  ------------------------------------------------------------------
1149  Identifying subpattern count = 1  Capturing subpattern count = 1
1150  Options: anchored dotall  Options: anchored dotall
1151  No first char  No first char
1152  No req char  No need char
1153    
1154  /(?s:.*X|^B)/D  /(?s:.*X|^B)/D
1155  ------------------------------------------------------------------  ------------------------------------------------------------------
# Line 1162  No req char Line 1167  No req char
1167   27  27 Ket   27  27 Ket
1168   30     End   30     End
1169  ------------------------------------------------------------------  ------------------------------------------------------------------
1170  Identifying subpattern count = 0  Capturing subpattern count = 0
1171  No options  No options
1172  First char at start or follows \n  First char at start or follows \n
1173  No req char  No need char
1174    
1175  /\Biss\B/+  /\Biss\B/+
1176  Identifying subpattern count = 0  Capturing subpattern count = 0
1177  No options  No options
1178  First char = 'i'  First char = 'i'
1179  Req char = 's'  Need char = 's'
1180      Mississippi      Mississippi
1181   0: iss   0: iss
1182   0+ issippi   0+ issippi
# Line 1182  Req char = 's' Line 1187  Req char = 's'
1187   0+ issippi   0+ issippi
1188    
1189  /iss/G+  /iss/G+
1190  Identifying subpattern count = 0  Capturing subpattern count = 0
1191  No options  No options
1192  First char = 'i'  First char = 'i'
1193  Req char = 's'  Need char = 's'
1194      Mississippi      Mississippi
1195   0: iss   0: iss
1196   0+ issippi   0+ issippi
# Line 1193  Req char = 's' Line 1198  Req char = 's'
1198   0+ ippi   0+ ippi
1199    
1200  /\Biss\B/G+  /\Biss\B/G+
1201  Identifying subpattern count = 0  Capturing subpattern count = 0
1202  No options  No options
1203  First char = 'i'  First char = 'i'
1204  Req char = 's'  Need char = 's'
1205      Mississippi      Mississippi
1206   0: iss   0: iss
1207   0+ issippi   0+ issippi
1208    
1209  /\Biss\B/g+  /\Biss\B/g+
1210  Identifying subpattern count = 0  Capturing subpattern count = 0
1211  No options  No options
1212  First char = 'i'  First char = 'i'
1213  Req char = 's'  Need char = 's'
1214      Mississippi      Mississippi
1215   0: iss   0: iss
1216   0+ issippi   0+ issippi
# Line 1217  No match Line 1222  No match
1222  No match  No match
1223    
1224  /(?<=[Ms])iss/g+  /(?<=[Ms])iss/g+
1225  Identifying subpattern count = 0  Capturing subpattern count = 0
1226  No options  No options
1227  First char = 'i'  First char = 'i'
1228  Req char = 's'  Need char = 's'
1229      Mississippi      Mississippi
1230   0: iss   0: iss
1231   0+ issippi   0+ issippi
# Line 1228  Req char = 's' Line 1233  Req char = 's'
1233   0+ ippi   0+ ippi
1234    
1235  /(?<=[Ms])iss/G+  /(?<=[Ms])iss/G+
1236  Identifying subpattern count = 0  Capturing subpattern count = 0
1237  No options  No options
1238  First char = 'i'  First char = 'i'
1239  Req char = 's'  Need char = 's'
1240      Mississippi      Mississippi
1241   0: iss   0: iss
1242   0+ issippi   0+ issippi
1243    
1244  /^iss/g+  /^iss/g+
1245  Identifying subpattern count = 0  Capturing subpattern count = 0
1246  Options: anchored  Options: anchored
1247  No first char  No first char
1248  Req char = 's'  Need char = 's'
1249      ississippi      ississippi
1250   0: iss   0: iss
1251   0+ issippi   0+ issippi
1252    
1253  /.*iss/g+  /.*iss/g+
1254  Identifying subpattern count = 0  Capturing subpattern count = 0
1255  No options  No options
1256  First char at start or follows \n  First char at start or follows \n
1257  Req char = 's'  Need char = 's'
1258      abciss\nxyzisspqr      abciss\nxyzisspqr
1259   0: abciss   0: abciss
1260   0+ \x0axyzisspqr   0+ \x0axyzisspqr
# Line 1257  Req char = 's' Line 1262  Req char = 's'
1262   0+ pqr   0+ pqr
1263    
1264  /.i./+g  /.i./+g
1265  Identifying subpattern count = 0  Capturing subpattern count = 0
1266  No options  No options
1267  No first char  No first char
1268  Req char = 'i'  Need char = 'i'
1269      Mississippi      Mississippi
1270   0: Mis   0: Mis
1271   0+ sissippi   0+ sissippi
# Line 1287  Req char = 'i' Line 1292  Req char = 'i'
1292   0+ souri river   0+ souri river
1293    
1294  /^.is/+g  /^.is/+g
1295  Identifying subpattern count = 0  Capturing subpattern count = 0
1296  Options: anchored  Options: anchored
1297  No first char  No first char
1298  Req char = 's'  Need char = 's'
1299      Mississippi      Mississippi
1300   0: Mis   0: Mis
1301   0+ sissippi   0+ sissippi
1302    
1303  /^ab\n/g+  /^ab\n/g+
1304  Identifying subpattern count = 0  Capturing subpattern count = 0
1305  Options: anchored  Options: anchored
1306  No first char  No first char
1307  Req char = 10  Need char = 10
1308      ab\nab\ncd      ab\nab\ncd
1309   0: ab\x0a   0: ab\x0a
1310   0+ ab\x0acd   0+ ab\x0acd
1311    
1312  /^ab\n/mg+  /^ab\n/mg+
1313  Identifying subpattern count = 0  Capturing subpattern count = 0
1314  Options: multiline  Options: multiline
1315  First char at start or follows \n  First char at start or follows \n
1316  Req char = 10  Need char = 10
1317      ab\nab\ncd      ab\nab\ncd
1318   0: ab\x0a   0: ab\x0a
1319   0+ ab\x0acd   0+ ab\x0acd
# Line 1316  Req char = 10 Line 1321  Req char = 10
1321   0+ cd   0+ cd
1322    
1323  /abc/  /abc/
1324  Identifying subpattern count = 0  Capturing subpattern count = 0
1325  No options  No options
1326  First char = 'a'  First char = 'a'
1327  Req char = 'c'  Need char = 'c'
1328    
1329  /abc|bac/  /abc|bac/
1330  Identifying subpattern count = 0  Capturing subpattern count = 0
1331  No options  No options
1332  No first char  No first char
1333  Req char = 'c'  Need char = 'c'
1334    
1335  /(abc|bac)/  /(abc|bac)/
1336  Identifying subpattern count = 1  Capturing subpattern count = 1
1337  No options  No options
1338  No first char  No first char
1339  Req char = 'c'  Need char = 'c'
1340    
1341  /(abc|(c|dc))/  /(abc|(c|dc))/
1342  Identifying subpattern count = 2  Capturing subpattern count = 2
1343  No options  No options
1344  No first char  No first char
1345  Req char = 'c'  Need char = 'c'
1346    
1347  /(abc|(d|de)c)/  /(abc|(d|de)c)/
1348  Identifying subpattern count = 2  Capturing subpattern count = 2
1349  No options  No options
1350  No first char  No first char
1351  Req char = 'c'  Need char = 'c'
1352    
1353  /a*/  /a*/
1354  Identifying subpattern count = 0  Capturing subpattern count = 0
1355  No options  No options
1356  No first char  No first char
1357  No req char  No need char
1358    
1359  /a+/  /a+/
1360  Identifying subpattern count = 0  Capturing subpattern count = 0
1361  No options  No options
1362  First char = 'a'  First char = 'a'
1363  No req char  No need char
1364    
1365  /(baa|a+)/  /(baa|a+)/
1366  Identifying subpattern count = 1  Capturing subpattern count = 1
1367  No options  No options
1368  No first char  No first char
1369  Req char = 'a'  Need char = 'a'
1370    
1371  /a{0,3}/  /a{0,3}/
1372  Identifying subpattern count = 0  Capturing subpattern count = 0
1373  No options  No options
1374  No first char  No first char
1375  No req char  No need char
1376    
1377  /baa{3,}/  /baa{3,}/
1378  Identifying subpattern count = 0  Capturing subpattern count = 0
1379  No options  No options
1380  First char = 'b'  First char = 'b'
1381  Req char = 'a'  Need char = 'a'
1382    
1383  /"([^\\"]+|\\.)*"/  /"([^\\"]+|\\.)*"/
1384  Identifying subpattern count = 1  Capturing subpattern count = 1
1385  No options  No options
1386  First char = '"'  First char = '"'
1387  Req char = '"'  Need char = '"'
1388    
1389  /(abc|ab[cd])/  /(abc|ab[cd])/
1390  Identifying subpattern count = 1  Capturing subpattern count = 1
1391  No options  No options
1392  First char = 'a'  First char = 'a'
1393  No req char  No need char
1394    
1395  /(a|.)/  /(a|.)/
1396  Identifying subpattern count = 1  Capturing subpattern count = 1
1397  No options  No options
1398  No first char  No first char
1399  No req char  No need char
1400    
1401  /a|ba|\w/  /a|ba|\w/
1402  Identifying subpattern count = 0  Capturing subpattern count = 0
1403  No options  No options
1404  No first char  No first char
1405  No req char  No need char
1406    
1407  /abc(?=pqr)/  /abc(?=pqr)/
1408  Identifying subpattern count = 0  Capturing subpattern count = 0
1409  No options  No options
1410  First char = 'a'  First char = 'a'
1411  Req char = 'r'  Need char = 'r'
1412    
1413  /...(?<=abc)/  /...(?<=abc)/
1414  Identifying subpattern count = 0  Capturing subpattern count = 0
1415  No options  No options
1416  No first char  No first char
1417  No req char  No need char
1418    
1419  /abc(?!pqr)/  /abc(?!pqr)/
1420  Identifying subpattern count = 0  Capturing subpattern count = 0
1421  No options  No options
1422  First char = 'a'  First char = 'a'
1423  Req char = 'c'  Need char = 'c'
1424    
1425  /ab./  /ab./
1426  Identifying subpattern count = 0  Capturing subpattern count = 0
1427  No options  No options
1428  First char = 'a'  First char = 'a'
1429  Req char = 'b'  Need char = 'b'
1430    
1431  /ab[xyz]/  /ab[xyz]/
1432  Identifying subpattern count = 0  Capturing subpattern count = 0
1433  No options  No options
1434  First char = 'a'  First char = 'a'
1435  Req char = 'b'  Need char = 'b'
1436    
1437  /abc*/  /abc*/
1438  Identifying subpattern count = 0  Capturing subpattern count = 0
1439  No options  No options
1440  First char = 'a'  First char = 'a'
1441  Req char = 'b'  Need char = 'b'
1442    
1443  /ab.c*/  /ab.c*/
1444  Identifying subpattern count = 0  Capturing subpattern count = 0
1445  No options  No options
1446  First char = 'a'  First char = 'a'
1447  Req char = 'b'  Need char = 'b'
1448    
1449  /a.c*/  /a.c*/
1450  Identifying subpattern count = 0  Capturing subpattern count = 0
1451  No options  No options
1452  First char = 'a'  First char = 'a'
1453  No req char  No need char
1454    
1455  /.c*/  /.c*/
1456  Identifying subpattern count = 0  Capturing subpattern count = 0
1457  No options  No options
1458  No first char  No first char
1459  No req char  No need char
1460    
1461  /ac*/  /ac*/
1462  Identifying subpattern count = 0  Capturing subpattern count = 0
1463  No options  No options
1464  First char = 'a'  First char = 'a'
1465  No req char  No need char
1466    
1467  /(a.c*|b.c*)/  /(a.c*|b.c*)/
1468  Identifying subpattern count = 1  Capturing subpattern count = 1
1469  No options  No options
1470  No first char  No first char
1471  No req char  No need char
1472    
1473  /a.c*|aba/  /a.c*|aba/
1474  Identifying subpattern count = 0  Capturing subpattern count = 0
1475  No options  No options
1476  First char = 'a'  First char = 'a'
1477  No req char  No need char
1478    
1479  /.+a/  /.+a/
1480  Identifying subpattern count = 0  Capturing subpattern count = 0
1481  No options  No options
1482  No first char  No first char
1483  Req char = 'a'  Need char = 'a'
1484    
1485  /(?=abcda)a.*/  /(?=abcda)a.*/
1486  Identifying subpattern count = 0  Capturing subpattern count = 0
1487  No options  No options
1488  First char = 'a'  First char = 'a'
1489  No req char  No need char
1490    
1491  /(?=a)a.*/  /(?=a)a.*/
1492  Identifying subpattern count = 0  Capturing subpattern count = 0
1493  No options  No options
1494  First char = 'a'  First char = 'a'
1495  No req char  No need char
1496    
1497  /a(b)*/  /a(b)*/
1498  Identifying subpattern count = 1  Capturing subpattern count = 1
1499  No options  No options
1500  First char = 'a'  First char = 'a'
1501  No req char  No need char
1502    
1503  /a\d*/  /a\d*/
1504  Identifying subpattern count = 0  Capturing subpattern count = 0
1505  No options  No options
1506  First char = 'a'  First char = 'a'
1507  No req char  No need char
1508    
1509  /ab\d*/  /ab\d*/
1510  Identifying subpattern count = 0  Capturing subpattern count = 0
1511  No options  No options
1512  First char = 'a'  First char = 'a'
1513  Req char = 'b'  Need char = 'b'
1514    
1515  /a(\d)*/  /a(\d)*/
1516  Identifying subpattern count = 1  Capturing subpattern count = 1
1517  No options  No options
1518  First char = 'a'  First char = 'a'
1519  No req char  No need char
1520    
1521  /abcde{0,0}/  /abcde{0,0}/
1522  Identifying subpattern count = 0  Capturing subpattern count = 0
1523  No options  No options
1524  First char = 'a'  First char = 'a'
1525  Req char = 'd'  Need char = 'd'
1526    
1527  /ab\d+/  /ab\d+/
1528  Identifying subpattern count = 0  Capturing subpattern count = 0
1529  No options  No options
1530  First char = 'a'  First char = 'a'
1531  Req char = 'b'  Need char = 'b'
1532    
1533  /a(?(1)b)/  /a(?(1)b)/
1534  Identifying subpattern count = 0  Capturing subpattern count = 0
1535  No options  No options
1536  First char = 'a'  First char = 'a'
1537  No req char  No need char
1538    
1539  /a(?(1)bag|big)/  /a(?(1)bag|big)/
1540  Identifying subpattern count = 0  Capturing subpattern count = 0
1541  No options  No options
1542  First char = 'a'  First char = 'a'
1543  Req char = 'g'  Need char = 'g'
1544    
1545  /a(?(1)bag|big)*/  /a(?(1)bag|big)*/
1546  Identifying subpattern count = 0  Capturing subpattern count = 0
1547  No options  No options
1548  First char = 'a'  First char = 'a'
1549  No req char  No need char
1550    
1551  /a(?(1)bag|big)+/  /a(?(1)bag|big)+/
1552  Identifying subpattern count = 0  Capturing subpattern count = 0
1553  No options  No options
1554  First char = 'a'  First char = 'a'
1555  Req char = 'g'  Need char = 'g'
1556    
1557  /a(?(1)b..|b..)/  /a(?(1)b..|b..)/
1558  Identifying subpattern count = 0  Capturing subpattern count = 0
1559  No options  No options
1560  First char = 'a'  First char = 'a'
1561  Req char = 'b'  Need char = 'b'
1562    
1563  /ab\d{0}e/  /ab\d{0}e/
1564  Identifying subpattern count = 0  Capturing subpattern count = 0
1565  No options  No options
1566  First char = 'a'  First char = 'a'
1567  Req char = 'e'  Need char = 'e'
1568    
1569  /a?b?/  /a?b?/
1570  Identifying subpattern count = 0  Capturing subpattern count = 0
1571  No options  No options
1572  No first char  No first char
1573  No req char  No need char
1574      a      a
1575   0: a   0: a
1576      b      b
# Line 1580  No req char Line 1585  No req char
1585  No match  No match
1586    
1587  /|-/  /|-/
1588  Identifying subpattern count = 0  Capturing subpattern count = 0
1589  No options  No options
1590  No first char  No first char
1591  No req char  No need char
1592      abcd      abcd
1593   0:   0:
1594      -abc      -abc
# Line 1621  No match Line 1626  No match
1626   1: bbbb   1: bbbb
1627   2: z   2: z
1628   3: z   3: z
1629    
1630    /^.?abcd/S
1631    Capturing subpattern count = 0
1632    Options: anchored
1633    No first char
1634    Need char = 'd'
1635    Study returned NULL
1636    
1637    /\(             # ( at start
1638      (?:           # Non-capturing bracket
1639      (?>[^()]+)    # Either a sequence of non-brackets (no backtracking)
1640      |             # Or
1641      (?R)          # Recurse - i.e. nested bracketed string
1642      )*            # Zero or more contents
1643      \)            # Closing )
1644      /x
1645    Capturing subpattern count = 0
1646    Options: extended
1647    First char = '('
1648    Need char = ')'
1649        (abcd)
1650     0: (abcd)
1651        (abcd)xyz
1652     0: (abcd)
1653        xyz(abcd)
1654     0: (abcd)
1655        (ab(xy)cd)pqr
1656     0: (ab(xy)cd)
1657        (ab(xycd)pqr
1658     0: (xycd)
1659        () abc ()
1660     0: ()
1661        12(abcde(fsh)xyz(foo(bar))lmno)89
1662     0: (abcde(fsh)xyz(foo(bar))lmno)
1663        *** Failers
1664    No match
1665        abcd
1666    No match
1667        abcd)
1668    No match
1669        (abcd
1670    No match
1671    
1672    /\(  ( (?>[^()]+) | (?R) )* \) /xg
1673    Capturing subpattern count = 1
1674    Options: extended
1675    First char = '('
1676    Need char = ')'
1677        (ab(xy)cd)pqr
1678     0: (ab(xy)cd)
1679     1: cd
1680        1(abcd)(x(y)z)pqr
1681     0: (abcd)
1682     1: abcd
1683     0: (x(y)z)
1684     1: z
1685    
1686    /\(  (?: (?>[^()]+) | (?R) ) \) /x
1687    Capturing subpattern count = 0
1688    Options: extended
1689    First char = '('
1690    Need char = ')'
1691        (abcd)
1692     0: (abcd)
1693        (ab(xy)cd)
1694     0: (xy)
1695        (a(b(c)d)e)
1696     0: (c)
1697        ((ab))
1698     0: ((ab))
1699        *** Failers
1700    No match
1701        ()
1702    No match
1703    
1704    /\(  (?: (?>[^()]+) | (?R) )? \) /x
1705    Capturing subpattern count = 0
1706    Options: extended
1707    First char = '('
1708    Need char = ')'
1709        ()
1710     0: ()
1711        12(abcde(fsh)xyz(foo(bar))lmno)89
1712     0: (fsh)
1713    
1714    /\(  ( (?>[^()]+) | (?R) )* \) /x
1715    Capturing subpattern count = 1
1716    Options: extended
1717    First char = '('
1718    Need char = ')'
1719        (ab(xy)cd)
1720     0: (ab(xy)cd)
1721     1: cd
1722    
1723    /\( ( ( (?>[^()]+) | (?R) )* ) \) /x
1724    Capturing subpattern count = 2
1725    Options: extended
1726    First char = '('
1727    Need char = ')'
1728        (ab(xy)cd)
1729     0: (ab(xy)cd)
1730     1: ab(xy)cd
1731     2: cd
1732    
1733    /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x
1734    Capturing subpattern count = 3
1735    Options: extended
1736    First char = '('
1737    Need char = ')'
1738        (ab(xy)cd)
1739     0: (ab(xy)cd)
1740     1: <unset>
1741     2: ab(xy)cd
1742     3: cd
1743        (123ab(xy)cd)
1744     0: (123ab(xy)cd)
1745     1: 123
1746     2: ab(xy)cd
1747     3: cd
1748    
1749    /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x
1750    Capturing subpattern count = 3
1751    Options: extended
1752    First char = '('
1753    Need char = ')'
1754        (ab(xy)cd)
1755     0: (ab(xy)cd)
1756     1: ab(xy)cd
1757     2: <unset>
1758     3: cd
1759        (123ab(xy)cd)
1760     0: (123ab(xy)cd)
1761     1: 123ab(xy)cd
1762     2: 123
1763     3: cd
1764    
1765    /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x
1766    Capturing subpattern count = 11
1767    Options: extended
1768    First char = '('
1769    Need char = ')'
1770        (ab(xy)cd)
1771     0: (ab(xy)cd)
1772     1: ab(xy)cd
1773     2: ab(xy)cd
1774     3: ab(xy)cd
1775     4: ab(xy)cd
1776     5: ab(xy)cd
1777     6: ab(xy)cd
1778     7: ab(xy)cd
1779     8: ab(xy)cd
1780     9: ab(xy)cd
1781    10: ab(xy)cd
1782    11: cd
1783    
1784    /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x
1785    Capturing subpattern count = 3
1786    Options: extended
1787    First char = '('
1788    Need char = ')'
1789        (abcd(xyz<p>qrs)123)
1790     0: (abcd(xyz<p>qrs)123)
1791     1: abcd(xyz<p>qrs)123
1792     2: 123
1793     3: <p>qrs
1794    
1795    /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x
1796    Capturing subpattern count = 3
1797    Options: extended
1798    First char = '('
1799    Need char = ')'
1800        (ab(cd)ef)
1801     0: (ab(cd)ef)
1802     1: ab(cd)ef
1803     2: ef
1804     3: (cd)
1805        (ab(cd(ef)gh)ij)
1806     0: (ab(cd(ef)gh)ij)
1807     1: ab(cd(ef)gh)ij
1808     2: ij
1809     3: (cd(ef)gh)
1810    
1811    /^[[:alnum:]]/D
1812    ------------------------------------------------------------------
1813      0  37 Bra 0
1814      3     ^
1815      4     [0-9A-Za-z]
1816     37  37 Ket
1817     40     End
1818    ------------------------------------------------------------------
1819    Capturing subpattern count = 0
1820    Options: anchored
1821    No first char
1822    No need char
1823    
1824    /^[[:alpha:]]/D
1825    ------------------------------------------------------------------
1826      0  37 Bra 0
1827      3     ^
1828      4     [A-Za-z]
1829     37  37 Ket
1830     40     End
1831    ------------------------------------------------------------------
1832    Capturing subpattern count = 0
1833    Options: anchored
1834    No first char
1835    No need char
1836    
1837    /^[[:ascii:]]/D
1838    ------------------------------------------------------------------
1839      0  37 Bra 0
1840      3     ^
1841      4     [\x00-\x7f]
1842     37  37 Ket
1843     40     End
1844    ------------------------------------------------------------------
1845    Capturing subpattern count = 0
1846    Options: anchored
1847    No first char
1848    No need char
1849    
1850    /^[[:cntrl:]]/D
1851    ------------------------------------------------------------------
1852      0  37 Bra 0
1853      3     ^
1854      4     [\x00-\x1f\x7f]
1855     37  37 Ket
1856     40     End
1857    ------------------------------------------------------------------
1858    Capturing subpattern count = 0
1859    Options: anchored
1860    No first char
1861    No need char
1862    
1863    /^[[:digit:]]/D
1864    ------------------------------------------------------------------
1865      0  37 Bra 0
1866      3     ^
1867      4     [0-9]
1868     37  37 Ket
1869     40     End
1870    ------------------------------------------------------------------
1871    Capturing subpattern count = 0
1872    Options: anchored
1873    No first char
1874    No need char
1875    
1876    /^[[:graph:]]/D
1877    ------------------------------------------------------------------
1878      0  37 Bra 0
1879      3     ^
1880      4     [!-~]
1881     37  37 Ket
1882     40     End
1883    ------------------------------------------------------------------
1884    Capturing subpattern count = 0
1885    Options: anchored
1886    No first char
1887    No need char
1888    
1889    /^[[:lower:]]/D
1890    ------------------------------------------------------------------
1891      0  37 Bra 0
1892      3     ^
1893      4     [a-z]
1894     37  37 Ket
1895     40     End
1896    ------------------------------------------------------------------
1897    Capturing subpattern count = 0
1898    Options: anchored
1899    No first char
1900    No need char
1901    
1902    /^[[:print:]]/D
1903    ------------------------------------------------------------------
1904      0  37 Bra 0
1905      3     ^
1906      4     [ -~]
1907     37  37 Ket
1908     40     End
1909    ------------------------------------------------------------------
1910    Capturing subpattern count = 0
1911    Options: anchored
1912    No first char
1913    No need char
1914    
1915    /^[[:punct:]]/D
1916    ------------------------------------------------------------------
1917      0  37 Bra 0
1918      3     ^
1919      4     [!-/:-@[-`{-~]
1920     37  37 Ket
1921     40     End
1922    ------------------------------------------------------------------
1923    Capturing subpattern count = 0
1924    Options: anchored
1925    No first char
1926    No need char
1927    
1928    /^[[:space:]]/D
1929    ------------------------------------------------------------------
1930      0  37 Bra 0
1931      3     ^
1932      4     [\x09-\x0d ]
1933     37  37 Ket
1934     40     End
1935    ------------------------------------------------------------------
1936    Capturing subpattern count = 0
1937    Options: anchored
1938    No first char
1939    No need char
1940    
1941    /^[[:upper:]]/D
1942    ------------------------------------------------------------------
1943      0  37 Bra 0
1944      3     ^
1945      4     [A-Z]
1946     37  37 Ket
1947     40     End
1948    ------------------------------------------------------------------
1949    Capturing subpattern count = 0
1950    Options: anchored
1951    No first char
1952    No need char
1953    
1954    /^[[:xdigit:]]/D
1955    ------------------------------------------------------------------
1956      0  37 Bra 0
1957      3     ^
1958      4     [0-9A-Fa-f]
1959     37  37 Ket
1960     40     End
1961    ------------------------------------------------------------------
1962    Capturing subpattern count = 0
1963    Options: anchored
1964    No first char
1965    No need char
1966    
1967    /^[[:word:]]/D
1968    ------------------------------------------------------------------
1969      0  37 Bra 0
1970      3     ^
1971      4     [0-9A-Z_a-z]
1972     37  37 Ket
1973     40     End
1974    ------------------------------------------------------------------
1975    Capturing subpattern count = 0
1976    Options: anchored
1977    No first char
1978    No need char
1979    
1980    /^[[:^cntrl:]]/D
1981    ------------------------------------------------------------------
1982      0  37 Bra 0
1983      3     ^
1984      4     [ -~\x80-\xff]
1985     37  37 Ket
1986     40     End
1987    ------------------------------------------------------------------
1988    Capturing subpattern count = 0
1989    Options: anchored
1990    No first char
1991    No need char
1992    
1993    /^[12[:^digit:]]/D
1994    ------------------------------------------------------------------
1995      0  37 Bra 0
1996      3     ^
1997      4     [\x00-/1-2:-\xff]
1998     37  37 Ket
1999     40     End
2000    ------------------------------------------------------------------
2001    Capturing subpattern count = 0
2002    Options: anchored
2003    No first char
2004    No need char
2005    
2006    /[01[:alpha:]%]/D
2007    ------------------------------------------------------------------
2008      0  36 Bra 0
2009      3     [%0-1A-Za-z]
2010     36  36 Ket
2011     39     End
2012    ------------------------------------------------------------------
2013    Capturing subpattern count = 0
2014    No options
2015    No first char
2016    No need char
2017    
2018    /[[.ch.]]/
2019    Failed: POSIX collating elements are not supported at offset 1
2020    
2021    /[[=ch=]]/
2022    Failed: POSIX collating elements are not supported at offset 1
2023    
2024    /[[:rhubarb:]]/
2025    Failed: unknown POSIX class name at offset 3
2026    
2027    /[[:upper:]]/i
2028    Capturing subpattern count = 0
2029    Options: caseless
2030    No first char
2031    No need char
2032        A
2033     0: A
2034        a
2035     0: a
2036    
2037    /[[:lower:]]/i
2038    Capturing subpattern count = 0
2039    Options: caseless
2040    No first char
2041    No need char
2042        A
2043     0: A
2044        a
2045     0: a
2046    
2047    /((?-i)[[:lower:]])[[:lower:]]/i
2048    Capturing subpattern count = 1
2049    Options: caseless
2050    Case state changes
2051    No first char
2052    No need char
2053        ab
2054     0: ab
2055     1: a
2056        aB
2057     0: aB
2058     1: a
2059        *** Failers
2060     0: ai
2061     1: a
2062        Ab
2063    No match
2064        AB
2065    No match
2066    
2067  / End of test input /  / End of test input /
2068  Identifying subpattern count = 0  Capturing subpattern count = 0
2069  No options  No options
2070  First char = ' '  First char = ' '
2071  Req char = ' '  Need char = ' '
2072    

Legend:
Removed from v.41  
changed lines
  Added in v.43

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12