I am looking to scan a page and look for any html elements that have a class or id that contains the word price
. My thought was to use regex here but I cannot get it to fire correctly.
I am using Safari and Chrome on OS X
var price = $("div:regex(\bprice\b)").text();
The purpose is to get the price of a product on an e-commerce site if it isn't already stated in Open Graph which is already handled.