title: C# Regex Match Vs Split for same string
body: <p>I was playing around in Linqpad with a regex to extract a string. I have a few doubts that I'm sharing. Can anyone please shed some light on this matter. - </p>
  
  <pre><code>string s = "abc|xyz";
  Regex.Match(s, @"(\w*)[|]{1}(\w*)").Dump();
  Regex.Split(s, @"(\w*)[|]{1}(\w*)").Dump();
  </code></pre>
  
  <p>With <code>Regex.Match</code> I get back two groups which I can easily extract.</p>
  
  <p><img src="https://i.stack.imgur.com/fEGuy.png" alt="Regex.Match">. </p>
  
  <p>But I don't understand why in <code>Regex.Split</code> there are two empty entries.</p>
  
  <p><img src="https://i.stack.imgur.com/qn5av.png" alt="Regex.Split"></p>