Regex.GetGroupNumbers Method

Definition

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

public:
 cli::array <int> ^ GetGroupNumbers();
public int[] GetGroupNumbers();
member this.GetGroupNumbers : unit -> int[]
Public Function GetGroupNumbers () As Integer()

Returns

Int32[]

An integer array of group numbers.

Remarks

Groups can be referred to using both their assigned number and their name (if one was provided). The returned array is ordered so that each number maps to the same group name returned by GetGroupNames() at the corresponding index.

Applies to

See also