title: Extract base url from full url
body: <p>Any quick way to extract base url from full url? for e.g., if i have <a href="http://test.example.com/abcd/test.html" rel="noreferrer">http://test.example.com/abcd/test.html</a> - i want only <a href="http://test.example.com" rel="noreferrer">http://test.example.com</a>. </p>
  
  <p>I can always do string parsing - but wanted to know if there is something in Uri where I can get it directly.  </p>