Just use the .Split (char) method. you can do something like this:
string web = "http://localhost:49062/projectname/";
string[] webParts = web.Split('/');
and all webParts [] cells will be like this:
webParts[0] = http://
webParts[1] = localhost:49062
webParts[2] = projectname
Κ»I may be wrong in parts of the cell, but it works. test it.
source share