I have a ruby ββscript that downloads URLs from an RSS server and then downloads files at these URLs.
I need to split the URL into 2 components, for example:
http:
--> 'www.website.com' and 'dir1/dir2/file.txt'
I'm struggling to find a way to do this. I played with regular expressions but nothing worked. How will others do this?
source
share