anchor.diff:  -export([
       strip/1,
       replace/3,
  -    escape/1,
  -    unescape/1,
       tokens/1
   ]).
   
  
positive.code:     ]);
  
  format(#t_message{user_id = Identity} = Message) ->
      io_lib:format("~s ~p ~s '~s'", [
          uuid:uuid_to_string(Message#t_message.room_id),
          Message#t_message.timestamp,
          format(get_user(Identity)),
          Message#t_message.data
      ]).
  
  format(#t_user{} = User, Status) ->
  
negative.code: replace(Content, ReplaceWhat, ReplaceWith) ->
      re:replace(Content, ReplaceWhat, ReplaceWith, [global, {return, list}]).
  
  tokens(Payload) ->
      Escape = fun(Content) -> replace(Content, "\\\\'", "%quote%") end,
      Unescape = fun(Content) -> replace(Content, "%quote%", "'") end,
  
      Message = Escape(strip(Payload)),
      {match, Groups} = re:run(Message, "'([^']+)'|([^\s']+)",
                               [{capture, all, list}, global]),
      Tokens = [case Group of [_, _, Token] -> Token; [_, Token] -> Token end
                || Group <- Groups],
      [Unescape(Token) || Token <- Tokens].
  