07-18-2011, 05:14 AM | #1 | |
Addict
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
Regexp help - I think...
I'm working in fixing some epubs and have discovered that on some of them, on every page there is over 50 KB of inline style font definitions like this:
Quote:
So far, I've been exploding the epubs and manualy removing all these font definitions with UltraEdit but it would be really great if I could do it at the time of conversion. Many thanks PF |
|
07-18-2011, 07:00 AM | #2 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
If it's part of the HTML itself search and replace will work. Search and replace however does not run over .css files. You could try:
Code:
(?mu)<style>.+</style> |
Advert | |
|
07-18-2011, 07:27 AM | #3 | ||
Addict
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
Quote:
Yes. It's inline style in the html, xhtml documents. I've tried putting Code:
(?mu)<style>.+</style> Quote:
I also tried Code:
(?mu)<style.+</style> Code:
<style type="text/css"> |
||
07-20-2011, 01:34 AM | #4 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
i remove that stuff with the find replace feature in Sigil. just paste the whole chunk into the find box & replace with nothing. works fine, even across multiple line breaks.
|
07-20-2011, 03:27 AM | #5 |
Addict
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
RegExp in search field | Format C: | Library Management | 4 | 06-13-2011 11:00 AM |
Is this as it supposed to be? (Regexp issue?) | Mixx | Calibre | 13 | 03-09-2011 03:30 AM |
Error in Regexp documentation | arifzaman | Calibre | 3 | 03-02-2011 06:03 AM |
Multiple line regexp | janvanmaar | Calibre | 19 | 11-02-2010 01:02 PM |
Regexp and header/footer problems | concern | Calibre | 0 | 02-07-2010 03:35 AM |