<?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 How to extract one field combining different substrings of another field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-field-combining-different-substrings-of/m-p/172698#M49506</link>
    <description>&lt;P&gt;I have a pattern in my raw field " ..... SPLIT: 11111:22222 ........." which says master id was split to &lt;EM&gt;id1:id2&lt;/EM&gt;. But the master id i need is &lt;EM&gt;id1&lt;/EM&gt;&lt;EM&gt;id2&lt;/EM&gt;. Is there a way to do this. I used rex and managed to get &lt;EM&gt;id1:id2&lt;/EM&gt;, but couldn't take off the colon. I see extracting to 2 fields and doing 'eval' with '+' is an option, but that looks messy&lt;/P&gt;

&lt;P&gt;So far, I have |rex "SPLIT: (?\d+:\d+)" ) |&lt;BR /&gt;
This gives me masterID=11111:22222. But I need masterID=1111122222&lt;/P&gt;</description>
    <pubDate>Fri, 17 Oct 2014 22:53:05 GMT</pubDate>
    <dc:creator>bharathreddyp</dc:creator>
    <dc:date>2014-10-17T22:53:05Z</dc:date>
    <item>
      <title>How to extract one field combining different substrings of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-field-combining-different-substrings-of/m-p/172698#M49506</link>
      <description>&lt;P&gt;I have a pattern in my raw field " ..... SPLIT: 11111:22222 ........." which says master id was split to &lt;EM&gt;id1:id2&lt;/EM&gt;. But the master id i need is &lt;EM&gt;id1&lt;/EM&gt;&lt;EM&gt;id2&lt;/EM&gt;. Is there a way to do this. I used rex and managed to get &lt;EM&gt;id1:id2&lt;/EM&gt;, but couldn't take off the colon. I see extracting to 2 fields and doing 'eval' with '+' is an option, but that looks messy&lt;/P&gt;

&lt;P&gt;So far, I have |rex "SPLIT: (?\d+:\d+)" ) |&lt;BR /&gt;
This gives me masterID=11111:22222. But I need masterID=1111122222&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2014 22:53:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-field-combining-different-substrings-of/m-p/172698#M49506</guid>
      <dc:creator>bharathreddyp</dc:creator>
      <dc:date>2014-10-17T22:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract one field combining different substrings of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-field-combining-different-substrings-of/m-p/172699#M49507</link>
      <description>&lt;P&gt;One option is to set up an &lt;CODE&gt;SEDCMD&lt;/CODE&gt; setting in props.conf that removes the colon from your events during index time. That'll work very well and will be simple to work with at search time, but remember that it does alter what is written to your index and that this cannot be done retroactively.&lt;/P&gt;

&lt;P&gt;A purely search-time option is to extract both sections of the id into two fields and to define a calculated field that appends the two together, or to extract the whole id into one field and to define a calculated field that removes the colon.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2014 23:50:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-field-combining-different-substrings-of/m-p/172699#M49507</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-17T23:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract one field combining different substrings of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-field-combining-different-substrings-of/m-p/172700#M49508</link>
      <description>&lt;P&gt;Another way to use SED would be to pipe to the rex command again.&lt;BR /&gt;&lt;BR /&gt;
| rex field=MasterID mode=sed "s/://g"&lt;/P&gt;</description>
      <pubDate>Sat, 18 Oct 2014 02:09:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-field-combining-different-substrings-of/m-p/172700#M49508</guid>
      <dc:creator>sjaworski</dc:creator>
      <dc:date>2014-10-18T02:09:27Z</dc:date>
    </item>
  </channel>
</rss>

