title: Custom regular expression for grok
body: <p>My question is about grok filter in logstash. For logstash filter I need to parse a log file . Sample log statement below</p>
  
  <blockquote>
    <p>2017-07-31 09:01:53,135 - INFO 
    [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer@617] -
    Established session 0x15d964d654646f4 with negotiated timeout 5000 for
    client /10.191.202.89:56232</p>
  </blockquote>
  
  <p>I want to parse statement between [] using regular expression but did not get any success ? From above line</p>
  
  <ol>
  <li><em>QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181</em> should be mapped to thread id .</li>
  <li><em>ZooKeeperServer</em> should be mapped to class name </li>
  <li><em>617</em> should be mapped with line number</li>
  </ol>
  
  <p>Can someone help me with the regular expression for this ? </p>