I am trying to extract characters from a string.
I want [a-z or A-Z or 0-9 or . or _]
all other characters should be trimmed from the string.
I have a regular expression that can replace characters but I want other way around, I want a regular expression or any other method that allows only [a-z or A-Z or 0-9 or . or _]
and remove all other characters.