From: "Jan-Erik R." Date: 2009-01-05T01:30:37+09:00 Subject: Re: Finding filename from a URL Sam Fent schrieb: > Hi all, > > This is just a basic parsing question, really. I'm trying to work out > how I would process a URL such as > "http://www.example.com/x/y/z/myfile.txt" and get back the filename > "myfile". Basically the pattern is to get the past part of the string > after the final /, and then strip off the filetype. > > Any help would be much appreciated, > Thanks! > > Sam File.basename("http://www.example.com/x/y/z/myfile.txt") works perfectly for urls ;)