TextMatcher refactoring