On Thu, Oct 14, 2004 at 03:14:40PM -0600, Justin Gombos wrote:
* Christopher L. Barnard <cbar44(_at_)tsg(_dot_)cbot(_dot_)com> [2004-10-14
16:36]:
How do I tell procmail to match on a quote symbol?
I'm not sure why \' does not work for you, but did you try brackets
instead? ie. ['] Brackets are an alternative way to express a
metacharacter as a literal.
Actually, neither an apostrophe nor a quote symbol (") is a
metacharacter to procmail within regexes. Nor is it in the
set $SHELLMETAS (for which, see the man pages). To have procmail
match a quote symbol or an apostrophe, you just type it in the regex.
Here's and example:
:0
* BH ?? ()\/'[^']*'
{ foo = $MATCH }
procmail: Match on "()\/'[^']*'"
procmail: Assigning "foo='lander'"
:0
* BH ?? ()\/"[^"]*"
{ foo = $MATCH }
procmail: Match on "()\/"[^"]*""
procmail: Assigning "foo="Andy Tracy""
Sometimes we assign a var to a quotation mark for convenience's sake
(ours, not procmail's), because they do tend to mess up some editors.
--
dman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail