def html_doctype_matches(text):
 return doctype_matches(text, 'html\\s+PUBLIC\\s+"-//W3C//DTD X?HTML.*')

def html_doctype_matches ( text ) : return doctype_matches ( text , 'html\\s+PUBLIC\\s+"-//W3C//DTD X?HTML.*' )
check if the file looks like it has a html doctype .