title: php preg_match or preg_replace to validate
body: <p>I want to check a string to allow only <code>a-z A-Z 0-9 . / ? &amp;</code> but I'm unsure how exactly to use preg_match().</p>
  
  <p>If you could also explain what each part of the code is I'd appreciate it! (ie why do you add <code>/^</code> and how to you add a <code>/</code>)</p>
  
  <p>Thanks</p>