如何将干净的MS Word函数中的ereg_replace转换为preg_replace?

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!!

Try using # as delimiter, example:

$html = preg_replace("#<(/)?(font|span|del|ins)[^>]*>#","",$html);