Hello,
I have a perl program which parses an input file for specific error patterns and generates an output file with all these lines.
One of the error patterns that I am looking at spans across multiple lines. I can detect it can as error pattern using information from the first line but cannot print out the remaining lines.
Is there a way to regexp multiple lines and store all lines in a string or array.
For eg an error pattern would be
Error: Module has the following
1. no link
2. internal wiring
issues. Use check_module on module top to resolve (ERR-30)
or
Error: Unable to link design (ERR-200)
In the latter case I just do a regexp for m/^Error:.*\(ERR-200\)/ and write out the line to my output file.
In the former I can write out only the first line.
How can I capture all four lines. Remember the no of lines may vary.
Is there a regular expression that can capture
m/^Error(any number of new lines)\(ERR-30\)/
Thanks
Natti