Home Cooker Classes Others Rice CookerGX
Classes  >  regex  >  IsMatch(string)
regex class : IsMatch(string) method

Description

Gets a value that Indicates whether there is a match in a input string.

Syntax

regexInstance.IsMatch(string source)

Arguments

ClassNameDescription
stringsourceA string which is searched.

Return value

ClassDescription
boolA value that Indicates whether there is a match in a input string.

Sample code

//anyRegex is an any instance of regex type.

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

bool isMatch = anyRegex.IsMatch("aaabbbaaccc");

Notes

It's a wrapper of the System.Text.RegularExpressions.Regex.IsMatch(String)

Links for reference

Copyright © Rice All rights reserved.