web sddress substring

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I seem to be having one of those days today when notihng works!

I need to get 'news' (or whatever other folder name I'm at) from the
following address:

http://ww.dev.com/news/page.aspx

I've tried a number of lines using substring etc, can anyone please help?

Thanks

Jon
 
Reverse the string.
use split method to split by "/"
access 2 element of an array after u split.

Eg: String.reverse.split("/").(2)

Regards,
Jignesh Desai.
 
Why not use what the .net framework makes available?

Check out Request.Url which returns a useful Uri instance. Specifically
the Segements property of the Uri class

karl
 
Back
Top