.NET Fiddle

CSharp · Console

/Program.cs

using System;
using System.Text.RegularExpressions;

public class Program
{
	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);
	}
}
;