title: Alphanumeric JavaScript RegEx for Password Validation
body: <p>I'm using a regex below to validate password to accept alphanumeric characters only. The regex works if I enter 2 characters one alpha and one number but if more than two characters my regex doesn't work. I want if possible the following results as shown in "Expected Behavior". Can anyone help me rewrite my regex?</p>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>  function checkPasswordComplexity(pwd) {
          var regularExpression = /^[a-zA-Z][0-9]$/;
          var valid = regularExpression.test(pwd);
          return valid;
      }
  </code></pre>
  
  <p><strong>Current Behavior</strong></p>
  
  <pre><code>Password:Valid
  a1:true
  aa1:false
  aa11:false
  </code></pre>
  
  <p><strong>Expected Behavior</strong> </p>
  
  <pre><code>Password:Valid
  aa:false (should have at least 1 number) 
  1111111:false (should have at least 1 letter)
  aa1:true
  aa11:true
  a1a1a1a1111:true
  </code></pre>