title: grep parts of string with match and not match?
body: <p>I have a log file which contains string <code>errorCode:null</code> or <code>errorCode:404</code> etc. I want to find all occurrences where errorCode is not null.</p>
  <p>I use:</p>
  <pre><code>grep -i &quot;errorcode&quot; -A 10 -B 10  app.2020-.* | grep -v -i &quot;errorCode:null&quot;`, 
  
  grep -v -i 'errorcode:[0-9]^4' -A 10 -B 10  app.2020-.* 
  </code></pre>
  <p>but this is not the right regex match. How could this be done?</p>