Regex, React, JavaScript, Nodejs, Development.
characters which do not include @, space and dot. Note that, we have added backslash before dot(.), Just dot(.) without backslash means it will match any character. function isEmailValid(email) { if(/^[^@ ]+@[^@ ]+\.[^@ \.]{2,}$/.test(email)) { console.log('email is valid'); } else {