Re: [Exim] Regular Expression - Spam Filtering

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Miquel van Smoorenburg
Data:  
Para: exim-users
Assunto: Re: [Exim] Regular Expression - Spam Filtering
In article <3C053234.6CC18BE5@???>,
Marc Perkel <marc@???> wrote:
>I want to catch spam based on wirds inside of url's within a message.
>For example, if the url contains "fetish" it's a spammer. But I only
>want to test the domain name and not the web page.
>
>So
>
>http://www.fetish.com/test.htm
>
>is a match - but -
>
>http://www.test.com/fetish/test
>
>is NOT a match
>
>The idea is to test the text IN BETWEEN the http and the first / or
>space.
>
>How do I write a regular expression to do this?


You really should read up on regular expressions, because this
is a regexp 101 question. Anyway:

http://[^/]*(word_here|anotherword|morestuff)[^/]*/

Mike.
--
"Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former" -- Albert Einstein.