I have an expression and I am trying to replace all single quote with blank but when I try to save my controller.js it gives error:
Error: 0Adf4000000en6S: org.auraframework.util.json.JsonStreamReader$JsonStreamParseException: Unterminated string [96, 41]: '/g, "");
I am trying this code:
var sqlExpression = 'gattexlead_flag'_1;
var text1 = sqlExpression.replace(/'/g, "");
Best Answer
This is probably a bug with the lexer. You will probably need to escape it:
For now, if you need a regular expression that fails to compile, compile it ahead of time: