Check out example codes for "regex replace all special characters". It will help you in understanding the concepts better.

Code Example 1

Regex.Replace(your String, @"[^0-9a-zA-Z]+", "")

Learn ReactJs, React Native from akashmittal.com