I am looking for a regular expression for matching that contains no white space in between text but it may or may not have white space at start or end of text.
Just found answer myself. So I am writing it here so that It may be helpful for someone else. ^\s*\S*\s*$
^\s*\S*\s*$