code: def re_match(self, pattern, haystack, **kwargs):
          
          try:
              return re.match(pattern, haystack.decode('utf8'), **kwargs)
  
          except Exception as e:
              logger.debug('re.match exception: %s' % e)
              self.trace_logger.log(e)
docs: re.match py3 compat
          :param pattern:
          :param haystack:
          :return: