StringMatcher, match function and other match improvements