Regular expression to check special symbols not working in lightning javascript
Try using the constructor syntax.
I've verified that this saves in lightning:
var regularExpression;
var re = new RegExp('[-!$%^&*()_+|~=`{}\[\]:";\'<>?,.\/]');
Note the escape of the '
char within the expression.