<?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: FIELDNAME for field extraction test disappeared in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/FIELDNAME-for-field-extraction-test-disappeared/m-p/94078#M24244</link>
    <description>&lt;P&gt;Field names are case-sensitive.  So in the following search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype="syslog" 
| head 10000 
| rex "(?i)(?P&amp;lt;fieldname&amp;gt;[^ ]+)\s+\d+:\d+:\d+:\d+\." 
| top 50 FIELDNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;fieldname&lt;/CODE&gt; and &lt;CODE&gt;FIELDNAME&lt;/CODE&gt; are not the same. I think the IFX uses &lt;CODE&gt;FIELDNAME&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So perhaps the following is what you want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype="syslog" 
| head 10000 
| rex "(?i)(?P&amp;lt;FIELDNAME&amp;gt;[^ ]+)\s+\d+:\d+:\d+:\d+\." 
| top 50 FIELDNAME
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Jul 2012 03:19:45 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-07-10T03:19:45Z</dc:date>
    <item>
      <title>FIELDNAME for field extraction test disappeared</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FIELDNAME-for-field-extraction-test-disappeared/m-p/94077#M24243</link>
      <description>&lt;P&gt;I have been trying to make a new field using IFX by making a search and selecting "extract fields" and then inputting the examples that I want, (I want a field for data like src=rcdn-vif41-19 and src=rtp1-vif17-15 and a separate field for data like src=rcdn9-dci04n-ucs02-b and src=alln01-dci04n-ucs01-a) and I tested the regex example it gave and it seemed to work fine, I just had to add the "FIELDNAME" field to the listed to be shown, as it said that I would have to in the Splunk documentation.  Then I went back and saved the field as a name other than FIELDNAME and it worked fine.  Now I am trying to make the second field of things like src=alln01-dci04n-ucs01-a and when I go to test the regex example it made, I cannot find the FIELDNAME field in the possible fields list.  The test search is "index=foo sourcetype="syslog" | head 10000 | rex "(?i)(?P&lt;FIELDNAME&gt;[^ ]+)\s+\d+:\d+:\d+:\d+\." | top 50 FIELDNAME" Could anyone tell me how to get the FIELDNAME field back?&lt;/FIELDNAME&gt;&lt;/P&gt;

&lt;P&gt;Side note, I deleted the first field that I created because it actually wasn't what I wanted and tried to recreate it, and the same problem of FIELDNAME not showing up again in the regex test field list happened again.&lt;/P&gt;

&lt;P&gt;If anyone could help me that would be great!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2012 22:02:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FIELDNAME-for-field-extraction-test-disappeared/m-p/94077#M24243</guid>
      <dc:creator>klaurean</dc:creator>
      <dc:date>2012-07-09T22:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: FIELDNAME for field extraction test disappeared</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FIELDNAME-for-field-extraction-test-disappeared/m-p/94078#M24244</link>
      <description>&lt;P&gt;Field names are case-sensitive.  So in the following search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype="syslog" 
| head 10000 
| rex "(?i)(?P&amp;lt;fieldname&amp;gt;[^ ]+)\s+\d+:\d+:\d+:\d+\." 
| top 50 FIELDNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;fieldname&lt;/CODE&gt; and &lt;CODE&gt;FIELDNAME&lt;/CODE&gt; are not the same. I think the IFX uses &lt;CODE&gt;FIELDNAME&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So perhaps the following is what you want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype="syslog" 
| head 10000 
| rex "(?i)(?P&amp;lt;FIELDNAME&amp;gt;[^ ]+)\s+\d+:\d+:\d+:\d+\." 
| top 50 FIELDNAME
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jul 2012 03:19:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FIELDNAME-for-field-extraction-test-disappeared/m-p/94078#M24244</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-07-10T03:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: FIELDNAME for field extraction test disappeared</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FIELDNAME-for-field-extraction-test-disappeared/m-p/94079#M24245</link>
      <description>&lt;P&gt;I did not see that distinction.  I will try to make the two fields again today and let you know how it goes.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 15:23:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FIELDNAME-for-field-extraction-test-disappeared/m-p/94079#M24245</guid>
      <dc:creator>klaurean</dc:creator>
      <dc:date>2012-07-10T15:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: FIELDNAME for field extraction test disappeared</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FIELDNAME-for-field-extraction-test-disappeared/m-p/94080#M24246</link>
      <description>&lt;P&gt;FIELDNAME came back using your suggestion of just replacing the lowercase with the uppercase FIELDNAME.  Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 21:51:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FIELDNAME-for-field-extraction-test-disappeared/m-p/94080#M24246</guid>
      <dc:creator>klaurean</dc:creator>
      <dc:date>2012-07-10T21:51:07Z</dc:date>
    </item>
  </channel>
</rss>

