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.
This should do it :
^\s*\S+\s*$
" aaadadadad "
" aaa aaaaa "