-
Hello,
I am writing a program in VB6 in which I need to open a text file and search for and words contained in brackets like this: <word>. As each word is found, I need to put the word into a string variable array for later use. Any code or suggestions would be greatly appreciated.
-
i can't give u much help but search for str function in the help section of vb ... i think it allows u to search for a character in a string ... if not then then look for the split function
-
Code:
dim buffer as string,arr() as string,x as long
open file for binary as 1
buffer=space(lof(1))
get#1,,buffer
close1
buffer=left(buffer,instr(buffer,"<")+1)
arr=split(buffer,"<")
for x=0 to ubound(arr)
arr(x)=left(arr(x),instr(buffer,">")-1)
next x