regex class : Group(string,string) 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 group name in the argument.
Syntax
regexInstance.Group(string source, string groupName)
Arguments
Class | Name | Description |
string | source | A string which is searched. |
string | groupName | A group name. |
Return value
Class | Description |
string | A new string that match a group regular expression pattern that is selected by group name. |
Sample code
1: | regex pattern = new regex("(?<a>a+)"); |
2: | string result = pattern.Group("aaabbbaaccc", "a");// result is "aaa". |
Notes
It's a wrapper of the System.Text.RegularExpressions.Match.Groups property.
If there are 2 or more strings that match by the group name, the first matching string is returned.
This method has been abolished in Rtype.Regex.dll Ver 1.0.0.1.