implement domain regexp according to the specification http://tools.ietf.org/html/rfc1035