Making data for replace commands