title: Regex to check to string containing whitespace & special chars
body: <p>I have the following regex statement:</p>
  
  <pre><code>String PASSWORD_PATTERN = "((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,12})";
  </code></pre>
  
  <p>And I check the statement like so:</p>
  
  <pre><code>Pattern pattern = Pattern.compile(PASSWORD_PATTERN);
  Matcher matcher = pattern.matcher(password); 
  if(!matcher.matches()) {
    // error
  }
  </code></pre>
  
  <p>How can I adjust this pattern to include checking for any whitespace and special characters? As in the matches() method should fail if the password contains any whitespace or any special characters.</p>