code: public static String replace(String strInput, String strPattern, String replacement, boolean caseSensitive, boolean replaceAll) throws MalformedPatternException {
  	return _replace(strInput, strPattern, escape(replacement), caseSensitive, replaceAll);
      }
docs: replace the first/all occurence of given pattern
  
  @param strInput text to search pattern
  @param strPattern pattern to search
  @param replacement text to replace with pattern
  @param caseSensitive
  @param replaceAll do replace all or only one
  @return transformed text
  @throws MalformedPatternException