06-11-2011, 10:16 AM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Jun 2011
Device: Kindle
|
Page Numbers
Hello,
I am new to Calibre and also to regex expressions and I am struggling a bit with what seems like should be a very simple problem. I have a PDF file which I have converted to MOBI format with Calibre, and I am trying to remove the page numbers as they crop up in the middle of the text. I have used the expression \d+</p><p class="calibre_8"> which the test function of the wizard recognises, and highlights all of the items I want to remove correctly. (267 occurances, all of which are page numbers with a paragraph break immediately after them.) However when I actually convert the file, it doesn't remove the page numbers and I don't understand why. Can someone explain to me what I am doing wrong please? Thank you (I have searched for previous forum posts but can't find anything similar?) |
06-11-2011, 11:33 AM | #2 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
The fact that you have "calibre_8" in your expression indicates something odd is going on - you shouldn't see that for pdf input.
At a guess, you need to support spaces between the closing and opening paragraph tags: Code:
\d+</p>\s*<p class="calibre_8"> |
Advert | |
|
06-12-2011, 07:51 AM | #3 |
Junior Member
Posts: 3
Karma: 10
Join Date: Jun 2011
Device: Kindle
|
Thank you, I'll try that
|
06-12-2011, 08:23 AM | #4 |
Junior Member
Posts: 3
Karma: 10
Join Date: Jun 2011
Device: Kindle
|
Having gone back and looked at it again, I think what I was doing was trying to remove the page numbers after the conversion to MOBI.
I did try that expression above with no success, but I then started again from scratch and managed to get it to work straight away using \d+<b> on the PDF, so a case of me being an idiot I think. Thank you again, |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there a hack for displaying page numbers rather than location numbers? | nesler | Kindle Developer's Corner | 16 | 02-15-2011 12:00 AM |
Page numbers | Fincary | Astak EZReader | 4 | 02-18-2010 03:06 PM |
page numbers | nenad | Amazon Kindle | 2 | 12-19-2009 09:01 AM |
Page numbers, AGAIN | orlincho | Bookeen | 92 | 08-19-2008 07:15 AM |
Page numbers (again) | Prospect | Workshop | 50 | 04-10-2008 02:19 AM |