title: Regex to NOT match exact words in a string
body: <p>I've the following string:</p>
  <pre><code>group.cluster.namespace.release.app.pod.timer.grpc.server.processing.duration.package.method.error.count
  </code></pre>
  <p>and a regex:</p>
  <pre><code>(?:[^.]+\.){11}([^.]+)\.([^.]+)\.([^.]+)\.(?:[^.]+)
  </code></pre>
  <p>that <a href="https://regex101.com/r/Z6Kota/1" rel="nofollow noreferrer">produces a match</a>:</p>
  <pre><code>Group 1: package
  Group 2: method
  Group 3: error
  </code></pre>
  <p>Now I want to <em>not match</em> when group 3 is either <code>ok</code> or <code>cancelled</code>. I tried a negative lookahead, but it's not working.</p>
  <pre><code>(?:[^.]+\.){11}([^.]+)\.([^.]+)\.(?!ok|cancelled)\.(?:[^.]+)
  </code></pre>
  <p>What is wrong with the regex above?</p>