Sep
10th
Thu
10th
/^(?:[a-z\d!#\$%&'\*\+\-\/=\?\^_`\{\|\}~]+|\.)+@[a-z\d\-]+(?:\.[a-z\d\-]+)*$/i
This regular expression describes the HTML5 e-mail address syntax. The syntax is described in the spec as ABNF format
1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )
But to figure out what the hell that means, you must read the ABNF format RFC, the e-mail RFC and a domain name RFC.
I’ve created a gist on github for it as well.