<?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: Best way to create a search time field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110991#M29047</link>
    <description>&lt;P&gt;OK, I made it work using props.conf and transforms.conf, with &lt;BR /&gt;
REGEX = .&lt;EM&gt;-(?&lt;COMPANY&gt;[a-z]&lt;/COMPANY&gt;&lt;/EM&gt;$)&lt;BR /&gt;
SOURCE_KEY = Username&lt;BR /&gt;
in transforms.conf.  It's not converted to uppercase, but I found out searching is not case sensitive, so that's OK.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2013 07:45:19 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2013-10-23T07:45:19Z</dc:date>
    <item>
      <title>Best way to create a search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110988#M29044</link>
      <description>&lt;P&gt;I've spent a long time reading, but am not sure the best way to do this.&lt;/P&gt;

&lt;P&gt;I have events, which contain&lt;/P&gt;

&lt;P&gt;username-xxx, firstname, lastname, ...&lt;/P&gt;

&lt;P&gt;I would like to extract the n digit username suffix 'xxx' to a new field called Company.  Currently I'm doing this in my searches&lt;/P&gt;

&lt;P&gt;rex field=Username ".&lt;EM&gt;-(?&lt;COMPANY&gt;[a-z]&lt;/COMPANY&gt;&lt;/EM&gt;$)" | eval Company=upper(Company)&lt;/P&gt;

&lt;P&gt;(NB: For some reason Company has come out lower case above in this post, but it's upper case)&lt;/P&gt;

&lt;P&gt;which works, but I want to avoid doing this each time and make it a permanent extraction.  I am not sure of the right way&lt;/P&gt;

&lt;P&gt;Calculated fields&lt;BR /&gt;
Field extraction&lt;BR /&gt;
Field transformation&lt;/P&gt;

&lt;P&gt;What's the right way?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2013 06:32:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110988#M29044</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2013-10-23T06:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to create a search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110989#M29045</link>
      <description>&lt;P&gt;Field extraction, for instance using the Interactive Field Extractor. This will create permanent field extractions for you so you don't have to enter them manually inline in your search every time. &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/Knowledge/ExtractfieldsinteractivelywithIFX"&gt;http://docs.splunk.com/Documentation/Splunk/6.0/Knowledge/ExtractfieldsinteractivelywithIFX&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2013 06:52:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110989#M29045</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-10-23T06:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to create a search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110990#M29046</link>
      <description>&lt;P&gt;Thanks, I already found some of your helpful posts... I tried that, but I only want the regex to work on the already found Username field rather than the complete event.  Props.conf contains &lt;BR /&gt;
EXTRACT-Company = (?i)^.*-(?P&lt;COMPANY&gt;[^,]+), &lt;BR /&gt;
and I also need Company to be uppercase.&lt;/COMPANY&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2013 07:02:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110990#M29046</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2013-10-23T07:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to create a search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110991#M29047</link>
      <description>&lt;P&gt;OK, I made it work using props.conf and transforms.conf, with &lt;BR /&gt;
REGEX = .&lt;EM&gt;-(?&lt;COMPANY&gt;[a-z]&lt;/COMPANY&gt;&lt;/EM&gt;$)&lt;BR /&gt;
SOURCE_KEY = Username&lt;BR /&gt;
in transforms.conf.  It's not converted to uppercase, but I found out searching is not case sensitive, so that's OK.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2013 07:45:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110991#M29047</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2013-10-23T07:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to create a search time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110992#M29048</link>
      <description>&lt;P&gt;Probably neater to do it like this (directly in props.conf):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-blah = -(?&amp;lt;company&amp;gt;[a-z]+) in Username
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See the docs on props.conf&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/admin/propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/admin/propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2013 13:57:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Best-way-to-create-a-search-time-field-extraction/m-p/110992#M29048</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-23T13:57:55Z</dc:date>
    </item>
  </channel>
</rss>

