I've been looking around the manuals on PCRE syntax and I just can't make this pattern match work:
you can say for example
"|<tag>(.*)</tag>|Ui"
when using preg_match_all, but what I would like to do is match the contents of <tag>'s innermost nested tag
<tag><tag2><tag3>blah
</tag3></tag2></tag>
(I want to extract 'blah' with any varying nesting depth, and all I know is <tag> is outermost).
Can someone help with this?