Tidy output from regular expression matching
