On 04 Oct 2015, at 12:51 PM, Graham Leggett <[email protected]> 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
—
