anchor.diff:      [#uri{domain= <<"host">>}] = uris("sip:host"),
       [#uri{scheme=sips, domain= <<"host">>, port=5061}] = 
           uris("  sips  :  host  :  5061  "),
  -    [#uri{disp=(<<"\"My name\" ">>), user=(<<"user">>), pass=(<<"pass">>), 
  +    [#uri{
  +        disp=(<<"\"My name\" ">>), user=(<<"user">>), pass=(<<"pass">>), 
           domain= <<"host">>, port=5061, opts=[{transport,<<"tcp">>}],
  -        headers=[<<"head1">>], ext_opts=[{<<"op1">>,<<"\"1\"">>}]}] = 
  -        uris(" \"My name\" <sip:user:pass@host:5061;transport=tcp?head1> ; op1=\"1\""),
  -    [#uri{disp=(<<"Name   ">>), domain= <<"host">>, port=5061,
  -        ext_headers=[{<<"hd2">>,<<"2">>},{<<"hd3">>,<<"a">>}]}] = 
  -        uris(" Name   < sips : host:  5061 > ?hd2=2&hd3=a"),
  +        headers=[<<"head1">>], ext_opts=[{<<"op1">>,<<"\"1\"">>}]
  +    }] = uris(" \"My name\" <sip:user:pass@host:5061;transport=tcp?head1> ; op1=\"1\""),
  +    [#uri{
  +        disp=(<<"Name   ">>), domain= <<"host">>, port=5061,
  +        ext_headers=[{<<"hd2">>,<<"2">>},{<<"hd3">>,<<"a">>}]
  +    }] = uris(" Name   < sips : host:  5061 > ?hd2=2&hd3=a"),
       [#uri{user=(<<"user">>), domain= <<"host">>, opts=[lr,{<<"t">>,<<"1">>},<<"d">>]}] = 
           uris(" < sip : user@host ;lr; t=1 ;d ? a=1 >"),
       [#uri{ext_opts = [{tag, <<"a48s">>}]}] = 
           uris("\"A. G. Bell\" <sip:agb@bell-telephone.com> ;tag=a48s"),
  -    [#uri{scheme = sip,
  -         user = <<"+12125551212">>,
  -         domain = <<"server.phone2net.com">>,
  -         ext_opts = [{tag, <<"887s">>}]}] = 
  -        uris("sip:+12125551212@server.phone2net.com;tag=887s").
  +    [#uri{
  +        scheme = sip,
  +        user = <<"+12125551212">>,
  +        domain = <<"server.phone2net.com">>,
  +        ext_opts = [{tag, <<"887s">>}]
  +    }] = uris("sip:+12125551212@server.phone2net.com;tag=887s"),
  +    [#uri{
  +        scheme = sip,user = <<"xxxx">>,
  +        pass = <<>>,domain = <<"192.168.1.2">>,port = 5060,
  +        opts = [{transport,<<"TCP">>},<<"ob">>],
  +        headers = [],
  +        ext_opts = [
  +            {<<"reg-id">>,<<"1">>},
  +            {<<"+sip.instance">>,
  +                <<"\"<urn:uuid:00000000-0000-0000-0000-000097ee887e>\"">>}]
  +    }] =
  +        uris("<sip:xxxx@192.168.1.2:5060;transport=TCP;ob>;reg-id=1;"
  +             "+sip.instance=\"<urn:uuid:00000000-0000-0000-0000-000097ee887e>\""),
  +    [#uri{
  +        domain = <<"host">>, opts = [{<<"key">>,<<"\"my \\\"\"">>}],
  +        headers = [{<<"hd">>,<<"\"your \\\"\"">>}]
  +    }] = uris("<sip:host;key=\"my \\\"\"?hd=\"your \\\"\">").
  +
   
   uri4_test() ->
       [#uri{domain = <<"a">>}, #uri{domain = <<"b">>}] = uris("sip:a,sip:b"),
  
positive.code:         {#uri{}=Uri, []} -> lists:reverse([Uri|Acc]);
          {#uri{}=Uri, Rest} -> uris(Rest, [Uri|Acc]);
          {error, Type, Line} -> 
              lager:debug("Error parsing uri ~s: ~p (~p)", [String, Type, Line]),
              error
      end.
  
  
negative.code:             opts(Rest, Block, Uri1)
      end;
  
  opts_value([Ch|_]=Rest, Key, Acc, false, Block, Uri) when Ch==32; Ch==9; Ch==13 ->
      case strip(Rest) of
          [] ->
              opts_value([], Key, Acc, false, Block, Uri);
          [Ch1|_]=Rest1 when Ch1==$;; Ch1==$?; Ch1==$>; Ch1==$, ->
              opts_value(Rest1, Key, Acc, false, Block, Uri);
          _ ->
              {error, opts_value, ?LINE}
      end;
  
  opts_value([Ch|Rest], Key, Acc, Quoted, Block, Uri) ->
      opts_value(Rest, Key, [Ch|Acc], Quoted, Block, Uri).
  
  
  %% @private URI Header Keys
  