Results 1 to 6 of 6

Thread: Remove Slashes (my heads spinning) *URGENT*

  1. #1

    Thread Starter
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986

    Angry

    I really got frustrated now
    My heads spinnin' but I can't get it to work!
    I know it's not that hard but I just can't get it to work!!!

    I want to remove forwardslashes from a string like

    http://www.jop.com/jop/haha/site1/site.html

    to

    http://www.jop.comjophahasite1site.html

    please don't pay attention to the http://, Vb-World is putting them there, so it's just www


    Got it? I'm sorry for the stupidness but I know harder thinking only gets me more confused!

    [Edited by Jop on 08-20-2000 at 06:38 PM]
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  2. #2
    Guest
    Code:
    Private Sub Command1_Click()
        Text1 = Replace(Text1, "/", "")
    End Sub

  3. #3

    Thread Starter
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    I have VB 5
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  4. #4

    Thread Starter
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Found a substitute for all those VB4/5 Users!

    Code:
    Public Function replaceall(Byval searchstring As String, _
    findstring As String, replacestring As String) As String
    
    Dim curpos As Long
    
    curpos = 1
    
    Do
    
    curpos = InStr(curpos, searchstring, findstring)
    searchstring = Left$(searchstring, curpos - 1) & _
    replacestring & Right$(searchstring, Len(searchstring) _
    - curpos - Len(findstring) + 1)
    
    Loop Until InStr(searchstring, findstring) = 0
    
    replaceall = searchstring
    
    End Function
    [Edited by Jop on 08-20-2000 at 07:09 PM]
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5
    Member
    Join Date
    Jul 2000
    Location
    Ontario, Canada
    Posts
    61
    What do you want this for like while there typing Or something thats in a label
    ---~^ Absalom ^~---

    There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.

  6. #6

    Thread Starter
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Oh i got it already you can't use /\:?" and some other characters in filenames, you I was removing them
    thanks for your attention anyways!
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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