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

Contents of /code/trunk/testoutput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19 - (hide annotations) (download)
Sat Feb 24 21:38:33 2007 UTC (7 years, 4 months ago) by nigel
File size: 13585 byte(s)
Load pcre-1.08 into code/trunk.

1 nigel 3 Testing Perl-Compatible Regular Expressions
2 nigel 19 PCRE version 1.08 27-Mar-1998
3 nigel 3
4     /(a)b|/
5     Identifying subpattern count = 1
6     No options
7     No first char
8    
9     /(a*)*/
10     Failed: operand of unlimited repeat could match the empty string at offset 4
11    
12     /(abc|)+/
13     Failed: operand of unlimited repeat could match the empty string at offset 6
14    
15     /abc/
16     Identifying subpattern count = 0
17     No options
18     First char = 'a'
19     abc
20     0: abc
21     defabc
22     0: abc
23     \Aabc
24     0: abc
25     \IABC
26     0: ABC
27     *** Failers
28     No match
29     \Adefabc
30     No match
31     ABC
32     No match
33    
34     /^abc/
35     Identifying subpattern count = 0
36     Options: anchored
37     No first char
38     abc
39     0: abc
40     \Aabc
41     0: abc
42     *** Failers
43     No match
44     defabc
45     No match
46     \Adefabc
47     No match
48    
49     /a+bc/
50     Identifying subpattern count = 0
51     No options
52     First char = 'a'
53    
54     /a*bc/
55     Identifying subpattern count = 0
56     No options
57     No first char
58    
59     /a{3}bc/
60     Identifying subpattern count = 0
61     No options
62     First char = 'a'
63    
64     /(abc|a+z)/
65     Identifying subpattern count = 1
66     No options
67     First char = 'a'
68    
69     /^abc$/
70     Identifying subpattern count = 0
71     Options: anchored
72     No first char
73     abc
74     0: abc
75     \Mdef\nabc
76     0: abc
77     *** Failers
78     No match
79     def\nabc
80     No match
81    
82     /abc\/
83     Failed: \ at end of pattern at offset 4
84    
85     /ab\gdef/X
86     Failed: unrecognized character follows \ at offset 3
87    
88 nigel 19 /(?X)ab\gdef/X
89     Failed: unrecognized character follows \ at offset 7
90    
91 nigel 3 /x{5,4}/
92     Failed: numbers out of order in {} quantifier at offset 5
93    
94     /z{65536}/
95     Failed: number too big in {} quantifier at offset 7
96    
97     /[abcd/
98     Failed: missing terminating ] for character class at offset 5
99    
100     /[\B]/
101     Failed: invalid escape sequence in character class at offset 2
102    
103     /[a-\w]/
104     Failed: invalid escape sequence in character class at offset 4
105    
106     /[z-a]/
107     Failed: range out of order in character class at offset 3
108    
109     /^*/
110     Failed: nothing to repeat at offset 1
111    
112     /(abc/
113     Failed: missing ) at offset 4
114    
115     /(?# abc/
116     Failed: missing ) after comment at offset 7
117    
118     /(?z)abc/
119     Failed: unrecognized character after (? at offset 2
120    
121     /.*b/
122     Identifying subpattern count = 0
123     Options: anchored
124     No first char
125    
126     /.*?b/
127     Identifying subpattern count = 0
128     Options: anchored
129     No first char
130    
131     /cat|dog|elephant/
132     Identifying subpattern count = 0
133     No options
134     No first char
135     this sentence eventually mentions a cat
136     0: cat
137     this sentences rambles on and on for a while and then reaches elephant
138     0: elephant
139    
140     /cat|dog|elephant/S
141     Identifying subpattern count = 0
142     No options
143     No first char
144     Starting character set: c d e
145     this sentence eventually mentions a cat
146     0: cat
147     this sentences rambles on and on for a while and then reaches elephant
148     0: elephant
149    
150     /cat|dog|elephant/iS
151     Identifying subpattern count = 0
152     Options: caseless
153     No first char
154     Starting character set: C D E c d e
155     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     /cat|dog|elephant/IS
161     Identifying subpattern count = 0
162     No options
163     No first char
164     Starting character set: C D E c d e
165     this sentence eventually mentions a CAT cat
166     0: cat
167     this sentences rambles on and on for a while to elephant ElePhant
168     0: elephant
169    
170     /cat|dog|elephant/IS
171     Identifying subpattern count = 0
172     No options
173     No first char
174     Starting character set: C D E c d e
175     \Ithis sentence eventually mentions a CAT cat
176     0: CAT
177     \Ithis sentences rambles on and on for a while to elephant ElePhant
178     0: elephant
179    
180     /a|[bcd]/S
181     Identifying subpattern count = 0
182     No options
183     No first char
184     Starting character set: a b c d
185    
186     /(a|[^\dZ])/S
187     Identifying subpattern count = 1
188     No options
189     No first char
190     Starting character set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
191     \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
192     \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
193     ? @ 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
194     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
195     \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92
196     \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1
197     \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0
198     \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf
199     \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce
200     \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd
201     \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec
202     \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb
203     \xfc \xfd \xfe \xff
204    
205     /(a|b)*[\s]/S
206     Identifying subpattern count = 1
207     No options
208     No first char
209     Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b
210    
211     /(ab\2)/
212     Failed: back reference to non-existent subpattern at offset 4
213    
214     /{4,5}abc/
215     Failed: nothing to repeat at offset 4
216    
217     /(a)(b)(c)\2/
218     Identifying subpattern count = 3
219     No options
220     First char = 'a'
221     abcb
222     0: abcb
223     1: a
224     2: b
225     3: c
226     \O0abcb
227     Matched, but too many substrings
228     \O2abcb
229     Matched, but too many substrings
230     0: abcb
231     \O4abcb
232     Matched, but too many substrings
233     0: abcb
234     1: a
235     \O6abcb
236     Matched, but too many substrings
237     0: abcb
238     1: a
239     2: b
240     \O8abcb
241     0: abcb
242     1: a
243     2: b
244     3: c
245    
246     /(a)bc|(a)(b)\2/
247     Identifying subpattern count = 3
248     No options
249     First char = 'a'
250     abc
251     0: abc
252     1: a
253     \O0abc
254     Matched, but too many substrings
255     \O2abc
256     Matched, but too many substrings
257     0: abc
258     \O4abc
259     0: abc
260     1: a
261     aba
262     0: aba
263     1: <unset>
264     2: a
265     3: b
266     \O0aba
267     Matched, but too many substrings
268     \O2aba
269     Matched, but too many substrings
270     0: aba
271     \O4aba
272     Matched, but too many substrings
273     0: aba
274     1: <unset>
275     \O6aba
276     Matched, but too many substrings
277     0: aba
278     1: <unset>
279     2: a
280     \O8aba
281     0: aba
282     1: <unset>
283     2: a
284     3: b
285    
286     /^a.b/
287     Identifying subpattern count = 0
288     Options: anchored
289     No first char
290     \Sa\nb
291     0: a\x0ab
292    
293     /abc$/E
294     Identifying subpattern count = 0
295     Options: dollar_endonly
296     First char = 'a'
297     abc
298     0: abc
299     *** Failers
300     No match
301     abc\n
302     No match
303     abc\ndef
304     No match
305    
306     /abc$/
307     Identifying subpattern count = 0
308     No options
309     First char = 'a'
310     *** Failers
311     No match
312     \Eabc\n
313     No match
314     \Eabc\ndef
315     No match
316    
317     /abc$/m
318     Identifying subpattern count = 0
319     Options: multiline
320     First char = 'a'
321     \Eabc\n
322     0: abc
323     \Eabc\ndef
324     0: abc
325    
326     /(a)(b)(c)(d)(e)\6/
327     Failed: back reference to non-existent subpattern at offset 16
328    
329     /the quick brown fox/
330     Identifying subpattern count = 0
331     No options
332     First char = 't'
333     the quick brown fox
334     0: the quick brown fox
335     this is a line with the quick brown fox
336     0: the quick brown fox
337    
338     /the quick brown fox/A
339     Identifying subpattern count = 0
340     Options: anchored
341     No first char
342     the quick brown fox
343     0: the quick brown fox
344     *** Failers
345     No match
346     this is a line with the quick brown fox
347     No match
348    
349     /ab(?z)cd/
350     Failed: unrecognized character after (? at offset 4
351    
352     ".*/\Xfoo"X
353     Identifying subpattern count = 0
354     Options: anchored extra
355     No first char
356     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
357     No match
358    
359 nigel 19 "(?X).*/\Xfoo"
360     Identifying subpattern count = 0
361     Options: anchored extra
362     No first char
363     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
364     No match
365    
366 nigel 3 ".*/\Xfoo"X
367     Identifying subpattern count = 0
368     Options: anchored extra
369     No first char
370     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
371     0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
372    
373 nigel 19 "(?X).*/\Xfoo"
374     Identifying subpattern count = 0
375     Options: anchored extra
376     No first char
377     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
378     0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
379    
380 nigel 3 /(\.\d\d[1-9]?)\d+/
381     Identifying subpattern count = 1
382     No options
383     First char = '.'
384     1.230003938
385     0: .230003938
386     1: .23
387     1.875000282
388     0: .875000282
389     1: .875
390     1.235
391     0: .235
392     1: .23
393    
394     /(\.\d\d[1-9]?)\X\d+/X
395     Identifying subpattern count = 1
396     Options: extra
397     First char = '.'
398     1.230003938
399     0: .230003938
400     1: .23
401     1.875000282
402     0: .875000282
403     1: .875
404     *** Failers
405     No match
406     1.235
407     No match
408    
409     /(\.\d\d((?=0)|\d(?=\d)))/
410     Identifying subpattern count = 2
411     No options
412     First char = '.'
413     1.230003938
414     0: .23
415     1: .23
416     2:
417     1.875000282
418     0: .875
419     1: .875
420     2: 5
421     *** Failers
422     No match
423     1.235
424     No match
425    
426     /^(\w+\X|\s+\X)*$/X
427     Identifying subpattern count = 1
428     Options: anchored extra
429     No first char
430     now is the time for all good men to come to the aid of the party
431     0: now is the time for all good men to come to the aid of the party
432     1: party
433     *** Failers
434     No match
435     this is not a line with only words and spaces!
436     No match
437    
438     /^abc|def/
439     Identifying subpattern count = 0
440     No options
441     No first char
442     abcdef
443     0: abc
444     abcdef\B
445     0: def
446    
447     /.*((abc)$|(def))/
448     Identifying subpattern count = 3
449     Options: anchored
450     No first char
451     defabc
452     0: defabc
453     1: abc
454     2: abc
455     \Zdefabc
456     0: def
457     1: def
458     2: <unset>
459     3: def
460    
461     /abc/P
462     abc
463     0: abc
464     *** Failers
465     No match: POSIX code 17: match failed
466    
467     /^abc|def/P
468     abcdef
469     0: abc
470     abcdef\B
471     0: def
472    
473     /.*((abc)$|(def))/P
474     defabc
475     0: defabc
476     1: abc
477     2: abc
478     \Zdefabc
479     0: def
480     1: def
481     3: def
482    
483     /the quick brown fox/P
484     the quick brown fox
485     0: the quick brown fox
486     *** Failers
487     No match: POSIX code 17: match failed
488     The Quick Brown Fox
489     No match: POSIX code 17: match failed
490    
491     /the quick brown fox/Pi
492     the quick brown fox
493     0: the quick brown fox
494     The Quick Brown Fox
495     0: The Quick Brown Fox
496    
497     /abc.def/P
498     *** Failers
499     No match: POSIX code 17: match failed
500     abc\ndef
501     No match: POSIX code 17: match failed
502    
503     /abc$/P
504     abc
505     0: abc
506     abc\n
507     0: abc
508    
509     /abc\/P
510     Failed: POSIX code 9: bad escape sequence at offset 4
511    
512     /(abc)\2/P
513     Failed: POSIX code 15: bad back reference at offset 6
514    
515     /(abc\1)/P
516     abc
517     No match: POSIX code 15: bad back reference
518    
519     "(?>.*/)foo"X
520     Identifying subpattern count = 0
521     Options: anchored extra
522     No first char
523     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
524     No match
525    
526     "(?>.*/)foo"X
527     Identifying subpattern count = 0
528     Options: anchored extra
529     No first char
530     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
531     0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
532    
533     /(?>(\.\d\d[1-9]?))\d+/X
534     Identifying subpattern count = 1
535     Options: extra
536     No first char
537     1.230003938
538     0: .230003938
539     1: .23
540     1.875000282
541     0: .875000282
542     1: .875
543     *** Failers
544     No match
545     1.235
546     No match
547    
548     /^((?>\w+)|(?>\s+))*$/X
549     Identifying subpattern count = 1
550     Options: anchored extra
551     No first char
552     now is the time for all good men to come to the aid of the party
553     0: now is the time for all good men to come to the aid of the party
554     1: party
555     *** Failers
556     No match
557     this is not a line with only words and spaces!
558     No match
559    
560     /(\d+)(\w)/X
561     Identifying subpattern count = 2
562     Options: extra
563     No first char
564     12345a
565     0: 12345a
566     1: 12345
567     2: a
568     12345+
569     0: 12345
570     1: 1234
571     2: 5
572    
573     /((?>\d+))(\w)/X
574     Identifying subpattern count = 2
575     Options: extra
576     No first char
577     12345a
578     0: 12345a
579     1: 12345
580     2: a
581     *** Failers
582     No match
583     12345+
584     No match
585    
586 nigel 5 /([a]*)*/
587     Failed: operand of unlimited repeat could match the empty string at offset 6
588    
589     /([ab]*)*/
590     Failed: operand of unlimited repeat could match the empty string at offset 7
591    
592     /([^a]*)*/
593     Failed: operand of unlimited repeat could match the empty string at offset 7
594    
595     /([^ab]*)*/
596     Failed: operand of unlimited repeat could match the empty string at offset 8
597    
598     /([a]*?)*/
599     Failed: operand of unlimited repeat could match the empty string at offset 7
600    
601     /([ab]*?)*/
602     Failed: operand of unlimited repeat could match the empty string at offset 8
603    
604     /([^a]*?)*/
605     Failed: operand of unlimited repeat could match the empty string at offset 8
606    
607     /([^ab]*?)*/
608     Failed: operand of unlimited repeat could match the empty string at offset 9
609    
610     /(?>a*)*/X
611     Failed: nothing to repeat at offset 6
612    
613     /((?>a*))*/X
614     Failed: operand of unlimited repeat could match the empty string at offset 8
615    
616     /((?>a*?))*/X
617     Failed: operand of unlimited repeat could match the empty string at offset 9
618    
619 nigel 9 /)/
620     Failed: unmatched brackets at offset 0
621    
622     /a[]b/
623     Failed: missing terminating ] for character class at offset 4
624    
625 nigel 13 /[^a]/
626     Identifying subpattern count = 0
627     No options
628     No first char
629     \Iaaaabcd
630     0: b
631     \IaaAabcd
632     0: b
633    
634     /[^az]/
635     Identifying subpattern count = 0
636     No options
637     No first char
638     \Iaaaabcd
639     0: b
640     \IaaAabcd
641     0: b
642    
643     /[^az]/
644     Identifying subpattern count = 0
645     No options
646     No first char
647     \Izazabcd
648     0: b
649     \IAaZabcd
650     0: b
651    
652     /[^aeiou ]{3,}/
653     Identifying subpattern count = 0
654     No options
655     No first char
656     co-processors, and for
657     0: -pr
658     \Ico-processors, and for
659     0: -pr
660 nigel 17
661     /((a)*)*/
662     Failed: operand of unlimited repeat could match the empty string at offset 6
663 nigel 13
664 nigel 17 /((a|b|c)*)*/
665     Failed: operand of unlimited repeat could match the empty string at offset 10
666    
667 nigel 19 /<.*>/
668     Identifying subpattern count = 0
669     No options
670     First char = '<'
671     abc<def>ghi<klm>nop
672     0: <def>ghi<klm>
673    
674     /<.*?>/
675     Identifying subpattern count = 0
676     No options
677     First char = '<'
678     abc<def>ghi<klm>nop
679     0: <def>
680    
681     /<.*>/U
682     Identifying subpattern count = 0
683     Options: ungreedy
684     First char = '<'
685     abc<def>ghi<klm>nop
686     0: <def>
687    
688     /<.*>(?U)/
689     Identifying subpattern count = 0
690     Options: ungreedy
691     First char = '<'
692     abc<def>ghi<klm>nop
693     0: <def>
694    
695     /<.*?>/U
696     Identifying subpattern count = 0
697     Options: ungreedy
698     First char = '<'
699     abc<def>ghi<klm>nop
700     0: <def>ghi<klm>
701    
702     /={3,}/U
703     Identifying subpattern count = 0
704     Options: ungreedy
705     First char = '='
706     abc========def
707     0: ===
708    
709     /(?U)={3,}?/
710     Identifying subpattern count = 0
711     Options: ungreedy
712     First char = '='
713     abc========def
714     0: ========
715    
716 nigel 3 / End of test input /
717     Identifying subpattern count = 0
718     No options
719     First char = ' '
720    

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12