string pattern = @"([^\d]+)(\d+)([^\d]+)";
string input = "abc123cde";
Regex regexp = new Regex(pattern);
string result = regexp.Replace(input, "$2");
string html = "abc123abc"; string pattern = @"[^\d+]"; var groups = Regex.Replace(html, pattern,""); Console.WriteLine(groups.ToString()); //123 Console.Read();