Hi,
There is a string such as:
string s = "12445-65432 abc, 98767-45364 th, 56749-23198"
How can I remove the letters so that I end up with:
s = "12445-65432, 98767-45364, 56749-23198"
Thanks
Printable View
Hi,
There is a string such as:
string s = "12445-65432 abc, 98767-45364 th, 56749-23198"
How can I remove the letters so that I end up with:
s = "12445-65432, 98767-45364, 56749-23198"
Thanks
For a breakdown, have a read through on http://www.regular-expressions.info/reference.html. Brilliant author, very good readCode:string s = "12445-65432 abc, 98767-45364 th, 56749-23198";
string result = Regex.Replace(s, @"\s?[a-zA-Z]\s?", string.Empty);
Thank you