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 08-08-2011, 12:50 PM   #1
kamanza
Zealot
kamanza began at the beginning.
 
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
Can't remove a footer.

I'm having a problem with the following footer:

file:///G|/rah/Brian%20Lumley/Brian%20Lumley%20-%20Necroscope%204%20-%20Deadspeak%20V1.0%20(html).htm (30 of 239) [2/13/2004 10:16:36 PM].

I've copied it to the wizard but the test shows yellow only up to the "|" character. I understand that "|" has a function in the regex but i have no idea how to make calibre see it as a part of the footer to remove.
I've tried this:

<div><nobr><span>file:///G|/rah/Brian%20Lumley/Brian%20Lumley%20-%20Necroscope%204%20-%20Deadspeak%20V1.0%20(html).htm (\d+ of 239) [2/13/2004 10:16:35 PM]</span></nobr></div>

I've tried to put \ in front of "|" but it did not work.

I would very much appreciate if somebody helped me with this problem.
kamanza is offline   Reply With Quote
Old 08-08-2011, 02:11 PM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
You've probably missed that the time is changing as well. Have a look at your regex and the code bit you posted. Something like
Code:
<div><nobr><span>file.*?</span></nobr></div>
would probably work.
Manichean is offline   Reply With Quote
Advert
Old 08-08-2011, 04:16 PM   #3
kamanza
Zealot
kamanza began at the beginning.
 
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
Sorry,it doesn't work.
The time changes only from 10:16:35 to 10:16:37, so if that was the problem then at least for the pages with the correct time the regex i used should have worked.

Anyway, i've tried what you suggested :

<div><nobr><span>file:///G|/rah/Brian%20Lumley/Brian%20Lumley%20-%20Necroscope%204%20-%20Deadspeak%20V1.0%20(html).htm (\d+ of 239) [2/13/2004 10:16:35 PM].*?</span></nobr></div>

I've tried this:

<div><nobr><span>file:///G|/rah/Brian%20Lumley/Brian%20Lumley%20-%20Necroscope%204%20-%20Deadspeak%20V1.0%20(html).htm (\d+ of 239) [2/13/2004 10:16:\d+ PM].*?</span></nobr></div>

and this;

<div><nobr><span>file:///G|/rah/Brian%20Lumley/Brian%20Lumley%20-%20Necroscope%204%20-%20Deadspeak%20V1.0%20(html).htm (\d+ of 239) [2/13/2004 10:16:\d+ PM]</span></nobr></div>

but no luck.

I still think that "|" is the culprit.

Last edited by kamanza; 08-08-2011 at 04:18 PM. Reason: spelling
kamanza is offline   Reply With Quote
Old 08-08-2011, 04:19 PM   #4
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,800
Karma: 54830978
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 kamanza View Post


I still think that "|" is the culprit.
Escape it with a \
theducks is offline   Reply With Quote
Old 08-08-2011, 04:37 PM   #5
kamanza
Zealot
kamanza began at the beginning.
 
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
One other thing:

I've ran conversion (MOBI>MOBI) with the regex as is and it removed this part: file:///G.
The i tried to clean it again and copied this:

|/rah/Brian%20Lumley/Brian%20Lumley%20-%20Necroscope%204%20-%20Deadspeak%20V1.0%20(html).htm (\d+ of 239) [2/13/2004 10:16:35 PM]

to the wizard.

Pressing "Test" then invariably crashed calibre.
kamanza is offline   Reply With Quote
Advert
Old 08-08-2011, 04:42 PM   #6
kamanza
Zealot
kamanza began at the beginning.
 
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
Have tried \ :

<div><nobr><span>file:///G\|/rah/Brian%20Lumley/Brian%20Lumley%20-%20Necroscope%204%20-%20Deadspeak%20V1.0%20(html).htm (\d+ of 239) [2/13/2004 10:16:\d+ PM]</span></nobr></div>

no luck still
kamanza is offline   Reply With Quote
Old 08-08-2011, 07:48 PM   #7
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,800
Karma: 54830978
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 kamanza View Post
Have tried \ :

<div><nobr><span>file:///G\|/rah/Brian%20Lumley/Brian%20Lumley%20-%20Necroscope%204%20-%20Deadspeak%20V1.0%20(html).htm (\d+ of 239) [2/13/2004 10:16:\d+ PM]</span></nobr></div>

no luck still
you need to escape [ and ]
Get a 1 page REGEX (CSS,HTML) reference guide free at addedbytes.com
handy to see what needs escaping
theducks is offline   Reply With Quote
Old 08-08-2011, 10:20 PM   #8
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Not sure what the <nobr> is about, and you may want \s* between your tags to catch white space.

Did you try this (on the original):
file://.*?\]\.
ldolse is offline   Reply With Quote
Old 08-09-2011, 02:33 AM   #9
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by kamanza View Post
Anyway, i've tried what you suggested :

<div><nobr><span>file:///G|/rah/Brian%20Lumley/Brian%20Lumley%20-%20Necroscope%204%20-%20Deadspeak%20V1.0%20(html).htm (\d+ of 239) [2/13/2004 10:16:35 PM].*?</span></nobr></div>
That isn't what I've suggested. Just pick what I put in the code field and try that.

Edit: You do know that the dot is a special character in regexes, as well?
Manichean is offline   Reply With Quote
Old 08-09-2011, 07:51 PM   #10
kamanza
Zealot
kamanza began at the beginning.
 
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
Manichean, sorry for not understanding you the first time. It did work of course and it is a beautiful solution which sent me to the regex tutorial to figure out why it did.
I'm only beginning to understand the regex and hopefully in time i'll be able to come up with something like that by myself.
Thanks a lot for the solution and for the lesson.
kamanza is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove made by footer drMerry Recipes 1 05-27-2011 05:03 PM
software to remove pdf header, footer cybmole Conversion 31 04-18-2011 02:37 AM
Regex help to remove HTML footer neonbible Calibre 4 09-09-2010 09:42 AM
Remove Footer cdecaf Calibre 44 07-21-2010 05:48 AM
remove PDF footer containing variable? irisclara Calibre 10 03-06-2010 10:53 PM


All times are GMT -4. The time now is 07:41 PM.


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