Quote:
Originally Posted by BetterRed
Bump - gsd2012 needs Regex help - Case change tags in bulk edit
BR
|
If I wanted to do this then I would change all tags to title case. Any words in tags that are all in lower case would be changed. Words in tags that aren't, for example have embedded uppercase letters, wouldn't be touched. E.g.,
Code:
aAAa ::: Aaaa bbb ::: aaaaa ::: bBbb bbb => aAAa ::: Aaaa Bbb ::: Aaaaa ::: bBbb Bbb
Rules more complicated than that requires human intervention
A nuclear option is to change all tags to lower case, then in a second run change all tags to title case, then in a third pass fix the ones now broken. It is hard to imagine that this is a good idea, but heh, what do I know?
In general, regular expressions in calibre have trouble dealing with matching case because calibre tries very hard to ignore it. Search & replace can deal with case but it is hard to handle words like VoIP that are intentionally mixed-case. The difficulty is increased by the rule complexity: calibre's titlecase() function tries very hard to handle (English) punctuation and acronyms.