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

Contents of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 43 - (show annotations) (download)
Sat Feb 24 21:39:21 2007 UTC (7 years, 6 months ago) by nigel
File size: 7762 byte(s)
Load pcre-3.0 into code/trunk.

1 /(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 /[\B]/
42
43 /[a-\w]/
44
45 /[z-a]/
46
47 /^*/
48
49 /(abc/
50
51 /(?# abc/
52
53 /(?z)abc/
54
55 /.*b/
56
57 /.*?b/
58
59 /cat|dog|elephant/
60 this sentence eventually mentions a cat
61 this sentences rambles on and on for a while and then reaches elephant
62
63 /cat|dog|elephant/S
64 this sentence eventually mentions a cat
65 this sentences rambles on and on for a while and then reaches elephant
66
67 /cat|dog|elephant/iS
68 this sentence eventually mentions a CAT cat
69 this sentences rambles on and on for a while to elephant ElePhant
70
71 /a|[bcd]/S
72
73 /(a|[^\dZ])/S
74
75 /(a|b)*[\s]/S
76
77 /(ab\2)/
78
79 /{4,5}abc/
80
81 /(a)(b)(c)\2/
82 abcb
83 \O0abcb
84 \O3abcb
85 \O6abcb
86 \O9abcb
87 \O12abcb
88
89 /(a)bc|(a)(b)\2/
90 abc
91 \O0abc
92 \O3abc
93 \O6abc
94 aba
95 \O0aba
96 \O3aba
97 \O6aba
98 \O9aba
99 \O12aba
100
101 /abc$/E
102 abc
103 *** Failers
104 abc\n
105 abc\ndef
106
107 /(a)(b)(c)(d)(e)\6/
108
109 /the quick brown fox/
110 the quick brown fox
111 this is a line with the quick brown fox
112
113 /the quick brown fox/A
114 the quick brown fox
115 *** Failers
116 this is a line with the quick brown fox
117
118 /ab(?z)cd/
119
120 /^abc|def/
121 abcdef
122 abcdef\B
123
124 /.*((abc)$|(def))/
125 defabc
126 \Zdefabc
127
128 /abc/P
129 abc
130 *** Failers
131
132 /^abc|def/P
133 abcdef
134 abcdef\B
135
136 /.*((abc)$|(def))/P
137 defabc
138 \Zdefabc
139
140 /the quick brown fox/P
141 the quick brown fox
142 *** Failers
143 The Quick Brown Fox
144
145 /the quick brown fox/Pi
146 the quick brown fox
147 The Quick Brown Fox
148
149 /abc.def/P
150 *** Failers
151 abc\ndef
152
153 /abc$/P
154 abc
155 abc\n
156
157 /(abc)\2/P
158
159 /(abc\1)/P
160 abc
161
162 /)/
163
164 /a[]b/
165
166 /[^aeiou ]{3,}/
167 co-processors, and for
168
169 /<.*>/
170 abc<def>ghi<klm>nop
171
172 /<.*?>/
173 abc<def>ghi<klm>nop
174
175 /<.*>/U
176 abc<def>ghi<klm>nop
177
178 /<.*>(?U)/
179 abc<def>ghi<klm>nop
180
181 /<.*?>/U
182 abc<def>ghi<klm>nop
183
184 /={3,}/U
185 abc========def
186
187 /(?U)={3,}?/
188 abc========def
189
190 /(?<!bar|cattle)foo/
191 foo
192 catfoo
193 *** Failers
194 the barfoo
195 and cattlefoo
196
197 /(?<=a+)b/
198
199 /(?<=aaa|b{0,3})b/
200
201 /(?<!(foo)a\1)bar/
202
203 /(?i)abc/
204
205 /(a|(?m)a)/
206
207 /(?i)^1234/
208
209 /(^b|(?i)^d)/
210
211 /(?s).*/
212
213 /[abcd]/S
214
215 /(?i)[abcd]/S
216
217 /(?m)[xy]|(b|c)/S
218
219 /(^a|^b)/m
220
221 /(?i)(^a|^b)/m
222
223 /(a)(?(1)a|b|c)/
224
225 /(?(?=a)a|b|c)/
226
227 /(?(1a)/
228
229 /(?(?i))/
230
231 /(?(abc))/
232
233 /(?(?<ab))/
234
235 /((?s)blah)\s+\1/
236
237 /((?i)blah)\s+\1/
238
239 /((?i)b)/DS
240
241 /(a*b|(?i:c*(?-i)d))/S
242
243 /a$/
244 a
245 a\n
246 *** Failers
247 \Za
248 \Za\n
249
250 /a$/m
251 a
252 a\n
253 \Za\n
254 *** Failers
255 \Za
256
257 /\Aabc/m
258
259 /^abc/m
260
261 /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
262 aaaaabbbbbcccccdef
263
264 /(?<=foo)[ab]/S
265
266 /(?<!foo)(alpha|omega)/S
267
268 /(?!alphabet)[ab]/S
269
270 /(?<=foo\n)^bar/m
271
272 /(?>^abc)/m
273 abc
274 def\nabc
275 *** Failers
276 defabc
277
278 /(?<=ab(c+)d)ef/
279
280 /(?<=ab(?<=c+)d)ef/
281
282 /(?<=ab(c|de)f)g/
283
284 /The next three are in testinput2 because they have variable length branches/
285
286 /(?<=bullock|donkey)-cart/
287 the bullock-cart
288 a donkey-cart race
289 *** Failers
290 cart
291 horse-and-cart
292
293 /(?<=ab(?i)x|y|z)/
294
295 /(?>.*)(?<=(abcd)|(xyz))/
296 alphabetabcd
297 endingxyz
298
299 /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/
300 abxyZZ
301 abXyZZ
302 ZZZ
303 zZZ
304 bZZ
305 BZZ
306 *** Failers
307 ZZ
308 abXYZZ
309 zzz
310 bzz
311
312 /(?<!(foo)a)bar/
313 bar
314 foobbar
315 *** Failers
316 fooabar
317
318 /This one is here because Perl 5.005_02 doesn't fail it/
319
320 /^(a)?(?(1)a|b)+$/
321 *** Failers
322 a
323
324 /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/
325
326 /^(a\1?){4}$/
327 aaaaaa
328
329 /These are syntax tests from Perl 5.005/
330
331 /a[b-a]/
332
333 /a[]b/
334
335 /a[/
336
337 /*a/
338
339 /(*)b/
340
341 /abc)/
342
343 /(abc/
344
345 /a**/
346
347 /)(/
348
349 /\1/
350
351 /\2/
352
353 /(a)|\2/
354
355 /a[b-a]/i
356
357 /a[]b/i
358
359 /a[/i
360
361 /*a/i
362
363 /(*)b/i
364
365 /abc)/i
366
367 /(abc/i
368
369 /a**/i
370
371 /)(/i
372
373 /:(?:/
374
375 /(?<%)b/
376
377 /a(?{)b/
378
379 /a(?{{})b/
380
381 /a(?{}})b/
382
383 /a(?{"{"})b/
384
385 /a(?{"{"}})b/
386
387 /(?(1?)a|b)/
388
389 /(?(1)a|b|c)/
390
391 /[a[:xyz:/
392
393 /(?<=x+)y/
394
395 /a{37,17}/
396
397 /abc/\
398
399 /abc/\P
400
401 /abc/\i
402
403 /(a)bc(d)/
404 abcd
405 abcd\C2
406 abcd\C5
407
408 /(.{20})/
409 abcdefghijklmnopqrstuvwxyz
410 abcdefghijklmnopqrstuvwxyz\C1
411 abcdefghijklmnopqrstuvwxyz\G1
412
413 /(.{15})/
414 abcdefghijklmnopqrstuvwxyz
415 abcdefghijklmnopqrstuvwxyz\C1\G1
416
417 /(.{16})/
418 abcdefghijklmnopqrstuvwxyz
419 abcdefghijklmnopqrstuvwxyz\C1\G1\L
420
421 /^(a|(bc))de(f)/
422 adef\G1\G2\G3\G4\L
423 bcdef\G1\G2\G3\G4\L
424 adefghijk\C0
425
426 /^abc\00def/
427 abc\00def\L\C0
428
429 /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
430 )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
431 )?)?)?)?)?)?)?)?)?otherword/M
432
433 /.*X/D
434
435 /.*X/Ds
436
437 /(.*X|^B)/D
438
439 /(.*X|^B)/Ds
440
441 /(?s)(.*X|^B)/D
442
443 /(?s:.*X|^B)/D
444
445 /\Biss\B/+
446 Mississippi
447
448 /\Biss\B/+P
449 Mississippi
450
451 /iss/G+
452 Mississippi
453
454 /\Biss\B/G+
455 Mississippi
456
457 /\Biss\B/g+
458 Mississippi
459 *** Failers
460 Mississippi\A
461
462 /(?<=[Ms])iss/g+
463 Mississippi
464
465 /(?<=[Ms])iss/G+
466 Mississippi
467
468 /^iss/g+
469 ississippi
470
471 /.*iss/g+
472 abciss\nxyzisspqr
473
474 /.i./+g
475 Mississippi
476 Mississippi\A
477 Missouri river
478 Missouri river\A
479
480 /^.is/+g
481 Mississippi
482
483 /^ab\n/g+
484 ab\nab\ncd
485
486 /^ab\n/mg+
487 ab\nab\ncd
488
489 /abc/
490
491 /abc|bac/
492
493 /(abc|bac)/
494
495 /(abc|(c|dc))/
496
497 /(abc|(d|de)c)/
498
499 /a*/
500
501 /a+/
502
503 /(baa|a+)/
504
505 /a{0,3}/
506
507 /baa{3,}/
508
509 /"([^\\"]+|\\.)*"/
510
511 /(abc|ab[cd])/
512
513 /(a|.)/
514
515 /a|ba|\w/
516
517 /abc(?=pqr)/
518
519 /...(?<=abc)/
520
521 /abc(?!pqr)/
522
523 /ab./
524
525 /ab[xyz]/
526
527 /abc*/
528
529 /ab.c*/
530
531 /a.c*/
532
533 /.c*/
534
535 /ac*/
536
537 /(a.c*|b.c*)/
538
539 /a.c*|aba/
540
541 /.+a/
542
543 /(?=abcda)a.*/
544
545 /(?=a)a.*/
546
547 /a(b)*/
548
549 /a\d*/
550
551 /ab\d*/
552
553 /a(\d)*/
554
555 /abcde{0,0}/
556
557 /ab\d+/
558
559 /a(?(1)b)/
560
561 /a(?(1)bag|big)/
562
563 /a(?(1)bag|big)*/
564
565 /a(?(1)bag|big)+/
566
567 /a(?(1)b..|b..)/
568
569 /ab\d{0}e/
570
571 /a?b?/
572 a
573 b
574 ab
575 \
576 *** Failers
577 \N
578
579 /|-/
580 abcd
581 -abc
582 \Nab-c
583 *** Failers
584 \Nabc
585
586 /a*(b+)(z)(z)/P
587 aaaabbbbzzzz
588 aaaabbbbzzzz\O0
589 aaaabbbbzzzz\O1
590 aaaabbbbzzzz\O2
591 aaaabbbbzzzz\O3
592 aaaabbbbzzzz\O4
593 aaaabbbbzzzz\O5
594
595 /^.?abcd/S
596
597 /\( # ( at start
598 (?: # Non-capturing bracket
599 (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
600 | # Or
601 (?R) # Recurse - i.e. nested bracketed string
602 )* # Zero or more contents
603 \) # Closing )
604 /x
605 (abcd)
606 (abcd)xyz
607 xyz(abcd)
608 (ab(xy)cd)pqr
609 (ab(xycd)pqr
610 () abc ()
611 12(abcde(fsh)xyz(foo(bar))lmno)89
612 *** Failers
613 abcd
614 abcd)
615 (abcd
616
617 /\( ( (?>[^()]+) | (?R) )* \) /xg
618 (ab(xy)cd)pqr
619 1(abcd)(x(y)z)pqr
620
621 /\( (?: (?>[^()]+) | (?R) ) \) /x
622 (abcd)
623 (ab(xy)cd)
624 (a(b(c)d)e)
625 ((ab))
626 *** Failers
627 ()
628
629 /\( (?: (?>[^()]+) | (?R) )? \) /x
630 ()
631 12(abcde(fsh)xyz(foo(bar))lmno)89
632
633 /\( ( (?>[^()]+) | (?R) )* \) /x
634 (ab(xy)cd)
635
636 /\( ( ( (?>[^()]+) | (?R) )* ) \) /x
637 (ab(xy)cd)
638
639 /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x
640 (ab(xy)cd)
641 (123ab(xy)cd)
642
643 /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x
644 (ab(xy)cd)
645 (123ab(xy)cd)
646
647 /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x
648 (ab(xy)cd)
649
650 /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x
651 (abcd(xyz<p>qrs)123)
652
653 /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x
654 (ab(cd)ef)
655 (ab(cd(ef)gh)ij)
656
657 /^[[:alnum:]]/D
658
659 /^[[:alpha:]]/D
660
661 /^[[:ascii:]]/D
662
663 /^[[: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 /[01[:alpha:]%]/D
688
689 /[[.ch.]]/
690
691 /[[=ch=]]/
692
693 /[[:rhubarb:]]/
694
695 /[[:upper:]]/i
696 A
697 a
698
699 /[[:lower:]]/i
700 A
701 a
702
703 /((?-i)[[:lower:]])[[:lower:]]/i
704 ab
705 aB
706 *** Failers
707 Ab
708 AB
709
710 / End of test input /

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12