<?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 to delete unwanted special characters in alphanumeric string? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500496#M139329</link>
    <description>&lt;P&gt;Greetings @ravimmm,&lt;/P&gt;

&lt;P&gt;This is the laziest way I can think to do it. I'm sure there's a slightly better way.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval test = "123asdsd-123j;123gasds-1234iujh"
| rex field=test max_match=0 "(?&amp;lt;test&amp;gt;\w+)"
| eval test = mvjoin (test, "")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If that doesn't work perfectly for you, you can change &lt;CODE&gt;\w&lt;/CODE&gt; to be whatever characters you don't want, e.g. &lt;CODE&gt;[^-;_]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Jacob&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2019 14:48:02 GMT</pubDate>
    <dc:creator>jacobpevans</dc:creator>
    <dc:date>2019-10-10T14:48:02Z</dc:date>
    <item>
      <title>How to delete unwanted special characters in alphanumeric string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500495#M139328</link>
      <description>&lt;P&gt;I have a string as below, I need to delete the below special character and make the below as a single value.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;123asdsd-123j;123gasds-1234iujh  , with this create a new field value as 123asdsd123j123gasds1234iujh ( no special characters)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
RK&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 14:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500495#M139328</guid>
      <dc:creator>ravimmm</dc:creator>
      <dc:date>2019-10-10T14:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete unwanted special characters in alphanumeric string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500496#M139329</link>
      <description>&lt;P&gt;Greetings @ravimmm,&lt;/P&gt;

&lt;P&gt;This is the laziest way I can think to do it. I'm sure there's a slightly better way.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval test = "123asdsd-123j;123gasds-1234iujh"
| rex field=test max_match=0 "(?&amp;lt;test&amp;gt;\w+)"
| eval test = mvjoin (test, "")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If that doesn't work perfectly for you, you can change &lt;CODE&gt;\w&lt;/CODE&gt; to be whatever characters you don't want, e.g. &lt;CODE&gt;[^-;_]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Jacob&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 14:48:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500496#M139329</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-10-10T14:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete unwanted special characters in alphanumeric string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500497#M139330</link>
      <description>&lt;P&gt;Thank you that works , I was looking to regex using [^-;] the whole string without using MAX_MATCH .&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 14:58:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500497#M139330</guid>
      <dc:creator>ravimmm</dc:creator>
      <dc:date>2019-10-10T14:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete unwanted special characters in alphanumeric string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500498#M139331</link>
      <description>&lt;P&gt;The simplest route I know is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval field=replace(field,"[^[:word:]]","")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will replace all non-word characters (ie &lt;CODE&gt;[0-9a-zA-Z]&lt;/CODE&gt;) with blank (&lt;CODE&gt;""&lt;/CODE&gt;)&lt;/P&gt;

&lt;P&gt;Or:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval field=replace(field,"\W","")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;\W&lt;/CODE&gt; is any non-word character, too&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 15:21:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500498#M139331</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2019-10-10T15:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete unwanted special characters in alphanumeric string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500499#M139332</link>
      <description>&lt;P&gt;There is an easier way &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answering/776189/view.html"&gt;https://answers.splunk.com/answering/776189/view.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 15:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500499#M139332</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2019-10-10T15:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete unwanted special characters in alphanumeric string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500500#M139333</link>
      <description>&lt;P&gt;Definitely simpler!&lt;/P&gt;

&lt;P&gt;Also, I didn't know about &lt;CODE&gt;/W&lt;/CODE&gt; somehow! Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 19:24:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500500#M139333</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-10-10T19:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete unwanted special characters in alphanumeric string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500501#M139334</link>
      <description>&lt;P&gt;you're welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 13:03:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-unwanted-special-characters-in-alphanumeric-string/m-p/500501#M139334</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2019-10-11T13:03:22Z</dc:date>
    </item>
  </channel>
</rss>

