title: PHP-Function ereg_replace() is deprecated
body: <pre><code>class autoActiveLink {
  
      function makeActiveLink($originalString){
  
          $newString = ereg_replace("[[:alpha:]]+://[^&lt;&gt;[:space:]]+[[:alnum:]/]","&lt;a href=\"\\0\" target=\"_blank\"&gt;\\0&lt;/a&gt;", $originalString);
          return $newString;
      }
  
  }
  </code></pre>
  
  <p>What should I replace the function <code>ereg_replace</code> with? I tried <code>preg_replace</code>, but the error still persists.</p>