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

Contents of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 63 - (hide annotations) (download)
Sat Feb 24 21:40:03 2007 UTC (7 years, 6 months ago) by nigel
File size: 20136 byte(s)
Load pcre-4.0 into code/trunk.

1 nigel 41 /(a)b|/
2    
3     /abc/
4     abc
5     defabc
6     \Aabc
7     *** Failers
8     \Adefabc
9     ABC
10    
11     /^abc/
12     abc
13     \Aabc
14     *** Failers
15     defabc
16     \Adefabc
17    
18     /a+bc/
19    
20     /a*bc/
21    
22     /a{3}bc/
23    
24     /(abc|a+z)/
25    
26     /^abc$/
27     abc
28     *** Failers
29     def\nabc
30    
31     /ab\gdef/X
32    
33     /(?X)ab\gdef/X
34    
35     /x{5,4}/
36    
37     /z{65536}/
38    
39     /[abcd/
40    
41 nigel 63 /(?X)[\B]/
42 nigel 41
43     /[z-a]/
44    
45     /^*/
46    
47     /(abc/
48    
49     /(?# abc/
50    
51     /(?z)abc/
52    
53     /.*b/
54    
55     /.*?b/
56    
57     /cat|dog|elephant/
58     this sentence eventually mentions a cat
59     this sentences rambles on and on for a while and then reaches elephant
60    
61     /cat|dog|elephant/S
62     this sentence eventually mentions a cat
63     this sentences rambles on and on for a while and then reaches elephant
64    
65     /cat|dog|elephant/iS
66     this sentence eventually mentions a CAT cat
67     this sentences rambles on and on for a while to elephant ElePhant
68    
69     /a|[bcd]/S
70    
71     /(a|[^\dZ])/S
72    
73     /(a|b)*[\s]/S
74    
75     /(ab\2)/
76    
77     /{4,5}abc/
78    
79     /(a)(b)(c)\2/
80     abcb
81     \O0abcb
82     \O3abcb
83     \O6abcb
84     \O9abcb
85     \O12abcb
86    
87     /(a)bc|(a)(b)\2/
88     abc
89     \O0abc
90     \O3abc
91     \O6abc
92     aba
93     \O0aba
94     \O3aba
95     \O6aba
96     \O9aba
97     \O12aba
98    
99     /abc$/E
100     abc
101     *** Failers
102     abc\n
103     abc\ndef
104    
105     /(a)(b)(c)(d)(e)\6/
106    
107     /the quick brown fox/
108     the quick brown fox
109     this is a line with the quick brown fox
110    
111     /the quick brown fox/A
112     the quick brown fox
113     *** Failers
114     this is a line with the quick brown fox
115    
116     /ab(?z)cd/
117    
118     /^abc|def/
119     abcdef
120     abcdef\B
121    
122     /.*((abc)$|(def))/
123     defabc
124     \Zdefabc
125    
126     /abc/P
127     abc
128     *** Failers
129    
130     /^abc|def/P
131     abcdef
132     abcdef\B
133    
134     /.*((abc)$|(def))/P
135     defabc
136     \Zdefabc
137    
138     /the quick brown fox/P
139     the quick brown fox
140     *** Failers
141     The Quick Brown Fox
142    
143     /the quick brown fox/Pi
144     the quick brown fox
145     The Quick Brown Fox
146    
147     /abc.def/P
148     *** Failers
149     abc\ndef
150    
151     /abc$/P
152     abc
153     abc\n
154    
155     /(abc)\2/P
156    
157     /(abc\1)/P
158     abc
159    
160     /)/
161    
162     /a[]b/
163    
164     /[^aeiou ]{3,}/
165     co-processors, and for
166    
167     /<.*>/
168     abc<def>ghi<klm>nop
169    
170     /<.*?>/
171     abc<def>ghi<klm>nop
172    
173     /<.*>/U
174     abc<def>ghi<klm>nop
175    
176 nigel 63 /(?U)<.*>/
177 nigel 41 abc<def>ghi<klm>nop
178    
179     /<.*?>/U
180     abc<def>ghi<klm>nop
181    
182     /={3,}/U
183     abc========def
184    
185     /(?U)={3,}?/
186     abc========def
187    
188     /(?<!bar|cattle)foo/
189     foo
190     catfoo
191     *** Failers
192     the barfoo
193     and cattlefoo
194    
195     /(?<=a+)b/
196    
197     /(?<=aaa|b{0,3})b/
198    
199     /(?<!(foo)a\1)bar/
200    
201     /(?i)abc/
202    
203     /(a|(?m)a)/
204    
205     /(?i)^1234/
206    
207     /(^b|(?i)^d)/
208    
209     /(?s).*/
210    
211     /[abcd]/S
212    
213     /(?i)[abcd]/S
214    
215     /(?m)[xy]|(b|c)/S
216    
217     /(^a|^b)/m
218    
219     /(?i)(^a|^b)/m
220    
221     /(a)(?(1)a|b|c)/
222    
223     /(?(?=a)a|b|c)/
224    
225     /(?(1a)/
226    
227     /(?(?i))/
228    
229     /(?(abc))/
230    
231     /(?(?<ab))/
232    
233     /((?s)blah)\s+\1/
234    
235     /((?i)blah)\s+\1/
236    
237     /((?i)b)/DS
238    
239     /(a*b|(?i:c*(?-i)d))/S
240    
241     /a$/
242     a
243     a\n
244     *** Failers
245     \Za
246     \Za\n
247    
248     /a$/m
249     a
250     a\n
251     \Za\n
252     *** Failers
253     \Za
254    
255     /\Aabc/m
256    
257     /^abc/m
258    
259     /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
260     aaaaabbbbbcccccdef
261    
262     /(?<=foo)[ab]/S
263    
264     /(?<!foo)(alpha|omega)/S
265    
266     /(?!alphabet)[ab]/S
267    
268     /(?<=foo\n)^bar/m
269    
270     /(?>^abc)/m
271     abc
272     def\nabc
273     *** Failers
274     defabc
275    
276     /(?<=ab(c+)d)ef/
277    
278     /(?<=ab(?<=c+)d)ef/
279    
280     /(?<=ab(c|de)f)g/
281    
282     /The next three are in testinput2 because they have variable length branches/
283    
284     /(?<=bullock|donkey)-cart/
285     the bullock-cart
286     a donkey-cart race
287     *** Failers
288     cart
289     horse-and-cart
290    
291     /(?<=ab(?i)x|y|z)/
292    
293     /(?>.*)(?<=(abcd)|(xyz))/
294     alphabetabcd
295     endingxyz
296    
297     /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/
298     abxyZZ
299     abXyZZ
300     ZZZ
301     zZZ
302     bZZ
303     BZZ
304     *** Failers
305     ZZ
306     abXYZZ
307     zzz
308     bzz
309    
310     /(?<!(foo)a)bar/
311     bar
312     foobbar
313     *** Failers
314     fooabar
315    
316     /This one is here because Perl 5.005_02 doesn't fail it/
317    
318     /^(a)?(?(1)a|b)+$/
319     *** Failers
320     a
321    
322     /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/
323    
324     /^(a\1?){4}$/
325     aaaaaa
326    
327     /These are syntax tests from Perl 5.005/
328    
329     /a[b-a]/
330    
331     /a[]b/
332    
333     /a[/
334    
335     /*a/
336    
337     /(*)b/
338    
339     /abc)/
340    
341     /(abc/
342    
343     /a**/
344    
345     /)(/
346    
347     /\1/
348    
349     /\2/
350    
351     /(a)|\2/
352    
353     /a[b-a]/i
354    
355     /a[]b/i
356    
357     /a[/i
358    
359     /*a/i
360    
361     /(*)b/i
362    
363     /abc)/i
364    
365     /(abc/i
366    
367     /a**/i
368    
369     /)(/i
370    
371     /:(?:/
372    
373     /(?<%)b/
374    
375     /a(?{)b/
376    
377     /a(?{{})b/
378    
379     /a(?{}})b/
380    
381     /a(?{"{"})b/
382    
383     /a(?{"{"}})b/
384    
385     /(?(1?)a|b)/
386    
387     /(?(1)a|b|c)/
388    
389     /[a[:xyz:/
390    
391     /(?<=x+)y/
392    
393     /a{37,17}/
394    
395     /abc/\
396    
397     /abc/\P
398    
399     /abc/\i
400    
401     /(a)bc(d)/
402     abcd
403     abcd\C2
404     abcd\C5
405    
406     /(.{20})/
407     abcdefghijklmnopqrstuvwxyz
408     abcdefghijklmnopqrstuvwxyz\C1
409     abcdefghijklmnopqrstuvwxyz\G1
410    
411     /(.{15})/
412     abcdefghijklmnopqrstuvwxyz
413     abcdefghijklmnopqrstuvwxyz\C1\G1
414    
415     /(.{16})/
416     abcdefghijklmnopqrstuvwxyz
417     abcdefghijklmnopqrstuvwxyz\C1\G1\L
418    
419     /^(a|(bc))de(f)/
420     adef\G1\G2\G3\G4\L
421     bcdef\G1\G2\G3\G4\L
422     adefghijk\C0
423    
424     /^abc\00def/
425     abc\00def\L\C0
426    
427     /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
428     )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
429     )?)?)?)?)?)?)?)?)?otherword/M
430    
431     /.*X/D
432    
433     /.*X/Ds
434    
435     /(.*X|^B)/D
436    
437     /(.*X|^B)/Ds
438    
439     /(?s)(.*X|^B)/D
440    
441     /(?s:.*X|^B)/D
442    
443     /\Biss\B/+
444     Mississippi
445    
446     /\Biss\B/+P
447     Mississippi
448    
449     /iss/G+
450     Mississippi
451    
452     /\Biss\B/G+
453     Mississippi
454    
455     /\Biss\B/g+
456     Mississippi
457     *** Failers
458     Mississippi\A
459    
460     /(?<=[Ms])iss/g+
461     Mississippi
462    
463     /(?<=[Ms])iss/G+
464     Mississippi
465    
466     /^iss/g+
467     ississippi
468    
469     /.*iss/g+
470     abciss\nxyzisspqr
471    
472     /.i./+g
473     Mississippi
474     Mississippi\A
475     Missouri river
476     Missouri river\A
477    
478     /^.is/+g
479     Mississippi
480    
481     /^ab\n/g+
482     ab\nab\ncd
483    
484     /^ab\n/mg+
485     ab\nab\ncd
486    
487     /abc/
488    
489     /abc|bac/
490    
491     /(abc|bac)/
492    
493     /(abc|(c|dc))/
494    
495     /(abc|(d|de)c)/
496    
497     /a*/
498    
499     /a+/
500    
501     /(baa|a+)/
502    
503     /a{0,3}/
504    
505     /baa{3,}/
506    
507     /"([^\\"]+|\\.)*"/
508    
509     /(abc|ab[cd])/
510    
511     /(a|.)/
512    
513     /a|ba|\w/
514    
515     /abc(?=pqr)/
516    
517     /...(?<=abc)/
518    
519     /abc(?!pqr)/
520    
521     /ab./
522    
523     /ab[xyz]/
524    
525     /abc*/
526    
527     /ab.c*/
528    
529     /a.c*/
530    
531     /.c*/
532    
533     /ac*/
534    
535     /(a.c*|b.c*)/
536    
537     /a.c*|aba/
538    
539     /.+a/
540    
541     /(?=abcda)a.*/
542    
543     /(?=a)a.*/
544    
545     /a(b)*/
546    
547     /a\d*/
548    
549     /ab\d*/
550    
551     /a(\d)*/
552    
553     /abcde{0,0}/
554    
555     /ab\d+/
556    
557     /a(?(1)b)/
558    
559     /a(?(1)bag|big)/
560    
561     /a(?(1)bag|big)*/
562    
563     /a(?(1)bag|big)+/
564    
565     /a(?(1)b..|b..)/
566    
567     /ab\d{0}e/
568    
569     /a?b?/
570     a
571     b
572     ab
573     \
574     *** Failers
575     \N
576    
577     /|-/
578     abcd
579     -abc
580     \Nab-c
581     *** Failers
582     \Nabc
583    
584     /a*(b+)(z)(z)/P
585     aaaabbbbzzzz
586     aaaabbbbzzzz\O0
587     aaaabbbbzzzz\O1
588     aaaabbbbzzzz\O2
589     aaaabbbbzzzz\O3
590     aaaabbbbzzzz\O4
591     aaaabbbbzzzz\O5
592 nigel 43
593     /^.?abcd/S
594 nigel 41
595 nigel 43 /\( # ( at start
596     (?: # Non-capturing bracket
597     (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
598     | # Or
599     (?R) # Recurse - i.e. nested bracketed string
600     )* # Zero or more contents
601     \) # Closing )
602     /x
603     (abcd)
604     (abcd)xyz
605     xyz(abcd)
606     (ab(xy)cd)pqr
607     (ab(xycd)pqr
608     () abc ()
609     12(abcde(fsh)xyz(foo(bar))lmno)89
610     *** Failers
611     abcd
612     abcd)
613     (abcd
614    
615     /\( ( (?>[^()]+) | (?R) )* \) /xg
616     (ab(xy)cd)pqr
617     1(abcd)(x(y)z)pqr
618    
619     /\( (?: (?>[^()]+) | (?R) ) \) /x
620     (abcd)
621     (ab(xy)cd)
622     (a(b(c)d)e)
623     ((ab))
624     *** Failers
625     ()
626    
627     /\( (?: (?>[^()]+) | (?R) )? \) /x
628     ()
629     12(abcde(fsh)xyz(foo(bar))lmno)89
630    
631     /\( ( (?>[^()]+) | (?R) )* \) /x
632     (ab(xy)cd)
633    
634     /\( ( ( (?>[^()]+) | (?R) )* ) \) /x
635     (ab(xy)cd)
636    
637     /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x
638     (ab(xy)cd)
639     (123ab(xy)cd)
640    
641     /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x
642     (ab(xy)cd)
643     (123ab(xy)cd)
644    
645     /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x
646     (ab(xy)cd)
647    
648     /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x
649     (abcd(xyz<p>qrs)123)
650    
651     /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x
652     (ab(cd)ef)
653     (ab(cd(ef)gh)ij)
654    
655     /^[[:alnum:]]/D
656    
657     /^[[:alpha:]]/D
658    
659     /^[[:ascii:]]/D
660    
661 nigel 63 /^[[:blank:]]/D
662    
663 nigel 43 /^[[:cntrl:]]/D
664    
665     /^[[:digit:]]/D
666    
667     /^[[:graph:]]/D
668    
669     /^[[:lower:]]/D
670    
671     /^[[:print:]]/D
672    
673     /^[[:punct:]]/D
674    
675     /^[[:space:]]/D
676    
677     /^[[:upper:]]/D
678    
679     /^[[:xdigit:]]/D
680    
681     /^[[:word:]]/D
682    
683     /^[[:^cntrl:]]/D
684    
685     /^[12[:^digit:]]/D
686    
687 nigel 63 /^[[:^blank:]]/D
688    
689 nigel 43 /[01[:alpha:]%]/D
690    
691     /[[.ch.]]/
692    
693     /[[=ch=]]/
694    
695     /[[:rhubarb:]]/
696    
697     /[[:upper:]]/i
698     A
699     a
700    
701     /[[:lower:]]/i
702     A
703     a
704    
705     /((?-i)[[:lower:]])[[:lower:]]/i
706     ab
707     aB
708     *** Failers
709     Ab
710     AB
711    
712 nigel 49 /[\200-\410]/
713    
714 nigel 51 /^(?(0)f|b)oo/
715    
716 nigel 53 /This one's here because of the large output vector needed/
717    
718     /(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?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d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\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)/
719     \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
720    
721     /This one's here because Perl does this differently and PCRE can't at present/
722    
723     /(main(O)?)+/
724     mainmain
725     mainOmain
726    
727 nigel 63 /These are all cases where Perl does it differently (nested captures)/
728    
729     /^(a(b)?)+$/
730     aba
731    
732     /^(aa(bb)?)+$/
733     aabbaa
734    
735     /^(aa|aa(bb))+$/
736     aabbaa
737    
738     /^(aa(bb)??)+$/
739     aabbaa
740    
741     /^(?:aa(bb)?)+$/
742     aabbaa
743    
744     /^(aa(b(b))?)+$/
745     aabbaa
746    
747     /^(?:aa(b(b))?)+$/
748     aabbaa
749    
750     /^(?:aa(b(?:b))?)+$/
751     aabbaa
752    
753     /^(?:aa(bb(?:b))?)+$/
754     aabbbaa
755    
756     /^(?:aa(b(?:bb))?)+$/
757     aabbbaa
758    
759     /^(?:aa(?:b(b))?)+$/
760     aabbaa
761    
762     /^(?:aa(?:b(bb))?)+$/
763     aabbbaa
764    
765     /^(aa(b(bb))?)+$/
766     aabbbaa
767    
768     /^(aa(bb(bb))?)+$/
769     aabbbbaa
770    
771     /--------------------------------------------------------------------/
772    
773     /#/xMD
774    
775     /a#/xMD
776    
777     /[\s]/D
778    
779     /[\S]/D
780    
781     /a(?i)b/D
782     ab
783     aB
784     *** Failers
785     AB
786    
787     /(a(?i)b)/D
788     ab
789     aB
790     *** Failers
791     AB
792    
793     / (?i)abc/xD
794    
795     /#this is a comment
796     (?i)abc/xD
797    
798     /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
799    
800     /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
801    
802     /\Q\E/D
803     \
804    
805     /\Q\Ex/D
806    
807     / \Q\E/D
808    
809     /a\Q\E/D
810     abc
811     bca
812     bac
813    
814     /a\Q\Eb/D
815     abc
816    
817     /\Q\Eabc/D
818    
819     /x*+\w/D
820     *** Failers
821     xxxxx
822    
823     /x?+/D
824    
825     /x++/D
826    
827     /x{1,3}+/D
828    
829     /(x)*+/D
830    
831     /^(\w++|\s++)*$/
832     now is the time for all good men to come to the aid of the party
833     *** Failers
834     this is not a line with only words and spaces!
835    
836     /(\d++)(\w)/
837     12345a
838     *** Failers
839     12345+
840    
841     /a++b/
842     aaab
843    
844     /(a++b)/
845     aaab
846    
847     /(a++)b/
848     aaab
849    
850     /([^()]++|\([^()]*\))+/
851     ((abc(ade)ufh()()x
852    
853     /\(([^()]++|\([^()]+\))+\)/
854     (abc)
855     (abc(def)xyz)
856     *** Failers
857     ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
858    
859     /(abc){1,3}+/D
860    
861     /a+?+/
862    
863     /a{2,3}?+b/
864    
865     /(?U)a+?+/
866    
867     /a{2,3}?+b/U
868    
869     /x(?U)a++b/D
870     xaaaab
871    
872     /(?U)xa++b/D
873     xaaaab
874    
875     /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/D
876    
877     /^x(?U)a+b/D
878    
879     /^x(?U)(a+)b/D
880    
881     /[.x.]/
882    
883     /[=x=]/
884    
885     /[:x:]/
886    
887     /\l/
888    
889     /\L/
890    
891     /\N{name}/
892    
893     /\pP/
894    
895     /\PP/
896    
897     /\p{prop}/
898    
899     /\P{prop}/
900    
901     /\u/
902    
903     /\U/
904    
905     /\X/
906    
907     /[/
908    
909     /[a-/
910    
911     /[[:space:]/
912    
913     /[\s]/DM
914    
915     /[[:space:]]/DM
916    
917     /[[:space:]abcde]/DM
918    
919     /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
920     <>
921     <abcd>
922     <abc <123> hij>
923     <abc <def> hij>
924     <abc<>def>
925     <abc<>
926     *** Failers
927     <abc
928    
929     |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|DM
930    
931     |\$\<\.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|DM
932    
933     /(.*)\d+\1/I
934    
935     /(.*)\d+/I
936    
937     /(.*)\d+\1/Is
938    
939     /(.*)\d+/Is
940    
941     /(.*(xyz))\d+\2/I
942    
943     /((.*))\d+\1/I
944     abc123bc
945    
946     /a[b]/I
947    
948     /(?=a).*/I
949    
950     /(?=abc).xyz/iI
951    
952     /(?=abc)(?i).xyz/I
953    
954     /(?=a)(?=b)/I
955    
956     /(?=.)a/I
957    
958     /((?=abcda)a)/I
959    
960     /((?=abcda)ab)/I
961    
962     /()a/I
963    
964     /(?(1)ab|ac)/I
965    
966     /(?(1)abz|acz)/I
967    
968     /(?(1)abz)/I
969    
970     /(?(1)abz)123/I
971    
972     /(a)+/I
973    
974     /(a){2,3}/I
975    
976     /(a)*/I
977    
978     /[a]/I
979    
980     /[ab]/I
981    
982     /[ab]/IS
983    
984     /[^a]/I
985    
986     /\d456/I
987    
988     /\d456/IS
989    
990     /a^b/I
991    
992     /^a/mI
993     abcde
994     xy\nabc
995     *** Failers
996     xyabc
997    
998     /c|abc/I
999    
1000     /(?i)[ab]/IS
1001    
1002     /[ab](?i)cd/IS
1003    
1004     /abc(?C)def/
1005     abcdef
1006     1234abcdef
1007     *** Failers
1008     abcxyz
1009     abcxyzf
1010    
1011     /abc(?C)de(?C1)f/
1012     123abcdef
1013    
1014     /(?C1)\dabc(?C2)def/
1015     1234abcdef
1016     *** Failers
1017     abcdef
1018    
1019     /(?C255)ab/
1020    
1021     /(?C256)ab/
1022    
1023     /(?Cab)xx/
1024    
1025     /(?C12vr)x/
1026    
1027     /abc(?C)def/
1028     *** Failers
1029     \x83\x0\x61bcdef
1030    
1031     /(abc)(?C)de(?C1)f/
1032     123abcdef
1033     123abcdef\C+
1034     123abcdef\C-
1035     *** Failers
1036     123abcdef\C!1
1037    
1038     /(?C0)(abc(?C1))*/
1039     abcabcabc
1040     abcabc\C!1!3
1041     *** Failers
1042     abcabcabc\C!1!3
1043    
1044     /(\d{3}(?C))*/
1045     123\C+
1046     123456\C+
1047     123456789\C+
1048    
1049     /((xyz)(?C)p|(?C1)xyzabc)/
1050     xyzabc\C+
1051    
1052     /(X)((xyz)(?C)p|(?C1)xyzabc)/
1053     Xxyzabc\C+
1054    
1055     /(?=(abc))(?C)abcdef/
1056     abcdef\C+
1057    
1058     /(?!(abc)(?C1)d)(?C2)abcxyz/
1059     abcxyz\C+
1060    
1061     /(?<=(abc)(?C))xyz/
1062     abcxyz\C+
1063    
1064     /(?C)abc/
1065    
1066     /(?C)^abc/
1067    
1068     /(?C)a|b/S
1069    
1070     /(?R)/
1071    
1072     /(a|(?R))/
1073    
1074     /(ab|(bc|(de|(?R))))/
1075    
1076     /x(ab|(bc|(de|(?R))))/
1077     xab
1078     xbc
1079     xde
1080     xxab
1081     xxxab
1082     *** Failers
1083     xyab
1084    
1085     /(ab|(bc|(de|(?1))))/
1086    
1087     /x(ab|(bc|(de|(?1)x)x)x)/
1088    
1089     /^([^()]|\((?1)*\))*$/
1090     abc
1091     a(b)c
1092     a(b(c))d
1093     *** Failers)
1094     a(b(c)d
1095    
1096     /^>abc>([^()]|\((?1)*\))*<xyz<$/
1097     >abc>123<xyz<
1098     >abc>1(2)3<xyz<
1099     >abc>(1(2)3)<xyz<
1100    
1101     /(a(?1)b)/D
1102    
1103     /(a(?1)+b)/D
1104    
1105     /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/i
1106     1221
1107     Satan, oscillate my metallic sonatas!
1108     A man, a plan, a canal: Panama!
1109     Able was I ere I saw Elba.
1110     *** Failers
1111     The quick brown fox
1112    
1113     /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
1114     12
1115     (((2+2)*-3)-7)
1116     -12
1117     *** Failers
1118     ((2+2)*-3)-7)
1119    
1120     /^(x(y|(?1){2})z)/
1121     xyz
1122     xxyzxyzz
1123     *** Failers
1124     xxyzz
1125     xxyzxyzxyzz
1126    
1127     /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
1128     <>
1129     <abcd>
1130     <abc <123> hij>
1131     <abc <def> hij>
1132     <abc<>def>
1133     <abc<>
1134     *** Failers
1135     <abc
1136    
1137     /(?1)/
1138    
1139     /((?2)(abc)/
1140    
1141     /^(abc)def(?1)/
1142     abcdefabc
1143    
1144     /^(a|b|c)=(?1)+/
1145     a=a
1146     a=b
1147     a=bc
1148    
1149     /^(a|b|c)=((?1))+/
1150     a=a
1151     a=b
1152     a=bc
1153    
1154     /a(?P<name1>b|c)d(?P<longername2>e)/D
1155     abde
1156     acde
1157    
1158     /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/D
1159    
1160     /(?P<a>a)...(?P=a)bbb(?P>a)d/D
1161    
1162     /^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/i
1163     1221
1164     Satan, oscillate my metallic sonatas!
1165     A man, a plan, a canal: Panama!
1166     Able was I ere I saw Elba.
1167     *** Failers
1168     The quick brown fox
1169    
1170     /((?(R)a|b))\1(?1)?/
1171     bb
1172     bbaa
1173    
1174     /(.*)a/sI
1175    
1176     /(.*)a\1/sI
1177    
1178     /(.*)a(b)\2/sI
1179    
1180     /((.*)a|(.*)b)z/sI
1181    
1182     /((.*)a|(.*)b)z\1/sI
1183    
1184     /((.*)a|(.*)b)z\2/sI
1185    
1186     /((.*)a|(.*)b)z\3/sI
1187    
1188     /((.*)a|^(.*)b)z\3/sI
1189    
1190     /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/sI
1191    
1192     /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/sI
1193    
1194     /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/sI
1195    
1196     /(a)(bc)/ND
1197     abc
1198    
1199     /(?P<one>a)(bc)/ND
1200     abc
1201    
1202     /(a)(?P<named>bc)/ND
1203    
1204     /(a+)*zz/
1205     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
1206     aaaaaaaaaaaaaz\M
1207    
1208     /(aaa(?C1)bbb|ab)/
1209     aaabbb
1210     aaabbb\C*0
1211     aaabbb\C*1
1212     aaabbb\C*-1
1213    
1214     /ab(?P<one>cd)ef(?P<two>gh)/
1215     abcdefgh
1216     abcdefgh\C1\Gtwo
1217     abcdefgh\Cone\Ctwo
1218     abcdefgh\Cthree
1219    
1220     /(?P<Tes>)(?P<Test>)/D
1221    
1222     /(?P<Test>)(?P<Tes>)/D
1223    
1224     /(?P<Z>zz)(?P<A>aa)/
1225     zzaa\CZ
1226     zzaa\CA
1227    
1228 nigel 49 / End of testinput2 /

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12