I have a text like below
$str = '<div>
<div id="priceRangeWrapper">
<div id="priceSlider" min="0" max="0"></div>
</div>
</div>';
1) First I want to get the position of <div id="priceSlider" min="0" max="0"></div> from above string where min and max values are random. Something like with strpos() function of Php in which it returns the position in terms of int like
$pos = strpos($str, '<div id="priceSlider" min="0" max="0"></div>');
//but min and max values are random. I don't know what can be they
2) I want to get min and max values from above text. How can I get these two values with/without regex in PHP?
DOMDocumentin these situations than a regex.DOMDocumentis using regex on backend to find Paths and Attributes etc? I mean to say that how it would be searching for elements and their attribute etc without using regex?