//Expression let regex = /^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,3})+$/; let email = "test.gmail.com" //Execution if(email.match(regex)){ console.log("valid") }else{ console.log("Invalid") }