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

Contents of /code/trunk/testdata/testinput7

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91 - (hide annotations) (download)
Sat Feb 24 21:41:34 2007 UTC (7 years, 8 months ago) by nigel
File size: 75934 byte(s)
Load pcre-6.7 into code/trunk.

1 nigel 77 /abc/
2     abc
3    
4     /ab*c/
5     abc
6     abbbbc
7     ac
8    
9     /ab+c/
10     abc
11     abbbbbbc
12     *** Failers
13     ac
14     ab
15    
16     /a*/
17     a
18     aaaaaaaaaaaaaaaaa
19     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
20     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
21    
22     /(a|abcd|african)/
23     a
24     abcd
25     african
26    
27     /^abc/
28     abcdef
29     *** Failers
30     xyzabc
31     xyz\nabc
32    
33     /^abc/m
34     abcdef
35     xyz\nabc
36     *** Failers
37     xyzabc
38    
39     /\Aabc/
40     abcdef
41     *** Failers
42     xyzabc
43     xyz\nabc
44    
45     /\Aabc/m
46     abcdef
47     *** Failers
48     xyzabc
49     xyz\nabc
50    
51     /\Gabc/
52     abcdef
53     xyzabc\>3
54     *** Failers
55     xyzabc
56     xyzabc\>2
57    
58     /x\dy\Dz/
59     x9yzz
60     x0y+z
61     *** Failers
62     xyz
63     xxy0z
64    
65     /x\sy\Sz/
66     x yzz
67     x y+z
68     *** Failers
69     xyz
70     xxyyz
71    
72     /x\wy\Wz/
73     xxy+z
74     *** Failers
75     xxy0z
76     x+y+z
77    
78     /x.y/
79     x+y
80     x-y
81     *** Failers
82     x\ny
83    
84     /x.y/s
85     x+y
86     x-y
87     x\ny
88    
89     /(a.b(?s)c.d|x.y)p.q/
90     a+bc+dp+q
91     a+bc\ndp+q
92     x\nyp+q
93     *** Failers
94     a\nbc\ndp+q
95     a+bc\ndp\nq
96     x\nyp\nq
97    
98     /a\d\z/
99     ba0
100     *** Failers
101     ba0\n
102     ba0\ncd
103    
104     /a\d\z/m
105     ba0
106     *** Failers
107     ba0\n
108     ba0\ncd
109    
110     /a\d\Z/
111     ba0
112     ba0\n
113     *** Failers
114     ba0\ncd
115    
116     /a\d\Z/m
117     ba0
118     ba0\n
119     *** Failers
120     ba0\ncd
121    
122     /a\d$/
123     ba0
124     ba0\n
125     *** Failers
126     ba0\ncd
127    
128     /a\d$/m
129     ba0
130     ba0\n
131     ba0\ncd
132     *** Failers
133    
134     /abc/i
135     abc
136     aBc
137     ABC
138    
139     /[^a]/
140     abcd
141    
142     /ab?\w/
143     abz
144     abbz
145     azz
146    
147     /x{0,3}yz/
148     ayzq
149     axyzq
150     axxyz
151     axxxyzq
152     axxxxyzq
153     *** Failers
154     ax
155     axx
156    
157     /x{3}yz/
158     axxxyzq
159     axxxxyzq
160     *** Failers
161     ax
162     axx
163     ayzq
164     axyzq
165     axxyz
166    
167     /x{2,3}yz/
168     axxyz
169     axxxyzq
170     axxxxyzq
171     *** Failers
172     ax
173     axx
174     ayzq
175     axyzq
176    
177     /[^a]+/
178     bac
179     bcdefax
180     *** Failers
181     aaaaa
182    
183     /[^a]*/
184     bac
185     bcdefax
186     *** Failers
187     aaaaa
188    
189     /[^a]{3,5}/
190     xyz
191     awxyza
192     abcdefa
193     abcdefghijk
194     *** Failers
195     axya
196     axa
197     aaaaa
198    
199     /\d*/
200     1234b567
201     xyz
202    
203     /\D*/
204     a1234b567
205     xyz
206    
207     /\d+/
208     ab1234c56
209     *** Failers
210     xyz
211    
212     /\D+/
213     ab123c56
214     *** Failers
215     789
216    
217     /\d?A/
218     045ABC
219     ABC
220     *** Failers
221     XYZ
222    
223     /\D?A/
224     ABC
225     BAC
226     9ABC
227     *** Failers
228    
229     /a+/
230     aaaa
231    
232     /^.*xyz/
233     xyz
234     ggggggggxyz
235    
236     /^.+xyz/
237     abcdxyz
238     axyz
239     *** Failers
240     xyz
241    
242     /^.?xyz/
243     xyz
244     cxyz
245    
246     /^\d{2,3}X/
247     12X
248     123X
249     *** Failers
250     X
251     1X
252     1234X
253    
254     /^[abcd]\d/
255     a45
256     b93
257     c99z
258     d04
259     *** Failers
260     e45
261     abcd
262     abcd1234
263     1234
264    
265     /^[abcd]*\d/
266     a45
267     b93
268     c99z
269     d04
270     abcd1234
271     1234
272     *** Failers
273     e45
274     abcd
275    
276     /^[abcd]+\d/
277     a45
278     b93
279     c99z
280     d04
281     abcd1234
282     *** Failers
283     1234
284     e45
285     abcd
286    
287     /^a+X/
288     aX
289     aaX
290    
291     /^[abcd]?\d/
292     a45
293     b93
294     c99z
295     d04
296     1234
297     *** Failers
298     abcd1234
299     e45
300    
301     /^[abcd]{2,3}\d/
302     ab45
303     bcd93
304     *** Failers
305     1234
306     a36
307     abcd1234
308     ee45
309    
310     /^(abc)*\d/
311     abc45
312     abcabcabc45
313     42xyz
314     *** Failers
315    
316     /^(abc)+\d/
317     abc45
318     abcabcabc45
319     *** Failers
320     42xyz
321    
322     /^(abc)?\d/
323     abc45
324     42xyz
325     *** Failers
326     abcabcabc45
327    
328     /^(abc){2,3}\d/
329     abcabc45
330     abcabcabc45
331     *** Failers
332     abcabcabcabc45
333     abc45
334     42xyz
335    
336     /1(abc|xyz)2(?1)3/
337     1abc2abc3456
338     1abc2xyz3456
339    
340     /^(a*\w|ab)=(a*\w|ab)/
341     ab=ab
342    
343     /^(a*\w|ab)=(?1)/
344     ab=ab
345    
346     /^([^()]|\((?1)*\))*$/
347     abc
348     a(b)c
349     a(b(c))d
350     *** Failers)
351     a(b(c)d
352    
353     /^>abc>([^()]|\((?1)*\))*<xyz<$/
354     >abc>123<xyz<
355     >abc>1(2)3<xyz<
356     >abc>(1(2)3)<xyz<
357    
358     /^(?>a*)\d/
359     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
360     *** Failers
361     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
362    
363     /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
364     <>
365     <abcd>
366     <abc <123> hij>
367     <abc <def> hij>
368     <abc<>def>
369     <abc<>
370     *** Failers
371     <abc
372    
373     /^(?(?=abc)\w{3}:|\d\d)$/
374     abc:
375     12
376     *** Failers
377     123
378     xyz
379    
380     /^(?(?!abc)\d\d|\w{3}:)$/
381     abc:
382     12
383     *** Failers
384     123
385     xyz
386    
387     /^(?=abc)\w{5}:$/
388     abcde:
389     *** Failers
390     abc..
391     123
392     vwxyz
393    
394     /^(?!abc)\d\d$/
395     12
396     *** Failers
397     abcde:
398     abc..
399     123
400     vwxyz
401    
402     /(?<=abc|xy)123/
403     abc12345
404     wxy123z
405     *** Failers
406     123abc
407    
408     /(?<!abc|xy)123/
409     123abc
410     mno123456
411     *** Failers
412     abc12345
413     wxy123z
414    
415     /abc(?C1)xyz/
416     abcxyz
417     123abcxyz999
418    
419     /(ab|cd){3,4}/C
420     ababab
421     abcdabcd
422     abcdcdcdcdcd
423    
424     /^abc/
425     abcdef
426     *** Failers
427     abcdef\B
428    
429     /^(a*|xyz)/
430     bcd
431     aaabcd
432     xyz
433     xyz\N
434     *** Failers
435     bcd\N
436    
437     /xyz$/
438     xyz
439     xyz\n
440     *** Failers
441     xyz\Z
442     xyz\n\Z
443    
444     /xyz$/m
445     xyz
446     xyz\n
447     abcxyz\npqr
448     abcxyz\npqr\Z
449     xyz\n\Z
450     *** Failers
451     xyz\Z
452    
453     /\Gabc/
454     abcdef
455     defabcxyz\>3
456     *** Failers
457     defabcxyz
458    
459     /^abcdef/
460     ab\P
461     abcde\P
462     abcdef\P
463     *** Failers
464     abx\P
465    
466     /^a{2,4}\d+z/
467     a\P
468     aa\P
469     aa2\P
470     aaa\P
471     aaa23\P
472     aaaa12345\P
473     aa0z\P
474     aaaa4444444444444z\P
475     *** Failers
476     az\P
477     aaaaa\P
478     a56\P
479    
480     /^abcdef/
481     abc\P
482     def\R
483    
484     /(?<=foo)bar/
485     xyzfo\P
486 nigel 87 foob\P\>2
487 nigel 77 foobar...\R\P\>4
488     xyzfo\P
489 nigel 87 foobar\>2
490 nigel 77 *** Failers
491     xyzfo\P
492     obar\R
493    
494     /(ab*(cd|ef))+X/
495     adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
496     lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
497     cdabbbbbbbb\P\R\B\Z
498     efabbbbbbbbbbbbbbbb\P\R\B\Z
499     bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
500    
501     /(a|b)/SF>testsavedregex
502     <testsavedregex
503     abc
504     ** Failers
505     def
506    
507     /the quick brown fox/
508     the quick brown fox
509     The quick brown FOX
510     What do you know about the quick brown fox?
511     What do you know about THE QUICK BROWN FOX?
512    
513     /The quick brown fox/i
514     the quick brown fox
515     The quick brown FOX
516     What do you know about the quick brown fox?
517     What do you know about THE QUICK BROWN FOX?
518    
519     /abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
520     abcd\t\n\r\f\a\e9;\$\\?caxyz
521    
522     /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
523     abxyzpqrrrabbxyyyypqAzz
524     abxyzpqrrrabbxyyyypqAzz
525     aabxyzpqrrrabbxyyyypqAzz
526     aaabxyzpqrrrabbxyyyypqAzz
527     aaaabxyzpqrrrabbxyyyypqAzz
528     abcxyzpqrrrabbxyyyypqAzz
529     aabcxyzpqrrrabbxyyyypqAzz
530     aaabcxyzpqrrrabbxyyyypAzz
531     aaabcxyzpqrrrabbxyyyypqAzz
532     aaabcxyzpqrrrabbxyyyypqqAzz
533     aaabcxyzpqrrrabbxyyyypqqqAzz
534     aaabcxyzpqrrrabbxyyyypqqqqAzz
535     aaabcxyzpqrrrabbxyyyypqqqqqAzz
536     aaabcxyzpqrrrabbxyyyypqqqqqqAzz
537     aaaabcxyzpqrrrabbxyyyypqAzz
538     abxyzzpqrrrabbxyyyypqAzz
539     aabxyzzzpqrrrabbxyyyypqAzz
540     aaabxyzzzzpqrrrabbxyyyypqAzz
541     aaaabxyzzzzpqrrrabbxyyyypqAzz
542     abcxyzzpqrrrabbxyyyypqAzz
543     aabcxyzzzpqrrrabbxyyyypqAzz
544     aaabcxyzzzzpqrrrabbxyyyypqAzz
545     aaaabcxyzzzzpqrrrabbxyyyypqAzz
546     aaaabcxyzzzzpqrrrabbbxyyyypqAzz
547     aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
548     aaabcxyzpqrrrabbxyyyypABzz
549     aaabcxyzpqrrrabbxyyyypABBzz
550     >>>aaabxyzpqrrrabbxyyyypqAzz
551     >aaaabxyzpqrrrabbxyyyypqAzz
552     >>>>abcxyzpqrrrabbxyyyypqAzz
553     *** Failers
554     abxyzpqrrabbxyyyypqAzz
555     abxyzpqrrrrabbxyyyypqAzz
556     abxyzpqrrrabxyyyypqAzz
557     aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
558     aaaabcxyzzzzpqrrrabbbxyyypqAzz
559     aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
560    
561     /^(abc){1,2}zz/
562     abczz
563     abcabczz
564     *** Failers
565     zz
566     abcabcabczz
567     >>abczz
568    
569     /^(b+?|a){1,2}?c/
570     bc
571     bbc
572     bbbc
573     bac
574     bbac
575     aac
576     abbbbbbbbbbbc
577     bbbbbbbbbbbac
578     *** Failers
579     aaac
580     abbbbbbbbbbbac
581    
582     /^(b+|a){1,2}c/
583     bc
584     bbc
585     bbbc
586     bac
587     bbac
588     aac
589     abbbbbbbbbbbc
590     bbbbbbbbbbbac
591     *** Failers
592     aaac
593     abbbbbbbbbbbac
594    
595     /^(b+|a){1,2}?bc/
596     bbc
597    
598     /^(b*|ba){1,2}?bc/
599     babc
600     bbabc
601     bababc
602     *** Failers
603     bababbc
604     babababc
605    
606     /^(ba|b*){1,2}?bc/
607     babc
608     bbabc
609     bababc
610     *** Failers
611     bababbc
612     babababc
613    
614     /^\ca\cA\c[\c{\c:/
615     \x01\x01\e;z
616    
617     /^[ab\]cde]/
618     athing
619     bthing
620     ]thing
621     cthing
622     dthing
623     ething
624     *** Failers
625     fthing
626     [thing
627     \\thing
628    
629     /^[]cde]/
630     ]thing
631     cthing
632     dthing
633     ething
634     *** Failers
635     athing
636     fthing
637    
638     /^[^ab\]cde]/
639     fthing
640     [thing
641     \\thing
642     *** Failers
643     athing
644     bthing
645     ]thing
646     cthing
647     dthing
648     ething
649    
650     /^[^]cde]/
651     athing
652     fthing
653     *** Failers
654     ]thing
655     cthing
656     dthing
657     ething
658    
659     /^\/
660    
661    
662     /^/
663    
664    
665     /^[0-9]+$/
666     0
667     1
668     2
669     3
670     4
671     5
672     6
673     7
674     8
675     9
676     10
677     100
678     *** Failers
679     abc
680    
681     /^.*nter/
682     enter
683     inter
684     uponter
685    
686     /^xxx[0-9]+$/
687     xxx0
688     xxx1234
689     *** Failers
690     xxx
691    
692     /^.+[0-9][0-9][0-9]$/
693     x123
694     xx123
695     123456
696     *** Failers
697     123
698     x1234
699    
700     /^.+?[0-9][0-9][0-9]$/
701     x123
702     xx123
703     123456
704     *** Failers
705     123
706     x1234
707    
708     /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
709     abc!pqr=apquxz.ixr.zzz.ac.uk
710     *** Failers
711     !pqr=apquxz.ixr.zzz.ac.uk
712     abc!=apquxz.ixr.zzz.ac.uk
713     abc!pqr=apquxz:ixr.zzz.ac.uk
714     abc!pqr=apquxz.ixr.zzz.ac.ukk
715    
716     /:/
717     Well, we need a colon: somewhere
718     *** Fail if we don't
719    
720     /([\da-f:]+)$/i
721     0abc
722     abc
723     fed
724     E
725     ::
726     5f03:12C0::932e
727     fed def
728     Any old stuff
729     *** Failers
730     0zzz
731     gzzz
732     fed\x20
733     Any old rubbish
734    
735     /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
736     .1.2.3
737     A.12.123.0
738     *** Failers
739     .1.2.3333
740     1.2.3
741     1234.2.3
742    
743     /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
744     1 IN SOA non-sp1 non-sp2(
745     1 IN SOA non-sp1 non-sp2 (
746     *** Failers
747     1IN SOA non-sp1 non-sp2(
748    
749     /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
750     a.
751     Z.
752     2.
753     ab-c.pq-r.
754     sxk.zzz.ac.uk.
755     x-.y-.
756     *** Failers
757     -abc.peq.
758    
759     /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
760     *.a
761     *.b0-a
762     *.c3-b.c
763     *.c-a.b-c
764     *** Failers
765     *.0
766     *.a-
767     *.a-b.c-
768     *.c-a.0-c
769    
770     /^(?=ab(de))(abd)(e)/
771     abde
772    
773     /^(?!(ab)de|x)(abd)(f)/
774     abdf
775    
776     /^(?=(ab(cd)))(ab)/
777     abcd
778    
779     /^[\da-f](\.[\da-f])*$/i
780     a.b.c.d
781     A.B.C.D
782     a.b.c.1.2.3.C
783    
784     /^\".*\"\s*(;.*)?$/
785     \"1234\"
786     \"abcd\" ;
787     \"\" ; rhubarb
788     *** Failers
789     \"1234\" : things
790    
791     /^$/
792     \
793     *** Failers
794    
795     / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
796     ab c
797     *** Failers
798     abc
799     ab cde
800    
801     /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
802     ab c
803     *** Failers
804     abc
805     ab cde
806    
807     /^ a\ b[c ]d $/x
808     a bcd
809     a b d
810     *** Failers
811     abcd
812     ab d
813    
814     /^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
815     abcdefhijklm
816    
817     /^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
818     abcdefhijklm
819    
820     /^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
821     a+ Z0+\x08\n\x1d\x12
822    
823     /^[.^$|()*+?{,}]+/
824     .^\$(*+)|{?,?}
825    
826     /^a*\w/
827     z
828     az
829     aaaz
830     a
831     aa
832     aaaa
833     a+
834     aa+
835    
836     /^a*?\w/
837     z
838     az
839     aaaz
840     a
841     aa
842     aaaa
843     a+
844     aa+
845    
846     /^a+\w/
847     az
848     aaaz
849     aa
850     aaaa
851     aa+
852    
853     /^a+?\w/
854     az
855     aaaz
856     aa
857     aaaa
858     aa+
859    
860     /^\d{8}\w{2,}/
861     1234567890
862     12345678ab
863     12345678__
864     *** Failers
865     1234567
866    
867     /^[aeiou\d]{4,5}$/
868     uoie
869     1234
870     12345
871     aaaaa
872     *** Failers
873     123456
874    
875     /^[aeiou\d]{4,5}?/
876     uoie
877     1234
878     12345
879     aaaaa
880     123456
881    
882     /^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
883     From abcd Mon Sep 01 12:33:02 1997
884    
885     /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
886     From abcd Mon Sep 01 12:33:02 1997
887     From abcd Mon Sep 1 12:33:02 1997
888     *** Failers
889     From abcd Sep 01 12:33:02 1997
890    
891     /^12.34/s
892     12\n34
893     12\r34
894    
895     /\w+(?=\t)/
896     the quick brown\t fox
897    
898     /foo(?!bar)(.*)/
899     foobar is foolish see?
900    
901     /(?:(?!foo)...|^.{0,2})bar(.*)/
902     foobar crowbar etc
903     barrel
904     2barrel
905     A barrel
906    
907     /^(\D*)(?=\d)(?!123)/
908     abc456
909     *** Failers
910     abc123
911    
912     /^1234(?# test newlines
913     inside)/
914     1234
915    
916     /^1234 #comment in extended re
917     /x
918     1234
919    
920     /#rhubarb
921     abcd/x
922     abcd
923    
924     /^abcd#rhubarb/x
925     abcd
926    
927     /(?!^)abc/
928     the abc
929     *** Failers
930     abc
931    
932     /(?=^)abc/
933     abc
934     *** Failers
935     the abc
936    
937     /^[ab]{1,3}(ab*|b)/
938     aabbbbb
939    
940     /^[ab]{1,3}?(ab*|b)/
941     aabbbbb
942    
943     /^[ab]{1,3}?(ab*?|b)/
944     aabbbbb
945    
946     /^[ab]{1,3}(ab*?|b)/
947     aabbbbb
948    
949     / (?: [\040\t] | \(
950     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
951     \) )* # optional leading comment
952     (?: (?:
953     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
954     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
955     |
956     " (?: # opening quote...
957     [^\\\x80-\xff\n\015"] # Anything except backslash and quote
958     | # or
959     \\ [^\x80-\xff] # Escaped something (something != CR)
960     )* " # closing quote
961     ) # initial word
962     (?: (?: [\040\t] | \(
963     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
964     \) )* \. (?: [\040\t] | \(
965     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
966     \) )* (?:
967     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
968     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
969     |
970     " (?: # opening quote...
971     [^\\\x80-\xff\n\015"] # Anything except backslash and quote
972     | # or
973     \\ [^\x80-\xff] # Escaped something (something != CR)
974     )* " # closing quote
975     ) )* # further okay, if led by a period
976     (?: [\040\t] | \(
977     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
978     \) )* @ (?: [\040\t] | \(
979     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
980     \) )* (?:
981     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
982     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
983     | \[ # [
984     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
985     \] # ]
986     ) # initial subdomain
987     (?: #
988     (?: [\040\t] | \(
989     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
990     \) )* \. # if led by a period...
991     (?: [\040\t] | \(
992     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
993     \) )* (?:
994     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
995     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
996     | \[ # [
997     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
998     \] # ]
999     ) # ...further okay
1000     )*
1001     # address
1002     | # or
1003     (?:
1004     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1005     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1006     |
1007     " (?: # opening quote...
1008     [^\\\x80-\xff\n\015"] # Anything except backslash and quote
1009     | # or
1010     \\ [^\x80-\xff] # Escaped something (something != CR)
1011     )* " # closing quote
1012     ) # one word, optionally followed by....
1013     (?:
1014     [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
1015     \(
1016     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1017     \) | # comments, or...
1018    
1019     " (?: # opening quote...
1020     [^\\\x80-\xff\n\015"] # Anything except backslash and quote
1021     | # or
1022     \\ [^\x80-\xff] # Escaped something (something != CR)
1023     )* " # closing quote
1024     # quoted strings
1025     )*
1026     < (?: [\040\t] | \(
1027     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1028     \) )* # leading <
1029     (?: @ (?: [\040\t] | \(
1030     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1031     \) )* (?:
1032     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1033     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1034     | \[ # [
1035     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1036     \] # ]
1037     ) # initial subdomain
1038     (?: #
1039     (?: [\040\t] | \(
1040     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1041     \) )* \. # if led by a period...
1042     (?: [\040\t] | \(
1043     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1044     \) )* (?:
1045     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1046     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1047     | \[ # [
1048     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1049     \] # ]
1050     ) # ...further okay
1051     )*
1052    
1053     (?: (?: [\040\t] | \(
1054     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1055     \) )* , (?: [\040\t] | \(
1056     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1057     \) )* @ (?: [\040\t] | \(
1058     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1059     \) )* (?:
1060     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1061     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1062     | \[ # [
1063     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1064     \] # ]
1065     ) # initial subdomain
1066     (?: #
1067     (?: [\040\t] | \(
1068     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1069     \) )* \. # if led by a period...
1070     (?: [\040\t] | \(
1071     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1072     \) )* (?:
1073     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1074     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1075     | \[ # [
1076     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1077     \] # ]
1078     ) # ...further okay
1079     )*
1080     )* # further okay, if led by comma
1081     : # closing colon
1082     (?: [\040\t] | \(
1083     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1084     \) )* )? # optional route
1085     (?:
1086     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1087     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1088     |
1089     " (?: # opening quote...
1090     [^\\\x80-\xff\n\015"] # Anything except backslash and quote
1091     | # or
1092     \\ [^\x80-\xff] # Escaped something (something != CR)
1093     )* " # closing quote
1094     ) # initial word
1095     (?: (?: [\040\t] | \(
1096     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1097     \) )* \. (?: [\040\t] | \(
1098     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1099     \) )* (?:
1100     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1101     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1102     |
1103     " (?: # opening quote...
1104     [^\\\x80-\xff\n\015"] # Anything except backslash and quote
1105     | # or
1106     \\ [^\x80-\xff] # Escaped something (something != CR)
1107     )* " # closing quote
1108     ) )* # further okay, if led by a period
1109     (?: [\040\t] | \(
1110     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1111     \) )* @ (?: [\040\t] | \(
1112     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1113     \) )* (?:
1114     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1115     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1116     | \[ # [
1117     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1118     \] # ]
1119     ) # initial subdomain
1120     (?: #
1121     (?: [\040\t] | \(
1122     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1123     \) )* \. # if led by a period...
1124     (?: [\040\t] | \(
1125     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1126     \) )* (?:
1127     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1128     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1129     | \[ # [
1130     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1131     \] # ]
1132     ) # ...further okay
1133     )*
1134     # address spec
1135     (?: [\040\t] | \(
1136     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1137     \) )* > # trailing >
1138     # name and address
1139     ) (?: [\040\t] | \(
1140     (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
1141     \) )* # optional trailing comment
1142     /x
1143     Alan Other <user\@dom.ain>
1144     <user\@dom.ain>
1145     user\@dom.ain
1146     \"A. Other\" <user.1234\@dom.ain> (a comment)
1147     A. Other <user.1234\@dom.ain> (a comment)
1148     \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
1149     A missing angle <user\@some.where
1150     *** Failers
1151     The quick brown fox
1152    
1153     /[\040\t]* # Nab whitespace.
1154     (?:
1155     \( # (
1156     [^\\\x80-\xff\n\015()] * # normal*
1157     (?: # (
1158     (?: \\ [^\x80-\xff] |
1159     \( # (
1160     [^\\\x80-\xff\n\015()] * # normal*
1161     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1162     \) # )
1163     ) # special
1164     [^\\\x80-\xff\n\015()] * # normal*
1165     )* # )*
1166     \) # )
1167     [\040\t]* )* # If comment found, allow more spaces.
1168     # optional leading comment
1169     (?:
1170     (?:
1171     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1172     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1173     # Atom
1174     | # or
1175     " # "
1176     [^\\\x80-\xff\n\015"] * # normal
1177     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
1178     " # "
1179     # Quoted string
1180     )
1181     [\040\t]* # Nab whitespace.
1182     (?:
1183     \( # (
1184     [^\\\x80-\xff\n\015()] * # normal*
1185     (?: # (
1186     (?: \\ [^\x80-\xff] |
1187     \( # (
1188     [^\\\x80-\xff\n\015()] * # normal*
1189     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1190     \) # )
1191     ) # special
1192     [^\\\x80-\xff\n\015()] * # normal*
1193     )* # )*
1194     \) # )
1195     [\040\t]* )* # If comment found, allow more spaces.
1196     (?:
1197     \.
1198     [\040\t]* # Nab whitespace.
1199     (?:
1200     \( # (
1201     [^\\\x80-\xff\n\015()] * # normal*
1202     (?: # (
1203     (?: \\ [^\x80-\xff] |
1204     \( # (
1205     [^\\\x80-\xff\n\015()] * # normal*
1206     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1207     \) # )
1208     ) # special
1209     [^\\\x80-\xff\n\015()] * # normal*
1210     )* # )*
1211     \) # )
1212     [\040\t]* )* # If comment found, allow more spaces.
1213     (?:
1214     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1215     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1216     # Atom
1217     | # or
1218     " # "
1219     [^\\\x80-\xff\n\015"] * # normal
1220     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
1221     " # "
1222     # Quoted string
1223     )
1224     [\040\t]* # Nab whitespace.
1225     (?:
1226     \( # (
1227     [^\\\x80-\xff\n\015()] * # normal*
1228     (?: # (
1229     (?: \\ [^\x80-\xff] |
1230     \( # (
1231     [^\\\x80-\xff\n\015()] * # normal*
1232     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1233     \) # )
1234     ) # special
1235     [^\\\x80-\xff\n\015()] * # normal*
1236     )* # )*
1237     \) # )
1238     [\040\t]* )* # If comment found, allow more spaces.
1239     # additional words
1240     )*
1241     @
1242     [\040\t]* # Nab whitespace.
1243     (?:
1244     \( # (
1245     [^\\\x80-\xff\n\015()] * # normal*
1246     (?: # (
1247     (?: \\ [^\x80-\xff] |
1248     \( # (
1249     [^\\\x80-\xff\n\015()] * # normal*
1250     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1251     \) # )
1252     ) # special
1253     [^\\\x80-\xff\n\015()] * # normal*
1254     )* # )*
1255     \) # )
1256     [\040\t]* )* # If comment found, allow more spaces.
1257     (?:
1258     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1259     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1260     |
1261     \[ # [
1262     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1263     \] # ]
1264     )
1265     [\040\t]* # Nab whitespace.
1266     (?:
1267     \( # (
1268     [^\\\x80-\xff\n\015()] * # normal*
1269     (?: # (
1270     (?: \\ [^\x80-\xff] |
1271     \( # (
1272     [^\\\x80-\xff\n\015()] * # normal*
1273     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1274     \) # )
1275     ) # special
1276     [^\\\x80-\xff\n\015()] * # normal*
1277     )* # )*
1278     \) # )
1279     [\040\t]* )* # If comment found, allow more spaces.
1280     # optional trailing comments
1281     (?:
1282     \.
1283     [\040\t]* # Nab whitespace.
1284     (?:
1285     \( # (
1286     [^\\\x80-\xff\n\015()] * # normal*
1287     (?: # (
1288     (?: \\ [^\x80-\xff] |
1289     \( # (
1290     [^\\\x80-\xff\n\015()] * # normal*
1291     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1292     \) # )
1293     ) # special
1294     [^\\\x80-\xff\n\015()] * # normal*
1295     )* # )*
1296     \) # )
1297     [\040\t]* )* # If comment found, allow more spaces.
1298     (?:
1299     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1300     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1301     |
1302     \[ # [
1303     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1304     \] # ]
1305     )
1306     [\040\t]* # Nab whitespace.
1307     (?:
1308     \( # (
1309     [^\\\x80-\xff\n\015()] * # normal*
1310     (?: # (
1311     (?: \\ [^\x80-\xff] |
1312     \( # (
1313     [^\\\x80-\xff\n\015()] * # normal*
1314     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1315     \) # )
1316     ) # special
1317     [^\\\x80-\xff\n\015()] * # normal*
1318     )* # )*
1319     \) # )
1320     [\040\t]* )* # If comment found, allow more spaces.
1321     # optional trailing comments
1322     )*
1323     # address
1324     | # or
1325     (?:
1326     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1327     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1328     # Atom
1329     | # or
1330     " # "
1331     [^\\\x80-\xff\n\015"] * # normal
1332     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
1333     " # "
1334     # Quoted string
1335     )
1336     # leading word
1337     [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
1338     (?:
1339     (?:
1340     \( # (
1341     [^\\\x80-\xff\n\015()] * # normal*
1342     (?: # (
1343     (?: \\ [^\x80-\xff] |
1344     \( # (
1345     [^\\\x80-\xff\n\015()] * # normal*
1346     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1347     \) # )
1348     ) # special
1349     [^\\\x80-\xff\n\015()] * # normal*
1350     )* # )*
1351     \) # )
1352     |
1353     " # "
1354     [^\\\x80-\xff\n\015"] * # normal
1355     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
1356     " # "
1357     ) # "special" comment or quoted string
1358     [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
1359     )*
1360     <
1361     [\040\t]* # Nab whitespace.
1362     (?:
1363     \( # (
1364     [^\\\x80-\xff\n\015()] * # normal*
1365     (?: # (
1366     (?: \\ [^\x80-\xff] |
1367     \( # (
1368     [^\\\x80-\xff\n\015()] * # normal*
1369     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1370     \) # )
1371     ) # special
1372     [^\\\x80-\xff\n\015()] * # normal*
1373     )* # )*
1374     \) # )
1375     [\040\t]* )* # If comment found, allow more spaces.
1376     # <
1377     (?:
1378     @
1379     [\040\t]* # Nab whitespace.
1380     (?:
1381     \( # (
1382     [^\\\x80-\xff\n\015()] * # normal*
1383     (?: # (
1384     (?: \\ [^\x80-\xff] |
1385     \( # (
1386     [^\\\x80-\xff\n\015()] * # normal*
1387     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1388     \) # )
1389     ) # special
1390     [^\\\x80-\xff\n\015()] * # normal*
1391     )* # )*
1392     \) # )
1393     [\040\t]* )* # If comment found, allow more spaces.
1394     (?:
1395     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1396     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1397     |
1398     \[ # [
1399     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1400     \] # ]
1401     )
1402     [\040\t]* # Nab whitespace.
1403     (?:
1404     \( # (
1405     [^\\\x80-\xff\n\015()] * # normal*
1406     (?: # (
1407     (?: \\ [^\x80-\xff] |
1408     \( # (
1409     [^\\\x80-\xff\n\015()] * # normal*
1410     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1411     \) # )
1412     ) # special
1413     [^\\\x80-\xff\n\015()] * # normal*
1414     )* # )*
1415     \) # )
1416     [\040\t]* )* # If comment found, allow more spaces.
1417     # optional trailing comments
1418     (?:
1419     \.
1420     [\040\t]* # Nab whitespace.
1421     (?:
1422     \( # (
1423     [^\\\x80-\xff\n\015()] * # normal*
1424     (?: # (
1425     (?: \\ [^\x80-\xff] |
1426     \( # (
1427     [^\\\x80-\xff\n\015()] * # normal*
1428     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1429     \) # )
1430     ) # special
1431     [^\\\x80-\xff\n\015()] * # normal*
1432     )* # )*
1433     \) # )
1434     [\040\t]* )* # If comment found, allow more spaces.
1435     (?:
1436     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1437     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1438     |
1439     \[ # [
1440     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1441     \] # ]
1442     )
1443     [\040\t]* # Nab whitespace.
1444     (?:
1445     \( # (
1446     [^\\\x80-\xff\n\015()] * # normal*
1447     (?: # (
1448     (?: \\ [^\x80-\xff] |
1449     \( # (
1450     [^\\\x80-\xff\n\015()] * # normal*
1451     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1452     \) # )
1453     ) # special
1454     [^\\\x80-\xff\n\015()] * # normal*
1455     )* # )*
1456     \) # )
1457     [\040\t]* )* # If comment found, allow more spaces.
1458     # optional trailing comments
1459     )*
1460     (?: ,
1461     [\040\t]* # Nab whitespace.
1462     (?:
1463     \( # (
1464     [^\\\x80-\xff\n\015()] * # normal*
1465     (?: # (
1466     (?: \\ [^\x80-\xff] |
1467     \( # (
1468     [^\\\x80-\xff\n\015()] * # normal*
1469     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1470     \) # )
1471     ) # special
1472     [^\\\x80-\xff\n\015()] * # normal*
1473     )* # )*
1474     \) # )
1475     [\040\t]* )* # If comment found, allow more spaces.
1476     @
1477     [\040\t]* # Nab whitespace.
1478     (?:
1479     \( # (
1480     [^\\\x80-\xff\n\015()] * # normal*
1481     (?: # (
1482     (?: \\ [^\x80-\xff] |
1483     \( # (
1484     [^\\\x80-\xff\n\015()] * # normal*
1485     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1486     \) # )
1487     ) # special
1488     [^\\\x80-\xff\n\015()] * # normal*
1489     )* # )*
1490     \) # )
1491     [\040\t]* )* # If comment found, allow more spaces.
1492     (?:
1493     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1494     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1495     |
1496     \[ # [
1497     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1498     \] # ]
1499     )
1500     [\040\t]* # Nab whitespace.
1501     (?:
1502     \( # (
1503     [^\\\x80-\xff\n\015()] * # normal*
1504     (?: # (
1505     (?: \\ [^\x80-\xff] |
1506     \( # (
1507     [^\\\x80-\xff\n\015()] * # normal*
1508     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1509     \) # )
1510     ) # special
1511     [^\\\x80-\xff\n\015()] * # normal*
1512     )* # )*
1513     \) # )
1514     [\040\t]* )* # If comment found, allow more spaces.
1515     # optional trailing comments
1516     (?:
1517     \.
1518     [\040\t]* # Nab whitespace.
1519     (?:
1520     \( # (
1521     [^\\\x80-\xff\n\015()] * # normal*
1522     (?: # (
1523     (?: \\ [^\x80-\xff] |
1524     \( # (
1525     [^\\\x80-\xff\n\015()] * # normal*
1526     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1527     \) # )
1528     ) # special
1529     [^\\\x80-\xff\n\015()] * # normal*
1530     )* # )*
1531     \) # )
1532     [\040\t]* )* # If comment found, allow more spaces.
1533     (?:
1534     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1535     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1536     |
1537     \[ # [
1538     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1539     \] # ]
1540     )
1541     [\040\t]* # Nab whitespace.
1542     (?:
1543     \( # (
1544     [^\\\x80-\xff\n\015()] * # normal*
1545     (?: # (
1546     (?: \\ [^\x80-\xff] |
1547     \( # (
1548     [^\\\x80-\xff\n\015()] * # normal*
1549     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1550     \) # )
1551     ) # special
1552     [^\\\x80-\xff\n\015()] * # normal*
1553     )* # )*
1554     \) # )
1555     [\040\t]* )* # If comment found, allow more spaces.
1556     # optional trailing comments
1557     )*
1558     )* # additional domains
1559     :
1560     [\040\t]* # Nab whitespace.
1561     (?:
1562     \( # (
1563     [^\\\x80-\xff\n\015()] * # normal*
1564     (?: # (
1565     (?: \\ [^\x80-\xff] |
1566     \( # (
1567     [^\\\x80-\xff\n\015()] * # normal*
1568     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1569     \) # )
1570     ) # special
1571     [^\\\x80-\xff\n\015()] * # normal*
1572     )* # )*
1573     \) # )
1574     [\040\t]* )* # If comment found, allow more spaces.
1575     # optional trailing comments
1576     )? # optional route
1577     (?:
1578     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1579     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1580     # Atom
1581     | # or
1582     " # "
1583     [^\\\x80-\xff\n\015"] * # normal
1584     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
1585     " # "
1586     # Quoted string
1587     )
1588     [\040\t]* # Nab whitespace.
1589     (?:
1590     \( # (
1591     [^\\\x80-\xff\n\015()] * # normal*
1592     (?: # (
1593     (?: \\ [^\x80-\xff] |
1594     \( # (
1595     [^\\\x80-\xff\n\015()] * # normal*
1596     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1597     \) # )
1598     ) # special
1599     [^\\\x80-\xff\n\015()] * # normal*
1600     )* # )*
1601     \) # )
1602     [\040\t]* )* # If comment found, allow more spaces.
1603     (?:
1604     \.
1605     [\040\t]* # Nab whitespace.
1606     (?:
1607     \( # (
1608     [^\\\x80-\xff\n\015()] * # normal*
1609     (?: # (
1610     (?: \\ [^\x80-\xff] |
1611     \( # (
1612     [^\\\x80-\xff\n\015()] * # normal*
1613     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1614     \) # )
1615     ) # special
1616     [^\\\x80-\xff\n\015()] * # normal*
1617     )* # )*
1618     \) # )
1619     [\040\t]* )* # If comment found, allow more spaces.
1620     (?:
1621     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1622     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1623     # Atom
1624     | # or
1625     " # "
1626     [^\\\x80-\xff\n\015"] * # normal
1627     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
1628     " # "
1629     # Quoted string
1630     )
1631     [\040\t]* # Nab whitespace.
1632     (?:
1633     \( # (
1634     [^\\\x80-\xff\n\015()] * # normal*
1635     (?: # (
1636     (?: \\ [^\x80-\xff] |
1637     \( # (
1638     [^\\\x80-\xff\n\015()] * # normal*
1639     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1640     \) # )
1641     ) # special
1642     [^\\\x80-\xff\n\015()] * # normal*
1643     )* # )*
1644     \) # )
1645     [\040\t]* )* # If comment found, allow more spaces.
1646     # additional words
1647     )*
1648     @
1649     [\040\t]* # Nab whitespace.
1650     (?:
1651     \( # (
1652     [^\\\x80-\xff\n\015()] * # normal*
1653     (?: # (
1654     (?: \\ [^\x80-\xff] |
1655     \( # (
1656     [^\\\x80-\xff\n\015()] * # normal*
1657     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1658     \) # )
1659     ) # special
1660     [^\\\x80-\xff\n\015()] * # normal*
1661     )* # )*
1662     \) # )
1663     [\040\t]* )* # If comment found, allow more spaces.
1664     (?:
1665     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1666     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1667     |
1668     \[ # [
1669     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1670     \] # ]
1671     )
1672     [\040\t]* # Nab whitespace.
1673     (?:
1674     \( # (
1675     [^\\\x80-\xff\n\015()] * # normal*
1676     (?: # (
1677     (?: \\ [^\x80-\xff] |
1678     \( # (
1679     [^\\\x80-\xff\n\015()] * # normal*
1680     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1681     \) # )
1682     ) # special
1683     [^\\\x80-\xff\n\015()] * # normal*
1684     )* # )*
1685     \) # )
1686     [\040\t]* )* # If comment found, allow more spaces.
1687     # optional trailing comments
1688     (?:
1689     \.
1690     [\040\t]* # Nab whitespace.
1691     (?:
1692     \( # (
1693     [^\\\x80-\xff\n\015()] * # normal*
1694     (?: # (
1695     (?: \\ [^\x80-\xff] |
1696     \( # (
1697     [^\\\x80-\xff\n\015()] * # normal*
1698     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1699     \) # )
1700     ) # special
1701     [^\\\x80-\xff\n\015()] * # normal*
1702     )* # )*
1703     \) # )
1704     [\040\t]* )* # If comment found, allow more spaces.
1705     (?:
1706     [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
1707     (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
1708     |
1709     \[ # [
1710     (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
1711     \] # ]
1712     )
1713     [\040\t]* # Nab whitespace.
1714     (?:
1715     \( # (
1716     [^\\\x80-\xff\n\015()] * # normal*
1717     (?: # (
1718     (?: \\ [^\x80-\xff] |
1719     \( # (
1720     [^\\\x80-\xff\n\015()] * # normal*
1721     (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
1722     \) # )
1723     ) # special
1724     [^\\\x80-\xff\n\015()] * # normal*
1725     )* # )*
1726     \) # )
1727     [\040\t]* )* # If comment found, allow more spaces.
1728     # optional trailing comments
1729     )*
1730     # address spec
1731     > # >
1732     # name and address
1733     )
1734     /x
1735     Alan Other <user\@dom.ain>
1736     <user\@dom.ain>
1737     user\@dom.ain
1738     \"A. Other\" <user.1234\@dom.ain> (a comment)
1739     A. Other <user.1234\@dom.ain> (a comment)
1740     \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
1741     A missing angle <user\@some.where
1742     *** Failers
1743     The quick brown fox
1744    
1745     /abc\0def\00pqr\000xyz\0000AB/
1746     abc\0def\00pqr\000xyz\0000AB
1747     abc456 abc\0def\00pqr\000xyz\0000ABCDE
1748    
1749     /abc\x0def\x00pqr\x000xyz\x0000AB/
1750     abc\x0def\x00pqr\x000xyz\x0000AB
1751     abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
1752    
1753     /^[\000-\037]/
1754     \0A
1755     \01B
1756     \037C
1757    
1758     /\0*/
1759     \0\0\0\0
1760    
1761     /A\x0{2,3}Z/
1762     The A\x0\x0Z
1763     An A\0\x0\0Z
1764     *** Failers
1765     A\0Z
1766     A\0\x0\0\x0Z
1767    
1768     /^\s/
1769     \040abc
1770     \x0cabc
1771     \nabc
1772     \rabc
1773     \tabc
1774     *** Failers
1775     abc
1776    
1777     /^a b
1778    
1779     c/x
1780     abc
1781    
1782     /ab{1,3}bc/
1783     abbbbc
1784     abbbc
1785     abbc
1786     *** Failers
1787     abc
1788     abbbbbc
1789    
1790     /([^.]*)\.([^:]*):[T ]+(.*)/
1791     track1.title:TBlah blah blah
1792    
1793     /([^.]*)\.([^:]*):[T ]+(.*)/i
1794     track1.title:TBlah blah blah
1795    
1796     /([^.]*)\.([^:]*):[t ]+(.*)/i
1797     track1.title:TBlah blah blah
1798    
1799     /^[W-c]+$/
1800     WXY_^abc
1801     *** Failers
1802     wxy
1803    
1804     /^[W-c]+$/i
1805     WXY_^abc
1806     wxy_^ABC
1807    
1808     /^[\x3f-\x5F]+$/i
1809     WXY_^abc
1810     wxy_^ABC
1811    
1812     /^abc$/m
1813     abc
1814     qqq\nabc
1815     abc\nzzz
1816     qqq\nabc\nzzz
1817    
1818     /^abc$/
1819     abc
1820     *** Failers
1821     qqq\nabc
1822     abc\nzzz
1823     qqq\nabc\nzzz
1824    
1825     /\Aabc\Z/m
1826     abc
1827     abc\n
1828     *** Failers
1829     qqq\nabc
1830     abc\nzzz
1831     qqq\nabc\nzzz
1832    
1833     /\A(.)*\Z/s
1834     abc\ndef
1835    
1836     /\A(.)*\Z/m
1837     *** Failers
1838     abc\ndef
1839    
1840     /(?:b)|(?::+)/
1841     b::c
1842     c::b
1843    
1844     /[-az]+/
1845     az-
1846     *** Failers
1847     b
1848    
1849     /[az-]+/
1850     za-
1851     *** Failers
1852     b
1853    
1854     /[a\-z]+/
1855     a-z
1856     *** Failers
1857     b
1858    
1859     /[a-z]+/
1860     abcdxyz
1861    
1862     /[\d-]+/
1863     12-34
1864     *** Failers
1865     aaa
1866    
1867     /[\d-z]+/
1868     12-34z
1869     *** Failers
1870     aaa
1871    
1872     /\x5c/
1873     \\
1874    
1875     /\x20Z/
1876     the Zoo
1877     *** Failers
1878     Zulu
1879    
1880     /ab{3cd/
1881     ab{3cd
1882    
1883     /ab{3,cd/
1884     ab{3,cd
1885    
1886     /ab{3,4a}cd/
1887     ab{3,4a}cd
1888    
1889     /{4,5a}bc/
1890     {4,5a}bc
1891    
1892     /^a.b/
1893     a\rb
1894     *** Failers
1895     a\nb
1896    
1897     /abc$/
1898     abc
1899     abc\n
1900     *** Failers
1901     abc\ndef
1902    
1903     /(abc)\123/
1904     abc\x53
1905    
1906     /(abc)\223/
1907     abc\x93
1908    
1909     /(abc)\323/
1910     abc\xd3
1911    
1912 nigel 91 /(abc)\100/
1913 nigel 77 abc\x40
1914     abc\100
1915    
1916 nigel 91 /(abc)\1000/
1917 nigel 77 abc\x400
1918     abc\x40\x30
1919     abc\1000
1920     abc\100\x30
1921     abc\100\060
1922     abc\100\60
1923    
1924     /abc\81/
1925     abc\081
1926     abc\0\x38\x31
1927    
1928     /abc\91/
1929     abc\091
1930     abc\0\x39\x31
1931    
1932     /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
1933     abcdefghijk\12S
1934    
1935     /ab\gdef/
1936     abgdef
1937    
1938     /a{0}bc/
1939     bc
1940    
1941     /(a|(bc)){0,0}?xyz/
1942     xyz
1943    
1944     /abc[\10]de/
1945     abc\010de
1946    
1947     /abc[\1]de/
1948     abc\1de
1949    
1950     /(abc)[\1]de/
1951     abc\1de
1952    
1953     /(?s)a.b/
1954     a\nb
1955    
1956     /^([^a])([^\b])([^c]*)([^d]{3,4})/
1957     baNOTccccd
1958     baNOTcccd
1959     baNOTccd
1960     bacccd
1961     *** Failers
1962     anything
1963     b\bc
1964     baccd
1965    
1966     /[^a]/
1967     Abc
1968    
1969     /[^a]/i
1970     Abc
1971    
1972     /[^a]+/
1973     AAAaAbc
1974    
1975     /[^a]+/i
1976     AAAaAbc
1977    
1978     /[^a]+/
1979     bbb\nccc
1980    
1981     /[^k]$/
1982     abc
1983     *** Failers
1984     abk
1985    
1986     /[^k]{2,3}$/
1987     abc
1988     kbc
1989     kabc
1990     *** Failers
1991     abk
1992     akb
1993     akk
1994    
1995     /^\d{8,}\@.+[^k]$/
1996     12345678\@a.b.c.d
1997     123456789\@x.y.z
1998     *** Failers
1999     12345678\@x.y.uk
2000     1234567\@a.b.c.d
2001    
2002     /[^a]/
2003     aaaabcd
2004     aaAabcd
2005    
2006     /[^a]/i
2007     aaaabcd
2008     aaAabcd
2009    
2010     /[^az]/
2011     aaaabcd
2012     aaAabcd
2013    
2014     /[^az]/i
2015     aaaabcd
2016     aaAabcd
2017    
2018     /\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
2019     \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
2020    
2021     /P[^*]TAIRE[^*]{1,6}?LL/
2022     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
2023    
2024     /P[^*]TAIRE[^*]{1,}?LL/
2025     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
2026    
2027     /(\.\d\d[1-9]?)\d+/
2028     1.230003938
2029     1.875000282
2030     1.235
2031    
2032     /(\.\d\d((?=0)|\d(?=\d)))/
2033     1.230003938
2034     1.875000282
2035     *** Failers
2036     1.235
2037    
2038     /a(?)b/
2039     ab
2040    
2041     /\b(foo)\s+(\w+)/i
2042     Food is on the foo table
2043    
2044     /foo(.*)bar/
2045     The food is under the bar in the barn.
2046    
2047     /foo(.*?)bar/
2048     The food is under the bar in the barn.
2049    
2050     /(.*)(\d*)/
2051     I have 2 numbers: 53147
2052    
2053     /(.*)(\d+)/
2054     I have 2 numbers: 53147
2055    
2056     /(.*?)(\d*)/
2057     I have 2 numbers: 53147
2058    
2059     /(.*?)(\d+)/
2060     I have 2 numbers: 53147
2061    
2062     /(.*)(\d+)$/
2063     I have 2 numbers: 53147
2064    
2065     /(.*?)(\d+)$/
2066     I have 2 numbers: 53147
2067    
2068     /(.*)\b(\d+)$/
2069     I have 2 numbers: 53147
2070    
2071     /(.*\D)(\d+)$/
2072     I have 2 numbers: 53147
2073    
2074     /^\D*(?!123)/
2075     ABC123
2076    
2077     /^(\D*)(?=\d)(?!123)/
2078     ABC445
2079     *** Failers
2080     ABC123
2081    
2082     /^[W-]46]/
2083     W46]789
2084     -46]789
2085     *** Failers
2086     Wall
2087     Zebra
2088     42
2089     [abcd]
2090     ]abcd[
2091    
2092     /^[W-\]46]/
2093     W46]789
2094     Wall
2095     Zebra
2096     Xylophone
2097     42
2098     [abcd]
2099     ]abcd[
2100     \\backslash
2101     *** Failers
2102     -46]789
2103     well
2104    
2105     /\d\d\/\d\d\/\d\d\d\d/
2106     01/01/2000
2107    
2108     /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
2109     word cat dog elephant mussel cow horse canary baboon snake shark otherword
2110     word cat dog elephant mussel cow horse canary baboon snake shark
2111    
2112     /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
2113     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
2114    
2115     /^(a){0,0}/
2116     bcd
2117     abc
2118     aab
2119    
2120     /^(a){0,1}/
2121     bcd
2122     abc
2123     aab
2124    
2125     /^(a){0,2}/
2126     bcd
2127     abc
2128     aab
2129    
2130     /^(a){0,3}/
2131     bcd
2132     abc
2133     aab
2134     aaa
2135    
2136     /^(a){0,}/
2137     bcd
2138     abc
2139     aab
2140     aaa
2141     aaaaaaaa
2142    
2143     /^(a){1,1}/
2144     bcd
2145     abc
2146     aab
2147    
2148     /^(a){1,2}/
2149     bcd
2150     abc
2151     aab
2152    
2153     /^(a){1,3}/
2154     bcd
2155     abc
2156     aab
2157     aaa
2158    
2159     /^(a){1,}/
2160     bcd
2161     abc
2162     aab
2163     aaa
2164     aaaaaaaa
2165    
2166     /.*\.gif/
2167     borfle\nbib.gif\nno
2168    
2169     /.{0,}\.gif/
2170     borfle\nbib.gif\nno
2171    
2172     /.*\.gif/m
2173     borfle\nbib.gif\nno
2174    
2175     /.*\.gif/s
2176     borfle\nbib.gif\nno
2177    
2178     /.*\.gif/ms
2179     borfle\nbib.gif\nno
2180    
2181     /.*$/
2182     borfle\nbib.gif\nno
2183    
2184     /.*$/m
2185     borfle\nbib.gif\nno
2186    
2187     /.*$/s
2188     borfle\nbib.gif\nno
2189    
2190     /.*$/ms
2191     borfle\nbib.gif\nno
2192    
2193     /.*$/
2194     borfle\nbib.gif\nno\n
2195    
2196     /.*$/m
2197     borfle\nbib.gif\nno\n
2198    
2199     /.*$/s
2200     borfle\nbib.gif\nno\n
2201    
2202     /.*$/ms
2203     borfle\nbib.gif\nno\n
2204    
2205     /(.*X|^B)/
2206     abcde\n1234Xyz
2207     BarFoo
2208     *** Failers
2209     abcde\nBar
2210    
2211     /(.*X|^B)/m
2212     abcde\n1234Xyz
2213     BarFoo
2214     abcde\nBar
2215    
2216     /(.*X|^B)/s
2217     abcde\n1234Xyz
2218     BarFoo
2219     *** Failers
2220     abcde\nBar
2221    
2222     /(.*X|^B)/ms
2223     abcde\n1234Xyz
2224     BarFoo
2225     abcde\nBar
2226    
2227     /(?s)(.*X|^B)/
2228     abcde\n1234Xyz
2229     BarFoo
2230     *** Failers
2231     abcde\nBar
2232    
2233     /(?s:.*X|^B)/
2234     abcde\n1234Xyz
2235     BarFoo
2236     *** Failers
2237     abcde\nBar
2238    
2239     /^.*B/
2240     **** Failers
2241     abc\nB
2242    
2243     /(?s)^.*B/
2244     abc\nB
2245    
2246     /(?m)^.*B/
2247     abc\nB
2248    
2249     /(?ms)^.*B/
2250     abc\nB
2251    
2252     /(?ms)^B/
2253     abc\nB
2254    
2255     /(?s)B$/
2256     B\n
2257    
2258     /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
2259     123456654321
2260    
2261     /^\d\d\d\d\d\d\d\d\d\d\d\d/
2262     123456654321
2263    
2264     /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
2265     123456654321
2266    
2267     /^[abc]{12}/
2268     abcabcabcabc
2269    
2270     /^[a-c]{12}/
2271     abcabcabcabc
2272    
2273     /^(a|b|c){12}/
2274     abcabcabcabc
2275    
2276     /^[abcdefghijklmnopqrstuvwxy0123456789]/
2277     n
2278     *** Failers
2279     z
2280    
2281     /abcde{0,0}/
2282     abcd
2283     *** Failers
2284     abce
2285    
2286     /ab[cd]{0,0}e/
2287     abe
2288     *** Failers
2289     abcde
2290    
2291     /ab(c){0,0}d/
2292     abd
2293     *** Failers
2294     abcd
2295    
2296     /a(b*)/
2297     a
2298     ab
2299     abbbb
2300     *** Failers
2301     bbbbb
2302    
2303     /ab\d{0}e/
2304     abe
2305     *** Failers
2306     ab1e
2307    
2308     /"([^\\"]+|\\.)*"/
2309     the \"quick\" brown fox
2310     \"the \\\"quick\\\" brown fox\"
2311    
2312     /.*?/g+
2313     abc
2314    
2315     /\b/g+
2316     abc
2317    
2318     /\b/+g
2319     abc
2320    
2321     //g
2322     abc
2323    
2324     /<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
2325     <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
2326    
2327     /a[^a]b/
2328     acb
2329     a\nb
2330    
2331     /a.b/
2332     acb
2333     *** Failers
2334     a\nb
2335    
2336     /a[^a]b/s
2337     acb
2338     a\nb
2339    
2340     /a.b/s
2341     acb
2342     a\nb
2343    
2344     /^(b+?|a){1,2}?c/
2345     bac
2346     bbac
2347     bbbac
2348     bbbbac
2349     bbbbbac
2350    
2351     /^(b+|a){1,2}?c/
2352     bac
2353     bbac
2354     bbbac
2355     bbbbac
2356     bbbbbac
2357    
2358     /(?!\A)x/m
2359     x\nb\n
2360     a\bx\n
2361    
2362     /\x0{ab}/
2363     \0{ab}
2364    
2365     /(A|B)*?CD/
2366     CD
2367    
2368     /(A|B)*CD/
2369     CD
2370    
2371     /(?<!bar)foo/
2372     foo
2373     catfood
2374     arfootle
2375     rfoosh
2376     *** Failers
2377     barfoo
2378     towbarfoo
2379    
2380     /\w{3}(?<!bar)foo/
2381     catfood
2382     *** Failers
2383     foo
2384     barfoo
2385     towbarfoo
2386    
2387     /(?<=(foo)a)bar/
2388     fooabar
2389     *** Failers
2390     bar
2391     foobbar
2392    
2393     /\Aabc\z/m
2394     abc
2395     *** Failers
2396     abc\n
2397     qqq\nabc
2398     abc\nzzz
2399     qqq\nabc\nzzz
2400    
2401     "(?>.*/)foo"
2402     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
2403    
2404     "(?>.*/)foo"
2405     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
2406    
2407     /(?>(\.\d\d[1-9]?))\d+/
2408     1.230003938
2409     1.875000282
2410     *** Failers
2411     1.235
2412    
2413     /^((?>\w+)|(?>\s+))*$/
2414     now is the time for all good men to come to the aid of the party
2415     *** Failers
2416     this is not a line with only words and spaces!
2417    
2418     /(\d+)(\w)/
2419     12345a
2420     12345+
2421    
2422     /((?>\d+))(\w)/
2423     12345a
2424     *** Failers
2425     12345+
2426    
2427     /(?>a+)b/
2428     aaab
2429    
2430     /((?>a+)b)/
2431     aaab
2432    
2433     /(?>(a+))b/
2434     aaab
2435    
2436     /(?>b)+/
2437     aaabbbccc
2438    
2439     /(?>a+|b+|c+)*c/
2440     aaabbbbccccd
2441    
2442     /(a+|b+|c+)*c/
2443     aaabbbbccccd
2444    
2445     /((?>[^()]+)|\([^()]*\))+/
2446     ((abc(ade)ufh()()x
2447    
2448     /\(((?>[^()]+)|\([^()]+\))+\)/
2449     (abc)
2450     (abc(def)xyz)
2451     *** Failers
2452     ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2453    
2454     /a(?-i)b/i
2455     ab
2456     Ab
2457     *** Failers
2458     aB
2459     AB
2460    
2461     /(a (?x)b c)d e/
2462     a bcd e
2463     *** Failers
2464     a b cd e
2465     abcd e
2466     a bcde
2467    
2468     /(a b(?x)c d (?-x)e f)/
2469     a bcde f
2470     *** Failers
2471     abcdef
2472    
2473     /(a(?i)b)c/
2474     abc
2475     aBc
2476     *** Failers
2477     abC
2478     aBC
2479     Abc
2480     ABc
2481     ABC
2482     AbC
2483    
2484     /a(?i:b)c/
2485     abc
2486     aBc
2487     *** Failers
2488     ABC
2489     abC
2490     aBC
2491    
2492     /a(?i:b)*c/
2493     aBc
2494     aBBc
2495     *** Failers
2496     aBC
2497     aBBC
2498    
2499     /a(?=b(?i)c)\w\wd/
2500     abcd
2501     abCd
2502     *** Failers
2503     aBCd
2504     abcD
2505    
2506     /(?s-i:more.*than).*million/i
2507     more than million
2508     more than MILLION
2509     more \n than Million
2510     *** Failers
2511     MORE THAN MILLION
2512     more \n than \n million
2513    
2514     /(?:(?s-i)more.*than).*million/i
2515     more than million
2516     more than MILLION
2517     more \n than Million
2518     *** Failers
2519     MORE THAN MILLION
2520     more \n than \n million
2521    
2522     /(?>a(?i)b+)+c/
2523     abc
2524     aBbc
2525     aBBc
2526     *** Failers
2527     Abc
2528     abAb
2529     abbC
2530    
2531     /(?=a(?i)b)\w\wc/
2532     abc
2533     aBc
2534     *** Failers
2535     Ab
2536     abC
2537     aBC
2538    
2539     /(?<=a(?i)b)(\w\w)c/
2540     abxxc
2541     aBxxc
2542     *** Failers
2543     Abxxc
2544     ABxxc
2545     abxxC
2546    
2547     /^(?(?=abc)\w{3}:|\d\d)$/
2548     abc:
2549     12
2550     *** Failers
2551     123
2552     xyz
2553    
2554     /^(?(?!abc)\d\d|\w{3}:)$/
2555     abc:
2556     12
2557     *** Failers
2558     123
2559     xyz
2560    
2561     /(?(?<=foo)bar|cat)/
2562     foobar
2563     cat
2564     fcat
2565     focat
2566     *** Failers
2567     foocat
2568    
2569     /(?(?<!foo)cat|bar)/
2570     foobar
2571     cat
2572     fcat
2573     focat
2574     *** Failers
2575     foocat
2576    
2577     /(?>a*)*/
2578     a
2579     aa
2580     aaaa
2581    
2582     /(abc|)+/
2583     abc
2584     abcabc
2585     abcabcabc
2586     xyz
2587    
2588     /([a]*)*/
2589     a
2590     aaaaa
2591    
2592     /([ab]*)*/
2593     a
2594     b
2595     ababab
2596     aaaabcde
2597     bbbb
2598    
2599     /([^a]*)*/
2600     b
2601     bbbb
2602     aaa
2603    
2604     /([^ab]*)*/
2605     cccc
2606     abab
2607    
2608     /([a]*?)*/
2609     a
2610     aaaa
2611    
2612     /([ab]*?)*/
2613     a
2614     b
2615     abab
2616     baba
2617    
2618     /([^a]*?)*/
2619     b
2620     bbbb
2621     aaa
2622    
2623     /([^ab]*?)*/
2624     c
2625     cccc
2626     baba
2627    
2628     /(?>a*)*/
2629     a
2630     aaabcde
2631    
2632     /((?>a*))*/
2633     aaaaa
2634     aabbaa
2635    
2636     /((?>a*?))*/
2637     aaaaa
2638     aabbaa
2639    
2640     /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
2641     12-sep-98
2642     12-09-98
2643     *** Failers
2644     sep-12-98
2645    
2646     /(?i:saturday|sunday)/
2647     saturday
2648     sunday
2649     Saturday
2650     Sunday
2651     SATURDAY
2652     SUNDAY
2653     SunDay
2654    
2655     /(a(?i)bc|BB)x/
2656     abcx
2657     aBCx
2658     bbx
2659     BBx
2660     *** Failers
2661     abcX
2662     aBCX
2663     bbX
2664     BBX
2665    
2666     /^([ab](?i)[cd]|[ef])/
2667     ac
2668     aC
2669     bD
2670     elephant
2671     Europe
2672     frog
2673     France
2674     *** Failers
2675     Africa
2676    
2677     /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
2678     ab
2679     aBd
2680     xy
2681     xY
2682     zebra
2683     Zambesi
2684     *** Failers
2685     aCD
2686     XY
2687    
2688     /(?<=foo\n)^bar/m
2689     foo\nbar
2690     *** Failers
2691     bar
2692     baz\nbar
2693    
2694     /(?<=(?<!foo)bar)baz/
2695     barbaz
2696     barbarbaz
2697     koobarbaz
2698     *** Failers
2699     baz
2700     foobarbaz
2701    
2702     /The following tests are taken from the Perl 5.005 test suite; some of them/
2703     /are compatible with 5.004, but I'd rather not have to sort them out./
2704    
2705     /abc/
2706     abc
2707     xabcy
2708     ababc
2709     *** Failers
2710     xbc
2711     axc
2712     abx
2713    
2714     /ab*c/
2715     abc
2716    
2717     /ab*bc/
2718     abc
2719     abbc
2720     abbbbc
2721    
2722     /.{1}/
2723     abbbbc
2724    
2725     /.{3,4}/
2726     abbbbc
2727    
2728     /ab{0,}bc/
2729     abbbbc
2730    
2731     /ab+bc/
2732     abbc
2733     *** Failers
2734     abc
2735     abq
2736    
2737     /ab{1,}bc/
2738    
2739     /ab+bc/
2740     abbbbc
2741    
2742     /ab{1,}bc/
2743     abbbbc
2744    
2745     /ab{1,3}bc/
2746     abbbbc
2747    
2748     /ab{3,4}bc/
2749     abbbbc
2750    
2751     /ab{4,5}bc/
2752     *** Failers
2753     abq
2754     abbbbc
2755    
2756     /ab?bc/
2757     abbc
2758     abc
2759    
2760     /ab{0,1}bc/
2761     abc
2762    
2763     /ab?bc/
2764    
2765     /ab?c/
2766     abc
2767    
2768     /ab{0,1}c/
2769     abc
2770    
2771     /^abc$/
2772     abc
2773     *** Failers
2774     abbbbc
2775     abcc
2776    
2777     /^abc/
2778     abcc
2779    
2780     /^abc$/
2781    
2782     /abc$/
2783     aabc
2784     *** Failers
2785     aabc
2786     aabcd
2787    
2788     /^/
2789     abc
2790    
2791     /$/
2792     abc
2793    
2794     /a.c/
2795     abc
2796     axc
2797    
2798     /a.*c/
2799     axyzc
2800    
2801     /a[bc]d/
2802     abd
2803     *** Failers
2804     axyzd
2805     abc
2806    
2807     /a[b-d]e/
2808     ace
2809    
2810     /a[b-d]/
2811     aac
2812    
2813     /a[-b]/
2814     a-
2815    
2816     /a[b-]/
2817     a-
2818    
2819     /a]/
2820     a]
2821    
2822     /a[]]b/
2823     a]b
2824    
2825     /a[^bc]d/
2826     aed
2827     *** Failers
2828     abd
2829     abd
2830    
2831     /a[^-b]c/
2832     adc
2833    
2834     /a[^]b]c/
2835     adc
2836     *** Failers
2837     a-c
2838     a]c
2839    
2840     /\ba\b/
2841     a-
2842     -a
2843     -a-
2844    
2845     /\by\b/
2846     *** Failers
2847     xy
2848     yz
2849     xyz
2850    
2851     /\Ba\B/
2852     *** Failers
2853     a-
2854     -a
2855     -a-
2856    
2857     /\By\b/
2858     xy
2859    
2860     /\by\B/
2861     yz
2862    
2863     /\By\B/
2864     xyz
2865    
2866     /\w/
2867     a
2868    
2869     /\W/
2870     -
2871     *** Failers
2872     -
2873     a
2874    
2875     /a\sb/
2876     a b
2877    
2878     /a\Sb/
2879     a-b
2880     *** Failers
2881     a-b
2882     a b
2883    
2884     /\d/
2885     1
2886    
2887     /\D/
2888     -
2889     *** Failers
2890     -
2891     1
2892    
2893     /[\w]/
2894     a
2895    
2896     /[\W]/
2897     -
2898     *** Failers
2899     -
2900     a
2901    
2902     /a[\s]b/
2903     a b
2904    
2905     /a[\S]b/
2906     a-b
2907     *** Failers
2908     a-b
2909     a b
2910    
2911     /[\d]/
2912     1
2913    
2914     /[\D]/
2915     -
2916     *** Failers
2917     -
2918     1
2919    
2920     /ab|cd/
2921     abc
2922     abcd
2923    
2924     /()ef/
2925     def
2926    
2927     /$b/
2928    
2929     /a\(b/
2930     a(b
2931    
2932     /a\(*b/
2933     ab
2934     a((b
2935    
2936     /a\\b/
2937     a\b
2938    
2939     /((a))/
2940     abc
2941    
2942     /(a)b(c)/
2943     abc
2944    
2945     /a+b+c/
2946     aabbabc
2947    
2948     /a{1,}b{1,}c/
2949     aabbabc
2950    
2951     /a.+?c/
2952     abcabc
2953    
2954     /(a+|b)*/
2955     ab
2956    
2957     /(a+|b){0,}/
2958     ab
2959    
2960     /(a+|b)+/
2961     ab
2962    
2963     /(a+|b){1,}/
2964     ab
2965    
2966     /(a+|b)?/
2967     ab
2968    
2969     /(a+|b){0,1}/
2970     ab
2971    
2972     /[^ab]*/
2973     cde
2974    
2975     /abc/
2976     *** Failers
2977     b
2978    
2979    
2980     /a*/
2981    
2982    
2983     /([abc])*d/
2984     abbbcd
2985    
2986     /([abc])*bcd/
2987     abcd
2988    
2989     /a|b|c|d|e/
2990     e
2991    
2992     /(a|b|c|d|e)f/
2993     ef
2994    
2995     /abcd*efg/
2996     abcdefg
2997    
2998     /ab*/
2999     xabyabbbz
3000     xayabbbz
3001    
3002     /(ab|cd)e/
3003     abcde
3004    
3005     /[abhgefdc]ij/
3006     hij
3007    
3008     /^(ab|cd)e/
3009    
3010     /(abc|)ef/
3011     abcdef
3012    
3013     /(a|b)c*d/
3014     abcd
3015    
3016     /(ab|ab*)bc/
3017     abc
3018    
3019     /a([bc]*)c*/
3020     abc
3021    
3022     /a([bc]*)(c*d)/
3023     abcd
3024    
3025     /a([bc]+)(c*d)/
3026     abcd
3027    
3028     /a([bc]*)(c+d)/
3029     abcd
3030    
3031     /a[bcd]*dcdcde/
3032     adcdcde
3033    
3034     /a[bcd]+dcdcde/
3035     *** Failers
3036     abcde
3037     adcdcde
3038    
3039     /(ab|a)b*c/
3040     abc
3041    
3042     /((a)(b)c)(d)/
3043     abcd
3044    
3045     /[a-zA-Z_][a-zA-Z0-9_]*/
3046     alpha
3047    
3048     /^a(bc+|b[eh])g|.h$/
3049     abh
3050    
3051     /(bc+d$|ef*g.|h?i(j|k))/
3052     effgz
3053     ij
3054     reffgz
3055     *** Failers
3056     effg
3057     bcdd
3058    
3059     /((((((((((a))))))))))/
3060     a
3061    
3062     /(((((((((a)))))))))/
3063     a
3064    
3065     /multiple words of text/
3066     *** Failers
3067     aa
3068     uh-uh
3069    
3070     /multiple words/
3071     multiple words, yeah
3072    
3073     /(.*)c(.*)/
3074     abcde
3075    
3076     /\((.*), (.*)\)/
3077     (a, b)
3078    
3079     /[k]/
3080    
3081     /abcd/
3082     abcd
3083    
3084     /a(bc)d/
3085     abcd
3086    
3087     /a[-]?c/
3088     ac
3089    
3090     /abc/i
3091     ABC
3092     XABCY
3093     ABABC
3094     *** Failers
3095     aaxabxbaxbbx
3096     XBC
3097     AXC
3098     ABX
3099    
3100     /ab*c/i
3101     ABC
3102    
3103     /ab*bc/i
3104     ABC
3105     ABBC
3106    
3107     /ab*?bc/i
3108     ABBBBC
3109    
3110     /ab{0,}?bc/i
3111     ABBBBC
3112    
3113     /ab+?bc/i
3114     ABBC
3115    
3116     /ab+bc/i
3117     *** Failers
3118     ABC
3119     ABQ
3120    
3121     /ab{1,}bc/i
3122    
3123     /ab+bc/i
3124     ABBBBC
3125    
3126     /ab{1,}?bc/i
3127     ABBBBC
3128    
3129     /ab{1,3}?bc/i
3130     ABBBBC
3131    
3132     /ab{3,4}?bc/i
3133     ABBBBC
3134    
3135     /ab{4,5}?bc/i
3136     *** Failers
3137     ABQ
3138     ABBBBC
3139    
3140     /ab??bc/i
3141     ABBC
3142     ABC
3143    
3144     /ab{0,1}?bc/i
3145     ABC
3146    
3147     /ab??bc/i
3148    
3149     /ab??c/i
3150     ABC
3151    
3152     /ab{0,1}?c/i
3153     ABC
3154    
3155     /^abc$/i
3156     ABC
3157     *** Failers
3158     ABBBBC
3159     ABCC
3160    
3161     /^abc/i
3162     ABCC
3163    
3164     /^abc$/i
3165    
3166     /abc$/i
3167     AABC
3168    
3169     /^/i
3170     ABC
3171    
3172     /$/i
3173     ABC
3174    
3175     /a.c/i
3176     ABC
3177     AXC
3178    
3179     /a.*?c/i
3180     AXYZC
3181    
3182     /a.*c/i
3183     *** Failers
3184     AABC
3185     AXYZD
3186    
3187     /a[bc]d/i
3188     ABD
3189    
3190     /a[b-d]e/i
3191     ACE
3192     *** Failers
3193     ABC
3194     ABD
3195    
3196     /a[b-d]/i
3197     AAC
3198    
3199     /a[-b]/i
3200     A-
3201    
3202     /a[b-]/i
3203     A-
3204    
3205     /a]/i
3206     A]
3207    
3208     /a[]]b/i
3209     A]B
3210    
3211     /a[^bc]d/i
3212     AED
3213    
3214     /a[^-b]c/i
3215     ADC
3216     *** Failers
3217     ABD
3218     A-C
3219    
3220     /a[^]b]c/i
3221     ADC
3222    
3223     /ab|cd/i
3224     ABC
3225     ABCD
3226    
3227     /()ef/i
3228     DEF
3229    
3230     /$b/i
3231     *** Failers
3232     A]C
3233     B
3234    
3235     /a\(b/i
3236     A(B
3237    
3238     /a\(*b/i
3239     AB
3240     A((B
3241    
3242     /a\\b/i
3243     A\B
3244    
3245     /((a))/i
3246     ABC
3247    
3248     /(a)b(c)/i
3249     ABC
3250    
3251     /a+b+c/i
3252     AABBABC
3253    
3254     /a{1,}b{1,}c/i
3255     AABBABC
3256    
3257     /a.+?c/i
3258     ABCABC
3259    
3260     /a.*?c/i
3261     ABCABC
3262    
3263     /a.{0,5}?c/i
3264     ABCABC
3265    
3266     /(a+|b)*/i
3267     AB
3268    
3269     /(a+|b){0,}/i
3270     AB
3271    
3272     /(a+|b)+/i
3273     AB
3274    
3275     /(a+|b){1,}/i
3276     AB
3277    
3278     /(a+|b)?/i
3279     AB
3280    
3281     /(a+|b){0,1}/i
3282     AB
3283    
3284     /(a+|b){0,1}?/i
3285     AB
3286    
3287     /[^ab]*/i
3288     CDE
3289    
3290     /abc/i
3291    
3292     /a*/i
3293    
3294    
3295     /([abc])*d/i
3296     ABBBCD
3297    
3298     /([abc])*bcd/i
3299     ABCD
3300    
3301     /a|b|c|d|e/i
3302     E
3303    
3304     /(a|b|c|d|e)f/i
3305     EF
3306    
3307     /abcd*efg/i
3308     ABCDEFG
3309    
3310     /ab*/i
3311     XABYABBBZ
3312     XAYABBBZ
3313    
3314     /(ab|cd)e/i
3315     ABCDE
3316    
3317     /[abhgefdc]ij/i
3318     HIJ
3319    
3320     /^(ab|cd)e/i
3321     ABCDE
3322    
3323     /(abc|)ef/i
3324     ABCDEF
3325    
3326     /(a|b)c*d/i
3327     ABCD
3328    
3329     /(ab|ab*)bc/i
3330     ABC
3331    
3332     /a([bc]*)c*/i
3333     ABC
3334    
3335     /a([bc]*)(c*d)/i
3336     ABCD
3337    
3338     /a([bc]+)(c*d)/i
3339     ABCD
3340    
3341     /a([bc]*)(c+d)/i
3342     ABCD
3343    
3344     /a[bcd]*dcdcde/i
3345     ADCDCDE
3346    
3347     /a[bcd]+dcdcde/i
3348    
3349     /(ab|a)b*c/i
3350     ABC
3351    
3352     /((a)(b)c)(d)/i
3353     ABCD
3354    
3355     /[a-zA-Z_][a-zA-Z0-9_]*/i
3356     ALPHA
3357    
3358     /^a(bc+|b[eh])g|.h$/i
3359     ABH
3360    
3361     /(bc+d$|ef*g.|h?i(j|k))/i
3362     EFFGZ
3363     IJ
3364     REFFGZ
3365     *** Failers
3366     ADCDCDE
3367     EFFG
3368     BCDD
3369    
3370     /((((((((((a))))))))))/i
3371     A
3372    
3373     /(((((((((a)))))))))/i
3374     A
3375    
3376     /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
3377     A
3378    
3379     /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
3380     C
3381    
3382     /multiple words of text/i
3383     *** Failers
3384     AA
3385     UH-UH
3386    
3387     /multiple words/i
3388     MULTIPLE WORDS, YEAH
3389    
3390     /(.*)c(.*)/i
3391     ABCDE
3392    
3393     /\((.*), (.*)\)/i
3394     (A, B)
3395    
3396     /[k]/i
3397    
3398     /abcd/i
3399     ABCD
3400    
3401     /a(bc)d/i
3402     ABCD
3403    
3404     /a[-]?c/i
3405     AC
3406    
3407     /a(?!b)./
3408     abad
3409    
3410     /a(?=d)./
3411     abad
3412    
3413     /a(?=c|d)./
3414     abad
3415    
3416     /a(?:b|c|d)(.)/
3417     ace
3418    
3419     /a(?:b|c|d)*(.)/
3420     ace
3421    
3422     /a(?:b|c|d)+?(.)/
3423     ace
3424     acdbcdbe
3425    
3426     /a(?:b|c|d)+(.)/
3427     acdbcdbe
3428    
3429     /a(?:b|c|d){2}(.)/
3430     acdbcdbe
3431    
3432     /a(?:b|c|d){4,5}(.)/
3433     acdbcdbe
3434    
3435     /a(?:b|c|d){4,5}?(.)/
3436     acdbcdbe
3437    
3438     /((foo)|(bar))*/
3439     foobar
3440    
3441     /a(?:b|c|d){6,7}(.)/
3442     acdbcdbe
3443    
3444     /a(?:b|c|d){6,7}?(.)/
3445     acdbcdbe
3446    
3447     /a(?:b|c|d){5,6}(.)/
3448     acdbcdbe
3449    
3450     /a(?:b|c|d){5,6}?(.)/
3451     acdbcdbe
3452    
3453     /a(?:b|c|d){5,7}(.)/
3454     acdbcdbe
3455    
3456     /a(?:b|c|d){5,7}?(.)/
3457     acdbcdbe
3458    
3459     /a(?:b|(c|e){1,2}?|d)+?(.)/
3460     ace
3461    
3462     /^(.+)?B/
3463     AB
3464    
3465     /^([^a-z])|(\^)$/
3466     .
3467    
3468     /^[<>]&/
3469     <&OUT
3470    
3471     /(?:(f)(o)(o)|(b)(a)(r))*/
3472     foobar
3473    
3474     /(?<=a)b/
3475     ab
3476     *** Failers
3477     cb
3478     b
3479    
3480     /(?<!c)b/
3481     ab
3482     b
3483     b
3484    
3485     /(?:..)*a/
3486     aba
3487    
3488     /(?:..)*?a/
3489     aba
3490    
3491     /^(){3,5}/
3492     abc
3493    
3494     /^(a+)*ax/
3495     aax
3496    
3497     /^((a|b)+)*ax/
3498     aax
3499    
3500     /^((a|bc)+)*ax/
3501     aax
3502    
3503     /(a|x)*ab/
3504     cab
3505    
3506     /(a)*ab/
3507     cab
3508    
3509     /(?:(?i)a)b/
3510     ab
3511    
3512     /((?i)a)b/
3513     ab
3514    
3515     /(?:(?i)a)b/
3516     Ab
3517    
3518     /((?i)a)b/
3519     Ab
3520    
3521     /(?:(?i)a)b/
3522     *** Failers
3523     cb
3524     aB
3525    
3526     /((?i)a)b/
3527    
3528     /(?i:a)b/
3529     ab
3530    
3531     /((?i:a))b/
3532     ab
3533    
3534     /(?i:a)b/
3535     Ab
3536    
3537     /((?i:a))b/
3538     Ab
3539    
3540     /(?i:a)b/
3541     *** Failers
3542     aB
3543     aB
3544    
3545     /((?i:a))b/
3546    
3547     /(?:(?-i)a)b/i
3548     ab
3549    
3550     /((?-i)a)b/i
3551     ab
3552    
3553     /(?:(?-i)a)b/i
3554     aB
3555    
3556     /((?-i)a)b/i
3557     aB
3558    
3559     /(?:(?-i)a)b/i
3560     *** Failers
3561     aB
3562     Ab
3563    
3564     /((?-i)a)b/i
3565    
3566     /(?:(?-i)a)b/i
3567     aB
3568    
3569     /((?-i)a)b/i
3570     aB
3571    
3572     /(?:(?-i)a)b/i
3573     *** Failers
3574     Ab
3575     AB
3576    
3577     /((?-i)a)b/i
3578    
3579     /(?-i:a)b/i
3580     ab
3581    
3582     /((?-i:a))b/i
3583     ab
3584    
3585     /(?-i:a)b/i
3586     aB
3587    
3588     /((?-i:a))b/i
3589     aB
3590    
3591     /(?-i:a)b/i
3592     *** Failers
3593     AB
3594     Ab
3595    
3596     /((?-i:a))b/i
3597    
3598     /(?-i:a)b/i
3599     aB
3600    
3601     /((?-i:a))b/i
3602     aB
3603    
3604     /(?-i:a)b/i
3605     *** Failers
3606     Ab
3607     AB
3608    
3609     /((?-i:a))b/i
3610    
3611     /((?-i:a.))b/i
3612     *** Failers
3613     AB
3614     a\nB
3615    
3616     /((?s-i:a.))b/i
3617     a\nB
3618    
3619     /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
3620     cabbbb
3621    
3622     /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
3623     caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
3624    
3625     /foo\w*\d{4}baz/
3626     foobar1234baz
3627    
3628     /x(~~)*(?:(?:F)?)?/
3629     x~~
3630    
3631     /^a(?#xxx){3}c/
3632     aaac
3633    
3634     /^a (?#xxx) (?#yyy) {3}c/x
3635     aaac
3636    
3637     /(?<![cd])b/
3638     *** Failers
3639     B\nB
3640     dbcb
3641    
3642     /(?<![cd])[ab]/
3643     dbaacb
3644    
3645     /(?<!(c|d))b/
3646    
3647     /(?<!(c|d))[ab]/
3648     dbaacb
3649    
3650     /(?<!cd)[ab]/
3651     cdaccb
3652    
3653     /^(?:a?b?)*$/
3654     *** Failers
3655     dbcb
3656     a--
3657    
3658     /((?s)^a(.))((?m)^b$)/
3659     a\nb\nc\n
3660    
3661     /((?m)^b$)/
3662     a\nb\nc\n
3663    
3664     /(?m)^b/
3665     a\nb\n
3666    
3667     /(?m)^(b)/
3668     a\nb\n
3669    
3670     /((?m)^b)/
3671     a\nb\n
3672    
3673     /\n((?m)^b)/
3674     a\nb\n
3675    
3676     /((?s).)c(?!.)/
3677     a\nb\nc\n
3678     a\nb\nc\n
3679    
3680     /((?s)b.)c(?!.)/
3681     a\nb\nc\n
3682     a\nb\nc\n
3683    
3684     /^b/
3685    
3686     /()^b/
3687     *** Failers
3688     a\nb\nc\n
3689     a\nb\nc\n
3690    
3691     /((?m)^b)/
3692     a\nb\nc\n
3693    
3694     /(?(?!a)a|b)/
3695    
3696     /(?(?!a)b|a)/
3697     a
3698    
3699     /(?(?=a)b|a)/
3700     *** Failers
3701     a
3702     a
3703    
3704     /(?(?=a)a|b)/
3705     a
3706    
3707     /(\w+:)+/
3708     one:
3709    
3710     /$(?<=^(a))/
3711     a
3712    
3713     /([\w:]+::)?(\w+)$/
3714     abcd
3715     xy:z:::abcd
3716    
3717     /^[^bcd]*(c+)/
3718     aexycd
3719    
3720     /(a*)b+/
3721     caab
3722    
3723     /([\w:]+::)?(\w+)$/
3724     abcd
3725     xy:z:::abcd
3726     *** Failers
3727     abcd:
3728     abcd:
3729    
3730     /^[^bcd]*(c+)/
3731     aexycd
3732    
3733     /(>a+)ab/
3734    
3735     /(?>a+)b/
3736     aaab
3737    
3738     /([[:]+)/
3739     a:[b]:
3740    
3741     /([[=]+)/
3742     a=[b]=
3743    
3744     /([[.]+)/
3745     a.[b].
3746    
3747     /((?>a+)b)/
3748     aaab
3749    
3750     /(?>(a+))b/
3751     aaab
3752    
3753     /((?>[^()]+)|\([^()]*\))+/
3754     ((abc(ade)ufh()()x
3755    
3756     /a\Z/
3757     *** Failers
3758     aaab
3759     a\nb\n
3760    
3761     /b\Z/
3762     a\nb\n
3763    
3764     /b\z/
3765    
3766     /b\Z/
3767     a\nb
3768    
3769     /b\z/
3770     a\nb
3771     *** Failers
3772    
3773     /(?>.*)(?<=(abcd|wxyz))/
3774     alphabetabcd
3775     endingwxyz
3776     *** Failers
3777     a rather long string that doesn't end with one of them
3778    
3779     /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
3780     word cat dog elephant mussel cow horse canary baboon snake shark otherword
3781     word cat dog elephant mussel cow horse canary baboon snake shark
3782    
3783     /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
3784     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
3785    
3786     /(?<=\d{3}(?!999))foo/
3787     999foo
3788     123999foo
3789     *** Failers
3790     123abcfoo
3791    
3792     /(?<=(?!...999)\d{3})foo/
3793     999foo
3794     123999foo
3795     *** Failers
3796     123abcfoo
3797    
3798     /(?<=\d{3}(?!999)...)foo/
3799     123abcfoo
3800     123456foo
3801     *** Failers
3802     123999foo
3803    
3804     /(?<=\d{3}...)(?<!999)foo/
3805     123abcfoo
3806     123456foo
3807     *** Failers
3808     123999foo
3809    
3810     /((Z)+|A)*/
3811     ZABCDEFG
3812    
3813     /(Z()|A)*/
3814     ZABCDEFG
3815    
3816     /(Z(())|A)*/
3817     ZABCDEFG
3818    
3819     /((?>Z)+|A)*/
3820     ZABCDEFG
3821    
3822     /((?>)+|A)*/
3823     ZABCDEFG
3824    
3825     /a*/g
3826     abbab
3827    
3828     /^[a-\d]/
3829     abcde
3830     -things
3831     0digit
3832     *** Failers
3833     bcdef
3834    
3835     /^[\d-a]/
3836     abcde
3837     -things
3838     0digit
3839     *** Failers
3840     bcdef
3841    
3842     /[[:space:]]+/
3843     > \x09\x0a\x0c\x0d\x0b<
3844    
3845     /[[:blank:]]+/
3846     > \x09\x0a\x0c\x0d\x0b<
3847    
3848     /[\s]+/
3849     > \x09\x0a\x0c\x0d\x0b<
3850    
3851     /\s+/
3852     > \x09\x0a\x0c\x0d\x0b<
3853    
3854     /a b/x
3855     ab
3856    
3857     /(?!\A)x/m
3858     a\nxb\n
3859    
3860     /(?!^)x/m
3861     a\nxb\n
3862    
3863     /abc\Qabc\Eabc/
3864     abcabcabc
3865    
3866     /abc\Q(*+|\Eabc/
3867     abc(*+|abc
3868    
3869     / abc\Q abc\Eabc/x
3870     abc abcabc
3871     *** Failers
3872     abcabcabc
3873    
3874     /abc#comment
3875     \Q#not comment
3876     literal\E/x
3877     abc#not comment\n literal
3878    
3879     /abc#comment
3880     \Q#not comment
3881     literal/x
3882     abc#not comment\n literal
3883    
3884     /abc#comment
3885     \Q#not comment
3886     literal\E #more comment
3887     /x
3888     abc#not comment\n literal
3889    
3890     /abc#comment
3891     \Q#not comment
3892     literal\E #more comment/x
3893     abc#not comment\n literal
3894    
3895     /\Qabc\$xyz\E/
3896     abc\\\$xyz
3897    
3898     /\Qabc\E\$\Qxyz\E/
3899     abc\$xyz
3900    
3901     /\Gabc/
3902     abc
3903     *** Failers
3904     xyzabc
3905    
3906     /\Gabc./g
3907     abc1abc2xyzabc3
3908    
3909     /abc./g
3910     abc1abc2xyzabc3
3911    
3912     /a(?x: b c )d/
3913     XabcdY
3914     *** Failers
3915     Xa b c d Y
3916    
3917     /((?x)x y z | a b c)/
3918     XabcY
3919     AxyzB
3920    
3921     /(?i)AB(?-i)C/
3922     XabCY
3923     *** Failers
3924     XabcY
3925    
3926     /((?i)AB(?-i)C|D)E/
3927     abCE
3928     DE
3929     *** Failers
3930     abcE
3931     abCe
3932     dE
3933     De
3934    
3935     /[z\Qa-d]\E]/
3936     z
3937     a
3938     -
3939     d
3940     ]
3941     *** Failers
3942     b
3943    
3944     /[\z\C]/
3945     z
3946     C
3947    
3948     /\M/
3949     M
3950    
3951     /(a+)*b/
3952     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3953    
3954     /(?i)reg(?:ul(?:[a]|ae)r|ex)/
3955     REGular
3956     regulaer
3957     Regex
3958     regulr
3959    
3960     /[--]+/
3961    
3962    
3963    
3964    
3965    
3966     /(?<=Z)X./
3967     \x84XAZXB
3968    
3969     /^(?(2)a|(1)(2))+$/
3970     123a
3971    
3972     /(?<=a|bbbb)c/
3973     ac
3974     bbbbc
3975    
3976     /abc/>testsavedregex
3977     <testsavedregex
3978     abc
3979     *** Failers
3980     bca
3981    
3982     /abc/F>testsavedregex
3983     <testsavedregex
3984     abc
3985     *** Failers
3986     bca
3987    
3988     /(a|b)/S>testsavedregex
3989     <testsavedregex
3990     abc
3991     *** Failers
3992     def
3993    
3994     /(a|b)/SF>testsavedregex
3995     <testsavedregex
3996     abc
3997     *** Failers
3998     def
3999    
4000     /line\nbreak/
4001     this is a line\nbreak
4002     line one\nthis is a line\nbreak in the second line
4003    
4004     /line\nbreak/f
4005     this is a line\nbreak
4006     ** Failers
4007     line one\nthis is a line\nbreak in the second line
4008    
4009     /line\nbreak/mf
4010     this is a line\nbreak
4011     ** Failers
4012     line one\nthis is a line\nbreak in the second line
4013    
4014 nigel 87 /1234/
4015     123\P
4016     a4\P\R
4017    
4018     /1234/
4019     123\P
4020     4\P\R
4021    
4022 nigel 91 /^/mg
4023     a\nb\nc\n
4024     \
4025    
4026     /(?<=C\n)^/mg
4027     A\nC\nC\n
4028    
4029     /(?s)A?B/
4030     AB
4031     aB
4032    
4033     /(?s)A*B/
4034     AB
4035     aB
4036    
4037     /(?m)A?B/
4038     AB
4039     aB
4040    
4041     /(?m)A*B/
4042     AB
4043     aB
4044    
4045     /Content-Type\x3A[^\r\n]{6,}/
4046     Content-Type:xxxxxyyy
4047    
4048     /Content-Type\x3A[^\r\n]{6,}z/
4049     Content-Type:xxxxxyyyz
4050    
4051     /Content-Type\x3A[^a]{6,}/
4052     Content-Type:xxxyyy
4053    
4054     /Content-Type\x3A[^a]{6,}z/
4055     Content-Type:xxxyyyz
4056    
4057     /^abc/m
4058     xyz\nabc
4059     xyz\nabc\<lf>
4060     xyz\r\nabc\<lf>
4061     xyz\rabc\<cr>
4062     xyz\r\nabc\<crlf>
4063     ** Failers
4064     xyz\nabc\<cr>
4065     xyz\r\nabc\<cr>
4066     xyz\nabc\<crlf>
4067     xyz\rabc\<crlf>
4068     xyz\rabc\<lf>
4069    
4070     /abc$/m
4071     xyzabc
4072     xyzabc\n
4073     xyzabc\npqr
4074     xyzabc\r\<cr>
4075     xyzabc\rpqr\<cr>
4076     xyzabc\r\n\<crlf>
4077     xyzabc\r\npqr\<crlf>
4078     ** Failers
4079     xyzabc\r
4080     xyzabc\rpqr
4081     xyzabc\r\n
4082     xyzabc\r\npqr
4083    
4084     /^abc/m<cr>
4085     xyz\rabcdef
4086     xyz\nabcdef\<lf>
4087     ** Failers
4088     xyz\nabcdef
4089    
4090     /^abc/m<lf>
4091     xyz\nabcdef
4092     xyz\rabcdef\<cr>
4093     ** Failers
4094     xyz\rabcdef
4095    
4096     /^abc/m<crlf>
4097     xyz\r\nabcdef
4098     xyz\rabcdef\<cr>
4099     ** Failers
4100     xyz\rabcdef
4101    
4102     /.*/
4103     abc\ndef
4104     abc\rdef
4105     abc\r\ndef
4106     \<cr>abc\ndef
4107     \<cr>abc\rdef
4108     \<cr>abc\r\ndef
4109     \<crlf>abc\ndef
4110     \<crlf>abc\rdef
4111     \<crlf>abc\r\ndef
4112    
4113     /\w+(.)(.)?def/s
4114     abc\ndef
4115     abc\rdef
4116     abc\r\ndef
4117    
4118 nigel 77 / End of testinput7 /

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12