Visual Basic String Manipulation

cpugeniusmv

Computer Genius
Joined
14 Apr 2003
Messages
485
Here's what I'm trying to do.

VB6

I'm trying to get the source code of an EXTREMEMLY LONG page (delimited by the greater than symbol, ">") into a listbox.

However, I've run into a problem: Whenever I split() it with the ">" delimiter, when it gets to about the 1922nd 'delimit' it says that the subscript is out of range.

Suggestions?
 
I don't completely understand what you are trying to do, can you give an example of the input, the output, and what code you are currently using? I'll take a look and see what I can do.
 
dim working as String

text1.text = (attached html source)

private sub command1_click()
x=-1
do until working = "Take me to the bottom</a"
x=x+1
working = Split(text1.text, ">")(x)
loop
do until working = vbcrlf & "<a name=bot"
x=x+3
working = Split(text1.text, ">")(x)
list1.additem working
loop
end sub

what this SHOULD do is give me all those text files with a "</a" on the end into list1. but when it get's to about the 1920th one, it says that it's out of range.
 
if you dont mind, attach the source code, ill take a look at it.
 
Like X-Istence said, attach the code and a copy of the html file you are using if possible.

If what you are trying to do is what I think, this would be insanely easy to do if you had Unix/Linux commands to work with. This stuff is ez as pi with it :D
 
Can I take a guess? The condition was never being met, so it would keep going even past the end of the input data, and give you an error...hence the out of range error.

Anyways, good to know that you got it working :D
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back