How can I use a single search / replace to replace all words
village preserving the case of the first letter in this sentence:
Towns are small cities. I live in a town.
(And uncheck ignore case in the dialog)
I'm on my work machine right now, so no TextMate here for me to test on, but i think this might do what you want:
(Make sure to untick 'Ignore case' first.)
The 'Find' pattern searches for the letters
The replace pattern uses conditional insertions to determine what to replace the text by. In pseudo-code the replace string says basically:
(And then it adds
It's ugly, but i think it will probably work for the example you gave anyway.