title: C# Using Substring, how do I extract this string?
body: <p>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?</p>
  
  <p>The string: www.somewebsite.com/extractThisFolderName/leave/this/behind</p>
  
  <pre><code>String folderName = path.Substring(path.IndexOf(@"/"),XXXXXXXXXXX);
  </code></pre>
  
  <p>It's the length I'm struggling with.</p>