Extract part of a URL with URL/URI objects
<p>I have a String holding a URL in this format: <a href="http://hello.world.com/service/sps/f4c0e810456t" rel="nofollow">http://hello.world.com/service/sps/f4c0e810456t</a>
And I would like to extract the last part of the URL, i.e. f4c0e810456t.</p>

<p>I can do it with substrings:</p>

<pre><code>    System.out.println(s.substring(s.lastIndexOf("/") + 1, s.length()));
</code></pre>

<p>Or regexp however looking for something more elegant using URL/URI objects but couldn't find something.</p>

<p>Any ideas...?</p>
