<?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: Extract fields with a regular expression in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108675#M28315</link>
    <description>&lt;P&gt;Can you update the quesiton with a specific example of the line you're extracting this data from?  What data is in the "LOG_ID", "DEVICE_DATA", and "USERNAME" fields (numbers only, spaces, etc)?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:26:52 GMT</pubDate>
    <dc:creator>dglinder</dc:creator>
    <dc:date>2020-09-28T14:26:52Z</dc:date>
    <item>
      <title>Extract fields with a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108673#M28313</link>
      <description>&lt;P&gt;I have fields in the format of &lt;CODE&gt;LOG_ID&lt;/CODE&gt;, &lt;CODE&gt;DEVICE_DATA&lt;/CODE&gt;, &lt;CODE&gt;USERNAME&lt;/CODE&gt;, that I'd like to extract, and I'd like to exclude the default Splunk fields like &lt;CODE&gt;_time&lt;/CODE&gt;, &lt;CODE&gt;*_raw&lt;/CODE&gt;, and &lt;CODE&gt;timeendpos&lt;/CODE&gt;, &lt;CODE&gt;timestartpos&lt;/CODE&gt;, etc. Is that possible to do through the &lt;CODE&gt;regex&lt;/CODE&gt; command? Can I chain that with &lt;CODE&gt;table&lt;/CODE&gt; somehow?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2013 14:48:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108673#M28313</guid>
      <dc:creator>narabhut</dc:creator>
      <dc:date>2013-07-29T14:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields with a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108674#M28314</link>
      <description>&lt;P&gt;No, the &lt;CODE&gt;regex&lt;/CODE&gt; command is used for filtering search results based on a regular expression. The &lt;CODE&gt;rex&lt;/CODE&gt; command is used for extracting fields out of events though. Including/excluding fields is done using the &lt;CODE&gt;fields&lt;/CODE&gt; command.&lt;/P&gt;

&lt;P&gt;Based on your question it sounds like you should take a tour of how Splunk works. Field extractions are covered here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Addfieldsatsearchtime"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Addfieldsatsearchtime&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;And there's an excellent Splunk tutorial: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Tutorial/WelcometotheSplunkTutorial"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Tutorial/WelcometotheSplunkTutorial&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2013 15:15:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108674#M28314</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-07-29T15:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields with a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108675#M28315</link>
      <description>&lt;P&gt;Can you update the quesiton with a specific example of the line you're extracting this data from?  What data is in the "LOG_ID", "DEVICE_DATA", and "USERNAME" fields (numbers only, spaces, etc)?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:26:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108675#M28315</guid>
      <dc:creator>dglinder</dc:creator>
      <dc:date>2020-09-28T14:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields with a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108676#M28316</link>
      <description>&lt;P&gt;The data in the fields can contain anything, so I don't think I can do filtering based on that. An example would be  LOG_ID=12312 DEVICE_DATA="random stuff" USERNAME="DAVIDTEST"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:26:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108676#M28316</guid>
      <dc:creator>narabhut</dc:creator>
      <dc:date>2020-09-28T14:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields with a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108677#M28317</link>
      <description>&lt;P&gt;If you have "key=value" pairs, Splunk should be extracting them as a field by the name of "key" and the corresponding value "value".&lt;/P&gt;

&lt;P&gt;You should be able to limit your searches by simply adding a the field = value as part of your search terms. (Example: "LOG_ID=12312")&lt;/P&gt;

&lt;P&gt;If you are interested in displaying only certain fields in a table format, then piping into a table command and listing the fields you want is enough.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2013 19:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-with-a-regular-expression/m-p/108677#M28317</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2013-07-29T19:05:23Z</dc:date>
    </item>
  </channel>
</rss>

