Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 12-29-2019, 03:00 AM   #1
steveredshaw
Junior Member
steveredshaw began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2019
Device: Kindle app on tablet
Editing an epub file

I need to take out all page number references from an epub file. They appear like this - <p class="calibre_"><span class="bold">Page 52</span></p>.

I can delete each one separately, but can I use a wild card term instead of the number to replace/delete all of them in one go?
steveredshaw is offline   Reply With Quote
Old 12-29-2019, 09:00 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Yes, you can. That technique is called RegEx (for Regular Expression). There are some different 'flavors' of regex depending on what software you are using, but they all generally support the basic commands.

There is a short explanation of RegEx in MR's Wiki.

You can try:
Search: <p class="calibre_"><span class="bold">Page (\d*?)</span></p>
Replace: (nothing)

Give it a try, one at a time until you are sure it isn't going to pick up something unwanted... then you can Replace All.

As always, save your epub first!

Cheers,
Turtle91 is offline   Reply With Quote
Advert
Old 12-29-2019, 09:01 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,975
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
That sort of page numbering is usually found when a PDF is converted to ePub. If that is the case, there will be more errors then just page numbers.
JSWolf is offline   Reply With Quote
Old 12-29-2019, 11:56 AM   #4
steveredshaw
Junior Member
steveredshaw began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2019
Device: Kindle app on tablet
RE: editing using regular expressions

Thank you so much. Find and Replace is so powerful in Calibre! Apply changes to all files making up the book - that is so useful!!

Once I'd got familiar with the wild card terms and the Find and Replace section of the editing page, I was able to clean up the book in very little time.

It was a pdf file, which I wanted to read on my Kindle. Pdfs are a bit clumsy and inflexible when displayed via the Kindle app (no font size control for one thing), but a bit of cleaning up (yes there were other errors which I did correct - well probably most of them) and converting to Amazon file format made the book much easier and more pleasant to read.
steveredshaw is offline   Reply With Quote
Reply

Tags
editing ebook in calibre, wild card


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File list for editing johngross Editor 1 10-07-2019 09:29 PM
Problem editing a file Terisa de morgan Editor 2 05-01-2018 07:26 AM
Editing the file /etc/profile. How to??? Kirith Onyx Boox 0 05-05-2013 03:37 PM
Editing config file James_Wilde Sigil 4 12-11-2010 10:22 AM


All times are GMT -4. The time now is 11:06 AM.


MobileRead.com is a privately owned, operated and funded community.