in reply to Regex to end of a line from previous line
Maybe you don't need to know where the current (error) message ends, but just need to know where the next message starts?
Showing us some more lines of input (also in between <code>...</code> tags) might help us help you better. If the current message ends with a blank line, the following could be all you need:
while (<FILE>) { if (/^SQL/ .. /^$/) { print "Found error $_\n"; }; };
Also, instead of shelling out to date, I prefer POSIX::strftime, or localtime.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex to end of a line from previous line
by bp4a (Initiate) on Sep 23, 2010 at 15:28 UTC | |
by Corion (Patriarch) on Sep 23, 2010 at 15:30 UTC |