Use \s instead of ' ' in regexp.