I would like to find all the special characters in the string and replace with Hyphen ( - )
I am using the code below
string content = "foo,bar,(regular expression replace) 123"; string pattern = "[^a-zA-Z]";
Conclusion
Foo bar - regex replacement ----
I get a hyphen multiple occurrence (---) in out put.
I would like to get something like this
Foo-bar-regex replacement
How to achieve this?
Any help would be appreciated
Thanks deep
Deepu source share