I am currently building some custom form validators and using regular expressions to test the validity of email address against. I got the
And a version that supports non ASCII characters, though be careful as some programs may have trouble processing non ASCII characters.
As always, remember that client-side validation is no replacement for server-side validation and is mainly to improve user experience.
Here is a very detailed explanation about how to choose an email regex including a reference to the practical limitations of TLD length based on the capability of SMTP (Max 63 characters) and explanation of the official standard RFC 5321
You can find out about lookbehinds and conditionals on this site: http://www.regular-expressions.info/lookaround.html
Experiment with regular expressions here: https://regex101.com/