re = /<[\s\S]+?>/m
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.'
subst = ''
result = str.gsub(re, subst)
# Print the result of the substitution
puts 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 Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html