EDIT: Just to add that this does work; however I just wanted to ask if anyone can see any loopholes where an error message in the below format could slip through.
Code: Select all
while (<OUTPUTFILE>)
{
$permittedSBL = "00426|01042";
$permittedORA = "00000|00001";
if ( $_ =~ /(SBL-EIM-[0-9]{5}(?<!(?:$permittedSBL))|ORA-[0-9]{5}(?<!(?:$permittedORA)))/i )
{
push(@return, 8);
next;
}
if ( $_ =~ /Command completed successfully/i )
{
push(@return, 0);
next;
}
}Code: Select all
ORA-12345: Error messageCode: Select all
SBL-EIM-12345: Error Message