substitute all instances in a string