code: public int replace(CharSequence text, StringBuilder sb) {
          return replace(pattern.matcher(text), substitution, wrap(sb));
      }
docs: Takes all occurrences of the pattern this was constructed with in text and replaces them with the substitution.
  Appends the replaced text into sb.
  @param text a String, StringBuilder, or other CharSequence that may contain the text to replace
  @param sb the StringBuilder to append the result into
  @return the number of individual replacements performed; the results are applied to sb