Check out example codes for "c# filter non alphanumeric characters". It will help you in understanding the concepts better.

Code Example 1

Regex rgx = new Regex("[^a-zA-Z0-9 -]");
str = rgx.Replace(str, "");

Learn ReactJs, React Native from akashmittal.com