Visual Basic String Manipulation

cpugeniusmv

Computer Genius
#1
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?
 
B

Blitzkrieg

Guest
#2
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.
 

cpugeniusmv

Computer Genius
#3
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.
 
B

Blitzkrieg

Guest
#5
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
 
B

Blitzkrieg

Guest
#7
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 posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,969
Messages
673,295
Members
89,015
Latest member
arrangel