return every digit on a string c# code example Example: return every digit on a string c# return Regex.Replace(input, @"[^0-9]+", "");