September 15, 2009
using System.Text.RegularExpressions;(If you don't want to allow the decimal delimiter in the final result, remove the . from the regular expression above).
...
string newString = Regex.Replace(oldString, "[^.0-9]", "");
Comments
comments powered by Disqus