I've the following string:
group.cluster.namespace.release.app.pod.timer.grpc.server.processing.duration.package.method.error.count
and a regex:
(?:[^.]+\.){11}([^.]+)\.([^.]+)\.([^.]+)\.(?:[^.]+)
that produces a match:
Group 1: package
Group 2: method
Group 3: error
Now I want to not match when group 3 is either ok or cancelled. I tried a negative lookahead, but it's not working.
(?:[^.]+\.){11}([^.]+)\.([^.]+)\.(?!ok|cancelled)\.(?:[^.]+)
What is wrong with the regex above?