Re: [EXIM] Regular expressions for filtering.

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: John Henders
CC: exim-users
Tárgy: Re: [EXIM] Regular expressions for filtering.
On Wed, 4 Mar 1998, John Henders wrote:

> With the advent of these new direct injection spam programs I'm trying
> to come up with a way of filtering out dialup ports on some of the
> larger service providers. Is exim's regular expression filters up to the
> job of matching something like this.
>
> sdn-ts-003riprovP12.dialsprint.net
>
> I'm thinking of an expression like *-ts-*.dialsprint.net.


Easy peasy:

^.*-ts-.*\.dialsprint\.net$

Actually, if you know that -ts- will be much nearer the front than the
end, then

^.*?-ts-.*\.dialsprint\.net$

would probably be more efficient. (If you put these things in quotes,
remember to double the \ characters.)

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
*** Exim information can be found at http://www.exim.org/ ***