New dad, so my eyes are tired and I'm trying to figure out why this code:
var regex = new Regex(@"(https:)?\/");
Console.WriteLine (regex.Replace("https://foo.com", ""));
Emits:
foo.com
I only have the one forward slash, so why are both being captured in the group for the replacement?