Metric filtering by regular expressions