I have a string containg alphabetic characters, for example:
This should work:
// add directive at the top using System.Text.RegularExpressions; string numberOnly = Regex.Replace(s, "[^0-9.]", "")