<?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 Separating the string in the field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Separating-the-string-in-the-field/m-p/392339#M190803</link>
    <description>&lt;P&gt;I have various search string under the field name entity:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        Entity
 1   ABC:BOOT2NDSUNQTR_MAINT4_sfsdfdsfsdf
 2   FSD:BOOT2NDSUNMONTH_MAINT3_erewrewre
 3    AFE:BOOTALLSUNMONTH_MAINT1_SecProd_DEV_sdfsdfdsf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and so on..&lt;BR /&gt;
  I want field such as  BOOT2NDSUNQTR,BOOT2NDSUNMONTH_MAINT3 to be separated out and put it into a different field called    jobname.Can you please help me in writing the regex for the same&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2019 20:05:44 GMT</pubDate>
    <dc:creator>mayank101</dc:creator>
    <dc:date>2019-07-18T20:05:44Z</dc:date>
    <item>
      <title>Separating the string in the field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Separating-the-string-in-the-field/m-p/392339#M190803</link>
      <description>&lt;P&gt;I have various search string under the field name entity:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        Entity
 1   ABC:BOOT2NDSUNQTR_MAINT4_sfsdfdsfsdf
 2   FSD:BOOT2NDSUNMONTH_MAINT3_erewrewre
 3    AFE:BOOTALLSUNMONTH_MAINT1_SecProd_DEV_sdfsdfdsf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and so on..&lt;BR /&gt;
  I want field such as  BOOT2NDSUNQTR,BOOT2NDSUNMONTH_MAINT3 to be separated out and put it into a different field called    jobname.Can you please help me in writing the regex for the same&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 20:05:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Separating-the-string-in-the-field/m-p/392339#M190803</guid>
      <dc:creator>mayank101</dc:creator>
      <dc:date>2019-07-18T20:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Separating the string in the field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Separating-the-string-in-the-field/m-p/392340#M190804</link>
      <description>&lt;P&gt;@mayank101 See example below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults |eval Entity=" ABC:BOOT2NDSUNQTR_MAINT4_sfsdfdsfsdf"| rex field=Entity "(?&amp;lt;jobname&amp;gt;\S+_\S+)_"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jul 2019 20:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Separating-the-string-in-the-field/m-p/392340#M190804</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-07-18T20:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Separating the string in the field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Separating-the-string-in-the-field/m-p/392341#M190805</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval test="ABC:BOOT2NDSUNQTR_MAINT4_sfsdfdsfsdf,FSD:BOOT2NDSUNMONTH_MAINT3_erewrewre,AFE:BOOTALLSUNMONTH_MAINT1_SecProd_DEV_sdfsdfdsf" 
| makemv test delim="," 
| mvexpand test 
| rex field=test "\:(?P&amp;lt;test&amp;gt;[\S]+)" 
| eval result=split(test,"_") 
| eval jobName =mvindex(result,0)."_".mvindex(result,1) 
| table jobName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jul 2019 21:17:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Separating-the-string-in-the-field/m-p/392341#M190805</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-18T21:17:12Z</dc:date>
    </item>
  </channel>
</rss>

