Re: PCRE named captures sill counted in numerical variables list

2014-04-03 Thread B.R.
​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 i

Re: PCRE named captures sill counted in numerical variables list

2014-04-03 Thread Maxim Dounin
Hello! On Thu, Apr 03, 2014 at 03:08:14PM +0200, B.R. wrote: > I tried to configure the following location with something like: > > location ~* > "^/([[:alpha:]]{1,8}(?-[[:alpha:]]{1,8})?)(/.*[^/])?/?$" { > try_files $uri $uri/ $2/?lang=$1&$args; > } > > ​However, the $2 variable does

PCRE named captures sill counted in numerical variables list

2014-04-03 Thread B.R.
I tried to configure the following location with something like: location ~* "^/([[:alpha:]]{1,8}(?-[[: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 cap