Hi I am using razor and trying to use regular expression to validate email address here the validation function
function validateEmail(txtEmail){ var a = doc
try this may be help you
function validateEmail(email) { var re = /^[_a-z0-9-A-Z-]+(\.[_a-z0-9-A-Z-]+)*@[a-z0-9-A-Z-]+(\.[a-z0-9-A-Z-]+)*(\.[a-z]{2,4})$/; return re.test(email); }