<?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 you take a value out of a field and make a new field with it? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410296#M167235</link>
    <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
    <pubDate>Fri, 05 Oct 2018 21:07:51 GMT</pubDate>
    <dc:creator>aatha89</dc:creator>
    <dc:date>2018-10-05T21:07:51Z</dc:date>
    <item>
      <title>How do you take a value out of a field and make a new field with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410288#M167227</link>
      <description>&lt;P&gt;How do i take out the port number (portnr) from the args field and make it to a field called "port" by a search?  Can the answer here be to use &lt;CODE&gt;eval&lt;/CODE&gt; and &lt;CODE&gt;rex&lt;/CODE&gt; ?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:37:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410288#M167227</guid>
      <dc:creator>aatha89</dc:creator>
      <dc:date>2018-10-05T20:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you take a value out of a field and make a new field with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410289#M167228</link>
      <description>&lt;P&gt;try&lt;BR /&gt;
&lt;CODE&gt;YOUR_SEARCH | rename portnr as port&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:40:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410289#M167228</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-10-05T20:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do you take a value out of a field and make a new field with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410290#M167229</link>
      <description>&lt;P&gt;My logline her is:&lt;BR /&gt;
_time                         command   Args&lt;BR /&gt;
24.05.1998 17:54            splunkA       A_4040_restart&lt;/P&gt;

&lt;P&gt;4040 is the portnr. I just want to take out portnr and put it a new field called port&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:30:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410290#M167229</guid>
      <dc:creator>aatha89</dc:creator>
      <dc:date>2020-09-29T21:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do you take a value out of a field and make a new field with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410291#M167230</link>
      <description>&lt;P&gt;Yes , you can use this rex command to get port-  &lt;CODE&gt;rex field=Args "_(?&amp;lt;port&amp;gt;\d{4})_"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:42:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410291#M167230</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2018-10-05T20:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you take a value out of a field and make a new field with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410292#M167231</link>
      <description>&lt;P&gt;Thanks for your reply! But my full question was:&lt;/P&gt;

&lt;P&gt;My logline her is:&lt;BR /&gt;
_time                     command           Args // fields&lt;BR /&gt;
24.05.1998 17:54 splunkA             A_4040_restart //Values&lt;/P&gt;

&lt;P&gt;4040 is the portnr. I just want to take out portnr and put it a new field called port&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:30:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410292#M167231</guid>
      <dc:creator>aatha89</dc:creator>
      <dc:date>2020-09-29T21:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you take a value out of a field and make a new field with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410293#M167232</link>
      <description>&lt;P&gt;Thanks :). Do you think i will need to use eval here? or will it just be fine to use rex ?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:45:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410293#M167232</guid>
      <dc:creator>aatha89</dc:creator>
      <dc:date>2018-10-05T20:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you take a value out of a field and make a new field with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410294#M167233</link>
      <description>&lt;P&gt;rex will be fine, no need for eval if you just want to get port number in port field.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:48:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410294#M167233</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2018-10-05T20:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do you take a value out of a field and make a new field with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410295#M167234</link>
      <description>&lt;P&gt;try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH  | rex field=args "_(?&amp;lt;port&amp;gt;.*)_"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval args="A_4040_restart" | rex field=args "_(?&amp;lt;port&amp;gt;.*)_"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:49:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410295#M167234</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-10-05T20:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do you take a value out of a field and make a new field with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410296#M167235</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 21:07:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-take-a-value-out-of-a-field-and-make-a-new-field-with/m-p/410296#M167235</guid>
      <dc:creator>aatha89</dc:creator>
      <dc:date>2018-10-05T21:07:51Z</dc:date>
    </item>
  </channel>
</rss>

