public String replace(Matcher matcher) {
        StringBuilder replacementBuffer = new StringBuilder();
        String replacementText;

        for (int group = 1; group <= matcher.groupCount(); group++) {
            replacementText = getReplacement(group);
            if (replacementText != null) {
                // System.out.println("replacing group " + group + " : "
                // + matcher.group(group) + " with " + replacementText);
                replacementBuffer.append(replacementText);
            } else {
                replacementBuffer.append(matcher.group(group));
            }
        }
        return replacementBuffer.toString();
    }
This class represents a conversion rule It uses a Pattern and defines for
each capturing group of this Pattern a replacement text

@author jean-noelcharpin
slf4j-migrator/src/main/java/org/slf4j/migrator/line/MultiGroupConversionRule.java