forum

Home / DeveloperSection / Forums / How to email validation regex in C# and javascript?

How to email validation regex in C# and javascript?

Anonymous User 2154 19-Jan-2015

I have ASP.NET project and I need to check is email correct or not. I always using that script, but it fails with asp.net, because @ is bad symbol.

function emailvalidate(e)
{
    var b=/^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/;
    return b.test(e);
}

How can I fix this? And its important to check email by JavaScript, not ASP.NET or C#.

P.S. Im really new with ASP.NET and JavaScript RegEx.


Updated on 19-Jan-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By