The value used during the assertion.
The regular expression pattern.
The error message to display.
The file name where the error occurred. The value is added automatically at the call site.
The line where the error occurred. The value is added automatically at the call site.
DUnitAssertError if the assertation fails.
1 "foo".assertMatchRegex(r"^foo$"); 2 "192.168.0.1".assertMatchRegex(r"((?:[\d]{1,3}\.){3}[\d]{1,3})"); 3 4 // Assert a DUnitAssertError is thrown if assertMatchRegex fails. 5 "foo".assertMatchRegex(r"^bar$").assertThrow!(DUnitAssertError)("Failed asserting match to regex");
Assert that a string matches a regular expression.