regex class : IsMatch(string) method
Description
Gets a value that Indicates whether there is a match in the argument.
Syntax
regexInstance.IsMatch(string source)
Arguments
Class | Name | Description |
string | source | A string which is searched. |
Return value
Class | Description |
bool | A value that Indicates whether there is a match in the argument. |
Sample code
1: | regex pattern = new regex("(a+)"); |
2: | bool isMatch = pattern.IsMatch("aaabbbaaccc"); // true. |
Notes
It's a wrapper of the System.Text.RegularExpressions.Regex.IsMatch(String) method