View Single Post
Old 10-12-2024, 06:43 AM   #5
lomkiri
Groupie
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 167
Karma: 1497966
Join Date: Jul 2021
Device: N/A
Nice regex, Biblos!

As everyone said (including the OP), it's easier to do that with the Diap's Editing Toolbag, even more since the recent v. 0.5.0 (no need anymore to enter into the code to add some tags not predefined in the list).

But, as Biblos said, his regex may have a great utility when one wants to pass the whole expression inclosed in the targeted div to a regex-function, so one can make some treatments into the text, but only inside specific classes of specific tags.

Example : remove italics in the text of the footnotes, transform bold into italic in the legend of the pictures, transform <i> to <i class="quotes"> in some author's quotes, or put the name of this author in small caps (or transform a word into another word) but only in those quotes, etc.

I even think that this regex should go in the sticky post "Saved Search/Regex Functions"

Last edited by lomkiri; 10-12-2024 at 06:49 AM.
lomkiri is offline   Reply With Quote