title: Alternative to eregi() in php
body: <p>So, i was using eregi in my mail script, but as of lately, i get the error that the function is deprecated.</p>
  
  <p>So, what is the easiest way to replace the following bit of code:</p>
  
  <pre><code>if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email'])))?
  </code></pre>
  
  <p>Any help is appreciated :)</p>