I would like to detect strings that have non-whitespace characters in them. Right now I am trying:
!Pattern.matches("\\*\\S\\*", city)
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