$re = '/<!--\[[^\]]*(?:](?!-->)[^\]]*)*]-->\R?/';
$str = '<link rel=File-List href="filelist.xml">
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Revision>3</o:Revision>
<o:TotalTime>1</o:TotalTime>
<o:Created>2014-02-14T21:30:00Z</o:Created>
<o:LastSaved>2014-02-14T21:35:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>58</o:Words>
<o:Characters>331</o:Characters>
<o:Lines>2</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>388</o:CharactersWithSpaces>
<o:Version>15.00</o:Version>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<link rel=themeData href="themedata.tx">';
$subst = "";
$result = preg_replace($re, $subst, $str, 1);
echo "The result of the substitution is ".$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 PHP, please visit: http://php.net/manual/en/ref.pcre.php