View Single Post
Old 05-24-2017, 05:03 PM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by roger64 View Post
Edit: I used the first regex with Sigil (it does not work with the Calibre editor). It proceeded about 95% of all entries. The remaining ones had one or more accented letters of some sort (â, é, ë, ê, ô, ç, etc.). But it was easy to correct. No need to adapt the regex.
The regular expressions suggested by Turtle91 and me only work with non-accented characters. To add support for Unicode characters simply prefix the search expression with (*UCP). E.g.

Find:(*UCP)<span class="smcpIncise">([[:upper:]])([[:upper:]]{2,})</span>
Replace:<span class="smcpIncise">\1\L\2\E</span>

will find:
Code:
<span class="smcpIncise">ÉPILOGUE</span>
and replace it with:
Code:
<span class="smcpIncise">Épilogue</span>

Last edited by Doitsu; 05-25-2017 at 07:15 AM.
Doitsu is offline   Reply With Quote