View Single Post
Old 01-18-2014, 12:51 PM   #79
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,133
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by unboggling View Post
It's that simple? You just replace <br\s*/> with <br class="calibre\d+" />

Did you mean either of those are the Search regex, depending on whether book was previously converted by calibre or not?

What is the Replace regex to end up with
</p> closing prior paragraph and <p> opening next paragraph? Or whatever else is the best way to do it?
Here is one that finds either (and does not count as a capture

Code:
<br(?:\sclass="calibre\d+")*\s*/>
NB took me a while, I forgot to include the space before the optional calibre
theducks is offline   Reply With Quote