<?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: Remove punctuation from multivalue field  and put value in own event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Removing-punctuation-from-multivalue-field-and-put-value-in-own/m-p/636393#M221015</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/253260"&gt;@atebysandwich&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a run anywhere example that will meet your needs&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval IPs="['10.1.1.1', '10.2.2.2']"
  ``` above just creates dummy value ```
| rex field=IPs mode=sed "s/[\[\]']//g"   ``` strip unwanted characters to normalise the field ```
| eval IP=split(IPs, ", ")   ``` make the field a mutlivalue field ```
| mvexpand IP    ``` expand each value to an event ```&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yeahnah_0-1680034293693.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24591i66EDAFF4E2E6791E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yeahnah_0-1680034293693.png" alt="yeahnah_0-1680034293693.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2023 20:11:45 GMT</pubDate>
    <dc:creator>yeahnah</dc:creator>
    <dc:date>2023-03-28T20:11:45Z</dc:date>
    <item>
      <title>Removing punctuation from multivalue field  and put value in own event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-punctuation-from-multivalue-field-and-put-value-in-own/m-p/636389#M221014</link>
      <description>&lt;P&gt;I'm pretty sure the answer to my question is regex but I'm not too savy with it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have a few values in an IP field formatted like the below example. How can I remove the [] , and ' and get each IP in its own event?&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="147"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="147"&gt;['10.1.1.1', '10.2.2.2']&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 28 Mar 2023 22:24:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-punctuation-from-multivalue-field-and-put-value-in-own/m-p/636389#M221014</guid>
      <dc:creator>atebysandwich</dc:creator>
      <dc:date>2023-03-28T22:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Remove punctuation from multivalue field  and put value in own event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-punctuation-from-multivalue-field-and-put-value-in-own/m-p/636393#M221015</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/253260"&gt;@atebysandwich&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a run anywhere example that will meet your needs&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval IPs="['10.1.1.1', '10.2.2.2']"
  ``` above just creates dummy value ```
| rex field=IPs mode=sed "s/[\[\]']//g"   ``` strip unwanted characters to normalise the field ```
| eval IP=split(IPs, ", ")   ``` make the field a mutlivalue field ```
| mvexpand IP    ``` expand each value to an event ```&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yeahnah_0-1680034293693.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24591i66EDAFF4E2E6791E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yeahnah_0-1680034293693.png" alt="yeahnah_0-1680034293693.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 20:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-punctuation-from-multivalue-field-and-put-value-in-own/m-p/636393#M221015</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-03-28T20:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove punctuation from multivalue field  and put value in own event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-punctuation-from-multivalue-field-and-put-value-in-own/m-p/636394#M221016</link>
      <description>&lt;P&gt;It can be done without regex.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval data="['10.1.1.1','10.2.2.2']"
``` Above defines test data.  Delete IRL ```
``` Break the IP addresses apart ```
| eval data=split(data,",") 
``` Put each IP address in its own event ```
| mvexpand data
``` Trim out excess chars ```
| eval data=trim(trim(data,"[]"), "'")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Mar 2023 20:17:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-punctuation-from-multivalue-field-and-put-value-in-own/m-p/636394#M221016</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-03-28T20:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Remove punctuation from multivalue field  and put value in own event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-punctuation-from-multivalue-field-and-put-value-in-own/m-p/636397#M221017</link>
      <description>&lt;P&gt;While using your suggestion, the "dummy" data in line two of your suggestion made each event have the same two IPS while the lookup had over 7k. However, I was able to us eth regex and other example of regex to remove the spaces and achieve what I wanted.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=IP mode=sed "s/[\[\]']//g"
| makemv IP delim="," 
| rex field=IP mode=sed "s/(^\s+)|(\s+$)//g"
| mvexpand IP&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Mar 2023 20:37:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-punctuation-from-multivalue-field-and-put-value-in-own/m-p/636397#M221017</guid>
      <dc:creator>atebysandwich</dc:creator>
      <dc:date>2023-03-28T20:37:02Z</dc:date>
    </item>
  </channel>
</rss>

