title: C# Regex string parsing
body: <p>I have the expression already written, but whenever I run the code I get the entire string and a whole bunch of null values:</p>
  
  <pre><code>Regex regex = new Regex(@"y=\([0-9]\)\([0-9]\)(\s|)\+(\s+|)[0-9]");
  Match match = regex.Match("y=(4)(5)+6");
  
  for (int i = 0; i &lt; match.Length; i++)
  {
      MessageBox.Show(i+"---"+match.Groups[i].Value);
  }
  </code></pre>
  
  <p>Expected output:  4, 5, 6 (in different MessageBoxes</p>
  
  <p>Actual output: y=(4)(5)+6</p>
  
  <p>It finds if the entered string is correct, but once it does I can't get the specific values (the 4, 5, and 6).  What can I do to possibly get that code?  This is probably something very simple, but I've tried looking at the MSDN match.NextMatch article and that doesn't seem to help either.</p>
  
  <p>Thank you!</p>