merge range in a string