On Tue, Jul 07, 2020 at 11:41:01AM +0000, Pedro David Marco wrote:
> 
> >On Tuesday, July 7, 2020, 01:05:36 PM GMT+2, Henrik K <h...@hege.li> wrote:
> 
> 
> >What examply do you mean by checking multiple regex on the "same" URL?  Give
> an example.  Most likely it's already possible without any changes.
> 
> 
> for example..  checking if an URL matches Regex1  BUT does NOT matches Regex2 
> can be done  with looksahead/behind but is cpu-expensive and may be too 
> complex
> to maintain... 

Why would lookahead be expensive?  It's normal regex.  It's probably more
expensive to run two separate regexes.

uri FOO /^(?!.*?donotfind)(?=.*?findthis)/

Also newer SpamAssassin already has URIDetail plugin which can also do what
you want:

  uri_detail SYMBOLIC_TEST_NAME key1 =~ /value1/  key2 !~ /value2/ ...

Reply via email to