Regex positional capture in map

B.R. reallfqq-nginx at
Mon Nov 3 14:03:22 UTC 2014

map's documentation
<> states:
A regular expression can contain named and positional captures that can
later be used in other directives along with the resulting variable.

Trying to do the following failed validation:
map $host $foo {
    "~*^www\.(.*)$"    $1; # Positional capture fails
    default                    $foo;

What am I doing wrong?
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list