I have a validation function in lightning component that works on regex. I have a regular expression to check existance of special symbols but I am not able to save my js controller with that regular expression.
Field Integrity Exception: org.auraframework.util.json.JsonStreamReader$JsonStreamParseException: Unterminated string [663, 65]: ';'<>?,./]/;': Source
var regularExpression;
regularExpression = /[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/; //This line is giving error when trying to save
if(!regularExpression.test(value)) {
//Action to be taken
}
The code works fine with some other regex's
RegExp
constructor?