using System;
using System.Text.RegularExpressions;
public class Program
{
public static void Main()
var sample = "Total= 1082 fps= 21 q=29.0 size= 6144kB time=00:00:36.33";
var match = Regex.Match( sample,@"(?<=fps=[\W])\d+");
Console.WriteLine($"Total = {match.Value}");
}