Item Property (String)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Enables access to a member of the collection by string index.

Namespace:  System.Text.RegularExpressions
Assembly:  System.Text.RegularExpressions (in System.Text.RegularExpressions.dll)

Syntax

'Declaration
Public ReadOnly Property Item ( _
    groupname As String _
) As Group
public Group this[
    string groupname
] { get; }
public:
property Group^ Item[String^ groupname] {
    Group^ get (String^ groupname);
}
member Item : 
        groupname:string -> Group with get
JScript does not support indexed properties.

Parameters

Property Value

Type: System.Text.RegularExpressions. . :: . .Group
The member of the collection specified by groupname.

Remarks

groupName can be either the name of a capturing group that is defined by the (?<name>) element in a regular expression, or the string representation of the number of a capturing group that is defined by a grouping construct. For more information about groups in regular expressions, see Grouping Constructs.

If groupname is not the name of a capturing group in the collection, or if groupname is the name of a capturing group that has not been matched in the input string, the method returns a Group object whose Group..::..Success property is false and whose Group.Value property is String..::..Empty.

.NET Framework Security

See Also

Reference

GroupCollection Class

Item Overload

System.Text.RegularExpressions Namespace