Variables in if regexes

I have a caching system I need to bypass if the logging in user’s name
is found in the $request_uri. I’m trying to do something like this, but
can’t get the variable to interpolate into the regex. Any suggestions
pretty please?

set $me "Asabouros.";
if ($uri ~ $me) { set $chk ""; }

I’ve always tried things like this:
if ($uri ~ “by-{$me}”) { set $chk “”; }

Thanks!
-Kevin

Posted at Nginx Forum: