Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Use /g (global) regex modifier in map (6 replies)

$
0
0
Is it possible somehow to use the global modifier in a regex map match?

I'm trying to use the map directive to filter the query string leaving
my proxy_cache_key with only known parameters.

For the first test I've tried to use a map like below to just catch all
parameters without really filtering them without success. In this case,
the variable $args_filtered ends empty.

map $args $args_filtered {
"~(?<list>[^=]*=[^&]+)/g" $list;
default /;

}


When I try the same map, without the /g modifier at the end of the
expression, the variable $args_filtered ends with only the first query
string parameter in it.

--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>