View Single Post
Old 11-03-2023, 03:54 PM   #21
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,134
Karma: 169815798
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Bozana View Post
I've tried everything above... I need to have a search and replace uppercases in the beggining of a paragrahs. Example:

<p class=subsq">SARAH SNUGGLED DEEPER into Kade’s embrace.</p>

And I need it to be:

<p class=subsq">Sarah snuggled deeper to Kade’s embrace</p>

I've tired:

Find: ([[:upper:]])([[:upper:]]{1,})
Replace: \1\L\2\E

But realised that this works best in Sigil and not Calibre. And this this needs to work in Calibre please. Any help and suggestions would be appricated.

Thank you!
You do realize that you are posting in a Sigil forum? Perhaps this question would be best asked in the calibre editor subforum? Personally, I use both Sigil and the calibre editor. Sigil is my main editor but there are some tools that calibre has that I make use of.

You might also want to check the syntax difference between the PCRE2 regex used by Sigil and the Python regex used by calibre though I've seen statements that calibre uses PCRE. A useful site would be Regex101 which allows you to test regex using different engines.

And please note that in your example, you would need to manually change kade back to Kade.

Last edited by DNSB; 11-03-2023 at 03:57 PM. Reason: Perhaps I should have read the second page before replying?
DNSB is offline   Reply With Quote