PCRE named captures sill counted in numerical variables list

B.R. reallfqq-nginx at yahoo.fr
Thu Apr 3 13:42:55 UTC 2014

​Thanks Maxim,

I just understood my mistake: I was confusing (once again, I think) named
captures and subpatterns...

What I wanted to use was the OR logic capability of captures while actually
not capturing them...
The starting question mark of both syntax confused me...

If anyone is intereted in it, the intended (and working) syntax is:
location ~* "^/([[:alpha:]]{1,8}(?:-[[:alpha:]]{1,8})?)(/.*[^/])?/?$" {
        try_files $uri $uri/  $2/?lang=$1&$args;

Working on multi-language URIs on webserver-side... ;o)
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140403/f76c0456/attachment.html>

More information about the nginx mailing list