Re: [exim] case insensitive regex when using readfile?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Dave Lugo
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] case insensitive regex when using readfile?
On Tue, 14 Nov 2006, Phil Pennock wrote:
>
> You might instead try using readfile's ability to replace newlines and
> have something like:
>
> regex = <; (?i)${readfile{FILENAME}{;(?i)}}
>


TYVM! (I forgot all about replacing the delimiter)

> which assumes that you won't use semi-colons in your regexes. The idea
> is to separate the contents of each line with a list-separator and the
> PCRE caseless-option setting, together with an instance of that before
> the first item. Might be problematic if the last (?i) with nothing
> after it causes problems.


... and it was ;)

>


To take care of the last (?i), I ended up doing a `ps ajx | md5sum`, and
tacked the result on the end, so your example would then become:

regex = <; (?i)${readfile{FILENAME}{;(?i)}}bb58cdde19799e822b9ee3117da89e28


> readfile doesn't expand the string and I don't recall off-hand how that
> interacts with the string-list stuff. You might need to use
> ${expand{...}} too, in which case knowing about \N in regexes and using
> a couple in the eol-replacement string might be helpful.
>


Haven't needed to add anything else yet.

Thanks again,

Dave

-- 
--------------------------------------------------------
Dave Lugo   dlugo@???    LC Unit #260   TINLC
Have you hugged your firewall today?   No spam, thanks.
--------------------------------------------------------
Are you the police?  . . . .  No ma'am, we're sysadmins.