I am having an string and i want all extra characters to be removed from
that string except + and .
How to write a regular expression for it… Currently i am trying it like
this as word.sub(/[_-:\/]/, “”)… But its not working…
I can do it like this as well:- word.sub(/[\W]/, “”) but this will
replace all characters even also + and .