Regex.GetGroupNames Method

Definition

Returns an array of capturing group names for the regular expression.

public:
 cli::array <System::String ^> ^ GetGroupNames();
public string[] GetGroupNames();
member this.GetGroupNames : unit -> string[]
Public Function GetGroupNames () As String()

Returns

String[]

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 ("0", "1", "2", and so on). Group "0" always designates the entire match.

Applies to

See also