deleting characters at a certain point in a string

Hi agian,

Im going to use this page as an example.

I have a String which contains a few “/” characters. Like in the link.
How would I get the last “/” and delete everything before it?
So it would look like “ask.html”

I have been looking at substring, split , format and all that but I can’t get it to work…

Thanks for any help, Tim.

There is always a bizillion ways to doing string stuff. One way (C#):

Given your string is in a variable named ‘st’:

 int pos = st.LastIndexOf('\\');
 if (pos != -1) {
     st = st.Substring(pos + 1);