title: php only allow letters, numbers, spaces and specific symbols using pregmatch
body: <p>on my php i use <code>preg_match</code> to validate input texts. </p>
  
  <pre><code>if(preg_match('/^[a-zA-Z0-9]+$/', $firstname)) {
  }
  </code></pre>
  
  <p>But this only allows alphanumeric and does not allow spaces. I want to allow spaces, alpha and numeric. and period(.) and dash(-)</p>
  
  <p>Please help me out here? thanks in advance.</p>