Results 1 to 29 of 29

Thread: [RESOLVED] Need help replacing a url!!

Threaded View

  1. #10
    Lively Member
    Join Date
    Apr 2008
    Posts
    74

    Re: Need help replacing a url!!

    ok ok hire is universal code: we can assume that url may contain multuiple =, so:

    http://www.homeandlearn.co.uk/net/nets7p6.html

    Code:
            Dim URL = "www.thesite.com/userID=123123"
            For i = 1 To URL.Length
    
                MsgBox(URL.Substring(URL.Length - i, i)) ' this is hire to show you what i mean by cuttin goff
    
                'start cutting off 1 char from the end if the URL until we get this: =123123 (>= 0 means if found "=")
                If URL.Substring(URL.Length - i, i).IndexOf("=") >= 0 Then
    
                    'now we have =123123 & we replace = with nothing & vuala
                    MsgBox(URL.Substring(URL.Length - i, i).Replace("=", ""))
    
                    Exit For
                End If
            Next
    Last edited by goldenix; Apr 18th, 2008 at 03:23 PM.

    M.V.B. 2008 Express Edition

Posting Permissions

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



Click Here to Expand Forum to Full Width