Problem with {} in map regex matching

António P. P. Almeida appa at perusio.net
Wed Oct 9 11:04:46 UTC 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20131009/1894c70c/attachment.html>


More information about the nginx mailing list