Refactoring

Complex method prepareRegexRule