Results 1 to 2 of 2

Thread: Trimming URL

  1. #1
    Juuno is offline Member
    Join Date
    Feb 2009
    Rep Power

    Default Trimming URL

    I would like to trim some specific strings in my url string.

    Say I get an input url which will be accepted and stored in some string variable.,
    Eg. "//"
    Then all I want to get as my output is : Japan

    And same if the input url is like: "//" then all I want to get as my output is: index.html

    Can I do this? If so, how?
    Thanks in advance.

  2. #2
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Rep Power


    Use a loop that removes every character before the last slash ('/')

    Or use regex of course.
    I die a little on the inside...
    Every time I get shot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts