code: function replaceReferencedId(value, idFrom, idTo) {
    var re = new RegExp('url\\([\'"]?#' + idFrom + '[\'"]?\\)', 'g');
    return value.replace(re, "url(#" + idTo + ")");
  
  }
docs: replaced #fromid in CSS url('#fromid') to url('#toid')