using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
var rx = new Regex("([^=\\s]+)='([^']*)'");
var str = "key1='value1' key2='value 2' key3='value3' key4='value4' key5='5555' key6='xxx666'";
foreach (Match m in rx.Matches(str)) {
Console.WriteLine("{0} {1}", m.Groups[1], m.Groups[2]);
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkJdmFyIHJ4ID0gbmV3IFJlZ2V4KCIoW149XFxzXSspPScoW14nXSopJyIpOwoJCXZhciBzdHIgPSAia2V5MT0ndmFsdWUxJyBrZXkyPSd2YWx1ZSAyJyBrZXkzPSd2YWx1ZTMnIGtleTQ9J3ZhbHVlNCcga2V5NT0nNTU1NScga2V5Nj0neHh4NjY2JyI7CgkJZm9yZWFjaCAoTWF0Y2ggbSBpbiByeC5NYXRjaGVzKHN0cikpIHsKCQkJQ29uc29sZS5Xcml0ZUxpbmUoInswfSB7MX0iLCBtLkdyb3Vwc1sxXSwgbS5Hcm91cHNbMl0pOwoJCX0KCX0KfQ==