<?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 override automatic key-value extraction which contain single quotes? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377750#M68340</link>
    <description>&lt;P&gt;thanks. upvoted, but preferred the above person's option as it is simpler.&lt;/P&gt;</description>
    <pubDate>Sat, 28 Jul 2018 12:10:06 GMT</pubDate>
    <dc:creator>koshyk</dc:creator>
    <dc:date>2018-07-28T12:10:06Z</dc:date>
    <item>
      <title>How to override automatic key-value extraction which contain single quotes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377746#M68336</link>
      <description>&lt;P&gt;We have got some data in below format&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2018-07-26T01:00:01 empID=12345 empName='Spider Man' department='IT'
2018-07-26T01:00:02 empID=12346 empName='Super Man' department='HR'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When splunk extracts (automatically), the fields contains  single quotes &lt;CODE&gt;'&lt;/CODE&gt; &lt;BR /&gt;
eg    &lt;CODE&gt;empName='Spider Man'&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But customer doesn't need to see the single quotes !!&lt;BR /&gt;
Any Better way to remove the automatic extraction ,so we can say  the value is &lt;CODE&gt;Spider Man&lt;/CODE&gt;  and NOT &lt;CODE&gt;'Spider Man'&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;(I understand, I can write regex to do this. But prefer if we do via props.conf or transforms.conf in simplest way possible)&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 15:15:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377746#M68336</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2018-07-27T15:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to override automatic key-value extraction which contain single quotes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377747#M68337</link>
      <description>&lt;P&gt;I don't think you need transforms for this task. &lt;BR /&gt;
you simply need to add following or similar to your props under your sourcetype:(note " ' "  in replace)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [mysourcetype]
    .....
    EVAL-empName = nullif(replace(empName,"'",""),"-")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 16:27:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377747#M68337</guid>
      <dc:creator>akocak</dc:creator>
      <dc:date>2018-07-27T16:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to override automatic key-value extraction which contain single quotes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377748#M68338</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
Try using below in tensforms.conf.&lt;/P&gt;

&lt;P&gt;[mytransform]&lt;BR /&gt;
REGEX = \s+(\w+)='(.*?)'&lt;BR /&gt;
FORMAT = $1::$2&lt;BR /&gt;
MV_ADD = true&lt;BR /&gt;
REPEAT_MATCH = true&lt;/P&gt;

&lt;P&gt;Use the correct name in props.conf(mytransform) e.g&lt;BR /&gt;
 []&lt;BR /&gt;
REPORT-fieldextr = mytransform&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:40:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377748#M68338</guid>
      <dc:creator>patilsonali1729</dc:creator>
      <dc:date>2020-09-29T20:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to override automatic key-value extraction which contain single quotes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377749#M68339</link>
      <description>&lt;P&gt;thanks mate. Prefer this as it is simple&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 12:09:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377749#M68339</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2018-07-28T12:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to override automatic key-value extraction which contain single quotes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377750#M68340</link>
      <description>&lt;P&gt;thanks. upvoted, but preferred the above person's option as it is simpler.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 12:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377750#M68340</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2018-07-28T12:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to override automatic key-value extraction which contain single quotes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377751#M68341</link>
      <description>&lt;P&gt;your welcome&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 15:48:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-automatic-key-value-extraction-which-contain/m-p/377751#M68341</guid>
      <dc:creator>akocak</dc:creator>
      <dc:date>2018-07-28T15:48:00Z</dc:date>
    </item>
  </channel>
</rss>

