Could you explain why the conclusion Console.WriteLine(m.Groups[1]);will be Contoso, Inc? And could you also tell about the corresponding steps of this example? Thank.
PS: I am not familiar with the concept of groups
string input = "Company Name: Contoso, Inc.";
Match m = Regex.Match(input, @"Company Name: (.*$)");
Console.WriteLine(m.Groups[1]);
source
share