RegEx in whitelist
shuttlebox
shuttlebox at gmail.com
Fri Jun 23 17:07:54 IST 2006
On 6/23/06, Sam Przyswa <samp at arial-concept.com> wrote:
> shuttlebox a écrit :
>
> > On 6/23/06, Sam Przyswa <samp at arial-concept.com> wrote:
> >
> >> What is the right way accept all the smtp*-g*.free.fr machine ?
> >
> >
> > This should work:
> >
> > smtp.*-g.*\.free\.fr
> >
> > It can be done many ways.
>
>
> In fact a pure RegEx work as:
>
> From: smtp[\d]+-g[\d]+\.free\.fr yes
>
> Sure ?
Yours is more true to your example with numbers in it but when I see
asterisks I always tend to think of how file name matching is done in
the shell, the equivalent of "*" in Perl RE is ".*". The more you know
about what you want to match the more "pure" RE you can construct.
--
/peter
More information about the MailScanner
mailing list