title: Why does regex match capture the whole string as a group in C# when the whole pattern does not have an enclosing parentheses?
body: <p>Groups are not capturing what I expect in C# regex. Here is a very simple example:</p>
  
  <pre><code>var matches = Regex.Matches("abcdededefgh","(abc)(de)*(fgh)");
  </code></pre>
  
  <p>I thought this would capture abc, dededede and fgh as 3 separate groups, since each has a separate set of parentheses. It does, but it also captures the whole string as a group (as the first captured group of four). Given that I don't have a parentheses around the whole pattern (i.e. my pattern is not "((abc)(de)*(fgh))"), I don't understand why the extra group is being captured. This makes it confusing for me to predict the behavior and determine which group I can expect to correspond to what portion of the string.</p>
  
  <p>Also, note that the following has the same 4 group result, so the fact that the "0 to many" asterisk is outside the group parentheses in the above example does not seem to impact the result.</p>
  
  <pre><code>var matches = Regex.Matches("abcdededefgh","(abc)((?:de)*)(fgh)");
  </code></pre>
  
  <p>Many thanks for any assistance!</p>