check for spaces in regex