def doctype_matches(text, regex):
    m = doctype_lookup_re.match(text)
    if m is None:
        return False
    doctype = m.group(2)
    return re.compile(regex).match(doctype.strip()) is not None
Check if the doctype matches a regular expression (if present).
dataset/ETHPy150Open joeyb/joeyb-blog/externals/pygments/util.py/doctype_matches