I am using the following XPath instruction in a JS function that highlights certain keywords on web pages:
var xpath = "//text()[contains(., \"" + keyword + "\")]";
Any idea on how I could rewrite it in order to support regex? I tried in various ways, but nothing seemed to work!