title: Regular Expression for alpha numeric, space, dash, and hash
body: <p>I'm still a newbie for regular expressions. I want to create a regular expression with this rule:</p>
  
  <pre><code>if (preg_match('^[ A-Za-z0-9_-#]^', $text) == 1) {
      return true;
  }
  else {
      return false;
  }
  </code></pre>
  
  <p>In short, I would like $text to accept texts, numbers, spaces, underscores, dashes, and hashes (#).
  Is the above reg expression correct? it always return true.</p>