Welcome! Log In Create A New Profile

Advanced

Problem with {} in map regex matching

António P. P. Almeida
October 09, 2013 07:06AM
To my surprise, apparently doing a match with {} like in:

map $args $has_tr0_arg {
default 0;

~"tr%5B0%5D%3D=[1-9][[:digit:]]{3}-[[:digit:]]{2}-[[:digit:]]{2}T[[:digit:]]{2}%2F[1-9][[:digit:]]{3}-[[:digit:]]{2}-[[:digit:]]{2}T[[:digit:]]{2}%26"
1;

~"%26tr%5B0%5D%3D=[1-9][[:digit:]]{3}-[[:digit:]]{2}-[[:digit:]]{2}T[[:digit:]]{2}%2F[1-9][[:digit:]]{3}-[[:digit:]]{2}-[[:digit:]]{2}T[[:digit:]]{2}"
1;
}

Doesn't work.

Which is bit surprising knowing that location regex matching works with {},
of course you have to quote it, like I do above.

This is what I get from nginx -t:

nginx: [emerg] unexpected "{" in /etc/nginx/nginx.conf

Is this expected behavior or I'm doing something wrong here?


Thanks,
----appa
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Problem with {} in map regex matching

António P. P. Almeida October 09, 2013 07:06AM

Re: Problem with {} in map regex matching

Maxim Dounin October 09, 2013 07:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready