Name

Group

Synopsis

This class contains a group of results from a capturing group in a regular expression. A capturing group can return zero or more results depending on the use of quantifiers or nested groupings of a subexpression. Captures returns a CaptureCollection composed of individual Capture objects. Captures can use an indexer to return single results from the CaptureCollection.

You can treat a Group as an instance of its parent class (Capture) to get quick access to the last captured substring (an instance of Group is equal to the last item in its Captures property).

public class Group : Capture {
// Public Instance Properties
   public field CaptureCollection Captures{get; } 
   public field bool Success{get; } 
// Public Static Methods
   public static method Group Synchronized(Group inner);  
}

Hierarchy

System.ObjectCaptureGroup

Subclasses

Match

Returned By

GroupCollection.this

Get C# in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.