The answers above are wonderful. If you need to parse all numbers from a string carrying a sequence, then some help may be provided:
string input = "1-205-330-2342"; string result = Regex.Replace(input, @"[^\d]", ""); Console.WriteLine(result);
bluetoft Jun 22 '12 at 17:27 2012-06-22 17:27
source share