const regex = new RegExp('<[\\s\\S]+?>', 'gm')
const str = `covid sucks and I want to go outside <!--/* Font Definitions */@font-face{font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}@font-
face{font-family:""Cambria Math"";panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face{font-family:Calibri;panose-
1:2 15 5 2 2 2 4 3 2 4;}@font-face{font-family:""Bradley Hand ITC"";panose-1:3 7 4 2 5 3 2 3 2 3;}/*
Style Definitions */p.MsoNormal, li.MsoNormal, div.MsoNormal{margin:0in;margin-bottom:.0001pt;font-
size:11.0pt;font-family:""Calibri"",sans-serif;}p.MsoListParagraph, li.MsoListParagraph,
div.MsoListParagraph{m{margin-bottom:0in;}--> pop goes the peanut.
this is text before the junk starts <!--/* Font Definitions */@font-face{font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}@font-
face{font-family:""Camb
NEW LINE!
NEW LINE!
ria Math"";panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face{font-family:Calibri;panose-
1:2 15 5 2 2 2 4 3 2 4;}@font-face{font-family:""Bradley Hand ITC"";panose-1:3 7 4 2 5 3 2 3 2 3;}/*
Style Definitions */p.MsoNormal, li.MsoNormal, div.MsoNormal{margin:0in;margin-bottom:.0001pt;font-
size:11.0pt;font-family:""Calibri"",sans-serif;}p.MsoListParagraph, li.MsoListParagraph,
div.MsoListParagraph{m{margin-bottom:0in;}--> ...and this is the bit afterwards even if the junk has line returns.`;
const subst = ``;
// The substituted value will be contained in the result variable
const result = str.replace(regex, subst);
console.log('Substitution result: ', result);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions