Added regex matching to metrics.