SyntaxFix
Write A Post
Hire A Developer
Questions
[^a-zA-Z0-9] is a character class matches any non-alphanumeric characters.
[^a-zA-Z0-9]
Alternatively, [^\w\d] does the same thing.
[^\w\d]
Usage:
string regExp = "[^\w\d]"; string tmp = Regex.Replace(n, regExp, "");