<?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: Why is my rex search not extracting the field from my event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175786#M50499</link>
    <description>&lt;P&gt;Thanks but you forgot to vote&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jun 2015 13:36:02 GMT</pubDate>
    <dc:creator>chimell</dc:creator>
    <dc:date>2015-06-26T13:36:02Z</dc:date>
    <item>
      <title>Why is my rex search not extracting the field from my event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175782#M50495</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;I want to extract a field from the event, and name it &lt;CODE&gt;retail&lt;/CODE&gt;, and then use this new field to make a calculation. Could you pls help me to achieve this?&lt;/P&gt;

&lt;P&gt;This portion from my event below &lt;CODE&gt;mount_name="MerryMart-An-Wai&lt;/CODE&gt;, I want to extract &lt;CODE&gt;MerryMart&lt;/CODE&gt;, the first word of &lt;CODE&gt;mount_name&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;This is my current search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;interaction_count | rex field = mount_name"(?&amp;lt;retail&amp;gt;-.*)" | stats sum(interaction_count) by retail
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I got nothing returned. Could you kindly tell me what is wrong?&lt;/P&gt;

&lt;P&gt;Event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jun 25 2015 05:00:00 geoloc_city="**" geoloc_country="**" menu_interaction_count="0" menu_interaction_duration="0" menu_select_experience="0" mount_name="MerryMart-An-Wai " shop_id="d3ba599ad84f4eb69b5321b90e958b30" shop_name="MerryMart-An-Wai" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jun 2015 06:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175782#M50495</guid>
      <dc:creator>hqw</dc:creator>
      <dc:date>2015-06-25T06:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my rex search not extracting the field from my event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175783#M50496</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Try with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; interaction_count|rex field=_raw "mount_name\=\"(?&amp;lt;retail&amp;gt;[A-Z a-z]+)\-" | stats sum(interaction_count) by retail
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jun 2015 07:41:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175783#M50496</guid>
      <dc:creator>ngatchasandra</dc:creator>
      <dc:date>2015-06-25T07:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my rex search not extracting the field from my event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175784#M50497</link>
      <description>&lt;P&gt;You can try IFX which is easy to use. Following &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Knowledge/ExtractfieldsinteractivelywithIFX"&gt;tutorial&lt;/A&gt; can help you.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Knowledge/ExtractfieldsinteractivelywithIFX"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/Knowledge/ExtractfieldsinteractivelywithIFX&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2015 07:43:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175784#M50497</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-06-25T07:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my rex search not extracting the field from my event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175785#M50498</link>
      <description>&lt;P&gt;Hi  hqw &lt;BR /&gt;
Try this search code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; interaction_count | rex field=_raw "mount_name\=\"(?P&amp;lt;retail&amp;gt;[\w]+)\-"| stats sum(interaction_count) by retail
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Look at the result of  " MerryMart" extraction (first word of mount_name )&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/425i9E2CCE646E6F284C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2015 11:34:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175785#M50498</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-06-25T11:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my rex search not extracting the field from my event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175786#M50499</link>
      <description>&lt;P&gt;Thanks but you forgot to vote&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2015 13:36:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-rex-search-not-extracting-the-field-from-my-event/m-p/175786#M50499</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-06-26T13:36:02Z</dc:date>
    </item>
  </channel>
</rss>

