2 local match = string.match;
7 if not jid then return nil; end
8 local node = match(jid, "^([^@]+)@");
9 local server = (node and match(jid, ".-@([^@/]+)")) or match(jid, "^([^@/]+)");
10 local resource = match(jid, "/(.+)$");
11 return node, server, resource;