<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 3, 2014 at 3:22 PM, Igor Sysoev <span dir="ltr"><<a href="mailto:igor@sysoev.ru" target="_blank">igor@sysoev.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><span class=""><blockquote type="cite"><div dir="ltr"><div style="font-size:small;color:rgb(51,51,153)">Using named captures works (as demonstrated by <a href="https://stackoverflow.com/questions/12459518/nginx-extract-a-value-from-a-variable-or-any-string" target="_blank">https://stackoverflow.com/questions/12459518/nginx-extract-a-value-from-a-variable-or-any-string</a>), though:<br><div style="font-size:small;color:rgb(51,51,153)">map $host $foo {<br></div><div style="font-size:small;color:rgb(51,51,153)">    "~*^www\.(?<domain>.*)$"    $domain; # Named capture wins<br></div><div style="font-size:small;color:rgb(51,51,153)">    default                    $foo;<br></div>}</div></div></blockquote><div><br></div></span><div>default  $host;</div><span class=""><font color="#888888"><div><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word"><br></div></div></div></div></font></span></div></div></blockquote><div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">​Yup, my bad: typo while writing the example map.​<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">It does not interfere much with the problem though. Any piece of advice? :o)<br clear="all"><div><div class="gmail_signature"><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font>​</div></div></div></div></div><br></div></div>