#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "<!--\[[^\]]*(?:](?!-->)[^\]]*)*]-->\R?"
Local $sString = "<link rel=File-List href="filelist.xml">" & @CRLF & _
"<!--[if gte mso 9]><xml>" & @CRLF & _
" <o:DocumentProperties>" & @CRLF & _
" <o:Revision>3</o:Revision>" & @CRLF & _
" <o:TotalTime>1</o:TotalTime>" & @CRLF & _
" <o:Created>2014-02-14T21:30:00Z</o:Created>" & @CRLF & _
" <o:LastSaved>2014-02-14T21:35:00Z</o:LastSaved>" & @CRLF & _
" <o:Pages>1</o:Pages>" & @CRLF & _
" <o:Words>58</o:Words>" & @CRLF & _
" <o:Characters>331</o:Characters>" & @CRLF & _
" <o:Lines>2</o:Lines>" & @CRLF & _
" <o:Paragraphs>1</o:Paragraphs>" & @CRLF & _
" <o:CharactersWithSpaces>388</o:CharactersWithSpaces>" & @CRLF & _
" <o:Version>15.00</o:Version>" & @CRLF & _
" </o:DocumentProperties>" & @CRLF & _
" <o:OfficeDocumentSettings>" & @CRLF & _
" <o:AllowPNG/>" & @CRLF & _
" </o:OfficeDocumentSettings>" & @CRLF & _
"</xml><![endif]-->" & @CRLF & _
"<link rel=themeData href="themedata.tx">"
Local $sSubst = ""
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm