Re: Regex positional capture in map

2014-11-03 Thread B.R.
Thanks to both of you! Documentation bug, then... --- *B. R.* On Tue, Nov 4, 2014 at 1:22 AM, Maxim Dounin wrote: > Hello! > > On Mon, Nov 03, 2014 at 11:02:23PM +0100, B.R. wrote: > > > On Mon, Nov 3, 2014 at 3:22 PM, Igor Sysoev wrote: > > > > > Using named captures works (as demonstrated by

Re: Regex positional capture in map

2014-11-03 Thread Maxim Dounin
Hello! On Mon, Nov 03, 2014 at 11:02:23PM +0100, B.R. wrote: > On Mon, Nov 3, 2014 at 3:22 PM, Igor Sysoev wrote: > > > Using named captures works (as demonstrated by > > https://stackoverflow.com/questions/12459518/nginx-extract-a-value-from-a-variable-or-any-string), > > though: > > map $host

Re: Regex positional capture in map

2014-11-03 Thread Francis Daly
On Mon, Nov 03, 2014 at 03:03:22PM +0100, B.R. wrote: Hi there, I think this is a documentation bug. > map's documentation > states: > A regular expression can contain named and positional captures that can > later be used in other dir

Re: Regex positional capture in map

2014-11-03 Thread B.R.
On Mon, Nov 3, 2014 at 3:22 PM, Igor Sysoev wrote: > Using named captures works (as demonstrated by > https://stackoverflow.com/questions/12459518/nginx-extract-a-value-from-a-variable-or-any-string), > though: > map $host $foo { > "~*^www\.(?.*)$"$domain; # Named capture wins > defau

Re: Regex positional capture in map

2014-11-03 Thread Igor Sysoev
On 03 Nov 2014, at 17:18, B.R. wrote: > Using named captures works (as demonstrated by > https://stackoverflow.com/questions/12459518/nginx-extract-a-value-from-a-variable-or-any-string), > though: > map $host $foo { > "~*^www\.(?.*)$"$domain; # Named capture wins > default

Re: Regex positional capture in map

2014-11-03 Thread B.R.
Using named captures works (as demonstrated by https://stackoverflow.com/questions/12459518/nginx-extract-a-value-from-a-variable-or-any-string), though: map $host $foo { "~*^www\.(?.*)$"$domain; # Named capture wins default$foo; } --- *B. R.* On Mon, Nov 3, 2014 at

Regex positional capture in map

2014-11-03 Thread B.R.
map's documentation states: A regular expression can contain named and positional captures that can later be used in other directives along with the resulting variable. Trying to do the following failed validation: map $host $foo { "