471,330 Members | 1,258 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

RE: Parse Text File?

"DavidM" wrote:
Thanks for the code, Morten.

Based on what I'm seeing, it looks like your first code sample will work.

Are you only returning debits/credits for the first block match or is this
routine looping thru each and returning? It looks like you only return the
first block?
That is correct. My code only checks for a single "Blocks used" section.
If there are more just run the method again with the same binaryreader, or
find the next matching line.
As another side, I learned today that the section can also exist on the
right-hand side of the report and not the left hand. So I would have to
check to see where it exists.....

This is why I hate parsing reports; sinsce they're never consistent.
Yes, its hard to parse these reports if they keep changing. You may want to
adjust the code to allow for variations of "***BLOCKS USED***" to find the
correct section.

Happy Coding!
Morten Wennevik [C# MVP]

Jun 27 '08 #1
0 856

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by chuck amadi | last post: by
23 posts views Thread by Charles Law | last post: by
22 posts views Thread by Ram Laxman | last post: by
5 posts views Thread by liming | last post: by
1 post views Thread by AdrianH | last post: by
6 posts views Thread by =?Utf-8?B?RGF2aWRN?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.