Hi there,
Does any one know a Perl regular expresson to ignore specific string from a log file.
For example i want to use this simple unix command using perl regular expression
egrep -i -n "error|fatal" logfile.log |\egrep -v "user not found"
i.e. it should ignore log file entry "Error user not found" but at the same time if log file contains "error script fails" it should detect "error".
Hi there,
Does any one know a Perl regular expresson to ignore specific string from a log file.
For example i want to use this simple unix command using perl regular expression
egrep -i -n "error|fatal" logfile.log |\egrep -v "user not found"
i.e. it should ignore log file entry "Error user not found" but at the same time if log file contains "error script fails" it should detect "error".
365:[2005-02-10 10:43:39,499][testapi][INFO ][Servlet.Engine.Transports : 252][service.BaseService] - ApplRef: null Error -NXFB=(8;701) user not found in database.
370:[2005-02-10 10:43:47,955][testapi][ERROR][Servlet.Engine.Transports : 41][OLDLOGGING] - - E - - - User does not have the
required access level for this application.
The first line should be ignored eventhough it contents sring "Error".
but the second line should raise a flag because it does not content string "user not found in database"
i believe it's clear now. I'm looking for regular expression to parse this kinda log file. i can simply use egrep and egrep-v but that's not the solution i cna use here.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.