以下Regexp可以使Error 403与40-49范围内的数字匹配:
HTTP\/[\d.]+.\s+(?:403)\s+(4[0-9])\s+
sometext HTTP/1.1" 403 46 "-" "sometext" ->match
sometext HTTP/1.1" 403 56 "-" "sometext" -> no match
sometext HTTP/1.1" 403 460 "-" "sometext" -> no match
现在我在SCOM中设置此表达式来监视nginx日志文件,但是
/var/opt/microsoft/scx/log/scx.log
抱怨
SCXLogFileProvider DoInvokeMethod - invalid regexp : HTTP\/[\d.]+.\s+(?:403)\s+(4[0-9])\s+
这可能是什么原因?