Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 03-09-2018, 09:31 PM   #1
pdofak
randomly making better
pdofak began at the beginning.
 
pdofak's Avatar
 
Posts: 7
Karma: 10
Join Date: Mar 2018
Device: Marvin - Nook
basic Search & Replace for dummies

Hi,
I have a poorly built book that has page footers with numbers that I want to delete. Using Find and Replace this expression finds most of what I need:
The Title of the Blabity Blah [1-9]+
But I also would like to delete the </p> tag that follows the page number and ends each footer.
How do I include and capture that tag in the Find results?
And then I assume leaving the Replace field empty will delete the footer for me. Right?
Thanks
pdofak is offline   Reply With Quote
Old 03-09-2018, 10:17 PM   #2
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: 29,763
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Include ALL of what you want replaced, then.
Code:
<p class="footer">The Title of the Blabity Blah \d+</p>
the \d is any digit, the + say 0 1 or more times

Last edited by theducks; 03-10-2018 at 10:16 AM. Reason: ONE ormore
theducks is offline   Reply With Quote
Advert
Old 03-09-2018, 10:48 PM   #3
pdofak
randomly making better
pdofak began at the beginning.
 
pdofak's Avatar
 
Posts: 7
Karma: 10
Join Date: Mar 2018
Device: Marvin - Nook
Yup, I thought that for a very short time too. The problem is that this is a VERY poorly rendered epub. I think they just lassoed all the text from the formatted print file and pasted it into an ebook creator and called it an ebook. The result is there are no proper footer class/lines (Is that the right term?). The text of the print format footers appears right in the middle of a sentence (because that is where the line wrapped), then some spaces and the page number followed by a </p>.
I have to surgically remove the footer text, the number, and the </p> from a sentence that isn't often the actual end of a paragraph.
I can read past this noise but it's annoying and takes you out of the story. I'd like to fix it if I can. I'll gladly suffer the extra linefeed that may result where the sentence continues on.
I can find replace the footer text, spaces and line numbers. I just need help getting Edit Book to also find the </p> tag too.
Thanks again
pdofak is offline   Reply With Quote
Old 03-09-2018, 10:54 PM   #4
pdofak
randomly making better
pdofak began at the beginning.
 
pdofak's Avatar
 
Posts: 7
Karma: 10
Join Date: Mar 2018
Device: Marvin - Nook
Ha!
I got it!
\s+ \d+ \s</p>
Finds what I needed to find. (except for the bag of money. still looking for that)
pdofak is offline   Reply With Quote
Old 03-10-2018, 02:06 AM   #5
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 482
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
Quote:
Originally Posted by theducks View Post
the \d is any digit, the + say 0 or more times
Isn't + 1 or more, and * 0 or more?
MerlinMama is offline   Reply With Quote
Advert
Old 03-10-2018, 10:17 AM   #6
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: 29,763
Karma: 54401244
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 MerlinMama View Post
Isn't + 1 or more, and * 0 or more?


Yes, I spotted it before I read your reply
theducks is offline   Reply With Quote
Old 03-10-2018, 10:43 AM   #7
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,858
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
A conversion from PDF is not a simple matter. The problem is that you really have to A/B compare the PDF to the converted ePub and tha's not an easy job.
JSWolf is online now   Reply With Quote
Reply

Tags
find and replace, tag remove

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search & Replace changes in 3.0 Phssthpok Editor 4 06-21-2017 04:04 AM
Regex in search problems (NOT Search&Replace; the search bar) lairdb Calibre 3 03-15-2017 07:10 PM
Search & Replace Scott Nielsen Sigil 4 10-29-2013 12:10 PM
Help with a search & replace mmholt Library Management 11 10-21-2011 06:49 PM
Search & Replace Pat Nickholds Sigil 2 10-21-2010 11:18 PM


All times are GMT -4. The time now is 06:17 PM.


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