<?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: Field Extraction from existing field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133793#M36558</link>
    <description>&lt;P&gt;I had a similar issue and it turned out to be the order in which the extractions occurred. &lt;/P&gt;</description>
    <pubDate>Wed, 16 Apr 2014 19:02:52 GMT</pubDate>
    <dc:creator>rdownie</dc:creator>
    <dc:date>2014-04-16T19:02:52Z</dc:date>
    <item>
      <title>Field Extraction from existing field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133791#M36556</link>
      <description>&lt;P&gt;Although this works with no issue in SPL:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rex field=fieldName "(?i)^(?P&amp;lt;test&amp;gt;.*)$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-test = (?i)^(?P&amp;lt;test&amp;gt;.*)$ in fieldname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;seems to ONLY work when fieldname is source, sourcetype, host, etc.. - but does not work when fieldname is any of the fields that splunk auto-discovers within the events (name=value pairs).&lt;/P&gt;

&lt;P&gt;Running Splunk 6.0.2. I could swear this worked in prior releases.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/Admin/Propsconf&lt;/A&gt;&lt;BR /&gt;
shows that the syntax would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-&amp;lt;class&amp;gt; = [&amp;lt;regex&amp;gt;|&amp;lt;regex&amp;gt; in &amp;lt;src_field&amp;gt;]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And provides instructions:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Use '&lt;REGEX&gt; in &lt;SRC_FIELD&gt;' to match the regex against the values of a specific field. Otherwise it just matches against _raw (all raw event data).&lt;/SRC_FIELD&gt;&lt;/REGEX&gt;&lt;/LI&gt;
&lt;LI&gt;NOTE: &lt;SRC_FIELD&gt; can only contain alphanumeric characters (a-z, A-Z, and 0-9).&lt;/SRC_FIELD&gt;&lt;/LI&gt;
&lt;LI&gt;If your regex needs to end with 'in &lt;STRING&gt;' where &lt;STRING&gt; is &lt;EM&gt;not&lt;/EM&gt; a field name, change the regex to end with '[i]n &lt;STRING&gt;' to ensure that Splunk doesn't try to match &lt;STRING&gt; to a field name.&lt;/STRING&gt;&lt;/STRING&gt;&lt;/STRING&gt;&lt;/STRING&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;But my "fieldname" is only alpha characters and yet it still does not work.&lt;/P&gt;

&lt;P&gt;I did not see anything listed on the Known Issues page for 6.0.2 regarding field extractions.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 16:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133791#M36556</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2014-04-16T16:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction from existing field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133792#M36557</link>
      <description>&lt;P&gt;I think auto-extraction happens after props.conf/transforms.conf extraction, so those fields aren't available yet.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 17:26:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133792#M36557</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-16T17:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction from existing field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133793#M36558</link>
      <description>&lt;P&gt;I had a similar issue and it turned out to be the order in which the extractions occurred. &lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 19:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133793#M36558</guid>
      <dc:creator>rdownie</dc:creator>
      <dc:date>2014-04-16T19:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction from existing field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133794#M36559</link>
      <description>&lt;P&gt;So whats the solution to determine the order of extraction?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2015 15:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133794#M36559</guid>
      <dc:creator>BP9906</dc:creator>
      <dc:date>2015-07-10T15:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction from existing field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133795#M36560</link>
      <description>&lt;P&gt;I'm having same problem.  Source logs have a key=value pair called "ui"&lt;BR /&gt;
ui=GUI(x.x.x.x)&lt;BR /&gt;
ui=ssh(x.x.x.x)&lt;BR /&gt;
ui=console&lt;BR /&gt;
ui=https&lt;BR /&gt;
etc&lt;/P&gt;

&lt;P&gt;I want to make a CIM-compliant field called 'app' for Authentication since it's supposed to specify the mechanism.  But I want to only catch the field value up until the first parenthesis.&lt;/P&gt;

&lt;P&gt;This line in my local props.conf &lt;STRONG&gt;works&lt;/STRONG&gt; (working against entire _raw field)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-fgt_auth_app_extract = ui=['"]?(?[^(\s'"]+)['"\s]?
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but this line &lt;STRONG&gt;does not&lt;/STRONG&gt;  (trying to use the "in ui" specifier at the end)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-fgt_auth_app_extract = ['"]?(?[^(\s'"]+)['"\s]? in ui
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Apr 2016 18:48:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133795#M36560</guid>
      <dc:creator>fortiwhall</dc:creator>
      <dc:date>2016-04-10T18:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction from existing field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133796#M36561</link>
      <description>&lt;P&gt;In the case of delimited files (e.g IIS/w3c, tab delimited files), the field extraction happens at index time right? So, these fields are available as part of name value pairs in the search time. So  [regex | regex in ] doesn't work. It seems accept only source. Is this a bug?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 14:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-from-existing-field/m-p/133796#M36561</guid>
      <dc:creator>lakshman239</dc:creator>
      <dc:date>2017-03-31T14:36:17Z</dc:date>
    </item>
  </channel>
</rss>

