View Single Post
Old 04-18-2020, 05:16 PM   #26
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 451
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Quote:
Originally Posted by davidfor View Post
I use the following saved search in the calibre editor to do this:

Code:
([\w-.,’”"'–;:\!…\?])\s*\n+\s*([\w"'’‘“]|<i)
With the replace text:

Code:
\1 \2
That matches most of what I have found when trying to wrap the text in paragraphs and replacing the line break with a single space. It isn't perfect, and have added things over time. It could probably be simplified, but, it works for me.
Well, if you want simple, I use this: Make sure there are no parsing errors, then search for \s+ and replace with a space. Then do the "beautify all files" thing. It is sort of a dynamite solution, but I've not had any trouble with it.
retiredbiker is offline   Reply With Quote