title: Alternative for deprecated PHP function: eregi_replace
body: <p>Do anyone know a good alternative for the deprecated eregi_replace function?</p>
  
  <p>I need it for this sniplet:</p>
  
  <pre><code>$pattern = "([a-z0-9][_a-z0-9.-]+@([0-9a-z][_0-9a-z-]+\.)+[a-z]{2,6})";
  $replace = "&lt;a href=\"mailto:\\1\"&gt;\\1&lt;/a&gt;";
  $text = eregi_replace($pattern, $replace, $text);
  </code></pre>
  
  <p>Thanks!</p>