I have a regex that finds errors in the log for me:
/(exception|error)/i
This works, except that I do not want to be warned when the following happens, which I expect:
DD/MM/YYYY 10:20pm: Read exception encountered
How do I specifically reject the line "Read exception foundted"? Am I trying to use ?! operator, but failure:
/(?!Read exception encountered)(exception|error)/i
The above still matches the string I want to exclude.
UPDATE: After experimenting with the negative lookbehind and lookahead solutions below, I found that SiteScope only supports the basic POSIX regex functions, not advanced functions. Is it possible to use only the basic POSIX regular expression functions?
source share