Hello,
I have a large text file (about 2 GB) contains many records. In each record, fields are separated by tabs, at the 45th tab, there is a text block (call Message), I need to strip it out to write to a separated text file, and then the 48th tab with a CRLF ends the record. For example, if I have five records in this text file (abc.txt), with record ID 01, 02, 03, 04 and 05, the output should be:
abc_withoutTextBlock.txt -- only remove the text block (Message field) in each record, all other field will be keep.
01.txt -- 01 record's Message field
02.txt -- 02 record's Message field
03.txt -- 03 record's Message field
04.txt -- 04 record's Message field
05.txt -- 05 record's Message field
I cannot use StreamReader.Readline to get each record because the Message filed in each record contains tabs and CRLF.
How should I do this? Your code sample and direction would be much appreciated.
Thanks in advanced,
Rabbie
I have a large text file (about 2 GB) contains many records. In each record, fields are separated by tabs, at the 45th tab, there is a text block (call Message), I need to strip it out to write to a separated text file, and then the 48th tab with a CRLF ends the record. For example, if I have five records in this text file (abc.txt), with record ID 01, 02, 03, 04 and 05, the output should be:
abc_withoutTextBlock.txt -- only remove the text block (Message field) in each record, all other field will be keep.
01.txt -- 01 record's Message field
02.txt -- 02 record's Message field
03.txt -- 03 record's Message field
04.txt -- 04 record's Message field
05.txt -- 05 record's Message field
I cannot use StreamReader.Readline to get each record because the Message filed in each record contains tabs and CRLF.
How should I do this? Your code sample and direction would be much appreciated.
Thanks in advanced,
Rabbie