The domain part (after the last @), is a series of string labels divided by a dot.
Each label is a string of 1 to 63 octets consisting of A-Z, a-z 0-9 or hyphen (-)
The maximum size of the domain is 255 octets.
To be compatible with arpanet, each label must start with a letter and end with a letter or digit but some TLD:s now allows an all numeric domain, like 0.nu
Note that the TLD is allowed to be 63 octets. Very many scrips wrongly restricts it to 2-3 octets making domain.name invalid.
Example?
abcdefghijklmnopqrstuvwxyz.ABCDEFGHIJKLMNOPQRSTUVWXYZ.!#$%&'+-/=.?^`{|}~@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-0123456789.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.0.1.2.3.4.5.6.7.8.9.a-z.A-Z.0-9.a0.b1.c2.d3.e4.f5.g6.h7.i8.j9.K0.L1.M2.N3.O.domain.name
(and no, it isn't registered)
Update: With IDNA almost everything is possible:
See also:
https://stackoverflow.com/questions/3232/how-far-should-one-take-e-mail-address-validation
http://www.leshazlewood.com/?p=5
Update: Bobince suggested to test for a dot in the domain name.
Summary: Only test for @ and a dot in the domain part and then send a confirmation email.
Here is an example that test for @ and dot:
Here is a simple one:
function isEmail(