I'm using this simple regexp to validate an email in query, but it gives a syntax error because of the '@'.
var regexEmail = '^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$';
Is there a work around for this problem?
EDIT
Like I said, its the use of the character '@' that causes the problem. When delete it from te expression, the syntax error disappears. Maybe it's because I'm using it in a CSHTML page, whenever I type in the '@', it turns yellow.