Substring surround com cotações
str = "toQuotenotToQuote"
quotedStr = str.replace(/(toQuote)/g, '"$1"')
console.log(quotedStr) // "toQuote"notToQuote
Anxious Alpaca
str = "toQuotenotToQuote"
quotedStr = str.replace(/(toQuote)/g, '"$1"')
console.log(quotedStr) // "toQuote"notToQuote