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

Contents of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 75 - (show annotations) (download)
Sat Feb 24 21:40:37 2007 UTC (7 years, 9 months ago) by nigel
File size: 24195 byte(s)
Load pcre-5.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 /(?X)[\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 foo\nbarbar
270 ***Failers
271 rhubarb
272 barbell
273 abc\nbarton
274
275 /^(?<=foo\n)bar/m
276 foo\nbarbar
277 ***Failers
278 rhubarb
279 barbell
280 abc\nbarton
281
282 /(?>^abc)/m
283 abc
284 def\nabc
285 *** Failers
286 defabc
287
288 /(?<=ab(c+)d)ef/
289
290 /(?<=ab(?<=c+)d)ef/
291
292 /(?<=ab(c|de)f)g/
293
294 /The next three are in testinput2 because they have variable length branches/
295
296 /(?<=bullock|donkey)-cart/
297 the bullock-cart
298 a donkey-cart race
299 *** Failers
300 cart
301 horse-and-cart
302
303 /(?<=ab(?i)x|y|z)/
304
305 /(?>.*)(?<=(abcd)|(xyz))/
306 alphabetabcd
307 endingxyz
308
309 /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/
310 abxyZZ
311 abXyZZ
312 ZZZ
313 zZZ
314 bZZ
315 BZZ
316 *** Failers
317 ZZ
318 abXYZZ
319 zzz
320 bzz
321
322 /(?<!(foo)a)bar/
323 bar
324 foobbar
325 *** Failers
326 fooabar
327
328 /This one is here because Perl 5.005_02 doesn't fail it/
329
330 /^(a)?(?(1)a|b)+$/
331 *** Failers
332 a
333
334 /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/
335
336 /^(a\1?){4}$/
337 aaaaaa
338
339 /These are syntax tests from Perl 5.005/
340
341 /a[b-a]/
342
343 /a[]b/
344
345 /a[/
346
347 /*a/
348
349 /(*)b/
350
351 /abc)/
352
353 /(abc/
354
355 /a**/
356
357 /)(/
358
359 /\1/
360
361 /\2/
362
363 /(a)|\2/
364
365 /a[b-a]/i
366
367 /a[]b/i
368
369 /a[/i
370
371 /*a/i
372
373 /(*)b/i
374
375 /abc)/i
376
377 /(abc/i
378
379 /a**/i
380
381 /)(/i
382
383 /:(?:/
384
385 /(?<%)b/
386
387 /a(?{)b/
388
389 /a(?{{})b/
390
391 /a(?{}})b/
392
393 /a(?{"{"})b/
394
395 /a(?{"{"}})b/
396
397 /(?(1?)a|b)/
398
399 /(?(1)a|b|c)/
400
401 /[a[:xyz:/
402
403 /(?<=x+)y/
404
405 /a{37,17}/
406
407 /abc/\
408
409 /abc/\P
410
411 /abc/\i
412
413 /(a)bc(d)/
414 abcd
415 abcd\C2
416 abcd\C5
417
418 /(.{20})/
419 abcdefghijklmnopqrstuvwxyz
420 abcdefghijklmnopqrstuvwxyz\C1
421 abcdefghijklmnopqrstuvwxyz\G1
422
423 /(.{15})/
424 abcdefghijklmnopqrstuvwxyz
425 abcdefghijklmnopqrstuvwxyz\C1\G1
426
427 /(.{16})/
428 abcdefghijklmnopqrstuvwxyz
429 abcdefghijklmnopqrstuvwxyz\C1\G1\L
430
431 /^(a|(bc))de(f)/
432 adef\G1\G2\G3\G4\L
433 bcdef\G1\G2\G3\G4\L
434 adefghijk\C0
435
436 /^abc\00def/
437 abc\00def\L\C0
438
439 /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
440 )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
441 )?)?)?)?)?)?)?)?)?otherword/M
442
443 /.*X/D
444
445 /.*X/Ds
446
447 /(.*X|^B)/D
448
449 /(.*X|^B)/Ds
450
451 /(?s)(.*X|^B)/D
452
453 /(?s:.*X|^B)/D
454
455 /\Biss\B/+
456 Mississippi
457
458 /\Biss\B/+P
459 Mississippi
460
461 /iss/G+
462 Mississippi
463
464 /\Biss\B/G+
465 Mississippi
466
467 /\Biss\B/g+
468 Mississippi
469 *** Failers
470 Mississippi\A
471
472 /(?<=[Ms])iss/g+
473 Mississippi
474
475 /(?<=[Ms])iss/G+
476 Mississippi
477
478 /^iss/g+
479 ississippi
480
481 /.*iss/g+
482 abciss\nxyzisspqr
483
484 /.i./+g
485 Mississippi
486 Mississippi\A
487 Missouri river
488 Missouri river\A
489
490 /^.is/+g
491 Mississippi
492
493 /^ab\n/g+
494 ab\nab\ncd
495
496 /^ab\n/mg+
497 ab\nab\ncd
498
499 /abc/
500
501 /abc|bac/
502
503 /(abc|bac)/
504
505 /(abc|(c|dc))/
506
507 /(abc|(d|de)c)/
508
509 /a*/
510
511 /a+/
512
513 /(baa|a+)/
514
515 /a{0,3}/
516
517 /baa{3,}/
518
519 /"([^\\"]+|\\.)*"/
520
521 /(abc|ab[cd])/
522
523 /(a|.)/
524
525 /a|ba|\w/
526
527 /abc(?=pqr)/
528
529 /...(?<=abc)/
530
531 /abc(?!pqr)/
532
533 /ab./
534
535 /ab[xyz]/
536
537 /abc*/
538
539 /ab.c*/
540
541 /a.c*/
542
543 /.c*/
544
545 /ac*/
546
547 /(a.c*|b.c*)/
548
549 /a.c*|aba/
550
551 /.+a/
552
553 /(?=abcda)a.*/
554
555 /(?=a)a.*/
556
557 /a(b)*/
558
559 /a\d*/
560
561 /ab\d*/
562
563 /a(\d)*/
564
565 /abcde{0,0}/
566
567 /ab\d+/
568
569 /a(?(1)b)/
570
571 /a(?(1)bag|big)/
572
573 /a(?(1)bag|big)*/
574
575 /a(?(1)bag|big)+/
576
577 /a(?(1)b..|b..)/
578
579 /ab\d{0}e/
580
581 /a?b?/
582 a
583 b
584 ab
585 \
586 *** Failers
587 \N
588
589 /|-/
590 abcd
591 -abc
592 \Nab-c
593 *** Failers
594 \Nabc
595
596 /a*(b+)(z)(z)/P
597 aaaabbbbzzzz
598 aaaabbbbzzzz\O0
599 aaaabbbbzzzz\O1
600 aaaabbbbzzzz\O2
601 aaaabbbbzzzz\O3
602 aaaabbbbzzzz\O4
603 aaaabbbbzzzz\O5
604
605 /^.?abcd/S
606
607 /\( # ( at start
608 (?: # Non-capturing bracket
609 (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
610 | # Or
611 (?R) # Recurse - i.e. nested bracketed string
612 )* # Zero or more contents
613 \) # Closing )
614 /x
615 (abcd)
616 (abcd)xyz
617 xyz(abcd)
618 (ab(xy)cd)pqr
619 (ab(xycd)pqr
620 () abc ()
621 12(abcde(fsh)xyz(foo(bar))lmno)89
622 *** Failers
623 abcd
624 abcd)
625 (abcd
626
627 /\( ( (?>[^()]+) | (?R) )* \) /xg
628 (ab(xy)cd)pqr
629 1(abcd)(x(y)z)pqr
630
631 /\( (?: (?>[^()]+) | (?R) ) \) /x
632 (abcd)
633 (ab(xy)cd)
634 (a(b(c)d)e)
635 ((ab))
636 *** Failers
637 ()
638
639 /\( (?: (?>[^()]+) | (?R) )? \) /x
640 ()
641 12(abcde(fsh)xyz(foo(bar))lmno)89
642
643 /\( ( (?>[^()]+) | (?R) )* \) /x
644 (ab(xy)cd)
645
646 /\( ( ( (?>[^()]+) | (?R) )* ) \) /x
647 (ab(xy)cd)
648
649 /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x
650 (ab(xy)cd)
651 (123ab(xy)cd)
652
653 /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x
654 (ab(xy)cd)
655 (123ab(xy)cd)
656
657 /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x
658 (ab(xy)cd)
659
660 /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x
661 (abcd(xyz<p>qrs)123)
662
663 /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x
664 (ab(cd)ef)
665 (ab(cd(ef)gh)ij)
666
667 /^[[:alnum:]]/D
668
669 /^[[:^alnum:]]/D
670
671 /^[[:alpha:]]/D
672
673 /^[[:^alpha:]]/D
674
675 /^[[:ascii:]]/D
676
677 /^[[:^ascii:]]/D
678
679 /^[[:blank:]]/D
680
681 /^[[:cntrl:]]/D
682
683 /^[[:digit:]]/D
684
685 /^[[:graph:]]/D
686
687 /^[[:lower:]]/D
688
689 /^[[:print:]]/D
690
691 /^[[:punct:]]/D
692
693 /^[[:space:]]/D
694
695 /^[[:upper:]]/D
696
697 /^[[:xdigit:]]/D
698
699 /^[[:word:]]/D
700
701 /^[[:^cntrl:]]/D
702
703 /^[12[:^digit:]]/D
704
705 /^[[:^blank:]]/D
706
707 /[01[:alpha:]%]/D
708
709 /[[.ch.]]/
710
711 /[[=ch=]]/
712
713 /[[:rhubarb:]]/
714
715 /[[:upper:]]/i
716 A
717 a
718
719 /[[:lower:]]/i
720 A
721 a
722
723 /((?-i)[[:lower:]])[[:lower:]]/i
724 ab
725 aB
726 *** Failers
727 Ab
728 AB
729
730 /[\200-\410]/
731
732 /^(?(0)f|b)oo/
733
734 /This one's here because of the large output vector needed/
735
736 /(\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|$))(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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|$))(\w+)\s+(\270)/
737 \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
738
739 /This one's here because Perl does this differently and PCRE can't at present/
740
741 /(main(O)?)+/
742 mainmain
743 mainOmain
744
745 /These are all cases where Perl does it differently (nested captures)/
746
747 /^(a(b)?)+$/
748 aba
749
750 /^(aa(bb)?)+$/
751 aabbaa
752
753 /^(aa|aa(bb))+$/
754 aabbaa
755
756 /^(aa(bb)??)+$/
757 aabbaa
758
759 /^(?:aa(bb)?)+$/
760 aabbaa
761
762 /^(aa(b(b))?)+$/
763 aabbaa
764
765 /^(?:aa(b(b))?)+$/
766 aabbaa
767
768 /^(?:aa(b(?:b))?)+$/
769 aabbaa
770
771 /^(?:aa(bb(?:b))?)+$/
772 aabbbaa
773
774 /^(?:aa(b(?:bb))?)+$/
775 aabbbaa
776
777 /^(?:aa(?:b(b))?)+$/
778 aabbaa
779
780 /^(?:aa(?:b(bb))?)+$/
781 aabbbaa
782
783 /^(aa(b(bb))?)+$/
784 aabbbaa
785
786 /^(aa(bb(bb))?)+$/
787 aabbbbaa
788
789 /--------------------------------------------------------------------/
790
791 /#/xMD
792
793 /a#/xMD
794
795 /[\s]/D
796
797 /[\S]/D
798
799 /a(?i)b/D
800 ab
801 aB
802 *** Failers
803 AB
804
805 /(a(?i)b)/D
806 ab
807 aB
808 *** Failers
809 AB
810
811 / (?i)abc/xD
812
813 /#this is a comment
814 (?i)abc/xD
815
816 /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
817
818 /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
819
820 /\Q\E/D
821 \
822
823 /\Q\Ex/D
824
825 / \Q\E/D
826
827 /a\Q\E/D
828 abc
829 bca
830 bac
831
832 /a\Q\Eb/D
833 abc
834
835 /\Q\Eabc/D
836
837 /x*+\w/D
838 *** Failers
839 xxxxx
840
841 /x?+/D
842
843 /x++/D
844
845 /x{1,3}+/D
846
847 /(x)*+/D
848
849 /^(\w++|\s++)*$/
850 now is the time for all good men to come to the aid of the party
851 *** Failers
852 this is not a line with only words and spaces!
853
854 /(\d++)(\w)/
855 12345a
856 *** Failers
857 12345+
858
859 /a++b/
860 aaab
861
862 /(a++b)/
863 aaab
864
865 /(a++)b/
866 aaab
867
868 /([^()]++|\([^()]*\))+/
869 ((abc(ade)ufh()()x
870
871 /\(([^()]++|\([^()]+\))+\)/
872 (abc)
873 (abc(def)xyz)
874 *** Failers
875 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
876
877 /(abc){1,3}+/D
878
879 /a+?+/
880
881 /a{2,3}?+b/
882
883 /(?U)a+?+/
884
885 /a{2,3}?+b/U
886
887 /x(?U)a++b/D
888 xaaaab
889
890 /(?U)xa++b/D
891 xaaaab
892
893 /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/D
894
895 /^x(?U)a+b/D
896
897 /^x(?U)(a+)b/D
898
899 /[.x.]/
900
901 /[=x=]/
902
903 /[:x:]/
904
905 /\l/
906
907 /\L/
908
909 /\N{name}/
910
911 /\u/
912
913 /\U/
914
915 /[/
916
917 /[a-/
918
919 /[[:space:]/
920
921 /[\s]/DM
922
923 /[[:space:]]/DM
924
925 /[[:space:]abcde]/DM
926
927 /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
928 <>
929 <abc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w\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|DM
940
941 /(.*)\d+\1/I
942
943 /(.*)\d+/I
944
945 /(.*)\d+\1/Is
946
947 /(.*)\d+/Is
948
949 /(.*(xyz))\d+\2/I
950
951 /((.*))\d+\1/I
952 abc123bc
953
954 /a[b]/I
955
956 /(?=a).*/I
957
958 /(?=abc).xyz/iI
959
960 /(?=abc)(?i).xyz/I
961
962 /(?=a)(?=b)/I
963
964 /(?=.)a/I
965
966 /((?=abcda)a)/I
967
968 /((?=abcda)ab)/I
969
970 /()a/I
971
972 /(?(1)ab|ac)/I
973
974 /(?(1)abz|acz)/I
975
976 /(?(1)abz)/I
977
978 /(?(1)abz)123/I
979
980 /(a)+/I
981
982 /(a){2,3}/I
983
984 /(a)*/I
985
986 /[a]/I
987
988 /[ab]/I
989
990 /[ab]/IS
991
992 /[^a]/I
993
994 /\d456/I
995
996 /\d456/IS
997
998 /a^b/I
999
1000 /^a/mI
1001 abcde
1002 xy\nabc
1003 *** Failers
1004 xyabc
1005
1006 /c|abc/I
1007
1008 /(?i)[ab]/IS
1009
1010 /[ab](?i)cd/IS
1011
1012 /abc(?C)def/
1013 abcdef
1014 1234abcdef
1015 *** Failers
1016 abcxyz
1017 abcxyzf
1018
1019 /abc(?C)de(?C1)f/
1020 123abcdef
1021
1022 /(?C1)\dabc(?C2)def/
1023 1234abcdef
1024 *** Failers
1025 abcdef
1026
1027 /(?C255)ab/
1028
1029 /(?C256)ab/
1030
1031 /(?Cab)xx/
1032
1033 /(?C12vr)x/
1034
1035 /abc(?C)def/
1036 *** Failers
1037 \x83\x0\x61bcdef
1038
1039 /(abc)(?C)de(?C1)f/
1040 123abcdef
1041 123abcdef\C+
1042 123abcdef\C-
1043 *** Failers
1044 123abcdef\C!1
1045
1046 /(?C0)(abc(?C1))*/
1047 abcabcabc
1048 abcabc\C!1!3
1049 *** Failers
1050 abcabcabc\C!1!3
1051
1052 /(\d{3}(?C))*/
1053 123\C+
1054 123456\C+
1055 123456789\C+
1056
1057 /((xyz)(?C)p|(?C1)xyzabc)/
1058 xyzabc\C+
1059
1060 /(X)((xyz)(?C)p|(?C1)xyzabc)/
1061 Xxyzabc\C+
1062
1063 /(?=(abc))(?C)abcdef/
1064 abcdef\C+
1065
1066 /(?!(abc)(?C1)d)(?C2)abcxyz/
1067 abcxyz\C+
1068
1069 /(?<=(abc)(?C))xyz/
1070 abcxyz\C+
1071
1072 /(?C)abc/
1073
1074 /(?C)^abc/
1075
1076 /(?C)a|b/S
1077
1078 /(?R)/
1079
1080 /(a|(?R))/
1081
1082 /(ab|(bc|(de|(?R))))/
1083
1084 /x(ab|(bc|(de|(?R))))/
1085 xab
1086 xbc
1087 xde
1088 xxab
1089 xxxab
1090 *** Failers
1091 xyab
1092
1093 /(ab|(bc|(de|(?1))))/
1094
1095 /x(ab|(bc|(de|(?1)x)x)x)/
1096
1097 /^([^()]|\((?1)*\))*$/
1098 abc
1099 a(b)c
1100 a(b(c))d
1101 *** Failers)
1102 a(b(c)d
1103
1104 /^>abc>([^()]|\((?1)*\))*<xyz<$/
1105 >abc>123<xyz<
1106 >abc>1(2)3<xyz<
1107 >abc>(1(2)3)<xyz<
1108
1109 /(a(?1)b)/D
1110
1111 /(a(?1)+b)/D
1112
1113 /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/i
1114 1221
1115 Satan, oscillate my metallic sonatas!
1116 A man, a plan, a canal: Panama!
1117 Able was I ere I saw Elba.
1118 *** Failers
1119 The quick brown fox
1120
1121 /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
1122 12
1123 (((2+2)*-3)-7)
1124 -12
1125 *** Failers
1126 ((2+2)*-3)-7)
1127
1128 /^(x(y|(?1){2})z)/
1129 xyz
1130 xxyzxyzz
1131 *** Failers
1132 xxyzz
1133 xxyzxyzxyzz
1134
1135 /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
1136 <>
1137 <abcd>
1138 <abc <123> hij>
1139 <abc <def> hij>
1140 <abc<>def>
1141 <abc<>
1142 *** Failers
1143 <abc
1144
1145 /(?1)/
1146
1147 /((?2)(abc)/
1148
1149 /^(abc)def(?1)/
1150 abcdefabc
1151
1152 /^(a|b|c)=(?1)+/
1153 a=a
1154 a=b
1155 a=bc
1156
1157 /^(a|b|c)=((?1))+/
1158 a=a
1159 a=b
1160 a=bc
1161
1162 /a(?P<name1>b|c)d(?P<longername2>e)/D
1163 abde
1164 acde
1165
1166 /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/D
1167
1168 /(?P<a>a)...(?P=a)bbb(?P>a)d/D
1169
1170 /^\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
1171 1221
1172 Satan, oscillate my metallic sonatas!
1173 A man, a plan, a canal: Panama!
1174 Able was I ere I saw Elba.
1175 *** Failers
1176 The quick brown fox
1177
1178 /((?(R)a|b))\1(?1)?/
1179 bb
1180 bbaa
1181
1182 /(.*)a/sI
1183
1184 /(.*)a\1/sI
1185
1186 /(.*)a(b)\2/sI
1187
1188 /((.*)a|(.*)b)z/sI
1189
1190 /((.*)a|(.*)b)z\1/sI
1191
1192 /((.*)a|(.*)b)z\2/sI
1193
1194 /((.*)a|(.*)b)z\3/sI
1195
1196 /((.*)a|^(.*)b)z\3/sI
1197
1198 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/sI
1199
1200 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/sI
1201
1202 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/sI
1203
1204 /(a)(bc)/ND
1205 abc
1206
1207 /(?P<one>a)(bc)/ND
1208 abc
1209
1210 /(a)(?P<named>bc)/ND
1211
1212 /(a+)*zz/
1213 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
1214 aaaaaaaaaaaaaz\M
1215
1216 /(aaa(?C1)bbb|ab)/
1217 aaabbb
1218 aaabbb\C*0
1219 aaabbb\C*1
1220 aaabbb\C*-1
1221
1222 /ab(?P<one>cd)ef(?P<two>gh)/
1223 abcdefgh
1224 abcdefgh\C1\Gtwo
1225 abcdefgh\Cone\Ctwo
1226 abcdefgh\Cthree
1227
1228 /(?P<Tes>)(?P<Test>)/D
1229
1230 /(?P<Test>)(?P<Tes>)/D
1231
1232 /(?P<Z>zz)(?P<A>aa)/
1233 zzaa\CZ
1234 zzaa\CA
1235
1236 /(?P<x>eks)(?P<x>eccs)/
1237
1238 /(?P<abc>abc(?P<def>def)(?P<abc>xyz))/
1239
1240 "\[((?P<elem>\d+)(,(?P>elem))*)\]"
1241 [10,20,30,5,5,4,4,2,43,23,4234]
1242 *** Failers
1243 []
1244
1245 "\[((?P<elem>\d+)(,(?P>elem))*)?\]"
1246 [10,20,30,5,5,4,4,2,43,23,4234]
1247 []
1248
1249 /(a(b(?2)c))?/D
1250
1251 /(a(b(?2)c))*/D
1252
1253 /(a(b(?2)c)){0,2}/D
1254
1255 /[ab]{1}+/D
1256
1257 /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/i
1258 Baby Bjorn Active Carrier - With free SHIPPING!!
1259
1260 /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/iS
1261 Baby Bjorn Active Carrier - With free SHIPPING!!
1262
1263 /a*.*b/SD
1264
1265 /(a|b)*.?c/SD
1266
1267 /abc(?C255)de(?C)f/D
1268
1269 /abcde/CD
1270 abcde
1271 abcdfe
1272
1273 /a*b/CD
1274 ab
1275 aaaab
1276 aaaacb
1277
1278 /a+b/CD
1279 ab
1280 aaaab
1281 aaaacb
1282
1283 /(abc|def)x/CD
1284 abcx
1285 defx
1286 abcdefzx
1287
1288 /(ab|cd){3,4}/C
1289 ababab
1290 abcdabcd
1291 abcdcdcdcdcd
1292
1293 /([ab]{,4}c|xy)/CD
1294 Note: that { does NOT introduce a quantifier
1295
1296 /([ab]{1,4}c|xy){4,5}?123/CD
1297 aacaacaacaacaac123
1298
1299 /\b.*/I
1300 ab cd\>1
1301
1302 /\b.*/Is
1303 ab cd\>1
1304
1305 /(?!.bcd).*/I
1306 Xbcd12345
1307
1308 /abcde/
1309 ab\P
1310 abc\P
1311 abcd\P
1312 abcde\P
1313 the quick brown abc\P
1314 ** Failers\P
1315 the quick brown abxyz fox\P
1316
1317 "^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"
1318 13/05/04\P
1319 13/5/2004\P
1320 02/05/09\P
1321 1\P
1322 1/2\P
1323 1/2/0\P
1324 1/2/04\P
1325 0\P
1326 02/\P
1327 02/0\P
1328 02/1\P
1329 ** Failers\P
1330 \P
1331 123\P
1332 33/4/04\P
1333 3/13/04\P
1334 0/1/2003\P
1335 0/\P
1336 02/0/\P
1337 02/13\P
1338
1339 /0{0,2}ABC/I
1340
1341 /\d{3,}ABC/I
1342
1343 /\d*ABC/I
1344
1345 /[abc]+DE/I
1346
1347 /[abc]?123/
1348 123\P
1349 a\P
1350 b\P
1351 c\P
1352 c12\P
1353 c123\P
1354
1355 /^(?:\d){3,5}X/
1356 1\P
1357 123\P
1358 123X
1359 1234\P
1360 1234X
1361 12345\P
1362 12345X
1363 *** Failers
1364 1X
1365 123456\P
1366
1367 /abc/>testsavedregex
1368 <testsavedregex
1369 abc
1370 ** Failers
1371 bca
1372
1373 /abc/F>testsavedregex
1374 <testsavedregex
1375 abc
1376 ** Failers
1377 bca
1378
1379 /(a|b)/S>testsavedregex
1380 <testsavedregex
1381 abc
1382 ** Failers
1383 def
1384
1385 /(a|b)/SF>testsavedregex
1386 <testsavedregex
1387 abc
1388 ** Failers
1389 def
1390
1391 ~<(\w+)/?>(.)*</(\1)>~smg
1392 <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
1393
1394 /^a/IF
1395
1396 / End of testinput2 /

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12