Javascript function to validate e-mail format.

function isEmail(s){  

            if (s.search(/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/) == -1){

                  return false;

            }

            else{

                  return true;

            }

          }

Ebook Download
View all
Learn
View all