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

Contents of /code/trunk/testdata/testinput7

Parent Directory Parent Directory | Revision Log Revision Log


Revision 143 - (hide annotations) (download)
Mon Apr 2 10:08:14 2007 UTC (7 years, 4 months ago) by ph10
File size: 77856 byte(s)
Previous fix for pcretest was buggy. Try again.

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 nigel 93 c/x
1779 nigel 77 abc
1780    
1781     /ab{1,3}bc/
1782     abbbbc
1783     abbbc
1784     abbc
1785     *** Failers
1786     abc
1787     abbbbbc
1788    
1789     /([^.]*)\.([^:]*):[T ]+(.*)/
1790     track1.title:TBlah blah blah
1791    
1792     /([^.]*)\.([^:]*):[T ]+(.*)/i
1793     track1.title:TBlah blah blah
1794    
1795     /([^.]*)\.([^:]*):[t ]+(.*)/i
1796     track1.title:TBlah blah blah
1797    
1798     /^[W-c]+$/
1799     WXY_^abc
1800     *** Failers
1801     wxy
1802    
1803     /^[W-c]+$/i
1804     WXY_^abc
1805     wxy_^ABC
1806    
1807     /^[\x3f-\x5F]+$/i
1808     WXY_^abc
1809     wxy_^ABC
1810    
1811     /^abc$/m
1812     abc
1813     qqq\nabc
1814     abc\nzzz
1815     qqq\nabc\nzzz
1816    
1817     /^abc$/
1818     abc
1819     *** Failers
1820     qqq\nabc
1821     abc\nzzz
1822     qqq\nabc\nzzz
1823    
1824     /\Aabc\Z/m
1825     abc
1826     abc\n
1827     *** Failers
1828     qqq\nabc
1829     abc\nzzz
1830     qqq\nabc\nzzz
1831    
1832     /\A(.)*\Z/s
1833     abc\ndef
1834    
1835     /\A(.)*\Z/m
1836     *** Failers
1837     abc\ndef
1838    
1839     /(?:b)|(?::+)/
1840     b::c
1841     c::b
1842    
1843     /[-az]+/
1844     az-
1845     *** Failers
1846     b
1847    
1848     /[az-]+/
1849     za-
1850     *** Failers
1851     b
1852    
1853     /[a\-z]+/
1854     a-z
1855     *** Failers
1856     b
1857    
1858     /[a-z]+/
1859     abcdxyz
1860    
1861     /[\d-]+/
1862     12-34
1863     *** Failers
1864     aaa
1865    
1866     /[\d-z]+/
1867     12-34z
1868     *** Failers
1869     aaa
1870    
1871     /\x5c/
1872     \\
1873    
1874     /\x20Z/
1875     the Zoo
1876     *** Failers
1877     Zulu
1878    
1879     /ab{3cd/
1880     ab{3cd
1881    
1882     /ab{3,cd/
1883     ab{3,cd
1884    
1885     /ab{3,4a}cd/
1886     ab{3,4a}cd
1887    
1888     /{4,5a}bc/
1889     {4,5a}bc
1890    
1891 nigel 93 /^a.b/<lf>
1892 nigel 77 a\rb
1893     *** Failers
1894     a\nb
1895    
1896     /abc$/
1897     abc
1898     abc\n
1899     *** Failers
1900     abc\ndef
1901    
1902     /(abc)\123/
1903     abc\x53
1904    
1905     /(abc)\223/
1906     abc\x93
1907    
1908     /(abc)\323/
1909     abc\xd3
1910    
1911 nigel 91 /(abc)\100/
1912 nigel 77 abc\x40
1913     abc\100
1914    
1915 nigel 91 /(abc)\1000/
1916 nigel 77 abc\x400
1917     abc\x40\x30
1918     abc\1000
1919     abc\100\x30
1920     abc\100\060
1921     abc\100\60
1922    
1923     /abc\81/
1924     abc\081
1925     abc\0\x38\x31
1926    
1927     /abc\91/
1928     abc\091
1929     abc\0\x39\x31
1930    
1931     /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
1932     abcdefghijk\12S
1933    
1934 nigel 93 /ab\hdef/
1935     abhdef
1936 nigel 77
1937     /a{0}bc/
1938     bc
1939    
1940     /(a|(bc)){0,0}?xyz/
1941     xyz
1942    
1943     /abc[\10]de/
1944     abc\010de
1945    
1946     /abc[\1]de/
1947     abc\1de
1948    
1949     /(abc)[\1]de/
1950     abc\1de
1951    
1952     /(?s)a.b/
1953     a\nb
1954    
1955     /^([^a])([^\b])([^c]*)([^d]{3,4})/
1956     baNOTccccd
1957     baNOTcccd
1958     baNOTccd
1959     bacccd
1960     *** Failers
1961     anything
1962     b\bc
1963     baccd
1964    
1965     /[^a]/
1966     Abc
1967    
1968     /[^a]/i
1969     Abc
1970    
1971     /[^a]+/
1972     AAAaAbc
1973    
1974     /[^a]+/i
1975     AAAaAbc
1976    
1977     /[^a]+/
1978     bbb\nccc
1979    
1980     /[^k]$/
1981     abc
1982     *** Failers
1983     abk
1984    
1985     /[^k]{2,3}$/
1986     abc
1987     kbc
1988     kabc
1989     *** Failers
1990     abk
1991     akb
1992     akk
1993    
1994     /^\d{8,}\@.+[^k]$/
1995     12345678\@a.b.c.d
1996     123456789\@x.y.z
1997     *** Failers
1998     12345678\@x.y.uk
1999     1234567\@a.b.c.d
2000    
2001     /[^a]/
2002     aaaabcd
2003     aaAabcd
2004    
2005     /[^a]/i
2006     aaaabcd
2007     aaAabcd
2008    
2009     /[^az]/
2010     aaaabcd
2011     aaAabcd
2012    
2013     /[^az]/i
2014     aaaabcd
2015     aaAabcd
2016    
2017     /\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/
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    
2020     /P[^*]TAIRE[^*]{1,6}?LL/
2021     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
2022    
2023     /P[^*]TAIRE[^*]{1,}?LL/
2024     xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
2025    
2026     /(\.\d\d[1-9]?)\d+/
2027     1.230003938
2028     1.875000282
2029     1.235
2030    
2031     /(\.\d\d((?=0)|\d(?=\d)))/
2032     1.230003938
2033     1.875000282
2034     *** Failers
2035     1.235
2036    
2037     /a(?)b/
2038     ab
2039    
2040     /\b(foo)\s+(\w+)/i
2041     Food is on the foo table
2042    
2043     /foo(.*)bar/
2044     The food is under the bar in the barn.
2045    
2046     /foo(.*?)bar/
2047     The food is under the bar in the barn.
2048    
2049     /(.*)(\d*)/
2050     I have 2 numbers: 53147
2051    
2052     /(.*)(\d+)/
2053     I have 2 numbers: 53147
2054    
2055     /(.*?)(\d*)/
2056     I have 2 numbers: 53147
2057    
2058     /(.*?)(\d+)/
2059     I have 2 numbers: 53147
2060    
2061     /(.*)(\d+)$/
2062     I have 2 numbers: 53147
2063    
2064     /(.*?)(\d+)$/
2065     I have 2 numbers: 53147
2066    
2067     /(.*)\b(\d+)$/
2068     I have 2 numbers: 53147
2069    
2070     /(.*\D)(\d+)$/
2071     I have 2 numbers: 53147
2072    
2073     /^\D*(?!123)/
2074     ABC123
2075    
2076     /^(\D*)(?=\d)(?!123)/
2077     ABC445
2078     *** Failers
2079     ABC123
2080    
2081     /^[W-]46]/
2082     W46]789
2083     -46]789
2084     *** Failers
2085     Wall
2086     Zebra
2087     42
2088     [abcd]
2089     ]abcd[
2090    
2091     /^[W-\]46]/
2092     W46]789
2093     Wall
2094     Zebra
2095     Xylophone
2096     42
2097     [abcd]
2098     ]abcd[
2099     \\backslash
2100     *** Failers
2101     -46]789
2102     well
2103    
2104     /\d\d\/\d\d\/\d\d\d\d/
2105     01/01/2000
2106    
2107     /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
2108     word cat dog elephant mussel cow horse canary baboon snake shark otherword
2109     word cat dog elephant mussel cow horse canary baboon snake shark
2110    
2111     /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
2112     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
2113    
2114     /^(a){0,0}/
2115     bcd
2116     abc
2117     aab
2118    
2119     /^(a){0,1}/
2120     bcd
2121     abc
2122     aab
2123    
2124     /^(a){0,2}/
2125     bcd
2126     abc
2127     aab
2128    
2129     /^(a){0,3}/
2130     bcd
2131     abc
2132     aab
2133     aaa
2134    
2135     /^(a){0,}/
2136     bcd
2137     abc
2138     aab
2139     aaa
2140     aaaaaaaa
2141    
2142     /^(a){1,1}/
2143     bcd
2144     abc
2145     aab
2146    
2147     /^(a){1,2}/
2148     bcd
2149     abc
2150     aab
2151    
2152     /^(a){1,3}/
2153     bcd
2154     abc
2155     aab
2156     aaa
2157    
2158     /^(a){1,}/
2159     bcd
2160     abc
2161     aab
2162     aaa
2163     aaaaaaaa
2164    
2165     /.*\.gif/
2166     borfle\nbib.gif\nno
2167    
2168     /.{0,}\.gif/
2169     borfle\nbib.gif\nno
2170    
2171     /.*\.gif/m
2172     borfle\nbib.gif\nno
2173    
2174     /.*\.gif/s
2175     borfle\nbib.gif\nno
2176    
2177     /.*\.gif/ms
2178     borfle\nbib.gif\nno
2179    
2180     /.*$/
2181     borfle\nbib.gif\nno
2182    
2183     /.*$/m
2184     borfle\nbib.gif\nno
2185    
2186     /.*$/s
2187     borfle\nbib.gif\nno
2188    
2189     /.*$/ms
2190     borfle\nbib.gif\nno
2191    
2192     /.*$/
2193     borfle\nbib.gif\nno\n
2194    
2195     /.*$/m
2196     borfle\nbib.gif\nno\n
2197    
2198     /.*$/s
2199     borfle\nbib.gif\nno\n
2200    
2201     /.*$/ms
2202     borfle\nbib.gif\nno\n
2203    
2204     /(.*X|^B)/
2205     abcde\n1234Xyz
2206     BarFoo
2207     *** Failers
2208     abcde\nBar
2209    
2210     /(.*X|^B)/m
2211     abcde\n1234Xyz
2212     BarFoo
2213     abcde\nBar
2214    
2215     /(.*X|^B)/s
2216     abcde\n1234Xyz
2217     BarFoo
2218     *** Failers
2219     abcde\nBar
2220    
2221     /(.*X|^B)/ms
2222     abcde\n1234Xyz
2223     BarFoo
2224     abcde\nBar
2225    
2226     /(?s)(.*X|^B)/
2227     abcde\n1234Xyz
2228     BarFoo
2229     *** Failers
2230     abcde\nBar
2231    
2232     /(?s:.*X|^B)/
2233     abcde\n1234Xyz
2234     BarFoo
2235     *** Failers
2236     abcde\nBar
2237    
2238     /^.*B/
2239     **** Failers
2240     abc\nB
2241    
2242     /(?s)^.*B/
2243     abc\nB
2244    
2245     /(?m)^.*B/
2246     abc\nB
2247    
2248     /(?ms)^.*B/
2249     abc\nB
2250    
2251     /(?ms)^B/
2252     abc\nB
2253    
2254     /(?s)B$/
2255     B\n
2256    
2257     /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
2258     123456654321
2259    
2260     /^\d\d\d\d\d\d\d\d\d\d\d\d/
2261     123456654321
2262    
2263     /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
2264     123456654321
2265    
2266     /^[abc]{12}/
2267     abcabcabcabc
2268    
2269     /^[a-c]{12}/
2270     abcabcabcabc
2271    
2272     /^(a|b|c){12}/
2273     abcabcabcabc
2274    
2275     /^[abcdefghijklmnopqrstuvwxy0123456789]/
2276     n
2277     *** Failers
2278     z
2279    
2280     /abcde{0,0}/
2281     abcd
2282     *** Failers
2283     abce
2284    
2285     /ab[cd]{0,0}e/
2286     abe
2287     *** Failers
2288     abcde
2289    
2290     /ab(c){0,0}d/
2291     abd
2292     *** Failers
2293     abcd
2294    
2295     /a(b*)/
2296     a
2297     ab
2298     abbbb
2299     *** Failers
2300     bbbbb
2301    
2302     /ab\d{0}e/
2303     abe
2304     *** Failers
2305     ab1e
2306    
2307     /"([^\\"]+|\\.)*"/
2308     the \"quick\" brown fox
2309     \"the \\\"quick\\\" brown fox\"
2310    
2311     /.*?/g+
2312     abc
2313    
2314     /\b/g+
2315     abc
2316    
2317     /\b/+g
2318     abc
2319    
2320     //g
2321     abc
2322    
2323     /<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
2324     <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>
2325    
2326     /a[^a]b/
2327     acb
2328     a\nb
2329    
2330     /a.b/
2331     acb
2332     *** Failers
2333     a\nb
2334    
2335     /a[^a]b/s
2336     acb
2337     a\nb
2338    
2339     /a.b/s
2340     acb
2341     a\nb
2342    
2343     /^(b+?|a){1,2}?c/
2344     bac
2345     bbac
2346     bbbac
2347     bbbbac
2348     bbbbbac
2349    
2350     /^(b+|a){1,2}?c/
2351     bac
2352     bbac
2353     bbbac
2354     bbbbac
2355     bbbbbac
2356    
2357     /(?!\A)x/m
2358     x\nb\n
2359     a\bx\n
2360    
2361     /\x0{ab}/
2362     \0{ab}
2363    
2364     /(A|B)*?CD/
2365     CD
2366    
2367     /(A|B)*CD/
2368     CD
2369    
2370     /(?<!bar)foo/
2371     foo
2372     catfood
2373     arfootle
2374     rfoosh
2375     *** Failers
2376     barfoo
2377     towbarfoo
2378    
2379     /\w{3}(?<!bar)foo/
2380     catfood
2381     *** Failers
2382     foo
2383     barfoo
2384     towbarfoo
2385    
2386     /(?<=(foo)a)bar/
2387     fooabar
2388     *** Failers
2389     bar
2390     foobbar
2391    
2392     /\Aabc\z/m
2393     abc
2394     *** Failers
2395     abc\n
2396     qqq\nabc
2397     abc\nzzz
2398     qqq\nabc\nzzz
2399    
2400     "(?>.*/)foo"
2401     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
2402    
2403     "(?>.*/)foo"
2404     /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
2405    
2406     /(?>(\.\d\d[1-9]?))\d+/
2407     1.230003938
2408     1.875000282
2409     *** Failers
2410     1.235
2411    
2412     /^((?>\w+)|(?>\s+))*$/
2413     now is the time for all good men to come to the aid of the party
2414     *** Failers
2415     this is not a line with only words and spaces!
2416    
2417     /(\d+)(\w)/
2418     12345a
2419     12345+
2420    
2421     /((?>\d+))(\w)/
2422     12345a
2423     *** Failers
2424     12345+
2425    
2426     /(?>a+)b/
2427     aaab
2428    
2429     /((?>a+)b)/
2430     aaab
2431    
2432     /(?>(a+))b/
2433     aaab
2434    
2435     /(?>b)+/
2436     aaabbbccc
2437    
2438     /(?>a+|b+|c+)*c/
2439     aaabbbbccccd
2440    
2441     /(a+|b+|c+)*c/
2442     aaabbbbccccd
2443    
2444     /((?>[^()]+)|\([^()]*\))+/
2445     ((abc(ade)ufh()()x
2446    
2447     /\(((?>[^()]+)|\([^()]+\))+\)/
2448     (abc)
2449     (abc(def)xyz)
2450     *** Failers
2451     ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2452    
2453     /a(?-i)b/i
2454     ab
2455     Ab
2456     *** Failers
2457     aB
2458     AB
2459    
2460     /(a (?x)b c)d e/
2461     a bcd e
2462     *** Failers
2463     a b cd e
2464     abcd e
2465     a bcde
2466    
2467     /(a b(?x)c d (?-x)e f)/
2468     a bcde f
2469     *** Failers
2470     abcdef
2471    
2472     /(a(?i)b)c/
2473     abc
2474     aBc
2475     *** Failers
2476     abC
2477     aBC
2478     Abc
2479     ABc
2480     ABC
2481     AbC
2482    
2483     /a(?i:b)c/
2484     abc
2485     aBc
2486     *** Failers
2487     ABC
2488     abC
2489     aBC
2490    
2491     /a(?i:b)*c/
2492     aBc
2493     aBBc
2494     *** Failers
2495     aBC
2496     aBBC
2497    
2498     /a(?=b(?i)c)\w\wd/
2499     abcd
2500     abCd
2501     *** Failers
2502     aBCd
2503     abcD
2504    
2505     /(?s-i:more.*than).*million/i
2506     more than million
2507     more than MILLION
2508     more \n than Million
2509     *** Failers
2510     MORE THAN MILLION
2511     more \n than \n million
2512    
2513     /(?:(?s-i)more.*than).*million/i
2514     more than million
2515     more than MILLION
2516     more \n than Million
2517     *** Failers
2518     MORE THAN MILLION
2519     more \n than \n million
2520    
2521     /(?>a(?i)b+)+c/
2522     abc
2523     aBbc
2524     aBBc
2525     *** Failers
2526     Abc
2527     abAb
2528     abbC
2529    
2530     /(?=a(?i)b)\w\wc/
2531     abc
2532     aBc
2533     *** Failers
2534     Ab
2535     abC
2536     aBC
2537    
2538     /(?<=a(?i)b)(\w\w)c/
2539     abxxc
2540     aBxxc
2541     *** Failers
2542     Abxxc
2543     ABxxc
2544     abxxC
2545    
2546     /^(?(?=abc)\w{3}:|\d\d)$/
2547     abc:
2548     12
2549     *** Failers
2550     123
2551     xyz
2552    
2553     /^(?(?!abc)\d\d|\w{3}:)$/
2554     abc:
2555     12
2556     *** Failers
2557     123
2558     xyz
2559    
2560     /(?(?<=foo)bar|cat)/
2561     foobar
2562     cat
2563     fcat
2564     focat
2565     *** Failers
2566     foocat
2567    
2568     /(?(?<!foo)cat|bar)/
2569     foobar
2570     cat
2571     fcat
2572     focat
2573     *** Failers
2574     foocat
2575    
2576     /(?>a*)*/
2577     a
2578     aa
2579     aaaa
2580    
2581     /(abc|)+/
2582     abc
2583     abcabc
2584     abcabcabc
2585     xyz
2586    
2587     /([a]*)*/
2588     a
2589     aaaaa
2590    
2591     /([ab]*)*/
2592     a
2593     b
2594     ababab
2595     aaaabcde
2596     bbbb
2597    
2598     /([^a]*)*/
2599     b
2600     bbbb
2601     aaa
2602    
2603     /([^ab]*)*/
2604     cccc
2605     abab
2606    
2607     /([a]*?)*/
2608     a
2609     aaaa
2610    
2611     /([ab]*?)*/
2612     a
2613     b
2614     abab
2615     baba
2616    
2617     /([^a]*?)*/
2618     b
2619     bbbb
2620     aaa
2621    
2622     /([^ab]*?)*/
2623     c
2624     cccc
2625     baba
2626    
2627     /(?>a*)*/
2628     a
2629     aaabcde
2630    
2631     /((?>a*))*/
2632     aaaaa
2633     aabbaa
2634    
2635     /((?>a*?))*/
2636     aaaaa
2637     aabbaa
2638    
2639     /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
2640     12-sep-98
2641     12-09-98
2642     *** Failers
2643     sep-12-98
2644    
2645     /(?i:saturday|sunday)/
2646     saturday
2647     sunday
2648     Saturday
2649     Sunday
2650     SATURDAY
2651     SUNDAY
2652     SunDay
2653    
2654     /(a(?i)bc|BB)x/
2655     abcx
2656     aBCx
2657     bbx
2658     BBx
2659     *** Failers
2660     abcX
2661     aBCX
2662     bbX
2663     BBX
2664    
2665     /^([ab](?i)[cd]|[ef])/
2666     ac
2667     aC
2668     bD
2669     elephant
2670     Europe
2671     frog
2672     France
2673     *** Failers
2674     Africa
2675    
2676     /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
2677     ab
2678     aBd
2679     xy
2680     xY
2681     zebra
2682     Zambesi
2683     *** Failers
2684     aCD
2685     XY
2686    
2687     /(?<=foo\n)^bar/m
2688     foo\nbar
2689     *** Failers
2690     bar
2691     baz\nbar
2692    
2693     /(?<=(?<!foo)bar)baz/
2694     barbaz
2695     barbarbaz
2696     koobarbaz
2697     *** Failers
2698     baz
2699     foobarbaz
2700    
2701     /The following tests are taken from the Perl 5.005 test suite; some of them/
2702     /are compatible with 5.004, but I'd rather not have to sort them out./
2703    
2704     /abc/
2705     abc
2706     xabcy
2707     ababc
2708     *** Failers
2709     xbc
2710     axc
2711     abx
2712    
2713     /ab*c/
2714     abc
2715    
2716     /ab*bc/
2717     abc
2718     abbc
2719     abbbbc
2720    
2721     /.{1}/
2722     abbbbc
2723    
2724     /.{3,4}/
2725     abbbbc
2726    
2727     /ab{0,}bc/
2728     abbbbc
2729    
2730     /ab+bc/
2731     abbc
2732     *** Failers
2733     abc
2734     abq
2735    
2736     /ab{1,}bc/
2737    
2738     /ab+bc/
2739     abbbbc
2740    
2741     /ab{1,}bc/
2742     abbbbc
2743    
2744     /ab{1,3}bc/
2745     abbbbc
2746    
2747     /ab{3,4}bc/
2748     abbbbc
2749    
2750     /ab{4,5}bc/
2751     *** Failers
2752     abq
2753     abbbbc
2754    
2755     /ab?bc/
2756     abbc
2757     abc
2758    
2759     /ab{0,1}bc/
2760     abc
2761    
2762     /ab?bc/
2763    
2764     /ab?c/
2765     abc
2766    
2767     /ab{0,1}c/
2768     abc
2769    
2770     /^abc$/
2771     abc
2772     *** Failers
2773     abbbbc
2774     abcc
2775    
2776     /^abc/
2777     abcc
2778    
2779     /^abc$/
2780    
2781     /abc$/
2782     aabc
2783     *** Failers
2784     aabc
2785     aabcd
2786    
2787     /^/
2788     abc
2789    
2790     /$/
2791     abc
2792    
2793     /a.c/
2794     abc
2795     axc
2796    
2797     /a.*c/
2798     axyzc
2799    
2800     /a[bc]d/
2801     abd
2802     *** Failers
2803     axyzd
2804     abc
2805    
2806     /a[b-d]e/
2807     ace
2808    
2809     /a[b-d]/
2810     aac
2811    
2812     /a[-b]/
2813     a-
2814    
2815     /a[b-]/
2816     a-
2817    
2818     /a]/
2819     a]
2820    
2821     /a[]]b/
2822     a]b
2823    
2824     /a[^bc]d/
2825     aed
2826     *** Failers
2827     abd
2828     abd
2829    
2830     /a[^-b]c/
2831     adc
2832    
2833     /a[^]b]c/
2834     adc
2835     *** Failers
2836     a-c
2837     a]c
2838    
2839     /\ba\b/
2840     a-
2841     -a
2842     -a-
2843    
2844     /\by\b/
2845     *** Failers
2846     xy
2847     yz
2848     xyz
2849    
2850     /\Ba\B/
2851     *** Failers
2852     a-
2853     -a
2854     -a-
2855    
2856     /\By\b/
2857     xy
2858    
2859     /\by\B/
2860     yz
2861    
2862     /\By\B/
2863     xyz
2864    
2865     /\w/
2866     a
2867    
2868     /\W/
2869     -
2870     *** Failers
2871     -
2872     a
2873    
2874     /a\sb/
2875     a b
2876    
2877     /a\Sb/
2878     a-b
2879     *** Failers
2880     a-b
2881     a b
2882    
2883     /\d/
2884     1
2885    
2886     /\D/
2887     -
2888     *** Failers
2889     -
2890     1
2891    
2892     /[\w]/
2893     a
2894    
2895     /[\W]/
2896     -
2897     *** Failers
2898     -
2899     a
2900    
2901     /a[\s]b/
2902     a b
2903    
2904     /a[\S]b/
2905     a-b
2906     *** Failers
2907     a-b
2908     a b
2909    
2910     /[\d]/
2911     1
2912    
2913     /[\D]/
2914     -
2915     *** Failers
2916     -
2917     1
2918    
2919     /ab|cd/
2920     abc
2921     abcd
2922    
2923     /()ef/
2924     def
2925    
2926     /$b/
2927    
2928     /a\(b/
2929     a(b
2930    
2931     /a\(*b/
2932     ab
2933     a((b
2934    
2935     /a\\b/
2936     a\b
2937    
2938     /((a))/
2939     abc
2940    
2941     /(a)b(c)/
2942     abc
2943    
2944     /a+b+c/
2945     aabbabc
2946    
2947     /a{1,}b{1,}c/
2948     aabbabc
2949    
2950     /a.+?c/
2951     abcabc
2952    
2953     /(a+|b)*/
2954     ab
2955    
2956     /(a+|b){0,}/
2957     ab
2958    
2959     /(a+|b)+/
2960     ab
2961    
2962     /(a+|b){1,}/
2963     ab
2964    
2965     /(a+|b)?/
2966     ab
2967    
2968     /(a+|b){0,1}/
2969     ab
2970    
2971     /[^ab]*/
2972     cde
2973    
2974     /abc/
2975     *** Failers
2976     b
2977    
2978    
2979     /a*/
2980    
2981    
2982     /([abc])*d/
2983     abbbcd
2984    
2985     /([abc])*bcd/
2986     abcd
2987    
2988     /a|b|c|d|e/
2989     e
2990    
2991     /(a|b|c|d|e)f/
2992     ef
2993    
2994     /abcd*efg/
2995     abcdefg
2996    
2997     /ab*/
2998     xabyabbbz
2999     xayabbbz
3000    
3001     /(ab|cd)e/
3002     abcde
3003    
3004     /[abhgefdc]ij/
3005     hij
3006    
3007     /^(ab|cd)e/
3008    
3009     /(abc|)ef/
3010     abcdef
3011    
3012     /(a|b)c*d/
3013     abcd
3014    
3015     /(ab|ab*)bc/
3016     abc
3017    
3018     /a([bc]*)c*/
3019     abc
3020    
3021     /a([bc]*)(c*d)/
3022     abcd
3023    
3024     /a([bc]+)(c*d)/
3025     abcd
3026    
3027     /a([bc]*)(c+d)/
3028     abcd
3029    
3030     /a[bcd]*dcdcde/
3031     adcdcde
3032    
3033     /a[bcd]+dcdcde/
3034     *** Failers
3035     abcde
3036     adcdcde
3037    
3038     /(ab|a)b*c/
3039     abc
3040    
3041     /((a)(b)c)(d)/
3042     abcd
3043    
3044     /[a-zA-Z_][a-zA-Z0-9_]*/
3045     alpha
3046    
3047     /^a(bc+|b[eh])g|.h$/
3048     abh
3049    
3050     /(bc+d$|ef*g.|h?i(j|k))/
3051     effgz
3052     ij
3053     reffgz
3054     *** Failers
3055     effg
3056     bcdd
3057    
3058     /((((((((((a))))))))))/
3059     a
3060    
3061     /(((((((((a)))))))))/
3062     a
3063    
3064     /multiple words of text/
3065     *** Failers
3066     aa
3067     uh-uh
3068    
3069     /multiple words/
3070     multiple words, yeah
3071    
3072     /(.*)c(.*)/
3073     abcde
3074    
3075     /\((.*), (.*)\)/
3076     (a, b)
3077    
3078     /[k]/
3079    
3080     /abcd/
3081     abcd
3082    
3083     /a(bc)d/
3084     abcd
3085    
3086     /a[-]?c/
3087     ac
3088    
3089     /abc/i
3090     ABC
3091     XABCY
3092     ABABC
3093     *** Failers
3094     aaxabxbaxbbx
3095     XBC
3096     AXC
3097     ABX
3098    
3099     /ab*c/i
3100     ABC
3101    
3102     /ab*bc/i
3103     ABC
3104     ABBC
3105    
3106     /ab*?bc/i
3107     ABBBBC
3108    
3109     /ab{0,}?bc/i
3110     ABBBBC
3111    
3112     /ab+?bc/i
3113     ABBC
3114    
3115     /ab+bc/i
3116     *** Failers
3117     ABC
3118     ABQ
3119    
3120     /ab{1,}bc/i
3121    
3122     /ab+bc/i
3123     ABBBBC
3124    
3125     /ab{1,}?bc/i
3126     ABBBBC
3127    
3128     /ab{1,3}?bc/i
3129     ABBBBC
3130    
3131     /ab{3,4}?bc/i
3132     ABBBBC
3133    
3134     /ab{4,5}?bc/i
3135     *** Failers
3136     ABQ
3137     ABBBBC
3138    
3139     /ab??bc/i
3140     ABBC
3141     ABC
3142    
3143     /ab{0,1}?bc/i
3144     ABC
3145    
3146     /ab??bc/i
3147    
3148     /ab??c/i
3149     ABC
3150    
3151     /ab{0,1}?c/i
3152     ABC
3153    
3154     /^abc$/i
3155     ABC
3156     *** Failers
3157     ABBBBC
3158     ABCC
3159    
3160     /^abc/i
3161     ABCC
3162    
3163     /^abc$/i
3164    
3165     /abc$/i
3166     AABC
3167    
3168     /^/i
3169     ABC
3170    
3171     /$/i
3172     ABC
3173    
3174     /a.c/i
3175     ABC
3176     AXC
3177    
3178     /a.*?c/i
3179     AXYZC
3180    
3181     /a.*c/i
3182     *** Failers
3183     AABC
3184     AXYZD
3185    
3186     /a[bc]d/i
3187     ABD
3188    
3189     /a[b-d]e/i
3190     ACE
3191     *** Failers
3192     ABC
3193     ABD
3194    
3195     /a[b-d]/i
3196     AAC
3197    
3198     /a[-b]/i
3199     A-
3200    
3201     /a[b-]/i
3202     A-
3203    
3204     /a]/i
3205     A]
3206    
3207     /a[]]b/i
3208     A]B
3209    
3210     /a[^bc]d/i
3211     AED
3212    
3213     /a[^-b]c/i
3214     ADC
3215     *** Failers
3216     ABD
3217     A-C
3218    
3219     /a[^]b]c/i
3220     ADC
3221    
3222     /ab|cd/i
3223     ABC
3224     ABCD
3225    
3226     /()ef/i
3227     DEF
3228    
3229     /$b/i
3230     *** Failers
3231     A]C
3232     B
3233    
3234     /a\(b/i
3235     A(B
3236    
3237     /a\(*b/i
3238     AB
3239     A((B
3240    
3241     /a\\b/i
3242     A\B
3243    
3244     /((a))/i
3245     ABC
3246    
3247     /(a)b(c)/i
3248     ABC
3249    
3250     /a+b+c/i
3251     AABBABC
3252    
3253     /a{1,}b{1,}c/i
3254     AABBABC
3255    
3256     /a.+?c/i
3257     ABCABC
3258    
3259     /a.*?c/i
3260     ABCABC
3261    
3262     /a.{0,5}?c/i
3263     ABCABC
3264    
3265     /(a+|b)*/i
3266     AB
3267    
3268     /(a+|b){0,}/i
3269     AB
3270    
3271     /(a+|b)+/i
3272     AB
3273    
3274     /(a+|b){1,}/i
3275     AB
3276    
3277     /(a+|b)?/i
3278     AB
3279    
3280     /(a+|b){0,1}/i
3281     AB
3282    
3283     /(a+|b){0,1}?/i
3284     AB
3285    
3286     /[^ab]*/i
3287     CDE
3288    
3289     /abc/i
3290    
3291     /a*/i
3292    
3293    
3294     /([abc])*d/i
3295     ABBBCD
3296    
3297     /([abc])*bcd/i
3298     ABCD
3299    
3300     /a|b|c|d|e/i
3301     E
3302    
3303     /(a|b|c|d|e)f/i
3304     EF
3305    
3306     /abcd*efg/i
3307     ABCDEFG
3308    
3309     /ab*/i
3310     XABYABBBZ
3311     XAYABBBZ
3312    
3313     /(ab|cd)e/i
3314     ABCDE
3315    
3316     /[abhgefdc]ij/i
3317     HIJ
3318    
3319     /^(ab|cd)e/i
3320     ABCDE
3321    
3322     /(abc|)ef/i
3323     ABCDEF
3324    
3325     /(a|b)c*d/i
3326     ABCD
3327    
3328     /(ab|ab*)bc/i
3329     ABC
3330    
3331     /a([bc]*)c*/i
3332     ABC
3333    
3334     /a([bc]*)(c*d)/i
3335     ABCD
3336    
3337     /a([bc]+)(c*d)/i
3338     ABCD
3339    
3340     /a([bc]*)(c+d)/i
3341     ABCD
3342    
3343     /a[bcd]*dcdcde/i
3344     ADCDCDE
3345    
3346     /a[bcd]+dcdcde/i
3347    
3348     /(ab|a)b*c/i
3349     ABC
3350    
3351     /((a)(b)c)(d)/i
3352     ABCD
3353    
3354     /[a-zA-Z_][a-zA-Z0-9_]*/i
3355     ALPHA
3356    
3357     /^a(bc+|b[eh])g|.h$/i
3358     ABH
3359    
3360     /(bc+d$|ef*g.|h?i(j|k))/i
3361     EFFGZ
3362     IJ
3363     REFFGZ
3364     *** Failers
3365     ADCDCDE
3366     EFFG
3367     BCDD
3368    
3369     /((((((((((a))))))))))/i
3370     A
3371    
3372     /(((((((((a)))))))))/i
3373     A
3374    
3375     /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
3376     A
3377    
3378     /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
3379     C
3380    
3381     /multiple words of text/i
3382     *** Failers
3383     AA
3384     UH-UH
3385    
3386     /multiple words/i
3387     MULTIPLE WORDS, YEAH
3388    
3389     /(.*)c(.*)/i
3390     ABCDE
3391    
3392     /\((.*), (.*)\)/i
3393     (A, B)
3394    
3395     /[k]/i
3396    
3397     /abcd/i
3398     ABCD
3399    
3400     /a(bc)d/i
3401     ABCD
3402    
3403     /a[-]?c/i
3404     AC
3405    
3406     /a(?!b)./
3407     abad
3408    
3409     /a(?=d)./
3410     abad
3411    
3412     /a(?=c|d)./
3413     abad
3414    
3415     /a(?:b|c|d)(.)/
3416     ace
3417    
3418     /a(?:b|c|d)*(.)/
3419     ace
3420    
3421     /a(?:b|c|d)+?(.)/
3422     ace
3423     acdbcdbe
3424    
3425     /a(?:b|c|d)+(.)/
3426     acdbcdbe
3427    
3428     /a(?:b|c|d){2}(.)/
3429     acdbcdbe
3430    
3431     /a(?:b|c|d){4,5}(.)/
3432     acdbcdbe
3433    
3434     /a(?:b|c|d){4,5}?(.)/
3435     acdbcdbe
3436    
3437     /((foo)|(bar))*/
3438     foobar
3439    
3440     /a(?:b|c|d){6,7}(.)/
3441     acdbcdbe
3442    
3443     /a(?:b|c|d){6,7}?(.)/
3444     acdbcdbe
3445    
3446     /a(?:b|c|d){5,6}(.)/
3447     acdbcdbe
3448    
3449     /a(?:b|c|d){5,6}?(.)/
3450     acdbcdbe
3451    
3452     /a(?:b|c|d){5,7}(.)/
3453     acdbcdbe
3454    
3455     /a(?:b|c|d){5,7}?(.)/
3456     acdbcdbe
3457    
3458     /a(?:b|(c|e){1,2}?|d)+?(.)/
3459     ace
3460    
3461     /^(.+)?B/
3462     AB
3463    
3464     /^([^a-z])|(\^)$/
3465     .
3466    
3467     /^[<>]&/
3468     <&OUT
3469    
3470     /(?:(f)(o)(o)|(b)(a)(r))*/
3471     foobar
3472    
3473     /(?<=a)b/
3474     ab
3475     *** Failers
3476     cb
3477     b
3478    
3479     /(?<!c)b/
3480     ab
3481     b
3482     b
3483    
3484     /(?:..)*a/
3485     aba
3486    
3487     /(?:..)*?a/
3488     aba
3489    
3490     /^(){3,5}/
3491     abc
3492    
3493     /^(a+)*ax/
3494     aax
3495    
3496     /^((a|b)+)*ax/
3497     aax
3498    
3499     /^((a|bc)+)*ax/
3500     aax
3501    
3502     /(a|x)*ab/
3503     cab
3504    
3505     /(a)*ab/
3506     cab
3507    
3508     /(?:(?i)a)b/
3509     ab
3510    
3511     /((?i)a)b/
3512     ab
3513    
3514     /(?:(?i)a)b/
3515     Ab
3516    
3517     /((?i)a)b/
3518     Ab
3519    
3520     /(?:(?i)a)b/
3521     *** Failers
3522     cb
3523     aB
3524    
3525     /((?i)a)b/
3526    
3527     /(?i:a)b/
3528     ab
3529    
3530     /((?i:a))b/
3531     ab
3532    
3533     /(?i:a)b/
3534     Ab
3535    
3536     /((?i:a))b/
3537     Ab
3538    
3539     /(?i:a)b/
3540     *** Failers
3541     aB
3542     aB
3543    
3544     /((?i:a))b/
3545    
3546     /(?:(?-i)a)b/i
3547     ab
3548    
3549     /((?-i)a)b/i
3550     ab
3551    
3552     /(?:(?-i)a)b/i
3553     aB
3554    
3555     /((?-i)a)b/i
3556     aB
3557    
3558     /(?:(?-i)a)b/i
3559     *** Failers
3560     aB
3561     Ab
3562    
3563     /((?-i)a)b/i
3564    
3565     /(?:(?-i)a)b/i
3566     aB
3567    
3568     /((?-i)a)b/i
3569     aB
3570    
3571     /(?:(?-i)a)b/i
3572     *** Failers
3573     Ab
3574     AB
3575    
3576     /((?-i)a)b/i
3577    
3578     /(?-i:a)b/i
3579     ab
3580    
3581     /((?-i:a))b/i
3582     ab
3583    
3584     /(?-i:a)b/i
3585     aB
3586    
3587     /((?-i:a))b/i
3588     aB
3589    
3590     /(?-i:a)b/i
3591     *** Failers
3592     AB
3593     Ab
3594    
3595     /((?-i:a))b/i
3596    
3597     /(?-i:a)b/i
3598     aB
3599    
3600     /((?-i:a))b/i
3601     aB
3602    
3603     /(?-i:a)b/i
3604     *** Failers
3605     Ab
3606     AB
3607    
3608     /((?-i:a))b/i
3609    
3610     /((?-i:a.))b/i
3611     *** Failers
3612     AB
3613     a\nB
3614    
3615     /((?s-i:a.))b/i
3616     a\nB
3617    
3618     /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
3619     cabbbb
3620    
3621     /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
3622     caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
3623    
3624     /foo\w*\d{4}baz/
3625     foobar1234baz
3626    
3627     /x(~~)*(?:(?:F)?)?/
3628     x~~
3629    
3630     /^a(?#xxx){3}c/
3631     aaac
3632    
3633     /^a (?#xxx) (?#yyy) {3}c/x
3634     aaac
3635    
3636     /(?<![cd])b/
3637     *** Failers
3638     B\nB
3639     dbcb
3640    
3641     /(?<![cd])[ab]/
3642     dbaacb
3643    
3644     /(?<!(c|d))b/
3645    
3646     /(?<!(c|d))[ab]/
3647     dbaacb
3648    
3649     /(?<!cd)[ab]/
3650     cdaccb
3651    
3652     /^(?:a?b?)*$/
3653     *** Failers
3654     dbcb
3655     a--
3656    
3657     /((?s)^a(.))((?m)^b$)/
3658     a\nb\nc\n
3659    
3660     /((?m)^b$)/
3661     a\nb\nc\n
3662    
3663     /(?m)^b/
3664     a\nb\n
3665    
3666     /(?m)^(b)/
3667     a\nb\n
3668    
3669     /((?m)^b)/
3670     a\nb\n
3671    
3672     /\n((?m)^b)/
3673     a\nb\n
3674    
3675     /((?s).)c(?!.)/
3676     a\nb\nc\n
3677     a\nb\nc\n
3678    
3679     /((?s)b.)c(?!.)/
3680     a\nb\nc\n
3681     a\nb\nc\n
3682    
3683     /^b/
3684    
3685     /()^b/
3686     *** Failers
3687     a\nb\nc\n
3688     a\nb\nc\n
3689    
3690     /((?m)^b)/
3691     a\nb\nc\n
3692    
3693     /(?(?!a)a|b)/
3694    
3695     /(?(?!a)b|a)/
3696     a
3697    
3698     /(?(?=a)b|a)/
3699     *** Failers
3700     a
3701     a
3702    
3703     /(?(?=a)a|b)/
3704     a
3705    
3706     /(\w+:)+/
3707     one:
3708    
3709     /$(?<=^(a))/
3710     a
3711    
3712     /([\w:]+::)?(\w+)$/
3713     abcd
3714     xy:z:::abcd
3715    
3716     /^[^bcd]*(c+)/
3717     aexycd
3718    
3719     /(a*)b+/
3720     caab
3721    
3722     /([\w:]+::)?(\w+)$/
3723     abcd
3724     xy:z:::abcd
3725     *** Failers
3726     abcd:
3727     abcd:
3728    
3729     /^[^bcd]*(c+)/
3730     aexycd
3731    
3732     /(>a+)ab/
3733    
3734     /(?>a+)b/
3735     aaab
3736    
3737     /([[:]+)/
3738     a:[b]:
3739    
3740     /([[=]+)/
3741     a=[b]=
3742    
3743     /([[.]+)/
3744     a.[b].
3745    
3746     /((?>a+)b)/
3747     aaab
3748    
3749     /(?>(a+))b/
3750     aaab
3751    
3752     /((?>[^()]+)|\([^()]*\))+/
3753     ((abc(ade)ufh()()x
3754    
3755     /a\Z/
3756     *** Failers
3757     aaab
3758     a\nb\n
3759    
3760     /b\Z/
3761     a\nb\n
3762    
3763     /b\z/
3764    
3765     /b\Z/
3766     a\nb
3767    
3768     /b\z/
3769     a\nb
3770     *** Failers
3771    
3772     /(?>.*)(?<=(abcd|wxyz))/
3773     alphabetabcd
3774     endingwxyz
3775     *** Failers
3776     a rather long string that doesn't end with one of them
3777    
3778     /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
3779     word cat dog elephant mussel cow horse canary baboon snake shark otherword
3780     word cat dog elephant mussel cow horse canary baboon snake shark
3781    
3782     /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
3783     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
3784    
3785     /(?<=\d{3}(?!999))foo/
3786     999foo
3787     123999foo
3788     *** Failers
3789     123abcfoo
3790    
3791     /(?<=(?!...999)\d{3})foo/
3792     999foo
3793     123999foo
3794     *** Failers
3795     123abcfoo
3796    
3797     /(?<=\d{3}(?!999)...)foo/
3798     123abcfoo
3799     123456foo
3800     *** Failers
3801     123999foo
3802    
3803     /(?<=\d{3}...)(?<!999)foo/
3804     123abcfoo
3805     123456foo
3806     *** Failers
3807     123999foo
3808    
3809     /((Z)+|A)*/
3810     ZABCDEFG
3811    
3812     /(Z()|A)*/
3813     ZABCDEFG
3814    
3815     /(Z(())|A)*/
3816     ZABCDEFG
3817    
3818     /((?>Z)+|A)*/
3819     ZABCDEFG
3820    
3821     /((?>)+|A)*/
3822     ZABCDEFG
3823    
3824     /a*/g
3825     abbab
3826    
3827     /^[a-\d]/
3828     abcde
3829     -things
3830     0digit
3831     *** Failers
3832     bcdef
3833    
3834     /^[\d-a]/
3835     abcde
3836     -things
3837     0digit
3838     *** Failers
3839     bcdef
3840    
3841     /[[:space:]]+/
3842     > \x09\x0a\x0c\x0d\x0b<
3843    
3844     /[[:blank:]]+/
3845     > \x09\x0a\x0c\x0d\x0b<
3846    
3847     /[\s]+/
3848     > \x09\x0a\x0c\x0d\x0b<
3849    
3850     /\s+/
3851     > \x09\x0a\x0c\x0d\x0b<
3852    
3853     /a b/x
3854     ab
3855    
3856     /(?!\A)x/m
3857     a\nxb\n
3858    
3859     /(?!^)x/m
3860     a\nxb\n
3861    
3862     /abc\Qabc\Eabc/
3863     abcabcabc
3864    
3865     /abc\Q(*+|\Eabc/
3866     abc(*+|abc
3867    
3868     / abc\Q abc\Eabc/x
3869     abc abcabc
3870     *** Failers
3871     abcabcabc
3872    
3873     /abc#comment
3874     \Q#not comment
3875     literal\E/x
3876     abc#not comment\n literal
3877    
3878     /abc#comment
3879     \Q#not comment
3880     literal/x
3881     abc#not comment\n literal
3882    
3883     /abc#comment
3884     \Q#not comment
3885     literal\E #more comment
3886     /x
3887     abc#not comment\n literal
3888    
3889     /abc#comment
3890     \Q#not comment
3891     literal\E #more comment/x
3892     abc#not comment\n literal
3893    
3894     /\Qabc\$xyz\E/
3895     abc\\\$xyz
3896    
3897     /\Qabc\E\$\Qxyz\E/
3898     abc\$xyz
3899    
3900     /\Gabc/
3901     abc
3902     *** Failers
3903     xyzabc
3904    
3905     /\Gabc./g
3906     abc1abc2xyzabc3
3907    
3908     /abc./g
3909     abc1abc2xyzabc3
3910    
3911     /a(?x: b c )d/
3912     XabcdY
3913     *** Failers
3914     Xa b c d Y
3915    
3916     /((?x)x y z | a b c)/
3917     XabcY
3918     AxyzB
3919    
3920     /(?i)AB(?-i)C/
3921     XabCY
3922     *** Failers
3923     XabcY
3924    
3925     /((?i)AB(?-i)C|D)E/
3926     abCE
3927     DE
3928     *** Failers
3929     abcE
3930     abCe
3931     dE
3932     De
3933    
3934     /[z\Qa-d]\E]/
3935     z
3936     a
3937     -
3938     d
3939     ]
3940     *** Failers
3941     b
3942    
3943     /[\z\C]/
3944     z
3945     C
3946    
3947     /\M/
3948     M
3949    
3950     /(a+)*b/
3951     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3952    
3953     /(?i)reg(?:ul(?:[a]|ae)r|ex)/
3954     REGular
3955     regulaer
3956     Regex
3957     regulr
3958    
3959     /[--]+/
3960    
3961    
3962    
3963    
3964    
3965     /(?<=Z)X./
3966     \x84XAZXB
3967    
3968     /^(?(2)a|(1)(2))+$/
3969     123a
3970    
3971     /(?<=a|bbbb)c/
3972     ac
3973     bbbbc
3974    
3975     /abc/>testsavedregex
3976     <testsavedregex
3977     abc
3978     *** Failers
3979     bca
3980    
3981     /abc/F>testsavedregex
3982     <testsavedregex
3983     abc
3984     *** Failers
3985     bca
3986    
3987     /(a|b)/S>testsavedregex
3988     <testsavedregex
3989     abc
3990     *** Failers
3991     def
3992    
3993     /(a|b)/SF>testsavedregex
3994     <testsavedregex
3995     abc
3996     *** Failers
3997     def
3998    
3999     /line\nbreak/
4000     this is a line\nbreak
4001     line one\nthis is a line\nbreak in the second line
4002    
4003     /line\nbreak/f
4004     this is a line\nbreak
4005     ** Failers
4006     line one\nthis is a line\nbreak in the second line
4007    
4008     /line\nbreak/mf
4009     this is a line\nbreak
4010     ** Failers
4011     line one\nthis is a line\nbreak in the second line
4012    
4013 nigel 87 /1234/
4014     123\P
4015     a4\P\R
4016    
4017     /1234/
4018     123\P
4019     4\P\R
4020    
4021 nigel 91 /^/mg
4022     a\nb\nc\n
4023     \
4024    
4025     /(?<=C\n)^/mg
4026     A\nC\nC\n
4027    
4028     /(?s)A?B/
4029     AB
4030     aB
4031    
4032     /(?s)A*B/
4033     AB
4034     aB
4035    
4036     /(?m)A?B/
4037     AB
4038     aB
4039    
4040     /(?m)A*B/
4041     AB
4042     aB
4043    
4044     /Content-Type\x3A[^\r\n]{6,}/
4045     Content-Type:xxxxxyyy
4046    
4047     /Content-Type\x3A[^\r\n]{6,}z/
4048     Content-Type:xxxxxyyyz
4049    
4050     /Content-Type\x3A[^a]{6,}/
4051     Content-Type:xxxyyy
4052    
4053     /Content-Type\x3A[^a]{6,}z/
4054     Content-Type:xxxyyyz
4055    
4056     /^abc/m
4057     xyz\nabc
4058     xyz\nabc\<lf>
4059     xyz\r\nabc\<lf>
4060     xyz\rabc\<cr>
4061     xyz\r\nabc\<crlf>
4062     ** Failers
4063     xyz\nabc\<cr>
4064     xyz\r\nabc\<cr>
4065     xyz\nabc\<crlf>
4066     xyz\rabc\<crlf>
4067     xyz\rabc\<lf>
4068    
4069 nigel 93 /abc$/m<lf>
4070 nigel 91 xyzabc
4071     xyzabc\n
4072     xyzabc\npqr
4073     xyzabc\r\<cr>
4074     xyzabc\rpqr\<cr>
4075     xyzabc\r\n\<crlf>
4076     xyzabc\r\npqr\<crlf>
4077     ** Failers
4078     xyzabc\r
4079     xyzabc\rpqr
4080     xyzabc\r\n
4081     xyzabc\r\npqr
4082    
4083     /^abc/m<cr>
4084     xyz\rabcdef
4085     xyz\nabcdef\<lf>
4086     ** Failers
4087     xyz\nabcdef
4088    
4089     /^abc/m<lf>
4090     xyz\nabcdef
4091     xyz\rabcdef\<cr>
4092     ** Failers
4093     xyz\rabcdef
4094    
4095     /^abc/m<crlf>
4096     xyz\r\nabcdef
4097     xyz\rabcdef\<cr>
4098     ** Failers
4099     xyz\rabcdef
4100    
4101 nigel 93 /.*/<lf>
4102 nigel 91 abc\ndef
4103     abc\rdef
4104     abc\r\ndef
4105     \<cr>abc\ndef
4106     \<cr>abc\rdef
4107     \<cr>abc\r\ndef
4108     \<crlf>abc\ndef
4109     \<crlf>abc\rdef
4110     \<crlf>abc\r\ndef
4111    
4112     /\w+(.)(.)?def/s
4113     abc\ndef
4114     abc\rdef
4115     abc\r\ndef
4116    
4117 nigel 93 /^\w+=.*(\\\n.*)*/
4118     abc=xyz\\\npqr
4119    
4120     /^(a()*)*/
4121     aaaa
4122    
4123     /^(?:a(?:(?:))*)*/
4124     aaaa
4125    
4126     /^(a()+)+/
4127     aaaa
4128    
4129     /^(?:a(?:(?:))+)+/
4130     aaaa
4131    
4132     /(a|)*\d/
4133     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4134     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
4135    
4136     /(?>a|)*\d/
4137     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4138     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
4139    
4140     /(?:a|)*\d/
4141     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
4142     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
4143    
4144     /^a.b/<lf>
4145     a\rb
4146     a\nb\<cr>
4147     ** Failers
4148     a\nb
4149     a\nb\<any>
4150     a\rb\<cr>
4151     a\rb\<any>
4152    
4153     /^abc./mgx<any>
4154     abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK
4155    
4156     /abc.$/mgx<any>
4157     abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9
4158    
4159     /^a\Rb/
4160     a\nb
4161     a\rb
4162     a\r\nb
4163     a\x0bb
4164     a\x0cb
4165     a\x85b
4166     ** Failers
4167     a\n\rb
4168    
4169     /^a\R*b/
4170     ab
4171     a\nb
4172     a\rb
4173     a\r\nb
4174     a\x0bb
4175     a\x0cb
4176     a\x85b
4177     a\n\rb
4178     a\n\r\x85\x0cb
4179    
4180     /^a\R+b/
4181     a\nb
4182     a\rb
4183     a\r\nb
4184     a\x0bb
4185     a\x0cb
4186     a\x85b
4187     a\n\rb
4188     a\n\r\x85\x0cb
4189     ** Failers
4190     ab
4191    
4192     /^a\R{1,3}b/
4193     a\nb
4194     a\n\rb
4195     a\n\r\x85b
4196     a\r\n\r\nb
4197     a\r\n\r\n\r\nb
4198     a\n\r\n\rb
4199     a\n\n\r\nb
4200     ** Failers
4201     a\n\n\n\rb
4202     a\r
4203    
4204     /^a[\R]b/
4205     aRb
4206     ** Failers
4207     a\nb
4208    
4209     /.+foo/
4210     afoo
4211     ** Failers
4212     \r\nfoo
4213     \nfoo
4214    
4215     /.+foo/<crlf>
4216     afoo
4217     \nfoo
4218     ** Failers
4219     \r\nfoo
4220    
4221     /.+foo/<any>
4222     afoo
4223     ** Failers
4224     \nfoo
4225     \r\nfoo
4226    
4227     /.+foo/s
4228     afoo
4229     \r\nfoo
4230     \nfoo
4231    
4232 ph10 131 /^$/mg<any>
4233     abc\r\rxyz
4234     abc\n\rxyz
4235     ** Failers
4236     abc\r\nxyz
4237    
4238     /^X/m
4239     XABC
4240     ** Failers
4241     XABC\B
4242    
4243 ph10 141 /(?m)^$/<any>g+
4244     abc\r\n\r\n
4245    
4246 ph10 143 /(?m)^$|^\r\n/<any>g+
4247     abc\r\n\r\n
4248    
4249     /(?m)$/<any>g+
4250     abc\r\n\r\n
4251    
4252 nigel 77 / End of testinput7 /

Properties

Name Value
svn:keywords "Author Date Id Revision Url"

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12