View Single Post
Old Today, 09:25 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 85,967
Karma: 154365289
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by peach View Post
i love using the e-reader xteink because how small and light it is. however it doesn't recognize as many font types as other e-readers like kindle or kobo so for some time already i've been using the regex option in calibre to replace the cursive text from <span class="italic">.*?</span> into <i>\1</i> but for whatever reason when i try to replace it now i get an error window saying IndexError:no such group

i've been searching how to fix this problem or an alternative i can use instead of \1 but can't find anything so i'm hoping someone here can help
The code you want is...

Search: <span class="italic">(.*?)</span>
Replace: <i>\1</i>

An easier way to do it because spans like this can use different class names, use Otter's Editing Toolbag. It's an editor plugin that's very handy/useful. It easily lets you do what are are trying to do and more.

Last edited by JSWolf; Today at 09:48 AM.
JSWolf is offline   Reply With Quote