title: how to write grok pattern upto particular word
body: <p>I need help in writing grok pattern for upto particular string.</p>
  
  <p>I have below types log lines in same log file:</p>
  
  <p><strong>line 1:</strong> </p>
  
  <pre><code>20151012 00:59:03 main ERROR java.lang.Class - Failed to retrieve the node - unable to resolve the path //mbeans/mbean[@id="audit-config"]/mbean-attributes
  </code></pre>
  
  <p><strong>line 2:</strong></p>
  
  <pre><code>20151012 00:59:59 RMI TCP Connection(5)-176.66.1.39 INFO  net.cp.cluster.configstore.admin.impl.AdminManager - config up-to-date; local anchor [ac6c08e5-cded-43ca-8cb3-e8be1b85c453] - global anchor: [ac6c08e5-cded-43ca-8cb3-e8be1b85c453]
  </code></pre>
  
  <p>here now, I want LOGLEVEL words like ERROR or INFO into severity field.</p>
  
  <p><strong>My goal is, I want everything after seconds field upto ERROR or INFO in one field.</strong></p>
  
  <p>how should I do that?</p>
  
  <p>I have tried below grok but its not working:</p>
  
  <pre><code>%{YEAR}%{MONTHNUM}%{MONTHDAY}\s*%{HOUR}:%{MINUTE}:%{SECOND}\s*\(?&lt;rawinfo&gt;/^(?:(?!\s*\b(?:ERROR | ?:INFO)\b).)*/\)
  </code></pre>
  
  <p>Any help here?</p>
  
  <p>Thanks!</p>