how to convert ereg_replace to preg_replace in php?
<p>how to convert below ereg statements to preg_replace     </p>

<pre><code> $message = ereg_replace("http://([.]?[a-zA-Z0-9_/-])*", "&lt;a href=\"\\0\" target=\"_blank\"&gt;\\0&lt;/a&gt;", $message);
 $message = ereg_replace("(^| |\n)(www([.]?[a-zA-Z0-9_/-])*)", "\\1&lt;a href=\"http://\\2\" target=\"_blank\"&gt;\\2&lt;/a&gt;", $message);
</code></pre>
