View Single Post
Old 09-22-2022, 04:42 PM   #17
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,369
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by KevinH View Post
You do not need actual regex "function replace" to handle what you wanted but you could use it.

If you use just normal Sigil regex find replace, then something like the following should handle it:

Find: <div\s*xml:lang=\"es\-MX\">\s*<div>(\s*.*)</div>\s*</div>

Replace: <blockquote>\1</blockquote>

And make sure you have Dot All and Minimal Match options checked.

If you wanted to use the function replace capability then using the same Find value and flags, and then in the replace function you could use a xhtml parser to parse the captured snippet and change it to whatever you want. That is the power of function replacement.
Blue highlighted area.
Turtle91 is offline   Reply With Quote