src/main/javascript/cowidget/common/RegExUtil.js
/**
	 * <p>Replaces each substring of the text String that matches the given regular expression pattern with the given replacement.</p>
	 * 
	 * @param text  text to search and replace in, may be null
	 * @param regex  the regular expression pattern to which this string is to be matched
	 * @param replacement  the string to be substituted for each match
	 * @return  the text with any replacements processed,
	 *              {@code null} if null String input
	 */
Replaces each substring of the text String that matches the given regular expression pattern with the given replacement.

@param text  text to search and replace in, may be null
@param regex  the regular expression pattern to which this string is to be matched
@param replacement  the string to be substituted for each match
@return  the text with any replacements processed,
null if null String input
Replaces each substring of the text String that matches the given regular expression pattern with the given replacement . @param text text to search and replace in may be null @param regex the regular expression pattern to which this string is to be matched @param replacement the string to be substituted for each match @return the text with any replacements processed null if null String input
static replaceAll(text, regex, replacement) {
		if (text == null || regex == null || replacement == null) {
			return text;
		}
		return regex.matcher(text).replaceAll(replacement);
	}
static replaceAll ( text , regex , replacement ) { if ( text == null || regex == null || replacement == null ) { return text ; } return regex . matcher ( text ) . replaceAll ( replacement ) ; }
<p>Replaces each substring of the text String that matches the given regular expression pattern with the given replacement.</p>
<p > Replaces each substring of the text String that matches the given regular expression pattern with the given replacement . < / p >