I am trying to extract the string at the end of a URL. Example:
C:\this\that\ExtractThisString.exe
^^^^^^^^^^^^^^^^^^^^^
I am trying to get the ExtractThisString.exe from that string, however it has an unknown amount of \‘s. I want it to basically grab the URL and list whatever is at the end of it.
To find the last occurence of a specified character use
then extract the substring
EDIT
I am reviewing this answer after 15 months because I have really missed a key point in the question. The OP is trying to extract a filename, not just simply finding the last occurrence of a given character. So, while my answer is technically correct it is not the best one because the NET framework has a specialized class to handle file name and paths. This class is called Path and you can find a simple and very effective way to achieve your result using Path.GetFileName as explained in the answer from @Adriano.
I wish also to highlight the fact that using the methods from the Path class you have the advantage of code portability because the class handles the situation when a different operating system uses a different directory separator char.