Group Class

Group Class

Group represents the results from a single capturing group. A capturing group can capture zero, one, or more strings in a single match because of quantifiers, so Group supplies a collection of Capture objects.

For a list of all members of this type, see Group Members.


[Visual Basic]
Public Class Group
   Inherits Capture
public class Group : Capture
public __gc class Group : public Capture
class Group extends Capture

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Group inherits from Capture so the last substring captured can be accessed directly. (That is, the Group instance itself is equivalent to the last item of the collection returned by the Captures property).


Namespace: System.Text.RegularExpressions

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: System (in System.dll)

See Also

Group Members | System.Text.RegularExpressions Namespace

© 2015 Microsoft