Deprecated: Function eregi() is deprecated contact form
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6270004/how-can-i-convert-ereg-expressions-to-preg-in-php">How can I convert ereg expressions to preg in PHP?</a>  </p>
</blockquote>



<p>I have a php contact form that I have used on a few different websites. I am trying to implement the same one on a new site, but I am getting the following message:</p>

<p>Deprecated: Function eregi() is deprecated in /home/content/58/10223058/html/contact-1.php on line 36</p>

<p>Here is line 36 from my code:</p>

<pre><code>if(!eregi($string_exp,$name)) {
    $error_message .= 'The Name you entered does not appear to be valid.&lt;br /&gt;';
  }
</code></pre>

<p>I am sure there is an easy fix for this, but I am very new to PHP and do not know how to go about fixing this!</p>

<p>Any help would be greatly appreciated. Thankyou</p>
