Thread: REGEX delete
View Single Post
Old 03-14-2024, 09:42 AM   #3
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 388
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
Quote:
Originally Posted by swepub View Post
Completely new to this.
Is it possible to remove all <div ids and it's corresponding end <\div> like below that has the class "Basic-Text-Frame" using regex?
<div id="_idContainer020" class="Basic-Text-Frame">
One way to do it: Using regex mode, search for
<div.*?class="Basic-Text-Frame">
and replace with nothing.
Check it out one-at-a-time at first to make sure it is doing what you want, before hitting Replace All.
Then use the Mend and Prettify All HTML files tool to get rid of the </div> tag ends left behind.

Also try the plugin KevinH mentions, and do spend some time with the manual and regex tutorials. Regex is powerful and can easily destroy a book.
retiredbiker is offline   Reply With Quote