title: Regex for Password validation in Javascript
body: <p>Regex Password complexity requires that <code>any three</code> of the following four characteristics must be applied when creating or changing a password.</p>
  
  <ul>
  <li>Alpha characters - at least 1 upper case alpha character</li>
  <li>Alpha characters - at least 1 lower case alpha character</li>
  <li>Numeric characters - at least 1 numeric character</li>
  <li>Special characters - at least 1 special character</li>
  </ul>
  
  <p>I am trying with the following code, but its not working for <code>special characters</code></p>
  
  <pre><code>(?=^.{6,}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*
  </code></pre>
  
  <p>I want my regex to be validated against the following 4 cases</p>
  
  <p>Match cases </p>
  
  <ul>
  <li>P@ssword</li>
  <li>Password1</li>
  <li>p@ssword1</li>
  <li>p@12345</li>
  </ul>