I have a folder path saved as a variable and want to keep the part after the \ which follows folder 2. Is there a way to count the number of "\'s" in the string and give me everything that follows after the sixth occurrence of the slash? I want to repeat this code in different areas and the folder names vary as well as the length so I can't specify a starting character position.
Original string:
Desired output:
Original string:
Code:
\\server\share\folder1\folder2\folder3\folder4\folder5\
Code:
folder3\folder4\folder5\