<?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 Case with multiple potential wildcard matches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Case-with-multiple-potential-wildcard-matches/m-p/556573#M158071</link>
    <description>&lt;P&gt;I have a field with error messages that I need a case statement to cleanup for reporting. In this case some of the messages contain ID's which make the report long as each error has a unique ID. I want to lean this up by using something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eval error=case(like(error, "%DB Error"), "Database error", like(error, "%network Error", "Network Error"))... Etc.&lt;/LI-CODE&gt;&lt;P&gt;I am not getting the matches that I should be getting with this though, still the full errors are showing. Is there a better way to accomplish this?&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jun 2021 19:06:48 GMT</pubDate>
    <dc:creator>aohls</dc:creator>
    <dc:date>2021-06-21T19:06:48Z</dc:date>
    <item>
      <title>Case with multiple potential wildcard matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Case-with-multiple-potential-wildcard-matches/m-p/556573#M158071</link>
      <description>&lt;P&gt;I have a field with error messages that I need a case statement to cleanup for reporting. In this case some of the messages contain ID's which make the report long as each error has a unique ID. I want to lean this up by using something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eval error=case(like(error, "%DB Error"), "Database error", like(error, "%network Error", "Network Error"))... Etc.&lt;/LI-CODE&gt;&lt;P&gt;I am not getting the matches that I should be getting with this though, still the full errors are showing. Is there a better way to accomplish this?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 19:06:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Case-with-multiple-potential-wildcard-matches/m-p/556573#M158071</guid>
      <dc:creator>aohls</dc:creator>
      <dc:date>2021-06-21T19:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Case with multiple potential wildcard matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Case-with-multiple-potential-wildcard-matches/m-p/556586#M158074</link>
      <description>&lt;P&gt;You could try using match something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eval error=case(match(error, "DB Error"), "Database error", match(error, "network Error"), "Network Error")... Etc.&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Jun 2021 21:15:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Case-with-multiple-potential-wildcard-matches/m-p/556586#M158074</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-21T21:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Case with multiple potential wildcard matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Case-with-multiple-potential-wildcard-matches/m-p/556689#M158104</link>
      <description>&lt;P&gt;I should add that there are two fields I need to try to use. There is a error code and error description and the description has an id in it, so it could be "Database Error: 1234" and another is "Database Code: 3214". I want to combine these to just be "Database Error".&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 13:26:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Case-with-multiple-potential-wildcard-matches/m-p/556689#M158104</guid>
      <dc:creator>aohls</dc:creator>
      <dc:date>2021-06-22T13:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Case with multiple potential wildcard matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Case-with-multiple-potential-wildcard-matches/m-p/556696#M158106</link>
      <description>&lt;P&gt;Since match uses regex, you can combine them so long as you can define a regex expression.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="message Database Error: 1234
other message Database Code: 3214"
| multikv noheader=t
| eval error=case(match(_raw,"Database (Error|Code): \d+"),"Database Error",1==1,"Other Error")
| table _raw error&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 22 Jun 2021 13:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Case-with-multiple-potential-wildcard-matches/m-p/556696#M158106</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-22T13:43:32Z</dc:date>
    </item>
  </channel>
</rss>

