<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">I tried to configure the following location with something like:<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
location ~* "^/([[:alpha:]]{1,8}(?<subtag>-[[:alpha:]]{1,8})?)(/.*[^/])?/?$" {<br> try_files $uri $uri/ $2/?lang=$1&$args;<br>}<br clear="all"></div><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">
However, the $2 variable does not catch the last part of the URI as expected (either it catches the named capture or nothing at all, that I do not know nor care).</div><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">
Using $3 instead of $2 does the job.</div><br><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">I thought that using named captures allowed for those capture not to be counted in numerical variable</div>
<div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">.<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">Am I wrong expecting that?<br>
</div><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>