using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; public class Test { public static void Main() { var text = "Top Rate: 8 88,888 and Top Rate: 8 \n 88,888 Top Rate: 2,500.00"; var results = Regex.Matches(text, @"\bTop Rate\b.*?(\d(?:[\d,.\s]*\d)?)", RegexOptions.Singleline) .Cast() .Select(x => new string(x.Groups[1].Value.Where(c => char.IsDigit(c) || c == '.').ToArray())); foreach (var s in results) { Console.WriteLine( s ); } } }