Modified content replacement in order to make the replacement only once for occurrence