'Plugin entry point, search for the user defined regex.
:param request: The HTTP request object.
:param response: The HTTP response object
:return: None'

def grep(self, request, response):

    if (self._all_in_one is None):
        return
    if (not response.is_text_or_html()):
        return
    html_string = response.get_body()
    if (not self._all_in_one.search(html_string)):
        return
    for (index, regex_tuple) in enumerate(self._regexlist_compiled):
        (regex, info_inst) = regex_tuple
        match_object = regex.search(html_string)
        if match_object:
            with self._plugin_lock:
                if (not (info_inst is None)):
                    ids = info_inst.get_id()
                    ids.append(response.id)
                    info_inst.set_id(ids)
                else:
                    str_match = match_object.group(0)
                    if (len(str_match) > 20):
                        str_match = (str_match[:20] + '...')
                    desc = 'User    defined    regular    expression    "%s"    matched    a    response.    The    matched    string    is:    "%s".'
                    desc = (desc % (regex.pattern, str_match))
                    info_inst = Info('User    defined    regular    expression    match', desc, response.id, self.get_name())
                    info_inst.set_url(response.get_url())
                    om.out.information(desc)
                    self.kb_append_uniq(self, 'user_defined_regex', info_inst, 'URL')
                self._regexlist_compiled[index] = (regex, info_inst)
