Hi,
I'm not a Perl programmer, and I've done almost no Perl before, but I need to edit script at work.
I have a string that looks like this:
and I need to find only the errors and parse them out.
I believe this is the right regex string to search for the whole block of text (separated by blank lines) containing the error code:
but if I'm not mistaken, this will only find the first match. How would I find all the matches and dump them all into a new string that I can print out?
I'm not a Perl programmer, and I've done almost no Perl before, but I need to edit script at work.
I have a string that looks like this:
Code:
Blah, blah...
Some SQL statement.
DB20000I some info.
Some SQL statement.
DB21034E error text.
...
I believe this is the right regex string to search for the whole block of text (separated by blank lines) containing the error code:
Code:
m/\n\n.*\nDB\d\d\d\d\dE.*\n\n/