src/main/javascript/cowidget/common/StringUtil.js
/**
	 * <p>
	 * Replaces each substring of the text String that matches the given regular
	 * expression with the given replacement.
	 * </p>
	 * 
	 * regex like /\./gi.
	 * 
	 * @deprecated Moved to RegExUtils.
	 */

Replaces each substring of the text String that matches the given regular
expression with the given replacement.

regex like /\./gi.

@deprecated Moved to RegExUtils.
Replaces each substring of the text String that matches the given regular expression with the given replacement . regex like / \ . / gi . @deprecated Moved to RegExUtils .
static replaceAll(text, regexStr, replacement) {
		let ret = text;
		if (StringUtil.isNotEmpty(text)) {
			regexStr = regexStr.replace(/\./g, '\\.');
			let regex = new RegExp(regexStr, 'g');
			ret = text.replace(regex, replacement);
		}
		return ret;
	}
static replaceAll ( text , regexStr , replacement ) { let ret = text ; if ( StringUtil . isNotEmpty ( text ) ) { regexStr = regexStr . replace ( / \. / g , '\\.' ) ; let regex = new RegExp ( regexStr , 'g' ) ; ret = text . replace ( regex , replacement ) ; } return ret ; }
<p>
 Replaces each substring of the text String that matches the given regular
 expression with the given replacement.
<p > Replaces each substring of the text String that matches the given regular expression with the given replacement .
// TODO replace . to \\.
 // StringUtil.LOG.debug('regexStr: ', regexStr);
 // StringUtil.LOG.debug('regex: ', regex);
 // StringUtil.LOG.debug('text: ', text);
