Scanner works for regexes with and without whitespace.