Home All Groups Group Topic Archive Search About

Search string in textfile

Author
20 Nov 2006 11:12 AM
beersa
Hi All,

I am looking for fastest search alogrithm in vb.net or vb2005.
I write a code in vb2005 to find a string in given text file.  The text
file contains about 120,000 lines and search string is contain in
another text file which is abt 4000 lines.

My code takes nearly 15 mins to scan the whole file.

Could anyone suggest me the fastest way to do this?

Thanks & Regards
beerSA.

Author
20 Nov 2006 7:02 PM
RobinS
How are you doing it now?

Robin S.
----------------------------
Show quoteHide quote
"beersa" <sabeer.sab***@gmail.com> wrote in message
news:1164021154.116326.203430@h48g2000cwc.googlegroups.com...
> Hi All,
>
> I am looking for fastest search alogrithm in vb.net or vb2005.
> I write a code in vb2005 to find a string in given text file.  The text
> file contains about 120,000 lines and search string is contain in
> another text file which is abt 4000 lines.
>
> My code takes nearly 15 mins to scan the whole file.
>
> Could anyone suggest me the fastest way to do this?
>
> Thanks & Regards
> beerSA.
>
Author
21 Nov 2006 8:52 AM
M. Posseth
Could you tell a bit more ??

cause now i understand it as if you want to find a 4000 lines search pattern
in a 120.000 lines file

regards

Michel Posseth [MCP]


Show quoteHide quote
"beersa" wrote:

> Hi All,
>
> I am looking for fastest search alogrithm in vb.net or vb2005.
> I write a code in vb2005 to find a string in given text file.  The text
> file contains about 120,000 lines and search string is contain in
> another text file which is abt 4000 lines.
>
> My code takes nearly 15 mins to scan the whole file.
>
> Could anyone suggest me the fastest way to do this?
>
> Thanks & Regards
> beerSA.
>
>