Yes, using the just-created function mode.
A little overkill, in simple cases like this, but the regex engine calibre uses doesn't support those switches.
http://manual.calibre-ebook.com/function_mode.html
There are builtin functios for titlecasing, capitalizing, uppercasing and lowercasing. That should work here, although arbitrary case-changing would require a function.