Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
<p class="text_obisnuit">(?:(?!<\/p>)(?!<p).)*(?:<.+?>|\z)
/
gm
Input 1
1
New
<p class="text_obisnuit"><em>I have to make sure of that</em></p> <p class="text_obisnuit"><em>I have to make sure of that</em><br> <p class="text_obisnuit">I have to make sure of that</div> <p class="text_obisnuit">I have to make sure of that </div> Toto, I have to select all lines that do not end with </p> your regex <p class="TEXT">(?:(?!<br>)(?!<p).)*(?:<.+?>|\z) becomes in this case: <p class="text_obisnuit">(?:(?!<\/p>)(?!<p).)*(?:<.+?>|\z) I think I made a mistake somewhere