title: Password validation by regex
body: <pre><code>System.out.println(Pattern.matches("[A-Z]{1,}[a-z]{1,}[0-9]{2,}[@#$%]+[ ]*", "DEFabc45$  "));
  </code></pre>
  
  <p>but it don't work When I pass string like <code>passW@ord45</code>. Mean I should not following regex order pattern written here. </p>
  
  <p>Following are the conditions given bellow:</p>
  
  <p>Write a function <code>boolean isValidPassword (String password)</code>  A Password is valid if it satisfies following conditions:</p>
  
  <ol>
  <li>Length of the password must be more than 10 (without counting
  spaces).</li>
  <li>Password must contain at least one capital and one small alphabet</li>
  <li>Password must contain at least 2 digits and if it does not have 2 digits then see next condition.</li>
  <li>Password must contain at least one special character from the given set-   {$, @,
  _, -, .,  /}</li>
  </ol>