title: RegEx differences
body: <p>Can someone please tell me the difference exactly between these 2 RegEx's?</p>
  
  <pre><code>'/[^a-zA-Z0-9\s]/'
  </code></pre>
  
  <p>and</p>
  
  <pre><code>'~[^A-Za-z0-9_]~'
  </code></pre>
  
  <p>Also, is there a syntax error for the space within the first Regex?  Thinking it needs to be like this:  <code>/\s</code> to be escaped properly.</p>
  
  <p>Basically, I need a RegEx that only uses English A-Z, a-z, 0-9, and underscores only!  Everything else will need to be replaced with an empty string <code>''</code>.  So, I know I need preg_replace to do this with, but Which RegEx is better to use, and why?</p>
  
  <p>Thanks many guys!</p>