Ensured result of regex replace is assigned back to original string.