Method Matches
- Namespace
- Xunit
- Assembly
- xunit.v3.assert.dll
Matches(string, string?)
Verifies that a string matches a regular expression.
public static void Matches(string expectedRegexPattern, string? actualString)
Parameters
expectedRegexPatternstringThe regex pattern expected to match
actualStringstringThe string to be inspected
Exceptions
Thrown when the string does not match the regex pattern
Matches(Regex, string?)
Verifies that a string matches a regular expression.
public static void Matches(Regex expectedRegex, string? actualString)
Parameters
Exceptions
Thrown when the string does not match the regex