title: ng-pattern to validate password match
body: <p>I use this to validate a password that has to have 8 characters, one capital letter and numeric but when I add an asterisk to it it throws an error saying passwords do not match, this only happens using the asterisk.</p>
  
  <p>Any help will be appreciate it </p>
  
  <pre><code>ng-pattern="/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/"
  </code></pre>