title: preg_match to only allow 10 digits an no special characters or spaces
body: <p>I have the following function: <code>preg_match('/^[0-9]{10}$/'</code> to only allow 10 digits.  How ever if i enter 041 123456 it accepts it.  how do i prevent spaces?  I want the user to enter the phone number as 041123456 only.  no spaces or special characters must be allowed.</p>
  
  <p>the code i am using is </p>
  
  <pre><code>If( ($fax_1_length != 0) | preg_match('/^[0-9]{10}$/', $fax_1) ){
      $fax_1_lenght_valid = true;
      $fax_1 = mysql_real_escape_string(stripslashes($_POST['fax_1']));   
      }
      else
      {
              $mistakes[] = 'ERROR - Your 1st Fax Number should only contain numbers or is empty.';
      }
  </code></pre>