Reputation: 86957
I have the following regex pattern, which strips out non, alpha-numerics.
[^0-9A-Za-z]
Works pretty good.
I was hoping to mod this regex so it looks for alphanumerics AND spaces. How can I tweak it so it also accepts spaces?
Upvotes: 2
Views: 4326
Reputation: 754735
Put a space into the brackets
[^0-9A-Za-z ]
You're question is also slightly ambiguous. I'm assuming you're looking to exclude both alphanumerics and spaces.
Upvotes: 10