emulate case-conversion of replace-regexp.
correct case conversion also for lisp-replacements