View Single Post
Old 04-18-2014, 01:19 PM   #6
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
Quote:
Originally Posted by kovidgoyal View Post
1) So insert id="split_here" there and use the split at multiple locations tool to split on tags with id="split_here"

2) There is no ?U operator in calibre's regex engine. If you want to match non greedily,a ll you need to do is, use: >(\w)(.*?)<

Note the position of the question mark.
1) Works, thanx!

2) That solved the Find part, now I need help with the Replace part

I'd like to replace ALL CAPS with capitalize headline-style (i.e. ONE with One) in HTML TOC. In Sigil, I used >\u\1\L\2\E<, but it gives an error in Sigil.

Also, is it possible to use Calibre's RegEx engine to replace multiword entries, say ABOUT THE PUBLISHER with About the Publisher (or, at least, About The Publisher)?
mikapanja is offline   Reply With Quote