Use a global replace for so repeated occurrences of the same DIGEST are all replaced.