regex replace all non alphanumeric characters code example
Example 1: python regex replace all non alphanumeric characters
import re
s = re.sub('[^0-9a-zA-Z]+', '*', s)
Example 2: c# filter non alphanumeric characters
Regex rgx = new Regex("[^a-zA-Z0-9 -]");
str = rgx.Replace(str, "");