Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

how to search a string in notepad

we have a notepad file written like below
one
two
three
one
five
one
four
four
one

i want there is a search button(write one) on vb front form .when we click this button a new sheet or form open which contain like
one
one
one
one
[293 byte] By [amit.nikhil] at [2007-11-11 10:20:52]
# 1 Re: how to search a string in notepad
open file for input as #X
open file2 for append as #Y 'output
do until eof(X)
line input #X, temp
if left(tmp,3) = "one" then print #Y, tmp
loop
close #X
close #Y
shell file2
Amahdy at 2007-11-11 17:22:42 >