View Single Post
Old 09-09-2022, 05:10 PM   #1
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 777
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
Remove Italic Tags from Selection?

Is there some way to remove italic tags (<i> and </i>, but this could apply to other tags as well) from a selected group of paragraphs in the Editor?

I ask because almost all the time, the author/publisher italicizes things with those tags in the HTML instead of with a css style. So far, the only things I've come up with are manually selecting each tag pair and deleting them, or marking the selection and running a Regex search/replace on the marked text:
Code:
find: (<p[^>]*>)<i>(.+?)</i>([\.\?]+)?</p>
replace: \1\2\3</p>

Last edited by enuddleyarbl; 09-11-2022 at 06:51 PM. Reason: better code for finding all-italic paragraphs
enuddleyarbl is online now   Reply With Quote