In my regex the pattern is something like this:
@\"Something\\(\\d+, \"\"(.+)\"\"(, .{1,5}, \\d+, (?\\d+)?\\),\"
So I would
According to the documentation:
If groupname is not the name of a capturing group in the collection, or if groupname is the name of a capturing group that has not been matched in the input string, the method returns a Group object whose Group.Success property is false and whose Group.Value property is String.Empty.
var regex = new Regex(@"Something\(\d+, ""(.+)""(, .{1,5}, \d+, (?<somename>\d+)?\),");
var match = regex.Match(input);
var group = match.Groups["somename"];
bool exists = group.Success;