|
-
Apr 27th, 2000, 05:48 AM
#1
Thread Starter
New Member
Heres the problem:
I have a string and i want to delete out some parts.
Example:IF i got the a string "www.vb-world.net" or someother string, how would i return only the word "net" to
a textbox and get rid of the words"www.vb-world."
-
Apr 27th, 2000, 05:58 AM
#2
Addicted Member
How about this:
Code:
strURL = "www.vb-world.net"
Text1.Text = Mid(strURL, InStrRev(strURL, ".") + 1)
-
Apr 27th, 2000, 06:01 AM
#3
Depends on version of vb
If vb6 lookup the split function, l use vb5 therefore
Dim sString as String
Dim iPos, iLen as Integer
'
sString = "www.vb-world.net" ' or where ever ya get it
iLen = Len(sString)
'
iPos = Mid(sString,"net",1)
txtbox = Instr(sString,iPos,iLen)
Don't know if syntax is correct, don't have vb in front of me, but anyway will give you the general idea
Hope it Helps
-
Apr 27th, 2000, 06:22 AM
#4
Lively Member
There are a thousand different ways to do it... it depends on what exactly you want to pull out.. is it a certian phrase.. is it certian characters.. depends what your goal is.
-
Apr 27th, 2000, 06:36 AM
#5
Addicted Member
You are exactly right Jethro, it does depend on the version Visual Basic. However, I've decided that from now on if a post doesn't specify a version of VB then I will just assume they are using VB6. I'm not going to write three versions (16-bit, 32-bit pre-VB6, and VB6) of an answer for every post. In this case, I just gave the most direct answer off the top of my head. If it doesn't work then the person will let us know.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|