'Returns True if `value1` is equal to `value2`. `value1` may
be a compiled regular expression, in which case it will be
matched against `value2`.'

def _eq(self, value1, value2):

    if isinstance(value1, re._pattern_type):
        return bool(value1.match(value2))
    return (value1 == value2)
