View Single Post
Old 04-09-2023, 07:07 PM   #23
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: 79,902
Karma: 146918083
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 DNSB View Post
Unfortunately, your regex does horrible things if you have nested spans:

Code:
<span class="text_14"> blah de blah de blah<span class="text_17">more blah de blah</span>yet more blah de blah</span>
which your regex would convert to:

Code:
 blah de blah de blah<span class="text_17">more blah de blah yet more blah de blah</span>
It would be much safer to simply use:

search: <span class="text_14>
replace: <span>

and then remove the naked <span> tags using Diap's "Editing Toolbag" (Calibre) / "TagMechanic" (Sigil).
That's twice the work when Diaps Editing Toolbag can do the <span class="text_14"> delete in one go.
JSWolf is offline   Reply With Quote