$text4 = preg_replace( array( '/^\<\!DOCTYPE.*?<html><body>/si', '/<\/body><\/html>$/si'), '', $dom_document->saveHTML());