Regex: find repeating tags <em> and </em>

I think that your regex is overly complicated, unless I have misunderstood the problem.

For me this is enough: <p class="TATA">.+<em>.+</p>

It searches for this tag when it contains <em> that is not immediately following the tag.


To find those <p class="TATA"> that contains 2 <em> tags, use:

<p class="TATA">.+<em>.+<em>.+</p>