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

Contents of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49 - (show annotations) (download)
Sat Feb 24 21:39:33 2007 UTC (7 years, 5 months ago) by nigel
File size: 7767 byte(s)
Load pcre-3.3 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 /[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 /<.*>(?U)/
177 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
593 /^.?abcd/S
594
595 /\( # ( 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 /^[[:cntrl:]]/D
662
663 /^[[:digit:]]/D
664
665 /^[[:graph:]]/D
666
667 /^[[:lower:]]/D
668
669 /^[[:print:]]/D
670
671 /^[[:punct:]]/D
672
673 /^[[:space:]]/D
674
675 /^[[:upper:]]/D
676
677 /^[[:xdigit:]]/D
678
679 /^[[:word:]]/D
680
681 /^[[:^cntrl:]]/D
682
683 /^[12[:^digit:]]/D
684
685 /[01[:alpha:]%]/D
686
687 /[[.ch.]]/
688
689 /[[=ch=]]/
690
691 /[[:rhubarb:]]/
692
693 /[[:upper:]]/i
694 A
695 a
696
697 /[[:lower:]]/i
698 A
699 a
700
701 /((?-i)[[:lower:]])[[:lower:]]/i
702 ab
703 aB
704 *** Failers
705 Ab
706 AB
707
708 /[\200-\410]/
709
710 / End of testinput2 /

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12