anchor.diff:      Jid.
   
   short_jid(Client) ->
  -    drop_jid_resource(full_jid(Client)).
  +    regexp_get(full_jid(Client), <<"^([^/]*)">>).
  +
  +username(Client) ->
  +    regexp_get(full_jid(Client), <<"^([^@]*)">>).
  +
  +server(Client) ->
  +    regexp_get(full_jid(Client), <<"^[^@]*[@]([^/]*)">>).
  +
  +resource(Client) ->
  +    regexp_get(full_jid(Client), <<"^[^/]*[/](.*)">>).
   
   %%--------------------------------------------------------------------
   %% spawn export
  
positive.code:         done
  end.
  
  drop_jid_resource(Jid) ->
      {match, [ShortJid]} =
          re:run(Jid, <<"^([^/]*)">>, [{capture, all_but_first, binary}]),
      ShortJid.
  
negative.code:          wait_for_stanza/1, wait_for_stanza/2,
           is_client/1,
           full_jid/1,
           short_jid/1,
           username/1,
           server/1,
           resource/1]).
  
  % spawn exports
  -export([client_loop/2]).
  