View Full Version : VB.NET - Splitting up a text file & Pattern Matching

10-31-2008, 04:49 PM
I have a text file that I am reading into VB.NET, to show up in a textbox.

The text file contains several "paragraphs" of information (blocks of 24 lines). I need to be able to split the contents into these 24 lines so I could for example pick a number, 5, and show the 5th block of information in the text file.

This would then help with my next problem - pattern matching/regular expressions. If I can split the contents up, I then need to be able to create filters to show various blocks of info. e.g. filter out all the odd blocks, or any block containing a certain word.

Right now my project consists of choosing a file, and then "scanning" it to show the entire contents within the textbox. I would like to be able to set the filters before the "scanning".

Any pointers, hints, tips etc welcome :D

Thanks in advance!

10-31-2008, 09:03 PM
minor bump - 23 views as I write this, and no takers? :confused:

11-04-2008, 01:01 AM

could really use some pointers at least, i have yet to find any good info on applying regex functions to a text file before displaying it in a textbox.

11-05-2008, 07:13 AM
what is your problem?more specific please and can you post the script also?so we can see the enquiry of your problem?