Re: [Exim] Re: [exiscanusers] acl content-checking: trouble …

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Odhiambo G. Washington
CC: exiscanusers, exim-users
Betreff: Re: [Exim] Re: [exiscanusers] acl content-checking: trouble with regex
On Mon, 10 Nov 2003, Odhiambo G. Washington wrote:

> While this is unrelated, I am new to regex (newbie) but I do think
> that exiscan needs to have a facility for doing case-insensitive
> matching.


Assuming it is supporting Perl regexes, there already is such a
facility. Start your ACL with (?i) to set the case insensitive flag.
(Or you can use this "locally" within parens in part of an ACL.)

> I tried modifying yours to the following
>
> [^a-z^A-Z][Ss][^a-z^A-Z]*[Ee][^a-z^A-Z]*[Xx][^a-z^A-Z]
>
> ..but it doesn't seem to want to match where there is a space character,


That does look a rather weird regex:

[^a-z^A-Z]    matches one character that is not alphabetic and not ^
[Ss]          matches one character that is S or s
[^a-z^A-Z]*   matches zero or more characters that are not (as above)
etc.


> but anyway I am a beginner..


Read Jeff Friedl's book "Mastering Regular Expressions" (O'Reilly) if
you can get hold of a copy.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book