reading lines from a file by searching a word(instr) and
copying to other textfile,but its only copying only one
line but there are some other lines match criteria but not
copying to the files

Answer Posted / senthilg

givenstring=f1.Readall

Do
If InStr(st_pos, givenstring, "<indexTerm>") <> 0 Then
st_pos = InStr(st_pos, givenstring, ""<indexTerm>")
close_pos = InStr(st_pos, givenstring, "</indexTerm>")
find_String = Mid(givenstring, st_pos, (close_pos -
st_pos) + Len("</indexTerm>"))
st_pos=close_pos +1
End If

Loop While InStr(st_pos, givenstring, "<indexTerm>") <> 0


'Start String =<indexTerm>
'End String =</indexTerm>

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I implement an accelerator key for a text box?

1063


What is script control?

570


How do I call help files from a VB program?

1004


What is snapshot in vb?

524


What is the difference between change event in normal combobox and dbcombobox?

1782






Explain about form creation in Visual Basic?

565


To populate a single column value which dbcontrols you to use?

1571


How do I change the color of a form in visual basic?

480


DHTML Is used for what?

1466


How do you change the system menu (on the Control-Menu Box)?

968


what are the Default cursor Type and LockEdit type in DAO?

1732


Does VB support pointers to functions?

1172


Is it possible to Manipulate data through flexgrid? Explain.

1556


what are the Types of Resultsets?

1657


How would you attach pictures in column headers of List View Control?

1644