Match into groups
suggest changepublic string Check()
{
string input = "Hello World!";
string pattern = @"H.ll. (?<Subject>W.rld)!";
Match match = Regex.Match(input, pattern);
// World
return match.Groups["Subject"].Value;
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents