Anchors are unnecessary with the .matches() method.
5
".*\\S+.*"
This means there is at least one non-whitespace character in the string. But you should watch out—if you call the string as an implicit parameter and it's null, you'll see a NullPointerException. Thus, it's probably better to check for null using conditionals.
" "to be "empty"?/^$|\s+/equates to 'empty string OR any string containing at least one whitespace character'