![]() |
#1 |
Zealot
![]() 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. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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> |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() 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 |
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,888
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#5 |
Zealot
![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Zealot
![]() 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 |
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,888
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Get a 1 page REGEX (CSS,HTML) reference guide free at addedbytes.com handy to see what needs escaping |
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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://.*?\]\. |
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Quote:
Edit: You do know that the dot is a special character in regexes, as well? |
|
![]() |
![]() |
![]() |
#10 |
Zealot
![]() 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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |