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. -
string s = "abc|xyz";
Regex.Match(s, @"(\w*)[|]{1}(\w*)").Dump();
Regex.Split(s, @"(\w*)[|]{1}(\w*)").Dump();
With Regex.Match I get back two groups which I can easily extract.
.
But I don't understand why in Regex.Split there are two empty entries.
