You can use `_invalidChars.split("").join(" ")` to add spaces, or use replace with a regular expression.