using System; public class Test { public static void Main() { var s = "PH/2400310945 01.09.21 WARRANTY2021091D 19307.92- 0 -19,307.92"; var result = System.Text.RegularExpressions.Regex.Match(s, @" -?\d+(?:,\d{3})*(?:\.\d{2})?$").Value; Console.WriteLine(result); } }