title: Javascript Regular Expression for Password
body: <p>I am writing the regex for validating password in Javascript. The constraints are:</p>
  
  <ol>
  <li>Password must contain at least one uppercase character</li>
  <li>Password must contain at least a special character</li>
  </ol>
  
  <p>With trial and error and some searching on the net, I found that this works:</p>
  
  <pre><code>/(?=.*[A-Z]+)(?=.*[!@#\$%]+)/
  </code></pre>
  
  <p>Can someone please explain the part of this expression which mentions that the uppercase letter and special character can come in ANY order?</p>