<?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 ignore case and remove characters? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460971#M130044</link>
    <description>&lt;P&gt;Once I figured out the single quote issue above your solution worked great! Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 22 Oct 2019 21:00:16 GMT</pubDate>
    <dc:creator>rmhughes</dc:creator>
    <dc:date>2019-10-22T21:00:16Z</dc:date>
    <item>
      <title>How to ignore case and remove characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460967#M130040</link>
      <description>&lt;P&gt;I occasionally use Splunk as part of my job to research issues, but am very much a novice. The query below charts the stored procedures and maps their average run times (and it works).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=X sourcetype IN Y source IN Z
| spath "TotalDuration"              
| search "TotalDuration"="*" 
| chart avg(TotalDuration) as average over ProcName
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The issue I'm running into is that the procs may be called with slight variations, such as:&lt;BR /&gt;
sp_DoAThing&lt;BR /&gt;
sp_doathing&lt;BR /&gt;
[sp_doathing]&lt;/P&gt;

&lt;P&gt;What I'd like to do is ignore case and remove brackets, so that all three of the examples above return as one proc with one average duration, instead of three. It says I don't have enough karma points to post links so I can't share the similar questions I've read through, but the answers I've seen (for ignoring case) seem as simple as,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval ProcName = lower(ProcName)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I have tried that in many locations and many variations and cannot get it to work. Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:37:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460967#M130040</guid>
      <dc:creator>rmhughes</dc:creator>
      <dc:date>2020-09-30T02:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore case and remove characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460968#M130041</link>
      <description>&lt;P&gt;You're on the right track with &lt;CODE&gt;lower&lt;/CODE&gt; to normalize case.  I'm interested in what you get when you try it.&lt;BR /&gt;
Removing brackets is done with the &lt;CODE&gt;trim&lt;/CODE&gt; function.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=X sourcetype IN Y source IN Z
 | spath "TotalDuration"              
 | search "TotalDuration"="*" 
 | eval ProcName=trim(lower(ProcName),"[]")
 | chart avg(TotalDuration) as average over ProcName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Oct 2019 23:58:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460968#M130041</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-15T23:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore case and remove characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460969#M130042</link>
      <description>&lt;P&gt;For some reason this doesn't work for me:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval ProcName = lower(ProcName)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It tells me no results are found. I simplified the Proc Name field for the purposes of asking the question. The actual field name is more like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval A.B.C = lower(A.B.C)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is it possible the periods are messing with it?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 20:51:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460969#M130042</guid>
      <dc:creator>rmhughes</dc:creator>
      <dc:date>2019-10-22T20:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore case and remove characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460970#M130043</link>
      <description>&lt;P&gt;Yup... that was it. I needed to put single quotes around it.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 20:56:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460970#M130043</guid>
      <dc:creator>rmhughes</dc:creator>
      <dc:date>2019-10-22T20:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore case and remove characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460971#M130044</link>
      <description>&lt;P&gt;Once I figured out the single quote issue above your solution worked great! Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 21:00:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-case-and-remove-characters/m-p/460971#M130044</guid>
      <dc:creator>rmhughes</dc:creator>
      <dc:date>2019-10-22T21:00:16Z</dc:date>
    </item>
  </channel>
</rss>

