PHP preg_replace to remove MS Office style html comments

crkgb

New Member
Im looking for a way to remove MS Office style html comments, and everything in between. These are of the form: \[code\]<!--[if gte mso 10]>\[/code\]blablablablablabla\[code\]<![endif]-->\[/code\]or\[code\]<!--[if gte mso 9]>\[/code\]blablablablablabla\[code\]<![endif]-->\[/code\]The problem i'm encountering is that I do not want to remove ALL comments from the html. Only these MSO style comments. Any ideas?
 
Back
Top