Fixed dupe issue by looking for spaces in regex.