-
search text files
how do you search text files for certain text and read that line only
thanks
trains
-
I don't know how you can search a text file without reading it. ;-) If the file is small, I would probably read the file into a string variable and use the Split function to turn it into a string array, then loop through the array looking for the line I want. If it's too large to load all at once, you can read the file one line at a time and stop when I find the text I'm looking for.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Hi you can find a java implementation of what you want at the following link, the idea as phil has mentioned is to read each line one by one and compare the data with your search criterial.
It should be easy to transfer the code to vb.net. Well hopefullyhttp://www.cy2online.net/Downloads.p...ation#Download
Similar Threads
-
By Spumbu1977 in forum VB Classic
Replies: 3
Last Post: 12-24-2005, 01:45 PM
-
By symbian_ravi in forum Java
Replies: 0
Last Post: 12-20-2005, 05:29 AM
-
By geertvdijk in forum VB Classic
Replies: 4
Last Post: 03-16-2005, 12:39 PM
-
By Ricardo in forum Database
Replies: 1
Last Post: 02-13-2002, 04:55 PM
-
By James Abbott in forum Web
Replies: 0
Last Post: 10-23-2001, 06:12 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks