title: Regex to test whether there are more than two digits in a string
body: <p>As far as I know, <code>\d{2,}</code> matches 2 or more consecutive digits, but I need to know whether there are any 2 digits in a string.</p>
  
  <p>I would also appreciate some good links to password strength meters.</p>
  
  <p>What I use now is</p>
  
  <pre><code>function passwordStrengthPercent(pwd,username)
  {
      var score = 0, special = /(.*[!,@,#,$,%,^,&amp;,*,?,_,~,;,:,`,|,\\,\/,&lt;,&gt;,\{,\},\[,\],=,\+])/
      if (pwd.length &lt; 8 ) return 0
      if (pwd.toLowerCase() == username.toLowerCase()) return -1
      score += pwd.length * 4
      score += ( checkRepetition(1,pwd).length - pwd.length )
      score += ( checkRepetition(2,pwd).length - pwd.length )
      score += ( checkRepetition(3,pwd).length - pwd.length )
      score += ( checkRepetition(4,pwd).length - pwd.length )
      if (pwd.match(/(.*[e].*[e].*[e])/))  score -= 15//most common letter in passswords?
      if (pwd.match(/(.*[a].*[a].*[a])/))  score -= 15//most common letter in passswords?
      if (pwd.match(/(.*[o].*[o].*[o])/))  score -= 10//most common letter in passswords?
      if (pwd.match(/^\l+$/) || pwd.match(/^\d+$/) )  return score/2//there was w here in regexp
      if (pwd.match(/(.*[0-9].*[0-9].*[0-9])/))  score += 10
  
      //todo additional rules 11
      if (pwd.match(special)) score += 15
      if (pwd.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/))  score += 15
      if (pwd.match(/(w)/) &amp;&amp; pwd.match(/(d)/))  score += 15
      if (pwd.match(special) &amp;&amp; pwd.match(/(d)/))  score += 10
      if (pwd.match(special) &amp;&amp; pwd.match(/(w)/))  score += 10
      if ( score &lt; 0 ) return 0
      if ( score &gt; 100 ) return 100
    return score
  }
  </code></pre>