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