Re: [EXIM] Regular expressions.

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Friso Kuipers
CC: exim-users
Subject: Re: [EXIM] Regular expressions.
On Tue, 16 Mar 1999, Friso Kuipers wrote:

> On the other hand, all mail to the outsite world can get send out right
> away. After studying the pcre man page for some time I came up with
> this:
>
> queue_smtp_except = ^(?i)([^.]+)\.(?!frop\.org)(.*)$
>
> Works fine, but needs refining. For instance, mail for
> 'host.frop.org.uk' would get queued also.


This is the most efficient way to code "not ending with" in a regular
expression:

queue_smtp_except = ^(?i)^(?>.*)(?<!frop.org)

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



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