splitting files

Hello experts:

I asked this question on 3-16-2010
"I have a file that needs to be procesed in a C# application
but the records are all in one big record
soI need to split them before I process it.
I tried SPLIT and REGEX but it's not working.

File is attached.
Each individual record starts with  these characters:   {1100}

the solution was:                      

string[] lines = Regex.Split(value, @"\{1100\}");

and it worked

now i have a related question

I have another file but this one starts with these characters:YFT811
File is attached

so I tried to split like this:
 string[] lines = Regex.Split(value, @"\{YFT811\}");

but it does not work. I only get the 1st record and then it ignores
the rest.

Who is Participating?
Fernando SotoConnect With a Mentor RetiredCommented:
Try this, this should work

string[] lines = Regex.Split(value, @"YFT811");
Fernando SotoRetiredCommented:
In the original solution each record started with {100} but in this case each record starts with YFT811 note no { or } so you needed to remove them from the regex pattern. You need to verify that this pattern, YFT811, can only occur at the beginning of the record and no place else it will split it incorrectly.
All Courses

From novice to tech pro — start learning today.