I found this function to clean MS Word markup:
$html = ereg_replace("<(/)?(font|span|del|ins)[^>]*>","",$html);
$html = ereg_replace("<([^>]*)(class|lang|style|size|face)=(\"[^\"]*\"|'[^']*'|[^>]+)([^>]*)>","<\\1>",$html);
$html = ereg_replace("<([^>]*)(class|lang|style|size|face)=(\"[^\"]*\"|'[^']*'|[^>]+)([^>]*)>","<\\1>",$html);
and it works fine. However, I would like to replace ereg_replace (deprecated) by preg_replace. When I do this (with / delimiters), the function doesn't work anymore.
I understand very little of regular expressions, I'm afraid... Some wizard here that can help me with this? It would be very much appreciated!!