title: php preg_match use of dash
body: <p>I have a search form which has a preg_match to validate text, but my problem comes when I input something with a dash.</p>
  
  <pre><code> if(preg_match("/^[a-zA-Z -]+$/", $_POST['inschrijvingnmr']) == 0){
  </code></pre>
  
  <p>The format that is allowed could be any of the following scenarios.</p>
  
  <pre><code>AAAAAA
  aaaaaa
  A-AAAAA
  AA-AAAA
  </code></pre>
  
  <p>I am able to search using just the first two, but when I try to search for the 3rd and 4th type, I just get the "else" message saying to enter a valid search query.</p>