Here is the suject:
http://www.mysite.com/files/get/937IPiztQG/the-blah-blah-text-i-dont-need.mov
What I need using regex is only the bit before the last / (including that last / too) Now this 937IPiztQG bit can change, it has a-z A-Z 0-9 - _
Heres the code i wrote but it doesnt work
$code = strstr($url, '/http:\/\/www\.mysite\.com\/files\/get\/([A-Za-z0-9]+)./');
EDIT: The reason i need to use regex is because I dont actually know the url
I have string like this...
<a href="http://www.mysite.com/files/get/1B-MenlPW0/my-file.doc">a song</a>
<a href="http://www.mysite.com/files/get/1ZeR5KEo9x/my-song.mp3">more text</a>
<a href="http://www.mysite.com/files/get/8IySvO5gMD/my-video.avi">oh and here goes some more blah blah</a>
I need it to read that string and cut off filename bit of the url's