The below code snippet explains how to validate email addresses using jQuery and regular expressions.
<script type = "text/javascript" src=""></script>
<script type = "text/javascript">
    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);
    $("#demo").live("click", function () {
        if (!ValidateEmail($("#txtEmail").val())) {
            alert("Invalid email address.");
        else {
            alert("Valid email address.");
<input type = "text" id = "txtEmail" />
<input type = "button" id = "demo" value = "Demo" />
In the above code snippet on click of the HTML input button with ID demo a function named ValidateEmail is called to which I have passed the value of the HTML Input textbox with ID txtEmail that accepts the email address of the user. The function ValidateEmail tests the value entered by the user with that of the Regular Expression and returns true if valid email address and false if not a valid email address.
The result is displayed to the user via alert.