So you want to find things like
<p class="calibre8"> <span class="calibre3"> — « There is a long sentence ending with a comma », said the man. « Then a second part of the blahblah dot »</span> </p>
and turn them into
<p class="calibre8"> <span class="calibre3"> — « There is a long sentence ending with a comma », said the man.</span> </p>
<p class="calibre8"> <span class="calibre3"> « Then a second part of the blahblah dot »</span> </p>
or into
<p class="calibre8"> <span class="calibre3"> — « There is a long sentence ending with a comma », said the man.<br /> « Then a second part of the blahblah dot »</span> </p>
The search term is the same either way.
(<p class="calibre8"> <span class="calibre3"> — «[^»]+»,.*?\.)( «)
(Well, assuming that all your </p> are followed by a new line, otherwise the .*? part of the pattern could run into the next paragraph)
And the replacement term is just the first capture group, what you want to insert, and then the second capture group, e.g.
\1<br />\2
Last edited by pdurrant; 02-25-2024 at 12:37 PM.
|