Refactoring Regex