Re: Procmail egrep regex problem...

Bart Schaefer <[email protected]> Fri, 05 Mar 2010 16:32:38 -0800
Newsgroups gmane.mail.smartlist.user
Message-ID <[email protected]>
On Wed, Mar 3, 2010 at 8:21 PM, M. G. Devour <[email protected]> wrote:
>
> The following ought to solve that problem by matching either 0 or 1
> occurrences of the double quote after the equals sign:
>
> :0 fhw
> =A0 * ^content-type:.*multipart.*boundary=3D"?\/.*
>
> It doesn't. The string still shows up in $MATCH and $TESTVAR with both
> quote marks intact. WHY?

The \/ operator has the side-effect of making regular expressions to
the LEFT of the \/ match the MINIMUM possible string, and expressions
to the RIGHT of the \/ match the MAXIMUM possible string.  So any RE
on the left that ends with a wildcard will always prefer to treat the
wildcard as a non-match UNLESS that would cause the RE on the right to
fail.