View Single Post
Old 12-13-2018, 10:39 AM   #4
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,830
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Vroni View Post
Depends. It can be impossible or very easy. If it's always the word CHAPTER, that's easy, and i guess you woudn't have asked
Yes, not always the word is CHAPTER.

Quote:
If all letters are capital you can just search for ([A-Z])_ and reaplce it with \1. The probality that a capital letter is followed by a blank is low, but not 0. So yo have to go through the text one at a time to make a decision.
Not always the letters are in uppercase. Sometimes only the first letter is capitalized.

Quote:
In any other case i would assume it's not possible as Regex in sigil can't be limited to work only inside a specific element (AFAIR Calibre can do that). So you are catching too many wrong positives if your heading is mixed-case.
I didn't know that Calibre could work with RegEx inside a specific element. I'll do a research to see what can I get there. Thanks for the info.

Last edited by RbnJrg; 06-06-2021 at 03:22 PM.
RbnJrg is offline   Reply With Quote