I have some file in mht format. On part HTML i do replace on regex.
string reta = Regex.Replace(_file, @"\<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>",
String.Empty, RegexOptions.Singleline | RegexOptions.Multiline |
RegexOptions.IgnorePatternWhitespace);
And for something file this replace never stop.
Maybe you can see something wrong in this replace.
I don't add this file because preserve data.
Thanx
PS. I try select out this part.
ANSWER
I changed the query REGEX in the test data set is working.
<![ \r\n\t]*--.*?--[ \r\n\t]*>