regex to validate email domain code example
Example 1: regex for email
^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$
//will validate for: [email protected] etc
Example 2: regex to verify email
let regex=/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-z]+)$/;