title: regex password validation angularjs
body: <p>I am new to angular js. I have created a login screen. I need to validate my password. it should contain one special character from <code>-'$@£!%*#?&amp;'</code> and at least one letter and number. As of now it accepts all special characters without any limitations. I have following code</p>
  
  <pre><code>if (vm.newpassword_details.password.search("^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[$@£!%*#?&amp;]).{8,}$")) {
    var msg = "Password should contain one special character from -'$@£!%*#?&amp;' and at least one letter and number";
    alert(msg);
  }
  </code></pre>