View Single Post
Old 11-02-2024, 10:00 AM   #2
lomkiri
Groupie
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 167
Karma: 1497966
Join Date: Jul 2021
Device: N/A
Code:
Find : </p>\s*<p>(\p{Ll}.*?</p>)
Replace : \x20\1
Mode : Regex
with "dot all" and "case sensitive" checked 
(\x20 is a space)
Note : it will merge only if the paragraph starts with a lower case letter. It won't if it starts with space or punctuation. If you want to give the possibility to have a space before the letter, it will give :
Code:
</p>\s*<p>(\s?\p{Ll}.*?</p>)
but you may have 2 spaces before the targeted word, which is not a problem because it won't be visible in the text (to avoid this, we could put a very simple regex-function instead of the "<space>\1" replace)

Last edited by lomkiri; 11-02-2024 at 04:28 PM.
lomkiri is offline   Reply With Quote