title: python regex for password validation
body: <p>I have the following requirement to validate the password with below context</p>
  
  <ul>
  <li>at least one digit</li>
  <li>at least one uppercase letter</li>
  <li>at least one lowercase letter</li>
  <li>at least one special character[$@#]</li>
  </ul>
  
  <p>Below program is doing the partial match but not the full regex</p>
  
  <pre><code>#!/usr/sfw/bin/python
  import re
  password = raw_input("Enter string to test: ")
  if re.match(r'[A-Za-z0-9@#$]{6,12}', password):
      print "match"
  else:
      print "Not Match"
  </code></pre>
  
  <p>In use:</p>
  
  <pre><code>localhost@user1$ ./pass.py
  Enter string to test: abcdabcd
  match
  </code></pre>
  
  <p>It is evaluating the wrong output. Can anyone suggest here should I use <code>re.search</code>?</p>