I'm writing a PHP script to pull div id's that are incremented within their id example:
<div id="tag_1">content</div>
<div id="tag_2">content</div>
so basically, how do I write query domxpath with a wildcard like so:
$nodes = $xpath->query("//div[@id='tag_.*']");
You can use starts-with
"//div/@id[starts-with(., 'tag_')]/.."