<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Parse words in a search result in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Parse-words-in-a-search-result/m-p/102568#M21521</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;Thanks for your answer, we were'nt able to extract the info as we wanted. The | stats part worked fine, it listed all the fields however the | where didn't. As a workaround we found the following :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "msg=\".*(?&amp;lt;Etat&amp;gt;(failed|success)).*\"" | stats count by Etat
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works great for us as we get both fields as result (failed and success)&lt;/P&gt;

&lt;P&gt;Thanks again,&lt;BR /&gt;
Gaetan&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2013 13:30:34 GMT</pubDate>
    <dc:creator>gnoellbn</dc:creator>
    <dc:date>2013-10-17T13:30:34Z</dc:date>
    <item>
      <title>Parse words in a search result</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parse-words-in-a-search-result/m-p/102566#M21519</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to extract data depending of one word (fail* or success*) from a field that is not always the same :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Oct 16 15:12:47 10.1.0.12 date=2013-10-16 time=15:12:47 devname=WIN_XP device_id=324156465 log_id=0000010001 type=event subtype=system pri=alert user=toto adom= msg="user 'toto' login failed from GUI(192.185.63.33)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The info I am looking for is always in "msg=" but not always at the same place.&lt;/P&gt;

&lt;P&gt;I have tried different way with the command below :&lt;/P&gt;

&lt;P&gt;| stats count(eval(msg="&lt;EM&gt;fail&lt;/EM&gt;")) as Failed &lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 20:49:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parse-words-in-a-search-result/m-p/102566#M21519</guid>
      <dc:creator>gnoellbn</dc:creator>
      <dc:date>2013-10-16T20:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Parse words in a search result</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parse-words-in-a-search-result/m-p/102567#M21520</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| rex "msg=\"(&amp;lt;YOURFIELD&amp;gt;.+?)\"" | stats count(YOURFIELD) as Failed | where YOURFIELD="*FAIL*"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Oct 2013 20:52:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parse-words-in-a-search-result/m-p/102567#M21520</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2013-10-16T20:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Parse words in a search result</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parse-words-in-a-search-result/m-p/102568#M21521</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;Thanks for your answer, we were'nt able to extract the info as we wanted. The | stats part worked fine, it listed all the fields however the | where didn't. As a workaround we found the following :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "msg=\".*(?&amp;lt;Etat&amp;gt;(failed|success)).*\"" | stats count by Etat
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works great for us as we get both fields as result (failed and success)&lt;/P&gt;

&lt;P&gt;Thanks again,&lt;BR /&gt;
Gaetan&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2013 13:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parse-words-in-a-search-result/m-p/102568#M21521</guid>
      <dc:creator>gnoellbn</dc:creator>
      <dc:date>2013-10-17T13:30:34Z</dc:date>
    </item>
  </channel>
</rss>

