Regex Help For Procmail

perryh at pluto.rain.com perryh at pluto.rain.com
Mon Sep 6 03:37:36 UTC 2010


Frank Shute <frank at shute.org.uk> wrote:

> Drew, try this:
>
> * ^From:.*famous-smoke\.com
>
> I think it's not catching it because the period isn't backslash
> escaped ...

Unless there's some edge case that I'm not thinking of, adding a
backslash to escape a period will never convert a non-match into
a match.  An unescaped period in an RE matches any character,
including a period.  An escaped period matches only a period.

Adding the backslash _does_ better represent what the OP wants
to accomplish, but the lack of it is not the cause of the RE not
matching.  (I'm not sufficiently familiar with how procmail uses
REs to figure out what _is_ causing it not to match.)


More information about the freebsd-questions mailing list