So I'm trying to validate an email address with the following rules: 1 to 64 characters (lowercase, uppercase, digits or .) plus @ plus another 1 to 64 characters (lowercase, uppercase, digits or .)
I tried with this
function validate(str) {
const regex = /([a-zA-Z0-9\.]){1,64}$@([a-zA-Z0-9\.]){1,64}$/;
return regex.test(str);
}
but it's not working. Any idea why?
$planted in the middle