Regex For Log Parsing -
i trying find of exceptions in log not of type invalidargumentexception. our log writes out lines following:
class: invalidargumentexception the regex trying use is:
/class:.*(!invalidargument)exception/ essentially, start word class:, allow characters after class not equal invalidargument, , include word exception
thank help.
one possibility negative behind:
/^class:.*?(?<!invalidargument)exception/ test grep -p:
kent$ echo "class: foo invalidargumentexception class: bar nullpointerexception"|grep -p '^class:.*?(?<!invalidargument)exception' class: bar nullpointerexception
Comments
Post a Comment