Javascript String Quote String via Regex and replace()
replace()
let myString = "Both Java and JavaScript share the same name, but are quite different."; let myRegexp = /Java(Script)?/g; console.log( myString.replace(myRegexp, "'$&'"));