I have this 3 situation in which I have <em>
and </em>
html tags framed by <p class="TATA"></p>
class
First case: (1 <em> and 1 </em> anywhere in the tag)
<p class="TATA">Ou quand vous peignez une fleur, comment elle ouvre ses pétales et montre <em>sa me dans </em> grâce dans votre jardin.</p>
Second case: (2 <em> and 2 </em> anywhere in the tag)
<p class="TATA"><em>Une fleur est un accompagnement <em>je veux aimer quelqu'un mais </em> je ne peux pas à cause du virus.</em></p>
The Third Case (1 <em> at begin and 1 </em> at the end of the tag)
<p class="TATA"><em>Une fleur est un accompagnement.</em></p>
The problem: I want to find only those <p class="TATA"></p>
tags that contains other <em>
and </em>
except for those found at the beginning and end of the tag.
So The Output should find those files that contains 2 <em>
and also 2 </em>
. How can I do the search?
My regex is not very good, it find exactly the opposite (the second case).
FIND: (?:<p class="TATA">|\G(?!^))<em>\K.*?</em>(?=.*?</p>)
Can anyone help me?
<p class="TATA"><em>…the <em>lazy</em> dog.</em></p>
; I interpreted the question as meaning that you didn’t want those. Or are you saying that that case will never occur? Why do you enumerate three cases and then not refer to them when you say what result you want? And, since you seem to want to find cases 1 and 2, how is finding only case 2 “exactly the opposite” of what you want?/
, so I correct that element. It's too late to enumerate. You've already rushed to give me negative votes. Please learn to explain to the person what needs to be corrected first, and then give him negative votes...