function replaceTag(value, from, to) {
  return value
    .replace(new RegExp(`<${from}(?=\\s|>)`, 'g'), `<${to}`) // positive lookahead for '>' or ' ' after the tagName
    .replace(new RegExp(`/${from}>`, 'g'), `/${to}>`);
}
@param {string} value
@param {string} from
@param {string} to