SPUG: [OT] procmail extended regexp Re: Regular Expression
John W. Krahn
krahnj at telus.net
Thu Jul 7 15:05:10 PDT 2005
John Costello wrote:
> On Thu, 7 Jul 2005, Duane Blanchard wrote:
>
>>My favorite online reference is http://www.regular-expressions.info/
>>which covers more material for more environments than I can fathom.
>
> Related to regular expressions, does anyone know of a good discussion of
> procmail's regular expressions? I encountered an odd example (discussed
> earlier this month on LondonPM) in which I wasn't sure if procmail would
> treat $? as an environment variable or an optional end-of-line character.
You can't use quantifiers with zero-width assertions because they match at a
position in the string not any characters. If you want an optional
end-of-line you have to do something like "($|)" (match end-of-line or nothing.)
John
--
use Perl;
program
fulfillment
More information about the spug-list
mailing list