Switch to substring replacement