Refactoring - extracting out the regexes