 | StringExtensionsRegexMatch Method |
Indicates whether the specified regular expression pattern
finds a match in the specified input string.
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static bool RegexMatch(
this string value,
string pattern
)
<ExtensionAttribute>
Public Shared Function RegexMatch (
value As String,
pattern As String
) As Boolean
public:
[ExtensionAttribute]
static bool RegexMatch(
String^ value,
String^ pattern
)
[<ExtensionAttribute>]
static member RegexMatch :
value : string *
pattern : string -> bool
Parameters
- value
- Type: SystemString
The string to search for a match. - pattern
- Type: SystemString
The regular expression pattern to match.
Return Value
Type:
BooleanReturns true if the regular expression finds a match, False if no match is found.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also