def paragraph_search(text_value, doc):
    if not isinstance(text_value, str):
        raise TypeError("Expected basestring, got '%s' instead" % type(text_value))
    if not isinstance(doc, Document):
        raise TypeError("Expected Document, got '%s' instead" % type(doc))

    try:
        para_regex = re.compile(text_value)
    except re.error:
        raise ValueError("Invalid regex expression.")

    for paragraph in doc.paragraphs:
        if paragraph.text:
            if para_regex.search(paragraph.text):
                return paragraph
    return None


# ----------------------------------------------------------------------
Please note that the Blat source and executables are freely available for
dataset/ETHPy150Open cr0hn/openvas_to_report/openvas_to_report/libs/exporters/word.py/paragraph_search--crossover with--dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/custom/bio_nextgen.py/install_kent_tools