// https://regex101.com/r/yX5xS8/73 const html = ` `.replace(/\/])+)\/?>/gi, ''); console.log(html)