i am using this regex
const emailRegex = new RegExp(/^[a-zA-Z0-9]+@[a-zA-Z0-9]+\.[A-Za-z]+$/);
but after i put .au, it considers it an incorrect email
>Solution :
maybe you can specify the number of characters ?
const emailRegex = new RegExp(/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})+$/);
like so
const emailRegex = new RegExp(/^([a-zA-Z0-9_\-.]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,5})+$/);
let matches = 'john.doe@domail.au'.match(emailRegex);
console.log(email);