03-09-2018, 09:31 PM | #1 |
randomly making better
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 |
03-09-2018, 10:17 PM | #2 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
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> Last edited by theducks; 03-10-2018 at 10:16 AM. Reason: ONE ormore |
03-09-2018, 10:48 PM | #3 |
randomly making better
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 |
03-09-2018, 10:54 PM | #4 |
randomly making better
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) |
03-10-2018, 02:06 AM | #5 |
Evangelist
Posts: 482
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
|
|
03-10-2018, 10:17 AM | #6 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
03-10-2018, 10:43 AM | #7 |
Resident Curmudgeon
Posts: 73,976
Karma: 128903378
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.
|
Tags |
find and replace, tag remove |
|
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 |