MadCom MadCom - 8 months ago 74
PHP Question

Find tags with text inside

I have this text string


And I'm searching for
tag which have text
inside them. So I need regex which will match


Closest what I got is with


but it matches from the first
and result is


Answer Source

Using a negative look-ahead should do it for you:


See it here at regex101.