Hello, @vasile-caraus, @eko-palypse and All,
Here is, below, a similar regex S/R, with a look-ahead structure, which, also, preserves the indentation of the two lines, involved !
So assuming the sample text, below :
<p> </p>
<p class="text_obisnuit">
<p> </p>
<p class="text_OTHER_1">
<p> </p>
<p class="text_obisnuit">
<p> </p>
<p class="text_OTHER_2">
<p> </p>
<p class="text_obisnuit">
If we use :
SEARCH (\h*)<p> </p>(?=\h*\R\h*<p class="text_obisnuit">)
REPLACE \1<br><br>
the above text becomes :
<br><br>
<p class="text_obisnuit">
<p> </p>
<p class="text_OTHER_1">
<br><br>
<p class="text_obisnuit">
<p> </p>
<p class="text_OTHER_2">
<br><br>
<p class="text_obisnuit">
With the previous regex S/R, we would have obtained :
<br><br>
<p class="text_obisnuit">
<p> </p>
<p class="text_OTHER_1">
<br><br>
<p class="text_obisnuit">
<p> </p>
<p class="text_OTHER_2">
<br><br>
<p class="text_obisnuit">
Note, also, that this new regex S/R works, whatever the line endings ( \r\n for me and \n for you )
Best regards,
guy038