Let's say I have a variable called URL and it's assigned a value of http://www.google.com
. I can also received the URL via ftp, hence it'll be ftp://ftp.google.com
. How can I have it so I grab everything before the :
? I'll have an if/else condition afterwards to test the logic.