Answers for "regex remove all non alphanumeric characters but"

C#
1

How do I remove all non alphanumeric characters from a string?

Regex rgx = new Regex("[^a-zA-Z0-9 -]");
str = rgx.Replace(str, "");
Posted by: Guest on March-25-2020
2

regex remove all non alphanumeric except spaces

/[^[:alnum:]\x20/gi
Posted by: Guest on November-21-2020

Code answers related to "regex remove all non alphanumeric characters but"

C# Answers by Framework

Browse Popular Code Answers by Language