using System.Text.RegularExpressions;
public static void Main()
string str = "@{TotalPhysicalMemory= 17856325}";
Regex regex = new Regex(@"^\@{TotalPhysicalMemory= (\d+)}");
var match = regex.Match(str);
Console.WriteLine("Value: " + match.Groups[1].Value);