View Single Post
Old 08-18-2014, 11:34 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,840
Karma: 207000000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by phossler View Post
My RegEx is mostly cookbook, i.e. look up a recipe, bake it, and see if I like it

Find: \x0a([^\s?])
Replace: space\1
I don't know about the Replace, but see what you think about:
Code:
(?<!(>|\n))\n
for finding linefeeds that aren't immediately preceded by a ">" (or another linefeed).

Will probably match the linefeed in a split-line DOCTYPE, but those tend to disappear in calibre's editor anyway.
DiapDealer is offline   Reply With Quote