Replace placeholder in string