<?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: How do I extract a field from my raw data using rex command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288947#M87473</link>
    <description>&lt;P&gt;Is your raw data in JSON format (hard to tell from the snippet). If it is, Splunk will do the field extraction for you.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Aug 2017 17:14:02 GMT</pubDate>
    <dc:creator>s2_splunk</dc:creator>
    <dc:date>2017-08-24T17:14:02Z</dc:date>
    <item>
      <title>How do I extract a field from my raw data using rex command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288944#M87470</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can someone able to help me please.&lt;/P&gt;

&lt;P&gt;I'm very new to using Splunk and most certainly to the rex command and regular expressions, so please bear with.&lt;/P&gt;

&lt;P&gt;I'm trying to extract an accountId field from my raw data which is in the following format  { "accountId":"C12345678" }&lt;/P&gt;

&lt;P&gt;Could someone possibly tell me please how I may strip the actual accountId number out of this line.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Tanvi&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 10:21:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288944#M87470</guid>
      <dc:creator>tanvi1g</dc:creator>
      <dc:date>2017-08-24T10:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a field from my raw data using rex command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288945#M87471</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "accountId\":\"(?&amp;lt;accountId&amp;gt;[\w]+)" | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Aug 2017 13:36:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288945#M87471</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-08-24T13:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a field from my raw data using rex command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288946#M87472</link>
      <description>&lt;P&gt;I would have done it slightly differently (in case there were non-&lt;CODE&gt;\w&lt;/CODE&gt; characters in the accountId):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "accountId\":\"(?&amp;lt;accountId&amp;gt;[^\"]+)" | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:10:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288946#M87472</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-08-24T15:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a field from my raw data using rex command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288947#M87473</link>
      <description>&lt;P&gt;Is your raw data in JSON format (hard to tell from the snippet). If it is, Splunk will do the field extraction for you.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 17:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288947#M87473</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-08-24T17:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a field from my raw data using rex command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288948#M87474</link>
      <description>&lt;P&gt;No, it's apache log&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 08:19:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288948#M87474</guid>
      <dc:creator>tanvi1g</dc:creator>
      <dc:date>2017-08-28T08:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a field from my raw data using rex command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288949#M87475</link>
      <description>&lt;P&gt;Thanks. I will try this.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 08:20:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-field-from-my-raw-data-using-rex-command/m-p/288949#M87475</guid>
      <dc:creator>tanvi1g</dc:creator>
      <dc:date>2017-08-28T08:20:03Z</dc:date>
    </item>
  </channel>
</rss>

