title: Matching non-whitespace in Java
body: <p>I would like to detect strings that have non-whitespace characters in them.  Right now I am trying: </p>
  
  <pre><code>!Pattern.matches("\\*\\S\\*", city)
  </code></pre>
  
  <p>But it doesn't seem to be working.  Does anyone have any suggestions?  I know I could trim the string and test to see if it equals the empty string, but I would rather do it this way</p>