procmail
[Top] [All Lists]

Re: Logic, DeMorgan's law, and efficiency

2000-08-09 05:55:52
On Wed, 9 Aug 2000 08:01:42 -0400 (EDT), Dallman Ross
<dman(_at_)nomotek(_dot_)com> wrote:
  nonWEST="*=\\?gb2312\\?[bq]\\?"  # useful for character-set testing

Minor issue: the leading star needs to be escaped, or -- if I
understand your intentions correctly -- removed altogether.

I believe you can avoid some backslashitis by using single quotes
instead of double. (Too lazy to check this ...)

But then it occured to me that, with DeMorgan's Law, I probably
should be able to do this?

     :0
     * ! $ FROM    ?? $nonWEST
     * ! $ SUBJECT ?? $nonWEST
     { }

     :0 E  # else . . .
     { RECIPE = "${RECIPE:+$RECIPE }UBE_03" }

Yes, this looks correct. FWIW, I went through similar pains when
trying to figure out how to write the `experiments.rc' file which is
part of the FAQ. Originally I started out with two recipes but I
lumped them together using this same technique.

Hope this helps,

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

_______________________________________________
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>