If you want to use regexes (to negate) you should use it properly, e.g. start with a "~".
See more: http://nginx.org/en/docs/http/ngx_http_map_module.html
That said, Francis' idea is a good one. Trying to negate things in regex is quite counterproductive.