title: HTML pattern validation always false
body: <p>I'm trying to perform a client-side check for a password insertion form in HTML, I need the password to contain at least an alphabetic character and a number. I tried with the following:</p>
  
  <pre><code>&lt;input type="password" name="reg-password" pattern="(?=.*\d)(?=.*[a-zA-Z])" title="The password must contain at least a number and an alphabetic character" required&gt;
  </code></pre>
  
  <p>but for some reason which I'm not understanding the validation always fails and I cannot submit the form. Could you please explain me where my code is wrong? I also tested the regex with some online regex debuggers and it should be ok. Thanks in advance.</p>
  
  <p>Also, is there any particular reason for which I should avoid this methods of client-side validation and use Javascript code instead? I find this way much faster (if it only worked)</p>