I have a ruby script that downloads URLs from an RSS server and then downloads the files at those URLs.
I need to split the URL into 2 components like so -
http://www.website.com/dir1/dir2/file.txt --> 'www.website.com' and 'dir1/dir2/file.txt'
I'm struggling to come up with a way to do this. I've been playing with regular expressions but nothing has worked. How would others go about doing this?