code: public static String replace(final CharSequence target, final CharSequence replacement, final String string) {
      return Pattern.compile(quote(target.toString())/*
                                                      * , Pattern.LITERAL jdk 1.4
                                                      */).matcher(string).replaceAll(
      /* Matcher. jdk 1.4 */quoteReplacement(replacement.toString()));
    }
docs: Replaces target with replacement in string. For jdk 1.4 compatiblity.
  
  @param target
  @param replacement
  @param string
  @return