Method To validate Email ID With the Help of Regular Expression.
function check for valid email address
function IsvalidEmail(src)
{
var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
var regex = new RegExp(emailReg);
return regex.test(src);
}
Remove White Space from Start and From End
TrimString=function(str)
{
str = this != window? this : str;
return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}