This documentation is archived and is not being maintained.

Regex.GetGroupNumbers Method

Returns an array of capturing group numbers that correspond to group names in an array.

[Visual Basic]
Public Function GetGroupNumbers() As Integer()
public int[] GetGroupNumbers();
public: int GetGroupNumbers()  __gc[];
public function GetGroupNumbers() : int[];

Return Value

An integer array of group numbers.


Referencing a group by its number instead of by string name can provide faster access.


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

See Also

Regex Class | Regex Members | System.Text.RegularExpressions Namespace