<?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: Replace space in multi-value filed with comma in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Replace-space-in-multi-value-filed-with-comma/m-p/58630#M14365</link>
    <description>&lt;P&gt;Hi jonuwz,&lt;/P&gt;

&lt;P&gt;i have field input_source_file and I need to make it a comma separated field, i followed your instruction but not able to get the result.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;data in input_source_file is&lt;/STRONG&gt; : aaaa bbbb&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;desired&lt;/STRONG&gt;: aaaa,bbbb&lt;/P&gt;

&lt;P&gt;My query is:&lt;/P&gt;

&lt;P&gt;sourcetype="mslogs" ("MPSVCCMN_10081" OR "DBG_21430") earliest="12/5/2012:16:08:00" latest="12/5/2013:16:16:00" | rex field=_raw "Mapping service is running [(?&lt;MAPPING_NAME&gt;(.+))]\sdep" | transaction source|search mapping_name=src_join_tgt_cachetuned*&lt;EM&gt;| rex mode=sed field=input_source_file "s/ /,/g" |&lt;/EM&gt;* table mapping_name,input_source_file.&lt;/MAPPING_NAME&gt;&lt;/P&gt;

&lt;P&gt;sample event:&lt;/P&gt;

&lt;P&gt;2012-12-05 20:19:17 INFO: [MPSVCCMN_10081] Mapping service is running [xxxx] deployed in [yyyy]&lt;/P&gt;

&lt;P&gt;2012-12-05 20:19:17 INFO: READER_1_1_1, DBG_21430,  Reading data from input source file [aaaa]&lt;/P&gt;

&lt;P&gt;2012-12-05 20:19:17 INFO: READER_1_2_1, DBG_21430,  Reading data from input source file [bbbb]&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:24:02 GMT</pubDate>
    <dc:creator>trkalva</dc:creator>
    <dc:date>2020-09-28T14:24:02Z</dc:date>
    <item>
      <title>Replace space in multi-value filed with comma</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replace-space-in-multi-value-filed-with-comma/m-p/58628#M14363</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;Can we replace space in multi-value filed with comma ..?&lt;/P&gt;

&lt;P&gt;Ex :&lt;/P&gt;

&lt;P&gt;field : host&lt;BR /&gt;
current Values : server1 server2 server3 &lt;/P&gt;

&lt;P&gt;Required Values : server1,server2,server3&lt;/P&gt;

&lt;P&gt;Thanks ...&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 14:26:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replace-space-in-multi-value-filed-with-comma/m-p/58628#M14363</guid>
      <dc:creator>Ravan</dc:creator>
      <dc:date>2013-03-12T14:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Replace space in multi-value filed with comma</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replace-space-in-multi-value-filed-with-comma/m-p/58629#M14364</link>
      <description>&lt;P&gt;Yep :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex mode=sed field=host "s/ /,/g" | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Mar 2013 14:54:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replace-space-in-multi-value-filed-with-comma/m-p/58629#M14364</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-03-12T14:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Replace space in multi-value filed with comma</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replace-space-in-multi-value-filed-with-comma/m-p/58630#M14365</link>
      <description>&lt;P&gt;Hi jonuwz,&lt;/P&gt;

&lt;P&gt;i have field input_source_file and I need to make it a comma separated field, i followed your instruction but not able to get the result.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;data in input_source_file is&lt;/STRONG&gt; : aaaa bbbb&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;desired&lt;/STRONG&gt;: aaaa,bbbb&lt;/P&gt;

&lt;P&gt;My query is:&lt;/P&gt;

&lt;P&gt;sourcetype="mslogs" ("MPSVCCMN_10081" OR "DBG_21430") earliest="12/5/2012:16:08:00" latest="12/5/2013:16:16:00" | rex field=_raw "Mapping service is running [(?&lt;MAPPING_NAME&gt;(.+))]\sdep" | transaction source|search mapping_name=src_join_tgt_cachetuned*&lt;EM&gt;| rex mode=sed field=input_source_file "s/ /,/g" |&lt;/EM&gt;* table mapping_name,input_source_file.&lt;/MAPPING_NAME&gt;&lt;/P&gt;

&lt;P&gt;sample event:&lt;/P&gt;

&lt;P&gt;2012-12-05 20:19:17 INFO: [MPSVCCMN_10081] Mapping service is running [xxxx] deployed in [yyyy]&lt;/P&gt;

&lt;P&gt;2012-12-05 20:19:17 INFO: READER_1_1_1, DBG_21430,  Reading data from input source file [aaaa]&lt;/P&gt;

&lt;P&gt;2012-12-05 20:19:17 INFO: READER_1_2_1, DBG_21430,  Reading data from input source file [bbbb]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:24:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replace-space-in-multi-value-filed-with-comma/m-p/58630#M14365</guid>
      <dc:creator>trkalva</dc:creator>
      <dc:date>2020-09-28T14:24:02Z</dc:date>
    </item>
  </channel>
</rss>

