Quote:
Originally Posted by kovidgoyal
@Papirus: Thankfully, calibre's editor is written in python so you dont have to create that unreadable gunk to do something like change case for roman numerals. Using the upcoming function mode, all you need is
Find: (?i)\b([ivclm]+)\b
Replace:
Code:
def replace(match, context):
word = match.group()
if word.lower() not in {set of common words}:
word = word.upper()
return word
|
The upcoming function mode sounds like it's going to be terribly useful.