I have some text that looks like this:
"CFName" "CLName" "CDOB" "CGender"
I would like to get output where are of the text inside the double quotes is lowercased, like this:
"cfname" "clname" "cdob" "cgender"
So I've tried to use
M-x replace-regexp with the regexp being
\(".*"\) and the replace as
\,(downcase \1). Which is how it is explained in this question. The selection does what I expect, but the replacement doesn't.
What I get is:
"cfname" "clname" "CDOB" "cgender"
The groups that are in ALL CAPS aren't downcased. I've tried using downcase-region and downcase-word but those both fail with errors such as
Wrong type argument: integerp, #("\"CG_DOB\"" 0 8 (fontified t)). I don't understand why downcase doesn't work with a group that is all caps.
How do I get this replace-regexp to downcase all groups?
I'm using GNU Emacs 24.3.1. The problem persists even if I start emacs with the -Q (don't use .emacs) flag. I've tried it in both sql-mode and text-mode with the same result.
I've tried this on the following two versions of emacs with the same results:
GNU Emacs 24.5.1 (x86_64-apple-darwin14.4.0) of 2015-07-20
GNU Emacs 24.3.1 (x86_64-pc-linux-gnu) of 2014-03-07 on lamiak, modified by Debian