I want to replace DoubleQuote from a specific JavaScript String in Aura Helper component using Regular Expression.
My JS String is ab ","{ cd
I want it to be ab ,{ cd
I am performing this operation:
var data = "ab \",\"{ cd";
data = data.replace(/\",\"{/g, ",{"); // Getting error at this line
But, every time I am receiving a Salesforce error message, while performing the 2nd line
org.auraframework.util.json.JsonStreamReader$JsonStreamParseException: Unterminated string [300, 46]: ');': Source
Please advice.
Thanks!