using System; using System.Text.RegularExpressions; class Program { static void Main() { string input = "Hello 123 World"; string pattern = "\\d+"; MatchCollection matches = Regex.Matches(input, pattern); foreach (Match match in matches) { Console.WriteLine(match.Value); } } }In this example, we are using the MatchCollection class from System.Text.RegularExpressions to find all the numeric values in a string. We use the Regex.Matches method to search for the pattern "\\d+" (which matches one or more digits), and then loop through the MatchCollection to print out the values.