JSFiddle - React, Tailwind, and code Playground

HTML

<div id="testResults"></div>
<div id="matchResults"></div>

JavaScript

var re = /^(([^<>()[\]\\.,;:\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,}))$/;
var text = '[email protected]';
var test = re.test(text);
var match = text.match( reggy );
if( test ) {
    jQuery( '#testResults' ).append( 'test matched' );
} else {
    jQuery( '#testResults' ).append( 'test did not match' );
}
if( match ) {
    jQuery( '#matchResults' ).append( 'match matched' );
} else {
    jQuery( '#matchResults' ).append( 'match did not match' );
}