title: How to grep text with brackets only
body: <p>the log looks like:</p>
  
  <pre><code>2019/10/04 03:03:12.938 [error]: some exception happened
  2019/10/04 03:03:12.938 [error]: some exception happened
  2019/10/04 03:53:35.595 [info]: there is a benign error in the code
  </code></pre>
  
  <p>grep "error" log.txt will give me all three lines but I only want the top two. How do I do that?</p>