def compare(self, value, expectation, regex_expr=False):
return compare(value, expectation, regex_expr=regex_expr)<EOL>
Compares two values with regular expression matching support.

Arguments:
    value (mixed): value to compare.
    expectation (mixed): value to match.
    regex_expr (bool, optional): enables string based regex matching.

Returns:
    bool