Changed the redundant regex for finding non-whitespaces.