View Single Post
Old 11-02-2021, 10:44 AM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,109
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
*assumed* follows
That the IMG tag is always followed by a caption (p tag)
(BTW I don't think a naked <img is allowed) I wrapped it in a basic div

REGEX (saved search if you intend to use again)
Simply search
Code:
(<img .+?</img>)\s+<p>(.+?)</p>
Replace:
Code:
<figure>
<div>\1</div>
<figcaption>
<p class="caption">\2</p>
</figcaption>
</figure>
theducks is offline   Reply With Quote