Args:
            origin (:obj:`str`): original string
            pattern (:obj:`str`): Regexp pattern string

        Returns:
            bool: True if matches otherwise False.

def compare(self, origin, pattern):
        """
        Args:
            origin (:obj:`str`): original string
            pattern (:obj:`str`): Regexp pattern string

        Returns:
            bool: True if matches otherwise False.
        """

        if origin is None or pattern is None:
            return False
        return re.match(pattern, origin) is not None