docs: 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();
      }