Hello monks! I am hoping you can help me with trying to parse information out of a data file. The file is a plain text file and the formats looks somethign the following:
!Data.
$
1-11-ABC22 (12:12) ABC 12 Foo Bar Foo Bar
Foo Bar Foo Bar
2-15-ABC33 (12:12) ABC 12 Foo Bar Foo Bar
Foo Bar Foo Bar
--
1-11-ABC33 (12:12) ABC 12 Foo Bar Foo Bar
Foo bar Foo Bar
--
1-11-ABC33 (12:12) ABC 12 Foo Bar Foo Bar
Foo abr Foo bar
Foo Bar
Foo Bar
Foo Bar
--
2-15-ABC45 (12:12) ABC 12 Foo Bar Foo Bar
Foo Bar Foo Bar
3-33-ABC15 (12:12) ABC 12 Foo Bar Foo Bar
!Data
*
Each entry I am trying to parse out starts with the d-dd-ABCdd line and I basically need the lines below it until the next entry starts. So examples of what I am trying to parse out are:
1-11-ABC22 (12:12) ABC 12 Foo Bar Foo Bar
Foo Bar Foo Bar
And...
1-11-ABC33 (12:12) ABC 12 Foo Bar Foo Bar
Foo abr Foo bar
Foo Bar
Foo Bar
Foo Bar
--
etc...
It would be easy enough to just split on lines that starts with a \n or a --, but the -- is part of the entry that I need to retain. Any ideas on how a good way to parse out this information? I appreciate any help you can offer. Thanks!
Prime