code: def doctype_matches(text, regex):
      """Check if the doctype matches a regular expression (if present).
  
      Note that this method only checks the first part of a DOCTYPE.
      eg: 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
      """
      m = doctype_lookup_re.match(text)
      if m is None:
          return False
      doctype = m.group(2)
      return re.compile(regex, re.I).match(doctype.strip()) is not None
  
imports: import re
  import sys
label_desc: Use image node_id 8 for calling a global function with example usage: doctype_matches(text, regex) and returns: unknown, False