Quote:
Originally Posted by LKJT
I'll have to edit every word in every book manually. Is that so?
|
It's pretty easy with regex, however the flavour (PCRE) used in Sigil makes it a bit trickier than it needs to be
This is a simple way to do it - however PCRE doesn't allow this.
Code:
(?<=>[^<]*)(([dg])\2*)
About the best you will get is something like:
Code:
Find:
First run : (?<=>)([^<]*?)(([dg])\3*)
Run until 0 matches : (?<=>)([^<]+?)(([dg])\3*)
Replace:
\1<span class="red">\2</span>
You also need to avoid hitting things like the title tags. It would become pretty complex and useless at this point - as you're unlikely to use it.
In short - upload the book somewhere, then send me a link to it, I'll make the modification as needed. If you need to do this on multiple books, I'll write a little script to do it on epubs.