[antispam-f] Re: RegEx Testing

  • From: Steven Pampling <steve.pampling@xxxxxxxxxxxxx>
  • To: antispam@xxxxxxxxxxxxx
  • Date: Mon, 06 Nov 2006 18:01:59 +0000 (GMT)

On 06 Nov, Jeremy C B Nicoll <Jeremy@xxxxxxxxxxxxxxxx> wrote:

> For a long time I had Pluto's regex support in use, but after a while I
> turned a lot of my regex rules off.  Why?  Because I wasn't completely
> convinced that they made filter checks faster.

If the pattern is not carefully coded then they will make things slower,
but they always provide a more flexible combination than anything AntiSpam
has ever had before

>  The suspected reason
> will also affect people using regex in AntiSpam (unless there's an
> option in the way that AS calls regex that defeats this).  The problem
> is that when a person sees a pattern like

>   A.*B.*

Avoid using the .* combination wherever possible.
Constructs like A.{1,15}B will match the first combination of A and B
separated by anything between 1 and 15 characters where the .* construct
applies to ANY number of characters between the A and B including zero.

-- 

Steve Pampling

Other related posts: