I am trying to find an equivalent to (.*) from regexes in XPath. Now this is what I currently have:
I have an HTML a-tag with an href to world/nl44/town/ANYNUMBER
where ANYNBUMBER
So it could for example be: world/nl44/town/12345
and world/nl44/town/1232
is replaced by a random value (I just need the value of the a tag).
The query would look something like this:
$elements = $xpath->query('//a[@href="/world/nl44/town/ANYNUMBER"]');
With ofcourse ANYNUMBER
replaced by the XPath equivalent of (.*)
To sum it up:
<a href="/world/nl44/town/12344">Something</a>
<- This is what my a looks like, where 12344 could be any number, and I just need the value between the tags, so with this example I would want it to return "Something".
How would I go about this?