csUnit Class Library

Assert.NotEqualsRegex Method (String, String, String)

Compares the given string (actual) against the regular expression. If the expression does match on the string, then an assertion is raised.

public static void NotEqualsRegex(
   string actual,
   string expression,
   string message
);

Parameters

actual
The string on which to test the expression
expression
The regular expression to test
message
The user message

Example

Assert.Equals("thisismyname1234", "[a-zA-Z]+[0-9]*")

See Also

Assert Class | csUnit Namespace | Assert.NotEqualsRegex Overload List