Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2018, 06:01 PM   #1
Ivan_Z
Junior Member
Ivan_Z began at the beginning.
 
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.
Ivan_Z is offline   Reply With Quote
Old 12-28-2018, 09:16 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://www.mobileread.com/forums/sh...d.php?t=186697
kovidgoyal is offline   Reply With Quote
Advert
Old 12-28-2018, 09:50 PM   #3
Ivan_Z
Junior Member
Ivan_Z began at the beginning.
 
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.
Attached Files
File Type: zip sample.zip (180.6 KB, 113 views)
Ivan_Z is offline   Reply With Quote
Old 12-29-2018, 02:45 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

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


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


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