<?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: Testing and debugging an Inline Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Testing-and-debugging-an-Inline-Field-Extraction/m-p/39354#M8979</link>
    <description>&lt;P&gt;The issue was that &lt;CODE&gt;rex&lt;/CODE&gt; was having me double-escape the special characters. When I changed to a single backslash, it started working.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Nov 2012 03:25:53 GMT</pubDate>
    <dc:creator>adamb0mb</dc:creator>
    <dc:date>2012-11-20T03:25:53Z</dc:date>
    <item>
      <title>Testing and debugging an Inline Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Testing-and-debugging-an-Inline-Field-Extraction/m-p/39351#M8976</link>
      <description>&lt;P&gt;I'm trying to setup Splunk to understand CloudFront log files.&lt;/P&gt;

&lt;P&gt;I've setup a field extraction like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^(?&amp;lt;DATE&amp;gt;[\\S]+)\\t(?&amp;lt;TIME&amp;gt;[\\S]+)\\t(?&amp;lt;CF_SERVER&amp;gt;[\\S]+)\\t(?&amp;lt;BYTES&amp;gt;[\\S]+)\\t(?&amp;lt;IP&amp;gt;[\\S]+)\\t(?&amp;lt;ACTION&amp;gt;[\\S]+)\\t(?&amp;lt;CF_DIST&amp;gt;[\\S]+)\\t(?&amp;lt;REQUEST&amp;gt;[\\S]+)\\t(?&amp;lt;STATUS&amp;gt;[\\S]+)\\t(?&amp;lt;REFERRER&amp;gt;[\\S]+)\\t(?&amp;lt;BROWSER&amp;gt;[\\S]+)\\t(?&amp;lt;QUERY&amp;gt;[\\S]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not seeing any of these fields showing up in the Search UI, and it I can't search for them. I've tested the regex with a &lt;CODE&gt;rex&lt;/CODE&gt; command, and it works just fine.&lt;/P&gt;

&lt;P&gt;A sidenote:&lt;BR /&gt;
I'm a new user. A lot of the documentation on this subject refers to &lt;CODE&gt;transforms.conf&lt;/CODE&gt; and &lt;CODE&gt;props.conf&lt;/CODE&gt;, but in the locations specified in the documentation, those files don't exist.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 00:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Testing-and-debugging-an-Inline-Field-Extraction/m-p/39351#M8976</guid>
      <dc:creator>adamb0mb</dc:creator>
      <dc:date>2012-11-20T00:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Testing and debugging an Inline Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Testing-and-debugging-an-Inline-Field-Extraction/m-p/39352#M8977</link>
      <description>&lt;P&gt;If you are looking to set this regex up in a props or transforms config file, then you may need to create those files in the $SPLUNK_HOME/etc/system/local/ directory or in a custom app directory depending on how you are looking to do your field extractions. Also, if that regex works with the 'rex' command then you will want to un-escape your slashes before using it within props or transforms files.&lt;/P&gt;

&lt;P&gt;This means a line in the config file would look like:&lt;BR /&gt;
&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;BR /&gt;
^(?&amp;lt;DATE&amp;gt;[\S]+)\t(?&amp;lt;TIME&amp;gt;[\S]+)\t(?&amp;lt;CF_SERVER&amp;gt;[\S]+)\t(?&amp;lt;BYTES&amp;gt;[\S]+)\t(?&amp;lt;IP&amp;gt;[\S]+)\t(?&amp;lt;ACTION&amp;gt;[\S]+)\t(?&amp;lt;CF_DIST&amp;gt;[\S]+)\t(?&amp;lt;REQUEST&amp;gt;[\S]+)\t(?&amp;lt;STATUS&amp;gt;[\S]+)\t(?&amp;lt;REFERRER&amp;gt;[\S]+)\t(?&amp;lt;BROWSER&amp;gt;[\S]+)\t(?&amp;lt;QUERY&amp;gt;[\S]+)&lt;BR /&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Testing-and-debugging-an-Inline-Field-Extraction/m-p/39352#M8977</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2020-09-28T12:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Testing and debugging an Inline Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Testing-and-debugging-an-Inline-Field-Extraction/m-p/39353#M8978</link>
      <description>&lt;P&gt;I don't necessarily want to put this in the &lt;CODE&gt;props.conf&lt;/CODE&gt; or &lt;CODE&gt;transforms.conf&lt;/CODE&gt;, I just want it the extraction to work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The regex your'e showing looks really wonky... no backslashes at all? If the backslashes don't need to be escaped, shouldn't it look like:&lt;BR /&gt;
    ^(?&lt;DATE&gt;[\S]+)\t(?&lt;TIME&gt;[\S]+)\t(?&lt;CF_SERVER&gt;[\S]+)\t(?&lt;BYTES&gt;[\S]+)\t(?&lt;IP&gt;[\S]+)\t(?&lt;ACTION&gt;[\S]+)\t(?&lt;CF_DIST&gt;[\S]+)\t(?&lt;REQUEST&gt;[\S]+)\t(?&lt;STATUS&gt;[\S]+)\t(?&lt;REFERRER&gt;[\S]+)\t(?&lt;BROWSER&gt;[\S]+)\t(?&lt;QUERY&gt;[\S]+)&lt;/QUERY&gt;&lt;/BROWSER&gt;&lt;/REFERRER&gt;&lt;/STATUS&gt;&lt;/REQUEST&gt;&lt;/CF_DIST&gt;&lt;/ACTION&gt;&lt;/IP&gt;&lt;/BYTES&gt;&lt;/CF_SERVER&gt;&lt;/TIME&gt;&lt;/DATE&gt;&lt;/P&gt;

&lt;P&gt;Edit: looks like the wonkiness might be splunkbase display issues.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 02:57:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Testing-and-debugging-an-Inline-Field-Extraction/m-p/39353#M8978</guid>
      <dc:creator>adamb0mb</dc:creator>
      <dc:date>2012-11-20T02:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Testing and debugging an Inline Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Testing-and-debugging-an-Inline-Field-Extraction/m-p/39354#M8979</link>
      <description>&lt;P&gt;The issue was that &lt;CODE&gt;rex&lt;/CODE&gt; was having me double-escape the special characters. When I changed to a single backslash, it started working.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 03:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Testing-and-debugging-an-Inline-Field-Extraction/m-p/39354#M8979</guid>
      <dc:creator>adamb0mb</dc:creator>
      <dc:date>2012-11-20T03:25:53Z</dc:date>
    </item>
  </channel>
</rss>

