On 01 Oct 2015, at 4:31 PM, Nick Kew <[email protected]> wrote:

>>>>>> Header set X-USER "expr=%{REMOTE_USER} =~ s/([^@]*)@.*/$1/"
> 
> One further thought there that might be easier to work,
> or a staging post on the way to your goal:
> 
> <If "expr=%{REMOTE_USER} =~ s/([^@]*)@.*/$1/">
>    X-USER = $_
> # (or whatever backref syntax you prefer).
> </If>

The reason I went with the named backref syntax only was the confusion 
generated by nesting or duplicating the sections.

I would avoid any auto-numbered variables that leak outside the scope of a 
single string expression so as to avoid side effects when two parts of the 
config generate the same variable.

Regards,
Graham
—

Reply via email to