<?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 use regex to remove duplicate characters? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-use-regex-to-remove-duplicate-characters/m-p/383712#M112063</link>
    <description>&lt;P&gt;YES! Thank you so much!&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2019 15:11:51 GMT</pubDate>
    <dc:creator>mistydennis</dc:creator>
    <dc:date>2019-03-29T15:11:51Z</dc:date>
    <item>
      <title>How do you use regex to remove duplicate characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-use-regex-to-remove-duplicate-characters/m-p/383710#M112061</link>
      <description>&lt;P&gt;I have a report that requires several fields to be concatenated, each separated by a semicolon. Because some of the fields are null, the values look like this:&lt;/P&gt;

&lt;P&gt;cat; dog; ; ; ; snake; bird; ; hamster; ; ;&lt;/P&gt;

&lt;P&gt;I want the field to look like this:&lt;/P&gt;

&lt;P&gt;cat; dog; snake; bird; hamster&lt;/P&gt;

&lt;P&gt;Is there a way to use regex to remove the duplicate semicolons? I'd also like to make sure the field does not end with a semicolon.&lt;/P&gt;

&lt;P&gt;Open to other ideas if regex is not the best solution.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 20:52:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-use-regex-to-remove-duplicate-characters/m-p/383710#M112061</guid>
      <dc:creator>mistydennis</dc:creator>
      <dc:date>2019-03-28T20:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use regex to remove duplicate characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-use-regex-to-remove-duplicate-characters/m-p/383711#M112062</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 msg="cat; dog; ; ; ; snake; bird; ; hamster; ; ;" 
| makemv delim=";" msg 
| eval msg= ltrim(msg) 
| eval msg=mvjoin(mvfilter(msg!=""),";")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Mar 2019 21:49:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-use-regex-to-remove-duplicate-characters/m-p/383711#M112062</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-03-28T21:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use regex to remove duplicate characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-use-regex-to-remove-duplicate-characters/m-p/383712#M112063</link>
      <description>&lt;P&gt;YES! Thank you so much!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:11:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-use-regex-to-remove-duplicate-characters/m-p/383712#M112063</guid>
      <dc:creator>mistydennis</dc:creator>
      <dc:date>2019-03-29T15:11:51Z</dc:date>
    </item>
  </channel>
</rss>

