title: Deprecated: Function ereg() is deprecated
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://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>My contact form is othervise working but I keep getting the following 
  error:</p>
  
  <blockquote>
    <p>Deprecated: Function ereg() is deprecated in/home/.....</p>
  </blockquote>
  
  <p>I'm really lost here but I figure this is the part that needs some adjusting.</p>
  
  <pre><code>    if ( empty($_REQUEST['name']) ) {
      $pass = 1;
      $alert .= $emptyname;
  } elseif ( ereg( "[][{}()*+?.\\^$|]", $_REQUEST['name'] ) ) {    
      $pass = 1;
      $alert .= $alertname;
  }
  if ( empty($_REQUEST['email']) ) {
      $pass = 1;
      $alert .= $emptyemail;
  } elseif ( !eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]   {2,3})$", $_REQUEST['email']) ) {
      $pass = 1;
      $alert .= $alertemail;
  }
  if ( empty($_REQUEST['message']) ) {
      $pass = 1;
      $alert .= $emptymessage;
  } elseif ( preg_match( "[][{}()*+?\\^$|]", $_REQUEST['message'] ) ) {
      $pass = 1;
      $alert .= $alertmessage;
  }
  </code></pre>
  
  <p>Finding a solution would be highly appreciated</p>