/[pcre]/code/tags/pcre-3.2/testdata/testinput3
ViewVC logotype

Contents of /code/tags/pcre-3.2/testdata/testinput3

Parent Directory Parent Directory | Revision Log Revision Log


Revision 48 - (show annotations) (download)
Sat Feb 24 21:39:31 2007 UTC (7 years, 5 months ago) by nigel
File size: 17736 byte(s)
Tag code/trunk as code/tags/pcre-3.2.

1 /(?<!bar)foo/
2 foo
3 catfood
4 arfootle
5 rfoosh
6 *** Failers
7 barfoo
8 towbarfoo
9
10 /\w{3}(?<!bar)foo/
11 catfood
12 *** Failers
13 foo
14 barfoo
15 towbarfoo
16
17 /(?<=(foo)a)bar/
18 fooabar
19 *** Failers
20 bar
21 foobbar
22
23 /\Aabc\z/m
24 abc
25 *** Failers
26 abc\n
27 qqq\nabc
28 abc\nzzz
29 qqq\nabc\nzzz
30
31 "(?>.*/)foo"
32 /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
33
34 "(?>.*/)foo"
35 /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
36
37 /(?>(\.\d\d[1-9]?))\d+/
38 1.230003938
39 1.875000282
40 *** Failers
41 1.235
42
43 /^((?>\w+)|(?>\s+))*$/
44 now is the time for all good men to come to the aid of the party
45 *** Failers
46 this is not a line with only words and spaces!
47
48 /(\d+)(\w)/
49 12345a
50 12345+
51
52 /((?>\d+))(\w)/
53 12345a
54 *** Failers
55 12345+
56
57 /(?>a+)b/
58 aaab
59
60 /((?>a+)b)/
61 aaab
62
63 /(?>(a+))b/
64 aaab
65
66 /(?>b)+/
67 aaabbbccc
68
69 /(?>a+|b+|c+)*c/
70 aaabbbbccccd
71
72 /((?>[^()]+)|\([^()]*\))+/
73 ((abc(ade)ufh()()x
74
75 /\(((?>[^()]+)|\([^()]+\))+\)/
76 (abc)
77 (abc(def)xyz)
78 *** Failers
79 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
80
81 /a(?-i)b/i
82 ab
83 *** Failers
84 Ab
85 aB
86 AB
87
88 /(a (?x)b c)d e/
89 a bcd e
90 *** Failers
91 a b cd e
92 abcd e
93 a bcde
94
95 /(a b(?x)c d (?-x)e f)/
96 a bcde f
97 *** Failers
98 abcdef
99
100 /(a(?i)b)c/
101 abc
102 aBc
103 *** Failers
104 abC
105 aBC
106 Abc
107 ABc
108 ABC
109 AbC
110
111 /a(?i:b)c/
112 abc
113 aBc
114 *** Failers
115 ABC
116 abC
117 aBC
118
119 /a(?i:b)*c/
120 aBc
121 aBBc
122 *** Failers
123 aBC
124 aBBC
125
126 /a(?=b(?i)c)\w\wd/
127 abcd
128 abCd
129 *** Failers
130 aBCd
131 abcD
132
133 /(?s-i:more.*than).*million/i
134 more than million
135 more than MILLION
136 more \n than Million
137 *** Failers
138 MORE THAN MILLION
139 more \n than \n million
140
141 /(?:(?s-i)more.*than).*million/i
142 more than million
143 more than MILLION
144 more \n than Million
145 *** Failers
146 MORE THAN MILLION
147 more \n than \n million
148
149 /(?>a(?i)b+)+c/
150 abc
151 aBbc
152 aBBc
153 *** Failers
154 Abc
155 abAb
156 abbC
157
158 /(?=a(?i)b)\w\wc/
159 abc
160 aBc
161 *** Failers
162 Ab
163 abC
164 aBC
165
166 /(?<=a(?i)b)(\w\w)c/
167 abxxc
168 aBxxc
169 *** Failers
170 Abxxc
171 ABxxc
172 abxxC
173
174 /(?:(a)|b)(?(1)A|B)/
175 aA
176 bB
177 *** Failers
178 aB
179 bA
180
181 /^(a)?(?(1)a|b)+$/
182 aa
183 b
184 bb
185 *** Failers
186 ab
187
188 /^(?(?=abc)\w{3}:|\d\d)$/
189 abc:
190 12
191 *** Failers
192 123
193 xyz
194
195 /^(?(?!abc)\d\d|\w{3}:)$/
196 abc:
197 12
198 *** Failers
199 123
200 xyz
201
202 /(?(?<=foo)bar|cat)/
203 foobar
204 cat
205 fcat
206 focat
207 *** Failers
208 foocat
209
210 /(?(?<!foo)cat|bar)/
211 foobar
212 cat
213 fcat
214 focat
215 *** Failers
216 foocat
217
218 /( \( )? [^()]+ (?(1) \) |) /x
219 abcd
220 (abcd)
221 the quick (abcd) fox
222 (abcd
223
224 /( \( )? [^()]+ (?(1) \) ) /x
225 abcd
226 (abcd)
227 the quick (abcd) fox
228 (abcd
229
230 /^(?(2)a|(1)(2))+$/
231 12
232 12a
233 12aa
234 *** Failers
235 1234
236
237 /((?i)blah)\s+\1/
238 blah blah
239 BLAH BLAH
240 Blah Blah
241 blaH blaH
242 *** Failers
243 blah BLAH
244 Blah blah
245 blaH blah
246
247 /((?i)blah)\s+(?i:\1)/
248 blah blah
249 BLAH BLAH
250 Blah Blah
251 blaH blaH
252 blah BLAH
253 Blah blah
254 blaH blah
255
256 /(?>a*)*/
257 a
258 aa
259 aaaa
260
261 /(abc|)+/
262 abc
263 abcabc
264 abcabcabc
265 xyz
266
267 /([a]*)*/
268 a
269 aaaaa
270
271 /([ab]*)*/
272 a
273 b
274 ababab
275 aaaabcde
276 bbbb
277
278 /([^a]*)*/
279 b
280 bbbb
281 aaa
282
283 /([^ab]*)*/
284 cccc
285 abab
286
287 /([a]*?)*/
288 a
289 aaaa
290
291 /([ab]*?)*/
292 a
293 b
294 abab
295 baba
296
297 /([^a]*?)*/
298 b
299 bbbb
300 aaa
301
302 /([^ab]*?)*/
303 c
304 cccc
305 baba
306
307 /(?>a*)*/
308 a
309 aaabcde
310
311 /((?>a*))*/
312 aaaaa
313 aabbaa
314
315 /((?>a*?))*/
316 aaaaa
317 aabbaa
318
319 /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
320 12-sep-98
321 12-09-98
322 *** Failers
323 sep-12-98
324
325 /(?<=(foo))bar\1/
326 foobarfoo
327 foobarfootling
328 *** Failers
329 foobar
330 barfoo
331
332 /(?i:saturday|sunday)/
333 saturday
334 sunday
335 Saturday
336 Sunday
337 SATURDAY
338 SUNDAY
339 SunDay
340
341 /(a(?i)bc|BB)x/
342 abcx
343 aBCx
344 bbx
345 BBx
346 *** Failers
347 abcX
348 aBCX
349 bbX
350 BBX
351
352 /^([ab](?i)[cd]|[ef])/
353 ac
354 aC
355 bD
356 elephant
357 Europe
358 frog
359 France
360 *** Failers
361 Africa
362
363 /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
364 ab
365 aBd
366 xy
367 xY
368 zebra
369 Zambesi
370 *** Failers
371 aCD
372 XY
373
374 /(?<=foo\n)^bar/m
375 foo\nbar
376 *** Failers
377 bar
378 baz\nbar
379
380 /(?<=(?<!foo)bar)baz/
381 barbaz
382 barbarbaz
383 koobarbaz
384 *** Failers
385 baz
386 foobarbaz
387
388 /The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/
389 /it wrong; it sets $1 to aaa rather than aa. Compare the following test,/
390 /where it does set $1 to aa when matching aaaaaa./
391
392 /^(a\1?){4}$/
393 a
394 aa
395 aaa
396 aaaa
397 aaaaa
398 aaaaaaa
399 aaaaaaaa
400 aaaaaaaaa
401 aaaaaaaaaa
402 aaaaaaaaaaa
403 aaaaaaaaaaaa
404 aaaaaaaaaaaaa
405 aaaaaaaaaaaaaa
406 aaaaaaaaaaaaaaa
407 aaaaaaaaaaaaaaaa
408
409 /^(a\1?)(a\1?)(a\2?)(a\3?)$/
410 a
411 aa
412 aaa
413 aaaa
414 aaaaa
415 aaaaaa
416 aaaaaaa
417 aaaaaaaa
418 aaaaaaaaa
419 aaaaaaaaaa
420 aaaaaaaaaaa
421 aaaaaaaaaaaa
422 aaaaaaaaaaaaa
423 aaaaaaaaaaaaaa
424 aaaaaaaaaaaaaaa
425 aaaaaaaaaaaaaaaa
426
427 /The following tests are taken from the Perl 5.005 test suite; some of them/
428 /are compatible with 5.004, but I'd rather not have to sort them out./
429
430 /abc/
431 abc
432 xabcy
433 ababc
434 *** Failers
435 xbc
436 axc
437 abx
438
439 /ab*c/
440 abc
441
442 /ab*bc/
443 abc
444 abbc
445 abbbbc
446
447 /.{1}/
448 abbbbc
449
450 /.{3,4}/
451 abbbbc
452
453 /ab{0,}bc/
454 abbbbc
455
456 /ab+bc/
457 abbc
458 *** Failers
459 abc
460 abq
461
462 /ab{1,}bc/
463
464 /ab+bc/
465 abbbbc
466
467 /ab{1,}bc/
468 abbbbc
469
470 /ab{1,3}bc/
471 abbbbc
472
473 /ab{3,4}bc/
474 abbbbc
475
476 /ab{4,5}bc/
477 *** Failers
478 abq
479 abbbbc
480
481 /ab?bc/
482 abbc
483 abc
484
485 /ab{0,1}bc/
486 abc
487
488 /ab?bc/
489
490 /ab?c/
491 abc
492
493 /ab{0,1}c/
494 abc
495
496 /^abc$/
497 abc
498 *** Failers
499 abbbbc
500 abcc
501
502 /^abc/
503 abcc
504
505 /^abc$/
506
507 /abc$/
508 aabc
509 *** Failers
510 aabc
511 aabcd
512
513 /^/
514 abc
515
516 /$/
517 abc
518
519 /a.c/
520 abc
521 axc
522
523 /a.*c/
524 axyzc
525
526 /a[bc]d/
527 abd
528 *** Failers
529 axyzd
530 abc
531
532 /a[b-d]e/
533 ace
534
535 /a[b-d]/
536 aac
537
538 /a[-b]/
539 a-
540
541 /a[b-]/
542 a-
543
544 /a]/
545 a]
546
547 /a[]]b/
548 a]b
549
550 /a[^bc]d/
551 aed
552 *** Failers
553 abd
554 abd
555
556 /a[^-b]c/
557 adc
558
559 /a[^]b]c/
560 adc
561 *** Failers
562 a-c
563 a]c
564
565 /\ba\b/
566 a-
567 -a
568 -a-
569
570 /\by\b/
571 *** Failers
572 xy
573 yz
574 xyz
575
576 /\Ba\B/
577 *** Failers
578 a-
579 -a
580 -a-
581
582 /\By\b/
583 xy
584
585 /\by\B/
586 yz
587
588 /\By\B/
589 xyz
590
591 /\w/
592 a
593
594 /\W/
595 -
596 *** Failers
597 -
598 a
599
600 /a\sb/
601 a b
602
603 /a\Sb/
604 a-b
605 *** Failers
606 a-b
607 a b
608
609 /\d/
610 1
611
612 /\D/
613 -
614 *** Failers
615 -
616 1
617
618 /[\w]/
619 a
620
621 /[\W]/
622 -
623 *** Failers
624 -
625 a
626
627 /a[\s]b/
628 a b
629
630 /a[\S]b/
631 a-b
632 *** Failers
633 a-b
634 a b
635
636 /[\d]/
637 1
638
639 /[\D]/
640 -
641 *** Failers
642 -
643 1
644
645 /ab|cd/
646 abc
647 abcd
648
649 /()ef/
650 def
651
652 /$b/
653
654 /a\(b/
655 a(b
656
657 /a\(*b/
658 ab
659 a((b
660
661 /a\\b/
662 a\b
663
664 /((a))/
665 abc
666
667 /(a)b(c)/
668 abc
669
670 /a+b+c/
671 aabbabc
672
673 /a{1,}b{1,}c/
674 aabbabc
675
676 /a.+?c/
677 abcabc
678
679 /(a+|b)*/
680 ab
681
682 /(a+|b){0,}/
683 ab
684
685 /(a+|b)+/
686 ab
687
688 /(a+|b){1,}/
689 ab
690
691 /(a+|b)?/
692 ab
693
694 /(a+|b){0,1}/
695 ab
696
697 /[^ab]*/
698 cde
699
700 /abc/
701 *** Failers
702 b
703
704
705 /a*/
706
707
708 /([abc])*d/
709 abbbcd
710
711 /([abc])*bcd/
712 abcd
713
714 /a|b|c|d|e/
715 e
716
717 /(a|b|c|d|e)f/
718 ef
719
720 /abcd*efg/
721 abcdefg
722
723 /ab*/
724 xabyabbbz
725 xayabbbz
726
727 /(ab|cd)e/
728 abcde
729
730 /[abhgefdc]ij/
731 hij
732
733 /^(ab|cd)e/
734
735 /(abc|)ef/
736 abcdef
737
738 /(a|b)c*d/
739 abcd
740
741 /(ab|ab*)bc/
742 abc
743
744 /a([bc]*)c*/
745 abc
746
747 /a([bc]*)(c*d)/
748 abcd
749
750 /a([bc]+)(c*d)/
751 abcd
752
753 /a([bc]*)(c+d)/
754 abcd
755
756 /a[bcd]*dcdcde/
757 adcdcde
758
759 /a[bcd]+dcdcde/
760 *** Failers
761 abcde
762 adcdcde
763
764 /(ab|a)b*c/
765 abc
766
767 /((a)(b)c)(d)/
768 abcd
769
770 /[a-zA-Z_][a-zA-Z0-9_]*/
771 alpha
772
773 /^a(bc+|b[eh])g|.h$/
774 abh
775
776 /(bc+d$|ef*g.|h?i(j|k))/
777 effgz
778 ij
779 reffgz
780 *** Failers
781 effg
782 bcdd
783
784 /((((((((((a))))))))))/
785 a
786
787 /((((((((((a))))))))))\10/
788 aa
789
790 /(((((((((a)))))))))/
791 a
792
793 /multiple words of text/
794 *** Failers
795 aa
796 uh-uh
797
798 /multiple words/
799 multiple words, yeah
800
801 /(.*)c(.*)/
802 abcde
803
804 /\((.*), (.*)\)/
805 (a, b)
806
807 /[k]/
808
809 /abcd/
810 abcd
811
812 /a(bc)d/
813 abcd
814
815 /a[-]?c/
816 ac
817
818 /(abc)\1/
819 abcabc
820
821 /([a-c]*)\1/
822 abcabc
823
824 /(a)|\1/
825 a
826 *** Failers
827 ab
828 x
829
830 /(([a-c])b*?\2)*/
831 ababbbcbc
832
833 /(([a-c])b*?\2){3}/
834 ababbbcbc
835
836 /((\3|b)\2(a)x)+/
837 aaaxabaxbaaxbbax
838
839 /((\3|b)\2(a)){2,}/
840 bbaababbabaaaaabbaaaabba
841
842 /abc/i
843 ABC
844 XABCY
845 ABABC
846 *** Failers
847 aaxabxbaxbbx
848 XBC
849 AXC
850 ABX
851
852 /ab*c/i
853 ABC
854
855 /ab*bc/i
856 ABC
857 ABBC
858
859 /ab*?bc/i
860 ABBBBC
861
862 /ab{0,}?bc/i
863 ABBBBC
864
865 /ab+?bc/i
866 ABBC
867
868 /ab+bc/i
869 *** Failers
870 ABC
871 ABQ
872
873 /ab{1,}bc/i
874
875 /ab+bc/i
876 ABBBBC
877
878 /ab{1,}?bc/i
879 ABBBBC
880
881 /ab{1,3}?bc/i
882 ABBBBC
883
884 /ab{3,4}?bc/i
885 ABBBBC
886
887 /ab{4,5}?bc/i
888 *** Failers
889 ABQ
890 ABBBBC
891
892 /ab??bc/i
893 ABBC
894 ABC
895
896 /ab{0,1}?bc/i
897 ABC
898
899 /ab??bc/i
900
901 /ab??c/i
902 ABC
903
904 /ab{0,1}?c/i
905 ABC
906
907 /^abc$/i
908 ABC
909 *** Failers
910 ABBBBC
911 ABCC
912
913 /^abc/i
914 ABCC
915
916 /^abc$/i
917
918 /abc$/i
919 AABC
920
921 /^/i
922 ABC
923
924 /$/i
925 ABC
926
927 /a.c/i
928 ABC
929 AXC
930
931 /a.*?c/i
932 AXYZC
933
934 /a.*c/i
935 *** Failers
936 AABC
937 AXYZD
938
939 /a[bc]d/i
940 ABD
941
942 /a[b-d]e/i
943 ACE
944 *** Failers
945 ABC
946 ABD
947
948 /a[b-d]/i
949 AAC
950
951 /a[-b]/i
952 A-
953
954 /a[b-]/i
955 A-
956
957 /a]/i
958 A]
959
960 /a[]]b/i
961 A]B
962
963 /a[^bc]d/i
964 AED
965
966 /a[^-b]c/i
967 ADC
968 *** Failers
969 ABD
970 A-C
971
972 /a[^]b]c/i
973 ADC
974
975 /ab|cd/i
976 ABC
977 ABCD
978
979 /()ef/i
980 DEF
981
982 /$b/i
983 *** Failers
984 A]C
985 B
986
987 /a\(b/i
988 A(B
989
990 /a\(*b/i
991 AB
992 A((B
993
994 /a\\b/i
995 A\B
996
997 /((a))/i
998 ABC
999
1000 /(a)b(c)/i
1001 ABC
1002
1003 /a+b+c/i
1004 AABBABC
1005
1006 /a{1,}b{1,}c/i
1007 AABBABC
1008
1009 /a.+?c/i
1010 ABCABC
1011
1012 /a.*?c/i
1013 ABCABC
1014
1015 /a.{0,5}?c/i
1016 ABCABC
1017
1018 /(a+|b)*/i
1019 AB
1020
1021 /(a+|b){0,}/i
1022 AB
1023
1024 /(a+|b)+/i
1025 AB
1026
1027 /(a+|b){1,}/i
1028 AB
1029
1030 /(a+|b)?/i
1031 AB
1032
1033 /(a+|b){0,1}/i
1034 AB
1035
1036 /(a+|b){0,1}?/i
1037 AB
1038
1039 /[^ab]*/i
1040 CDE
1041
1042 /abc/i
1043
1044 /a*/i
1045
1046
1047 /([abc])*d/i
1048 ABBBCD
1049
1050 /([abc])*bcd/i
1051 ABCD
1052
1053 /a|b|c|d|e/i
1054 E
1055
1056 /(a|b|c|d|e)f/i
1057 EF
1058
1059 /abcd*efg/i
1060 ABCDEFG
1061
1062 /ab*/i
1063 XABYABBBZ
1064 XAYABBBZ
1065
1066 /(ab|cd)e/i
1067 ABCDE
1068
1069 /[abhgefdc]ij/i
1070 HIJ
1071
1072 /^(ab|cd)e/i
1073 ABCDE
1074
1075 /(abc|)ef/i
1076 ABCDEF
1077
1078 /(a|b)c*d/i
1079 ABCD
1080
1081 /(ab|ab*)bc/i
1082 ABC
1083
1084 /a([bc]*)c*/i
1085 ABC
1086
1087 /a([bc]*)(c*d)/i
1088 ABCD
1089
1090 /a([bc]+)(c*d)/i
1091 ABCD
1092
1093 /a([bc]*)(c+d)/i
1094 ABCD
1095
1096 /a[bcd]*dcdcde/i
1097 ADCDCDE
1098
1099 /a[bcd]+dcdcde/i
1100
1101 /(ab|a)b*c/i
1102 ABC
1103
1104 /((a)(b)c)(d)/i
1105 ABCD
1106
1107 /[a-zA-Z_][a-zA-Z0-9_]*/i
1108 ALPHA
1109
1110 /^a(bc+|b[eh])g|.h$/i
1111 ABH
1112
1113 /(bc+d$|ef*g.|h?i(j|k))/i
1114 EFFGZ
1115 IJ
1116 REFFGZ
1117 *** Failers
1118 ADCDCDE
1119 EFFG
1120 BCDD
1121
1122 /((((((((((a))))))))))/i
1123 A
1124
1125 /((((((((((a))))))))))\10/i
1126 AA
1127
1128 /(((((((((a)))))))))/i
1129 A
1130
1131 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
1132 A
1133
1134 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
1135 C
1136
1137 /multiple words of text/i
1138 *** Failers
1139 AA
1140 UH-UH
1141
1142 /multiple words/i
1143 MULTIPLE WORDS, YEAH
1144
1145 /(.*)c(.*)/i
1146 ABCDE
1147
1148 /\((.*), (.*)\)/i
1149 (A, B)
1150
1151 /[k]/i
1152
1153 /abcd/i
1154 ABCD
1155
1156 /a(bc)d/i
1157 ABCD
1158
1159 /a[-]?c/i
1160 AC
1161
1162 /(abc)\1/i
1163 ABCABC
1164
1165 /([a-c]*)\1/i
1166 ABCABC
1167
1168 /a(?!b)./
1169 abad
1170
1171 /a(?=d)./
1172 abad
1173
1174 /a(?=c|d)./
1175 abad
1176
1177 /a(?:b|c|d)(.)/
1178 ace
1179
1180 /a(?:b|c|d)*(.)/
1181 ace
1182
1183 /a(?:b|c|d)+?(.)/
1184 ace
1185 acdbcdbe
1186
1187 /a(?:b|c|d)+(.)/
1188 acdbcdbe
1189
1190 /a(?:b|c|d){2}(.)/
1191 acdbcdbe
1192
1193 /a(?:b|c|d){4,5}(.)/
1194 acdbcdbe
1195
1196 /a(?:b|c|d){4,5}?(.)/
1197 acdbcdbe
1198
1199 /((foo)|(bar))*/
1200 foobar
1201
1202 /a(?:b|c|d){6,7}(.)/
1203 acdbcdbe
1204
1205 /a(?:b|c|d){6,7}?(.)/
1206 acdbcdbe
1207
1208 /a(?:b|c|d){5,6}(.)/
1209 acdbcdbe
1210
1211 /a(?:b|c|d){5,6}?(.)/
1212 acdbcdbe
1213
1214 /a(?:b|c|d){5,7}(.)/
1215 acdbcdbe
1216
1217 /a(?:b|c|d){5,7}?(.)/
1218 acdbcdbe
1219
1220 /a(?:b|(c|e){1,2}?|d)+?(.)/
1221 ace
1222
1223 /^(.+)?B/
1224 AB
1225
1226 /^([^a-z])|(\^)$/
1227 .
1228
1229 /^[<>]&/
1230 <&OUT
1231
1232 /^(a\1?){4}$/
1233 aaaaaaaaaa
1234 *** Failers
1235 AB
1236 aaaaaaaaa
1237 aaaaaaaaaaa
1238
1239 /^(a(?(1)\1)){4}$/
1240 aaaaaaaaaa
1241 *** Failers
1242 aaaaaaaaa
1243 aaaaaaaaaaa
1244
1245 /(?:(f)(o)(o)|(b)(a)(r))*/
1246 foobar
1247
1248 /(?<=a)b/
1249 ab
1250 *** Failers
1251 cb
1252 b
1253
1254 /(?<!c)b/
1255 ab
1256 b
1257 b
1258
1259 /(?:..)*a/
1260 aba
1261
1262 /(?:..)*?a/
1263 aba
1264
1265 /^(?:b|a(?=(.)))*\1/
1266 abc
1267
1268 /^(){3,5}/
1269 abc
1270
1271 /^(a+)*ax/
1272 aax
1273
1274 /^((a|b)+)*ax/
1275 aax
1276
1277 /^((a|bc)+)*ax/
1278 aax
1279
1280 /(a|x)*ab/
1281 cab
1282
1283 /(a)*ab/
1284 cab
1285
1286 /(?:(?i)a)b/
1287 ab
1288
1289 /((?i)a)b/
1290 ab
1291
1292 /(?:(?i)a)b/
1293 Ab
1294
1295 /((?i)a)b/
1296 Ab
1297
1298 /(?:(?i)a)b/
1299 *** Failers
1300 cb
1301 aB
1302
1303 /((?i)a)b/
1304
1305 /(?i:a)b/
1306 ab
1307
1308 /((?i:a))b/
1309 ab
1310
1311 /(?i:a)b/
1312 Ab
1313
1314 /((?i:a))b/
1315 Ab
1316
1317 /(?i:a)b/
1318 *** Failers
1319 aB
1320 aB
1321
1322 /((?i:a))b/
1323
1324 /(?:(?-i)a)b/i
1325 ab
1326
1327 /((?-i)a)b/i
1328 ab
1329
1330 /(?:(?-i)a)b/i
1331 aB
1332
1333 /((?-i)a)b/i
1334 aB
1335
1336 /(?:(?-i)a)b/i
1337 *** Failers
1338 aB
1339 Ab
1340
1341 /((?-i)a)b/i
1342
1343 /(?:(?-i)a)b/i
1344 aB
1345
1346 /((?-i)a)b/i
1347 aB
1348
1349 /(?:(?-i)a)b/i
1350 *** Failers
1351 Ab
1352 AB
1353
1354 /((?-i)a)b/i
1355
1356 /(?-i:a)b/i
1357 ab
1358
1359 /((?-i:a))b/i
1360 ab
1361
1362 /(?-i:a)b/i
1363 aB
1364
1365 /((?-i:a))b/i
1366 aB
1367
1368 /(?-i:a)b/i
1369 *** Failers
1370 AB
1371 Ab
1372
1373 /((?-i:a))b/i
1374
1375 /(?-i:a)b/i
1376 aB
1377
1378 /((?-i:a))b/i
1379 aB
1380
1381 /(?-i:a)b/i
1382 *** Failers
1383 Ab
1384 AB
1385
1386 /((?-i:a))b/i
1387
1388 /((?-i:a.))b/i
1389 *** Failers
1390 AB
1391 a\nB
1392
1393 /((?s-i:a.))b/i
1394 a\nB
1395
1396 /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
1397 cabbbb
1398
1399 /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
1400 caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
1401
1402 /(ab)\d\1/i
1403 Ab4ab
1404 ab4Ab
1405
1406 /foo\w*\d{4}baz/
1407 foobar1234baz
1408
1409 /x(~~)*(?:(?:F)?)?/
1410 x~~
1411
1412 /^a(?#xxx){3}c/
1413 aaac
1414
1415 /^a (?#xxx) (?#yyy) {3}c/x
1416 aaac
1417
1418 /(?<![cd])b/
1419 *** Failers
1420 B\nB
1421 dbcb
1422
1423 /(?<![cd])[ab]/
1424 dbaacb
1425
1426 /(?<!(c|d))b/
1427
1428 /(?<!(c|d))[ab]/
1429 dbaacb
1430
1431 /(?<!cd)[ab]/
1432 cdaccb
1433
1434 /^(?:a?b?)*$/
1435 *** Failers
1436 dbcb
1437 a--
1438
1439 /((?s)^a(.))((?m)^b$)/
1440 a\nb\nc\n
1441
1442 /((?m)^b$)/
1443 a\nb\nc\n
1444
1445 /(?m)^b/
1446 a\nb\n
1447
1448 /(?m)^(b)/
1449 a\nb\n
1450
1451 /((?m)^b)/
1452 a\nb\n
1453
1454 /\n((?m)^b)/
1455 a\nb\n
1456
1457 /((?s).)c(?!.)/
1458 a\nb\nc\n
1459 a\nb\nc\n
1460
1461 /((?s)b.)c(?!.)/
1462 a\nb\nc\n
1463 a\nb\nc\n
1464
1465 /^b/
1466
1467 /()^b/
1468 *** Failers
1469 a\nb\nc\n
1470 a\nb\nc\n
1471
1472 /((?m)^b)/
1473 a\nb\nc\n
1474
1475 /(?(1)a|b)/
1476
1477 /(?(1)b|a)/
1478 a
1479
1480 /(x)?(?(1)a|b)/
1481 *** Failers
1482 a
1483 a
1484
1485 /(x)?(?(1)b|a)/
1486 a
1487
1488 /()?(?(1)b|a)/
1489 a
1490
1491 /()(?(1)b|a)/
1492
1493 /()?(?(1)a|b)/
1494 a
1495
1496 /^(\()?blah(?(1)(\)))$/
1497 (blah)
1498 blah
1499 *** Failers
1500 a
1501 blah)
1502 (blah
1503
1504 /^(\(+)?blah(?(1)(\)))$/
1505 (blah)
1506 blah
1507 *** Failers
1508 blah)
1509 (blah
1510
1511 /(?(?!a)a|b)/
1512
1513 /(?(?!a)b|a)/
1514 a
1515
1516 /(?(?=a)b|a)/
1517 *** Failers
1518 a
1519 a
1520
1521 /(?(?=a)a|b)/
1522 a
1523
1524 /(?=(a+?))(\1ab)/
1525 aaab
1526
1527 /^(?=(a+?))\1ab/
1528
1529 /(\w+:)+/
1530 one:
1531
1532 /$(?<=^(a))/
1533 a
1534
1535 /(?=(a+?))(\1ab)/
1536 aaab
1537
1538 /^(?=(a+?))\1ab/
1539 *** Failers
1540 aaab
1541 aaab
1542
1543 /([\w:]+::)?(\w+)$/
1544 abcd
1545 xy:z:::abcd
1546
1547 /^[^bcd]*(c+)/
1548 aexycd
1549
1550 /(a*)b+/
1551 caab
1552
1553 /([\w:]+::)?(\w+)$/
1554 abcd
1555 xy:z:::abcd
1556 *** Failers
1557 abcd:
1558 abcd:
1559
1560 /^[^bcd]*(c+)/
1561 aexycd
1562
1563 /(>a+)ab/
1564
1565 /(?>a+)b/
1566 aaab
1567
1568 /([[:]+)/
1569 a:[b]:
1570
1571 /([[=]+)/
1572 a=[b]=
1573
1574 /([[.]+)/
1575 a.[b].
1576
1577 /((?>a+)b)/
1578 aaab
1579
1580 /(?>(a+))b/
1581 aaab
1582
1583 /((?>[^()]+)|\([^()]*\))+/
1584 ((abc(ade)ufh()()x
1585
1586 /a\Z/
1587 *** Failers
1588 aaab
1589 a\nb\n
1590
1591 /b\Z/
1592 a\nb\n
1593
1594 /b\z/
1595
1596 /b\Z/
1597 a\nb
1598
1599 /b\z/
1600 a\nb
1601 *** Failers
1602
1603 /^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
1604 a
1605 abc
1606 a-b
1607 0-9
1608 a.b
1609 5.6.7
1610 the.quick.brown.fox
1611 a100.b200.300c
1612 12-ab.1245
1613 ***Failers
1614 \
1615 .a
1616 -a
1617 a-
1618 a.
1619 a_b
1620 a.-
1621 a..
1622 ab..bc
1623 the.quick.brown.fox-
1624 the.quick.brown.fox.
1625 the.quick.brown.fox_
1626 the.quick.brown.fox+
1627
1628 /(?>.*)(?<=(abcd|wxyz))/
1629 alphabetabcd
1630 endingwxyz
1631 *** Failers
1632 a rather long string that doesn't end with one of them
1633
1634 /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
1635 word cat dog elephant mussel cow horse canary baboon snake shark otherword
1636 word cat dog elephant mussel cow horse canary baboon snake shark
1637
1638 /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
1639 word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
1640
1641 /(?<=\d{3}(?!999))foo/
1642 999foo
1643 123999foo
1644 *** Failers
1645 123abcfoo
1646
1647 /(?<=(?!...999)\d{3})foo/
1648 999foo
1649 123999foo
1650 *** Failers
1651 123abcfoo
1652
1653 /(?<=\d{3}(?!999)...)foo/
1654 123abcfoo
1655 123456foo
1656 *** Failers
1657 123999foo
1658
1659 /(?<=\d{3}...)(?<!999)foo/
1660 123abcfoo
1661 123456foo
1662 *** Failers
1663 123999foo
1664
1665 /<a[\s]+href[\s]*=[\s]* # find <a href=
1666 ([\"\'])? # find single or double quote
1667 (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
1668 # quote, otherwise match up to next space
1669 /isx
1670 <a href=abcd xyz
1671 <a href=\"abcd xyz pqr\" cats
1672 <a href=\'abcd xyz pqr\' cats
1673
1674 /<a\s+href\s*=\s* # find <a href=
1675 (["'])? # find single or double quote
1676 (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
1677 # quote, otherwise match up to next space
1678 /isx
1679 <a href=abcd xyz
1680 <a href=\"abcd xyz pqr\" cats
1681 <a href = \'abcd xyz pqr\' cats
1682
1683 /<a\s+href(?>\s*)=(?>\s*) # find <a href=
1684 (["'])? # find single or double quote
1685 (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
1686 # quote, otherwise match up to next space
1687 /isx
1688 <a href=abcd xyz
1689 <a href=\"abcd xyz pqr\" cats
1690 <a href = \'abcd xyz pqr\' cats
1691
1692 /((Z)+|A)*/
1693 ZABCDEFG
1694
1695 /(Z()|A)*/
1696 ZABCDEFG
1697
1698 /(Z(())|A)*/
1699 ZABCDEFG
1700
1701 /((?>Z)+|A)*/
1702 ZABCDEFG
1703
1704 /((?>)+|A)*/
1705 ZABCDEFG
1706
1707 /a*/g
1708 abbab
1709
1710 / End of test input /

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12