Hey Im looking to strip out non-numeric characters in a string in ASP.NET C#
So i.e 40,595 p.a.
would end up with 40595
Thanks
An extension method will be a better approach:
public static string GetNumbers(this string text) { text = text ?? string.Empty; return new string(text.Where(p => char.IsDigit(p)).ToArray()); }