Menu
Hi all,
I googled and found the following javascript which provides a simple email validation but I find it very difficult to understand that line. Is .test a javascript built-in function?Could somebody please explain this line for me? Thank you very much!
[CODE]
function checkEmail(email_address) {
if (/^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,3})+$/.test(email_address)){ // I don’t quite understand why there are so many symbols
return (true)
}
else{
alert(“Invalid E-mail Address! Please re-enter.”)
return (false)
}
}