regex class : MatchM(string) method
Description
Gets an instance of the match class that represents the first substring that matches the regular expression.
Syntax
regexInstance.MatchM(string source)
Arguments
Class | Name | Description |
string | source | A string which is searched. |
Return value
Class | Description |
match | An instance of the match class that represents the first substring that matches the regular expression. |
Sample code
1: | regex pattern = new regex("(a+)"); |
2: | match firstMatch = pattern.MatchM("aaabbbaaccc"); // An instance of the match class that represents the "aaa". |
Notes
It's a wrapper of the System.Text.RegularExpressions.Regex.MatchM(String) method.
If no match is found, return value is an instance of the match class that represents an empty string.
This method has been added in Rtype.Regex.dll Ver 1.0.0.1.