code: def compare(self, origin, pattern):
          
  
          if origin is None or pattern is None:
              return False
          return re.match(pattern, origin) is not None
docs: Args:
              origin (:obj:`str`): original string
              pattern (:obj:`str`): Regexp pattern string
  
          Returns:
              bool: True if matches otherwise False.