code: private String substituteString(String inputString, String patternString,
  			String replaceString) {
  		Pattern pattern = Pattern.compile(patternString);
  		Matcher m = pattern.matcher(inputString);
  		return m.replaceAll(replaceString);
  	}
docs: <p>
  Performs simple string replacement using regular expressions. All
  matching occurrences of the pattern string will be replaced in the input
  string by the replacement string.
  
  @param inputString
  The source string.
  @param patternString
  The regular expression pattern.
  @param replaceString
  The replacement string.
  @return The source string with substitutions.