var regex = new Regex(@"^(?: )?\((\w+)\)$");
var value = " (HTML)";
//I tried to play around with the following but it captures the whole string
var match = ResourceTypeRegex.Match(resourceType);
//The following lines all evaluate to the entire string
match.Groups.OfType<Group>().SingleOrDefault();
match.Captures.OfType<Capture>().SingleOrDefault();
match.Groups[0].Captures.OfType<Capture>().SingleOrDefault();
I only want to capture HTML
or whatever string it is.