c# - Replace all non-word characters with a space -
i have regex
[a-za-z]
and string, such as
hi! string.
i want replace charcters not in regex space. so, i'll end with
hi string
how done?
var cleaned = regex.replace(given, "[^a-za-z]", " ");
Comments
Post a Comment