|
|
#1 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 387
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
How can I find and remove all occurrences of the following:
Code:
<a class="calibre7" id="pb-rw_36"></a> I've been searching the forum and trying different combinations but so far no luck. ![]() Many thanks! |
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,763
Karma: 24088559
Join Date: Dec 2010
Device: Kindle PW2
|
I suck at regular expressions, but this one should work:
PHP Code:
|
|
|
|
|
|
#3 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 387
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
|
|
|
|
|
|
#4 |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
|
Something I often find quite handy is to clean specific empty tags with a specific attribute (id, class etc).
Code:
<(p|h\d|div|a)\b[^<>]*?(id="blarg")[^<>]*?>([\s\n\r]|&(nb|en|em|thin)sp;|</?br\s*/?>)*</\1> |
|
|
|
|
|
#5 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 387
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
Quote:
Another one for the collection.
|
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regex | Gunnerp245 | Conversion | 5 | 03-05-2012 04:15 PM |
| RegEx | el.motar | Sigil | 10 | 12-12-2011 05:54 PM |
| New help with a regex | txckie | Calibre | 2 | 08-29-2011 08:46 PM |
| What a regex is | Worldwalker | Calibre | 20 | 05-10-2010 05:51 AM |
| Help with a regex | A.T.E. | Calibre | 1 | 04-05-2010 07:50 AM |