Hi, I want to extract the first folder in the URL below, in this example it is called 'extractThisFolderName' but the folder could have any name and be any length. With this in mind how can I use substring to extract the first folder name?
The string: www.somewebsite.com/extractThisFolderName/leave/this/behind
String folderName = path.Substring(path.IndexOf(@"/"),XXXXXXXXXXX);
It's the length I'm struggling with.
Thanks all