Computing.Net > Forums > Programming > using java to serach a text file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

using java to serach a text file

Reply to Message Icon

Name: greenbear13
Date: October 28, 2004 at 08:35:28 Pacific
OS: xp home
CPU/Ram: pent 4
Comment:

well guys, the title says it all; I have a .txt file that I need to search for a particular string ... however, I don't know the line the string will be on or anything, nor even how many lines it will have exactly (it is a string which has the text "busy : x", whhere x is some random integer
any tips?



Sponsored Link
Ads by Google

Response Number 1
Name: bamakhrama
Date: November 17, 2004 at 04:17:49 Pacific
Reply:

The idea is to read the file as a whole using streams the search in that array then return the result. You need to look in streams in Java since they provide a powerful capabilities.


0
Reply to Message Icon

Related Posts

See More


Perl vs. C wrt log analys... Java console help



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: using java to serach a text file

How to create a text file using FSO www.computing.net/answers/programming/how-to-create-a-text-file-using-fso/10319.html

Batch to edit a text file www.computing.net/answers/programming/batch-to-edit-a-text-file/15894.html

splitting a text file www.computing.net/answers/programming/splitting-a-text-file/14804.html