regExpReplaceAll function
Uses regExp
to replace matches at s
, substituting with replace
.
replace
accepts use of $1
, $2
or ${1}
, ${2}
as group place holders.
Implementation
String regExpReplaceAll(Object? regExp, String s, String replace) {
var theRegExp = parseRegExp(regExp);
return theRegExp != null ? _RegExpReplacer(replace).replaceAll(regExp, s) : s;
}