Quote:
Originally Posted by eschwartz
Because that isn't title case. You can use a regex on the titles, though. Can't remember what the regex is to capitalize a letter at the moment.
|
Python regexps don't have replacement target processing like the ones in VI. However, there is a way to do it using calibre's post processing on search/replace. The idea is to find each word one by one then capitalize that word. 'Twas a bit of a challenge to work it out.

You can see it in the screen capture of the bulk metadata search and replace I used. The text of the regexp in that capture is
Code:
((?<=^)|(?<= ))(.*?)(?= |$)
which means look-behind for a space or the beginning of the text, then match as little as possible until a look-ahead for a space or the end of the text succeeds.