Deleting a repeating string