I have this statement:
String cap = Regex.Replace(winCaption, @"[^\w\.@-]", "");
that transforms "Hello | World!?"
to "HelloWorld"
.
But I want to preserve space character, for example: "Hello | World!?"
to "Hello World"
.
How can I do this?