We have a link like http://stackoverflow.com/questions/9281910/h1-and-semantic-html5
How do I get the part, which is before the last and after last but one /?
In this example we would get h1-and-semantic-html5
More examples:
From the link http://dribbble.com/highlights/2012/ we get 2012
From http://www.apple.com/iphone/ we get iphone