title: Regex doesn't recognize underscore as special character
body: <pre><code>/(?=^.{8,}$)(?=.*[_!@#$%^&amp;*-])(?=.*\d)(?=.*\W+)(?![.\n])(?=.*[a-z])(?=.*[A-Z]).*$/
  </code></pre>
  
  <p>I'm trying to make a regex for password validation such that the password must be at least 8 chars and include one uppercase, one lowercase, one number, and one special char. It works fine except it won't recognize the underscore (_) as a special character. I.e., Pa$$w0rd matches, but Pass_w0rd doesn't. Thoughts?</p>