Replace string with constant.