def rex_search(self, regexp, flags=0, byte=False, default=NULL):

        regexp = normalize_regexp(regexp, flags)
        match = None
        if byte:
            if not isinstance(regexp.pattern, six.text_type) or not six.PY3:
                # if six.PY3:
                    # body = self.body_as_bytes()
                # else:
                    # body = self.body
                match = regexp.search(self.body)
        else:
            if isinstance(regexp.pattern, six.text_type) or not six.PY3:
                ubody = self.unicode_body()
                match = regexp.search(ubody)
        if match:
            return match
        else:
            if default is NULL:
                raise DataNotFound('Could not find regexp: %s' % regexp)
            else:
                return default
Decorator that adds headers to a response so that it will
dataset/ETHPy150Open lorien/grab/grab/document.py/RegexpExtension.rex_search--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/views/decorators/cache.py/never_cache