RanorexRanorex Documentation
AreEqual Method (actual, regex, message, exceptionOnFail)
NamespacesRanorexValidateAreEqual(String, Regex, String, Boolean)
Validates if the given regular expression matches the given string.
Declaration Syntax
C#Visual BasicVisual C++
public static bool AreEqual(
	string actual,
	Regex regex,
	string message,
	bool exceptionOnFail
)
Public Shared Function AreEqual ( _
	actual As String, _
	regex As Regex, _
	message As String, _
	exceptionOnFail As Boolean _
) As Boolean
public:
static bool AreEqual(
	String^ actual, 
	Regex^ regex, 
	String^ message, 
	bool exceptionOnFail
)
Parameters
actual (String)
The string to match.
regex (Regex)
The regular expression to match.
message (String)
The message to log. "{0}" is replaced by the string representation of actual, "{1}" by the string representation of regex.
exceptionOnFail (Boolean)
A value specifying if an exception should be thrown if the validation fails.
Return Value
True if regex matches actual; otherwise false.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf regex is null.
ValidationExceptionIf the validation fails and exceptionOnFail is true.

Assembly: Ranorex.Core (Module: Ranorex.Core) Version: 4.0.3.22982 (4.0.3.22982)