in reply to Changing case inside substitution
Unlike other solutions posted, this deals with names such as O'Leary or Le Carré:
hth
dave