View Single Post
Old 04-19-2022, 12:11 AM   #13
celiapgt
EBook-obsessive gal
celiapgt began at the beginning.
 
celiapgt's Avatar
 
Posts: 47
Karma: 10
Join Date: Mar 2011
Location: La ciudad de la eterna primavera
Device: Kobo Clara HD
Quote:
Originally Posted by KevinH View Post
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.
Wow, thank you! Really appreciated.

I applied the regex and it worked perfectly. There were 368 hits, so it was very helpful.

Quote:
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.
I was trying to understand how to use it in a useful manner. I see now that I was trying to kill a fly with a dremmel

This plugin looks very powerful, but this case was not the optimal example to apply it. Thanks for your patience with a noob in this matter.
celiapgt is offline   Reply With Quote