changed regular expressions to find whitespace