I have a file that lists data about a system. It has a part that can look like:
the errors I'm looking for with other errors:
Code:
Alerts
Password Incorrect
Login Error
Another Error
Another Error 2
Other Info
or, just the errors I need to parse for:
Code:
Alerts
Password Incorrect
Login Error
Other Info
or, if no alerts:
What I need to do is parse the file, and branch iff the error "Password Incorrect" or "Login Error" comes up. If those come up with other errors that is fine. The file doesn't always include errors (actually this is usually the case). Also, what makes this difficult for me is the line after the last alert isn't blank -- it actually contains a single space.
I have code for it, but it's getting messier and messier, and I'm sure you guys help me out with something WAY more elegant.
Thanks,
Eric