convert ereg_replace to preg_replace in PHP
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3649574/replace-ereg-replace-with-preg-replace">replace ereg_replace with preg_replace</a>  </p>
</blockquote>



<p>I've upgraded to PHP 5.3 and I need to know how to convert these tags to Preg_replace. </p>

<p>Any ideas? </p>

<pre><code>$html = ereg_replace("&lt;(/)?(font|span|del|ins)[^&gt;]*&gt;", "", $html);

// then run another pass over the html (twice), removing unwanted attributes    
$html = ereg_replace("&lt;([^&gt;]*)(class|lang|style|size|face)=(\"[^\"]*\"|'[^']*'|[^&gt;]+)([^&gt;]*)&gt;", "&lt;\\1&gt;", $html);
$html = ereg_replace("&lt;([^&gt;]*)(class|lang|style|size|face)=(\"[^\"]*\"|'[^']*'|[^&gt;]+)([^&gt;]*)&gt;", "&lt;\\1&gt;", $html);
</code></pre>
