O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required