Welcome! Log In Create A New Profile

Advanced

Regex positional capture in map

B.R.
November 03, 2014 09:06AM
map's documentation
<http://nginx.org/en/docs/http/ngx_http_map_module.html#map> 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 {
"~*^www\.(.*)$" $1; # Positional capture fails
default $foo;
}

What am I doing wrong?
---
*B. R.*
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Regex positional capture in map

B.R. November 03, 2014 09:06AM

Re: Regex positional capture in map

B.R. November 03, 2014 09:20AM

Re: Regex positional capture in map

Igor Sysoev November 03, 2014 09:24AM

Re: Regex positional capture in map

B.R. November 03, 2014 05:04PM

Re: Regex positional capture in map

Maxim Dounin November 03, 2014 07:24PM

Re: Regex positional capture in map

B.R. November 04, 2014 02:48AM

Re: Regex positional capture in map

Francis Daly November 03, 2014 06:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 245
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready