httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: Expression Parser: search and replace with s/PATTERN/REPLACEMENT/FLAGS
Date Sun, 04 Oct 2015 11:11:40 GMT
On 04 Oct 2015, at 12:51 PM, Graham Leggett <minfrin@sharp.fm> wrote:

> How about a regex function?
> 
> The single argument could be “s/PATTERN/REPLACEMENT/FLAGS”.

Or more specifically:

%{regex:%{REMOTE_USER} =~ /([^@]*)@.*/$1/}

Or perhaps to avoid the issue of having to escape the =~ characters this:

%{regex:/([^@]*)@.*/$1/%{REMOTE_USER}}

Regards,
Graham
—


Mime
View raw message