regex class : Group(string,int) method

This method has been abolished in Rtype.Regex.dll Ver 1.0.0.1.

Description

Gets a new string that match a group regular expression pattern that is selected by index in the argument.

Syntax

regexInstance.Group(string source ,int index)

Arguments

ClassNameDescription
stringsourceA string which is searched.
intindexA index.

Return value

ClassDescription
stringA new string that match a group regular expression pattern that is selected by index.

Sample code

1:

regex pattern = new regex("(a+)");

2:

string result = pattern.Group("aaabbbaaccc", 0); // result is "aaa".

Notes

It's a wrapper of the System.Text.RegularExpressions.Match.Groups property.

The index is 0-based.

This method has been abolished in Rtype.Regex.dll Ver 1.0.0.1.

Links for reference

Copyright © Cooker All rights reserved.