Simplify regex and add white list

* Better metric name detection
* Simpler sanitization
* Make it possible to supply list of metrics to keep