<?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 to use rex command to extract this field from my sample log? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187045#M53899</link>
    <description>&lt;P&gt;Thank You MuS!!&lt;/P&gt;</description>
    <pubDate>Wed, 26 Aug 2015 23:21:02 GMT</pubDate>
    <dc:creator>Abilan1</dc:creator>
    <dc:date>2015-08-26T23:21:02Z</dc:date>
    <item>
      <title>How to use rex command to extract this field from my sample log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187042#M53896</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;COSE#1017 Associated kernel not found. Please see Enterprise Server log for details:   SocID:19041 PID:13695 BSFN:&lt;STRONG&gt;CustomShipConfirmWrapper&lt;/STRONG&gt; user:AIAINBND&lt;/P&gt;

&lt;P&gt;I want to create that highlighted term as a new event field. It may vary in length in following events. Could anyone help me?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2015 22:53:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187042#M53896</guid>
      <dc:creator>Abilan1</dc:creator>
      <dc:date>2015-08-26T22:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use rex command to extract this field from my sample log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187043#M53897</link>
      <description>&lt;P&gt;Hi Abilan1,&lt;/P&gt;

&lt;P&gt;try something like this, which is based on your provided example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search here | rex "\sBSFN:(?&amp;lt;myField&amp;gt;[^\s]*)" | table myField
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2015 23:10:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187043#M53897</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-08-26T23:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to use rex command to extract this field from my sample log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187044#M53898</link>
      <description>&lt;P&gt;If BSFN is a constant, which it appears to be, something as simple as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | rex "BSFN:(?&amp;lt;GiveMeAName&amp;gt;\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That says &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;BSFN:&lt;/CODE&gt; Match the string "BSFN:" (including the colon)&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;(?&lt;/CODE&gt; Then extract a field named "GiveMeAName" &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;\w+&lt;/CODE&gt; Which consists of one or more "word" type characters (letters)&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;)&lt;/CODE&gt; And finally close off this extraction.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2015 23:16:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187044#M53898</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2015-08-26T23:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use rex command to extract this field from my sample log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187045#M53899</link>
      <description>&lt;P&gt;Thank You MuS!!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2015 23:21:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187045#M53899</guid>
      <dc:creator>Abilan1</dc:creator>
      <dc:date>2015-08-26T23:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use rex command to extract this field from my sample log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187046#M53900</link>
      <description>&lt;P&gt;Thank You rich!!! it worked&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2015 23:21:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-command-to-extract-this-field-from-my-sample-log/m-p/187046#M53900</guid>
      <dc:creator>Abilan1</dc:creator>
      <dc:date>2015-08-26T23:21:55Z</dc:date>
    </item>
  </channel>
</rss>

