View Single Post
Old 08-06-2026, 04:28 PM   #4
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,891
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
This will take a few separate regex's to accomplish.

First you need to "Fix HTML - All files" and then "Beautify all files" which are tools in the editor. The spacing, tabs and layout look a mess. You need to get consistency across all the tags.

You also need to check that the classes being used in the tags are unique to these Authors Notes otherwise you will also be removing parts of the book you want to keep.

Then you need to step through the regexes. Remember to also capture the tabs and line before so you don;t end up with lot's of spacing.
Start with removing the empty <p class="calibre4"></p> tags.
Then remove the <p class="calibre4"><span>(.*?)</span></p> tags.
Then remove the <div> tags using Edit Spans & Divs, which I think is part of Diap's Toolbag plugin.
Then run the "Fix HTML - All files" and then "Beautify all files" again to remove all the extra line feeds.
Karellen is offline   Reply With Quote