This documentation is archived and is not being maintained.
Regex.GetGroupNames Method
.NET Framework 1.1
Returns an array of capturing group names for the regular expression.
[Visual Basic] Public Function GetGroupNames() As String() [C#] public string[] GetGroupNames(); [C++] public: String* GetGroupNames() __gc[]; [JScript] public function GetGroupNames() : String[];
Return Value
A string array of group names.
Remarks
The collection of group names contains the set of strings used to name capturing groups in the expression. Even if capturing groups are not explicitly named, they are automatically assigned numerical names (1, 2, 3, and so on). Therefore, this collection can be used to determine the number of groups.
Requirements
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
Show: