How do I remove all non alphanumeric characters from a string except dash and space characters?
C# – How to remove all non alphanumeric characters from a string except dash
cregex
Related Topic
- Php – How to remove non-alphanumeric characters
- C# – How to generate random alphanumeric strings
- Html – RegEx match open tags except XHTML self-contained tags
- Regex – a non-capturing group in regular expressions
- Python – Remove all special characters, punctuation and spaces from string
- C# – Efficient way to remove ALL whitespace from String
- Javascript – Remove not alphanumeric characters from string
- Javascript – How to remove all line breaks from a string
Best Answer
Replace
[^a-zA-Z0-9 -]
with an empty string.