Best way to get all digits from a string [duplicate] April 11, 2024 by Tarik Do you need to use a Regex? return new String(input.Where(Char.IsDigit).ToArray());