I need a Java regular expression, which checks that the given String is not Empty. However the expression should ingnore if the user has accidentally given whitespace in the
You don't need a regexp for this. This works, is clearer and faster:
if(myString.trim().length() > 0)