Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

PCRE named captures sill counted in numerical variables list (2 replies)

$
0
0
I tried to configure the following location with something like:

location ~*
"^/([[:alpha:]]{1,8}(?<subtag>-[[:alpha:]]{1,8})?)(/.*[^/])?/?$" {
try_files $uri $uri/ $2/?lang=$1&$args;
}

​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).​

​Using $3 instead of $2 does the job.​


​I thought that using named captures allowed for those capture not to be
counted in numerical variable​
​.


​Am I wrong expecting that?
---
*B. R.*
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>