title: Concatenates Regex.Matches to a string
body: <p>This is my first question on Stack 
  I have a string  like  this </p>
  
  <pre><code>string str = "key1=1;main.key=go1;main.test=go2;key2=2;x=y;main.go23=go23;main.go24=test24";
  </code></pre>
  
  <p>the matches pattern applied to extract all strings that starts with  main. returns the </p>
  
  <pre><code>Regex regex = new Regex("main.[^=]+=[^=;]+");       
  MatchCollection matchCollection = regex.Matches(str);
  </code></pre>
  
  <p>I have tried this to concatenates the match collection </p>
  
  <pre><code>string flatchain = string.Empty;
  foreach (Match m in matchCollection)
  {
      flatchain = flatchain +";"+ m.Value; 
  }
  </code></pre>
  
  <p>Is there any  better way to do it using LINQ ? </p>