Say this is the HTML?
<html>
<body>
<embed scr="...." attr="..."></embed>
</body>
</html>
I want to match whole embed tag <embed scr="...." attr="..."></embed>
. How can I do so?
I got this far
$fragment = new DOMDocument();
$fragment->loadHTML($string);
$xp = new DOMXPath($fragment);
$result = $xp->query("//embed");
print_r($result->item(0));