in reply to regular expression search and replace
As I understand it, you want to capitalize the first letter in each sentence. You could do what you are trying to do above with a capture group (get the match and then uppercase it in your replace). However, you could also split the string into sentences, and then call uppercase on the first letter in the string and lowercase on the remainder.