[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Postfix Regular Expressions



On Sun, 2002-04-14 at 03:18, Gene Grimm wrote:
> Craig Sanders wrote:
> > \s and \t (and \d, \w, \b, and many others) are pcre (perl-compatible
> > regular expressions) which are an extension of standard regexps.
> > 
> > > If the map is a regexp style map, then you just use a tab instead of
> > > \t.
> > 
> > yep,  and use "[[:space:]]" instead of "\s"  - that matches spaces &
> > tabs, just like \s does.
> 
> For pcre style expressions how would you represent the perl pattern
> /\s{15,}[a-zA-Z0-9]{2,8}$/? Is it exactly the same in pcre as it is in
> perl? How would you represent this in regexp style (for immediate spam
> rejection patterns)?

Well, as pcre stands for 'perl compatible re', I would guess it should
be exactly the same.
But the best answer you can get is testing itself by using postmap -q
with that regex pattern and a few test-lines.

I believe a regexp style pattern is almost the same, with only \s
replaced by [[:space:]]

See the pcre(7) and regex(7) manpages for the details.

-- 
Tot ziens,

Bart-Jan


-- 
To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: