Hi all,
For the module I am maintaining at drupal, I need to select the element which has a specific class. I am using the following query for it:
for eg <div class="foo"></div> is selected by the following query.
$class = "foo";
$xpath->query("//*[@class = '".$class."']");
But, this fails in case of multiple classes, i.e. does not select this :
<div class="foo bar"> </div>
I don't have much experience in writing regex, can someone please help me out with this.
Looking forward.