I have a regex email validation function that i have take it from here .But the problem is when i insert it to my cs file then it shows me the errors.( it shows me lots of erors like unexpected / , ] expected,; expected )
Code
function ValidateEmail(email) {
var expr = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
return expr.test(email);
}