Great Circle Associates Majordomo-Workers
(November 1997)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: negated regexps
From: Jason L Tibbitts III <tibbs @ hpc . uh . edu>
Date: 24 Nov 1997 18:23:09 -0600
To: majordomo-workers @ greatcircle . com
In-reply-to: Bill Houle's message of Mon, 24 Nov 1997 14:53:38 -0800
References: <199711180845.AAA27822@honor.greatcircle.com> <3.0.2.32.19971124145338.0098e910@www.sandiegoca.ncr.com>

>>>>> "BH" == Bill Houle <Bill.Houle@SanDiegoCA.NCR.COM> writes:

BH> OK, thanks. I can see how more than one regexp would be a problem.

Well, if you look at the way I implemented it (i.e. negated regexps for
taboo matching) for 2.0, the semantics work like this:

If any normal regex matches, bounce.
If any negated regex doesn't match, bounce.

So all of the normal regexps and none of the negated regexps must match.
The code is less than pretty but it essentially works like the 1.9x
version.  If you want to see it, look at Mj::Resend::_check_taboo()
and Mj::Config::parse_taboo_body (or _header).  (The match code is
generated in the latter and applied in the former.)

I don't think this really limits the usefulness of the specific application
of taboo regexps to taboo matches, because it covers the intended "must put
one of several keywords in the subject" application.  It's possible that
I'm missing some other possible application, though.

For the application you're looking at (something like (no)?advertise) I
completely sidestepped the issue by putting a programming language in the
way, so you can do :

zubscribe
deny, replyfile=goaway
/aol.com/ AND NOT /weenie@aol.com/

or you can make multiple rules if that bothers you:

zubscribe
allow
/weenie@aol.com/

zubscribe
deny, replyfile=goaway
/aol.com/

but I don't think you want to shoehorn any of that into 1.9x.

BTW, the fact that I've done very little development work lately is
weighing heavily and as soon as I can get my development environment
running on my new PII Linux machine I'll be cranking again.  Damn if
cperl-mode doesn't want to run under XEmacs 19.16.

 - J<


References:
Indexed By Date Previous: Re: negated regexps
From: Bill Houle <Bill.Houle@SanDiegoCA.NCR.COM>
Next: Sending an attachment with a majordomo message
From: "JUDY RUDE OF CTDE" <jrude@SMOKE.REEUSDA.GOV>
Indexed By Thread Previous: Re: negated regexps
From: Bill Houle <Bill.Houle@SanDiegoCA.NCR.COM>
Next: Sending an attachment with a majordomo message
From: "JUDY RUDE OF CTDE" <jrude@SMOKE.REEUSDA.GOV>

Google
 
Search Internet Search www.greatcircle.com