Refactor regexes