I am trying to validate email with regex.
I have found this function:@
Code: Select all
function is_valid_email($email) {
return preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s]+\.+[a-z]{2,6}))$#si', $email);
}Any help would be apprecited.
Thanks,
Rob.