PatternMatcherInput patternMatcherInput = new PatternMatcherInput(input);
Pattern pattern = getPattern();
if (matcher.contains(patternMatcherInput, pattern)) {
do {
MatchResult result = matcher.getMatch();
int start = result.beginOffset(0);
int end = result.endOffset(0);
buffer.append(convertMisc(input, lastStart, start));
buffer.append(convertMatch(input, start, end));
lastStart = end;
} while (matcher.contains(patternMatcherInput, pattern));