function insert(text, needleStart, needleEnd, replacementText) {
  const startIndex = text.indexOf(needleStart) + needleStart.length;
  const endIndex = text.indexOf(needleEnd, startIndex);
  return text.slice(0, startIndex) + replacementText + text.slice(endIndex);
}
@param {string} text
@param {string} needleStart
@param {string} needleEnd
@param {string} replacementText
@return {string}