<?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 non alphanumeric in the datamodel in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Remove-non-alphanumeric-in-the-datamodel/m-p/325950#M97179</link>
    <description>&lt;P&gt;Maybe try an eval based field with replace()&lt;/P&gt;

&lt;P&gt;I checked it using:&lt;BR /&gt;
| makeresults | head 1| eval _raw="field = 1;like&amp;amp;" | eval testfield=replace(_raw, "[^0-9&amp;amp;',-.\\/a-z\n]", "")&lt;/P&gt;

&lt;P&gt;testfield comes out as: "field1like&amp;amp;"&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 18:06:21 GMT</pubDate>
    <dc:creator>mhoogcarspel_sp</dc:creator>
    <dc:date>2020-09-29T18:06:21Z</dc:date>
    <item>
      <title>Remove non alphanumeric in the datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-non-alphanumeric-in-the-datamodel/m-p/325949#M97178</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have datamodel data like below.&lt;BR /&gt;
I have tried to remove all non alphanumeric. So i can put it on a new field in a datamodel "Add Fields with a Regular Expression" in the datamodel, but i just cant seem to crack it.&lt;BR /&gt;
I think i need to use a function of some sort as perhaps it is not easy done in REGEX.&lt;/P&gt;

&lt;P&gt;I would like to keep the underscores, or replace all the new characters with an underscore is also fine.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^(?P&amp;lt;source_path&amp;gt;/[^0-9!&amp;amp;',-.\\/a-z\n]/)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;What i have&lt;/STRONG&gt;&lt;BR /&gt;
peter hi&lt;BR /&gt;
ex&amp;amp;it&lt;BR /&gt;
field=1;like&amp;amp;&lt;BR /&gt;
name&lt;BR /&gt;
john&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;What i want&lt;/STRONG&gt;&lt;BR /&gt;
peterhi&lt;BR /&gt;
exit&lt;BR /&gt;
field1like&lt;BR /&gt;
name&lt;BR /&gt;
john&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2754iD1E7A0092C4E7F32/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
Cheers in advance&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 14:44:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-non-alphanumeric-in-the-datamodel/m-p/325949#M97178</guid>
      <dc:creator>robertlynch2020</dc:creator>
      <dc:date>2017-04-12T14:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Remove non alphanumeric in the datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-non-alphanumeric-in-the-datamodel/m-p/325950#M97179</link>
      <description>&lt;P&gt;Maybe try an eval based field with replace()&lt;/P&gt;

&lt;P&gt;I checked it using:&lt;BR /&gt;
| makeresults | head 1| eval _raw="field = 1;like&amp;amp;" | eval testfield=replace(_raw, "[^0-9&amp;amp;',-.\\/a-z\n]", "")&lt;/P&gt;

&lt;P&gt;testfield comes out as: "field1like&amp;amp;"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:06:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-non-alphanumeric-in-the-datamodel/m-p/325950#M97179</guid>
      <dc:creator>mhoogcarspel_sp</dc:creator>
      <dc:date>2020-09-29T18:06:21Z</dc:date>
    </item>
  </channel>
</rss>

