1

I currently have this portion of html with spans whose classes are integers:

<span class="1">
    .. some other stuff
</span>
<span class="2">
    .. some other stuff
</span>
<span class="3">
    .. some other stuff
</span>

I need to set a query to get these span child nodes whose classes are integers. Somehting like this:

$oDomObject = $oDomXpath->query('//span[contains(@class, number(something))]');

What would "something" be in order to get these span child nodes whose classes are integers? Is there such operator? The span tags only have class attribute with no id, or other. If I set "something" to "1"

$oDomObject = $oDomXpath->query('//span[contains(@class, number(1))]');

It return span tags with ids 1, 12, 21, any number containing 1. If I use "*"

$oDomObject = $oDomXpath->query('//span[contains(@class, number(*))]');

it returns nothing.

I hope I made sense.

Thank you!

karlosuccess
  • 843
  • 1
  • 9
  • 25

0 Answers0