I am trying to manipulate an nginx variable.
I have a variable names $user which contains a UPN like [email protected] I want to set another variable, $xuser; to be the $user minus the @domain - ie, someone.
This is done in a location block, so I don't think that I can use map.
I have tried this, but $xuser never seems to get set:
if ($user ~* "(?<p>[aa-zZ]+)@example.com")
{
set $xuser $p;
}