Getting the most out of regular expressions