sql email validation code example
Example 1: email validation
//Author: Mohammad Arman Khan
//Regular Expresssion for e-mail validation
var email_validator_regex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
Example 2: sql distinct email regex
/*Return distinct email domain name using regular expression*/
SELECT DISTINCT (REGEXP_SUBSTR (EMAIL_ADDR, '(@)\w+[\.-]\w+\.?\w+\.?\w+'))
FROM SCHEMA.TABLE_NAME;