Re: [exim] Regex help

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Steven A. Reisman
Date:  
À: exim-users
Sujet: Re: [exim] Regex help
On Fri, Mar 11, 2005 at 10:31:26AM -0800, Marc Perkel wrote:
> Trying to write a regex string to detect 8-bit characters in various
> headers. What I want to do is drop message with lots of 8-bit characters
> in the subject line.
>
> something like:
>
> drop    message = Subject full of 8 bit characters
>    regex = ^Subject::.*[¢-ÿ]{6,}

>
> but that isn't working for some reason.



From my .forward filter:

if $h_subject matches [\\x80-\\xff]{5} then

You probably have to escape the \, or surround your expression with \N.
(You need only test for 6 characters, ie. {6} instead of {6,}.)


Steve



----------------------------------------------------------------------
Steven A. Reisman          <sar@???>           P.O. Box 409
Press Enter LLP                                       421 N 2nd Street
715-426-2100 or 651-436-5254                    River Falls, WI  54022
----------------------------------------------------------------------