12-28-2018, 06:01 PM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Dec 2018
Device: Kindle
|
Can't erase Headers with Regex
Hello. I'm new to this so I might be making some mistakes here but I'm trying to delete the headers of a PDF while converting it to MOBI.
In Search & Replace I'm searching for the following expression with no quote marks: "<a id="p[0-9]+"></a>[0-9]+<br>Introduction<br>" Calibre shows me there are 3 instances of this. For replacement text I use blank or "", I have tried both. I then Add it to the list. When I convert the book the header is there in the middle of the text together with the page number. Am I missing a step here? What should I use as replacement text to erase it? Thanks. EDIT: Just realized there is a conversion subforum a bit down, sorry about posting in the wrong section. Last edited by Ivan_Z; 12-28-2018 at 06:04 PM. |
12-28-2018, 09:16 PM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
Advert | |
|
12-28-2018, 09:50 PM | #3 |
Junior Member
Posts: 2
Karma: 10
Join Date: Dec 2018
Device: Kindle
|
Thanks for the link, everything requested is attached.
I created a sample from the actual PDF and now the "Introduction" expression is working, but there is a second one still not working. That expression is: "<a id="p[0-9]+"></a>[0-9]+<br> T h e G r e a t G a m b l e<br>" So both examples can be used to detect the problem. Options different from default are: Heuristic processing enabled. In page setup, Kindle is selected. In PDF Input, no image is selected. Thanks. |
12-29-2018, 02:45 AM | #4 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's because the spaces are represented as entities in the actual HTML produced by the input plugin. I will add some code to replace those in the next release.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Erase and deregister | DianNC | Nook Color & Nook Tablet | 5 | 10-29-2013 10:52 PM |
n516 - how long to erase flash | Beebeeee | OpenInkpot | 6 | 06-24-2011 03:22 AM |
Regex for removing headers and footers | Mamaijee | Conversion | 3 | 05-26-2011 01:19 PM |
erase all tags ? | aceflor | Calibre | 6 | 01-01-2010 01:58 AM |