İşte konu:
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)
The 937IPiztQG string may change; it will contain a-z A-Z 0-9 - _
İşte ben denedim ne:
$code = strstr($url, '/http:\/\/www\.mysite\.com\/files\/get\/([A-Za-z0-9]+)./');
EDIT: Ben aslında URL bilmiyorum çünkü regex kullanmak gerekir. Ben böyle dize var ...
<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>
Ben bu dizeyi okudum ve URL'lerin dosya bölümü kesmeye gerek.