title: How do I allow spaces in this regex?
body: <p>I'm such an amateur at regex, how do I allow spaces(doesn't matter how many) in this regex? </p>
  
  <pre><code>if(preg_match('/[^A-Za-z0-9_-]/', $str)) return FALSE;
  </code></pre>