I need to scan the page for price and extract it, i was thinking of detecting $ and extract the value after $. How can i do that using xpath?
Unfortunately different page has different format. Therefore i need it to be smart enough to detect $12 or $12.30
$price= $xpath->query("//??[@??]");
Thanks in advance!
With XPath 2.0, you could use:
//*[text()[contains(., '$')]]/substring-after(text(),'$')