code: public static String replaceAll(final String input, final String regex,
        final Function<MatchResult, String> replacementFunction) {
      return replaceAll(input, Pattern.compile(regex), replacementFunction);
    }
docs: Returns a string which is the result of replacing every match of regex in the input string with
  the results of applying replacementFunction to the matched string. This is a candidate to be
  moved to a more general utility package.
  
  @param replacementFunction May not return null.