JSFiddle - React, Tailwind, and code Playground

JavaScript

var regex = /(?=^.{15,20}$)^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;

console.log("[email protected]".match(regex));
console.log("[email protected]".match(regex));
console.log("[email protected]".match(regex));