function replaceWithSurround(text, find, prefix, suffix) {
  const escapedString = escapeRegex(find);
  const re = new RegExp(escapedString, 'gi');
  return text.replace(re, matched => prefix + matched + suffix);
}
function replaceWithSurround(text, find, prefix, suffix) {
  const escapedString = escapeRegex(find);
  const re = new RegExp(escapedString, 'gi');
  return text.replace(re, matched => prefix + matched + suffix);
}
function replaceWithSurround ( text , find , prefix , suffix ) { const escapedString = escapeRegex ( find ) ; const re = new RegExp ( escapedString , 'gi' ) ; return text . replace ( re , matched => prefix + matched + suffix ) ; }
Replace all occurrences of string
@param text
@param find
@param prefix
@param suffix
@returns string
Replace all occurrences of string
Replace all occurrences of find with prefix and suffix