in reply to Case-preserving regexp search and replace?

You can find several suggested solutions to this problem at Case-sensitive substitution with case-insensitive matches. Basically, you can use string bitwise xor for cleverness and speed, or transfer case character by character for robustness and portability.
  • Comment on Re: Case-preserving regexp search and replace?