title: grep with after-context that does not contain a keyword
body: <p>I want to grep through logs, and gather a certain exception stacktrace but I want to only see those that do not contain certain keywords in --after-context.
  I do not know in which line in after-context the keyword is.</p>
  
  <p>Simple example - given this shell code:</p>
  
  <pre><code>grep -A 2 A &lt;&lt;EOF
  A
  B
  C 
  R
  A
  Z
  Z
  X
  EOF
  </code></pre>
  
  <p>the output is:</p>
  
  <pre><code>A
  B
  C 
  --
  A
  Z
  Z
  </code></pre>
  
  <p>I'd like the output to be:</p>
  
  <pre><code>A
  Z
  Z
  </code></pre>
  
  <p>I want to exclude any match that has 'B' in after-context</p>
  
  <p>How do I do this? Using grep is not a requirement, though I only have access to coreutils and perl.</p>