I want to catch "(<tag>(.*?)</tag>)"
, but only the latest child, so for example <tag><tag>...</tag></tag>
should be ignored.
Is this possible to do using only one regexp in PHP?
Code:
------------------------
<tag>
<tag>
<tag>
<i> abcd <\/i>
</tag>
</tag>
</tag>
<tag>
<tag>
efgh
</tag>
</tag>
------------------------
<tag>
ijkl
</tag>
<tag>
mnop
</tag>
------------------------