procmail
[Top] [All Lists]

Re: Similar question on hidden text

2003-01-18 13:55:45
Charles Gregory wrote:
:0 B
* ^.*\<a  *href\=[^\>]*\>[^\<]*\<\!\-\-

I may have escaped more characters than necesary, but I'm a cautious
guy.

Keep in mind, though (apart from the loss of readability you get),
that \< and \> have a special meaning in procmail regexps and aren't
just matched by literal < and >; see man procmailrc for the details.
Actually you don't need any backslash at all in your condition:

:0 B
* ()<a  *href=[^>]*>[^<]*<!--

(I've omitted the pointless ^.*, the () is then needed to prevent
procmail from reading the < as the start of a size condition. A
backslash would have worked as well because at the *beginning* of a
condition line \< *is* the way to escape a literal <, but () avoids
confusion with the "normal" \< I mentioned above.)

/HW

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>