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
There are many ways, but this should do (don't know how it performs with really large strings though):
private static string GetNumbers(string input) { return new string(input.Where(c => char.IsDigit(c)).ToArray()); }