using System;
using System.Text.RegularExpressions;
class Program
{
static void Main(string[] args)
{
string r = @"(?m)^\s*(?'name'\w+)\s*=\s*(?'value'.*)\s*(?=\r?$)";
string text = @"a = 3 s = t t= s";
foreach (Match m in Regex.Matches (text, r))
Console.WriteLine (m.Groups["name"] + " is " + m.Groups["value"]);
}
}
The output:
a is 3 s = t t= s