def compare(self, origin, pattern):
if origin is None or pattern is None:<EOL><INDENT>return False<EOL><DEDENT>return re.match(pattern, origin) is not None<EOL>
Args:
    origin (:obj:`str`): original string
    pattern (:obj:`str`): Regexp pattern string

Returns:
    bool: True if matches otherwise False.