<?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: Having Trouble With CASE in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48835#M11674</link>
    <description>&lt;P&gt;HURA you are brilliant thanks&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jan 2012 21:00:47 GMT</pubDate>
    <dc:creator>hartfoml</dc:creator>
    <dc:date>2012-01-11T21:00:47Z</dc:date>
    <item>
      <title>Having Trouble With CASE</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48833#M11672</link>
      <description>&lt;P&gt;Here is what I am using:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval siteName = case (Destination_IP == "199.47.*", dropbox.com)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried everything and it is not working.  Do you think it is because of the numbers "199.47.*"?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2012 19:42:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48833#M11672</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2012-01-11T19:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble With CASE</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48834#M11673</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| eval siteName = case(match(Destination_IP, "^199\.47\..*$"), "dropbox.com")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jan 2012 20:47:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48834#M11673</guid>
      <dc:creator>imrago</dc:creator>
      <dc:date>2012-01-11T20:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble With CASE</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48835#M11674</link>
      <description>&lt;P&gt;HURA you are brilliant thanks&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2012 21:00:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48835#M11674</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2012-01-11T21:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble With CASE</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48836#M11675</link>
      <description>&lt;P&gt;Opps the match doesn't seem to work in case&lt;BR /&gt;
'| eval siteName = case(match(Destination_IP, "^199.47..&lt;EM&gt;$"), "dropbox.com",match(Destination_IP, "^85.17.30.&lt;/EM&gt;$"), "megadownload.net",match(Destination_IP, "^195.122.131.*$"), "rapidshare.com")'&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:18:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48836#M11675</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2020-09-28T10:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble With CASE</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48837#M11676</link>
      <description>&lt;P&gt;the second argument of match function is a regex and "^199.47..$" in you example is not equal with "^199.47..*$"  as I had suggested&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/"&gt;http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2012 21:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48837#M11676</guid>
      <dc:creator>imrago</dc:creator>
      <dc:date>2012-01-11T21:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble With CASE</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48838#M11677</link>
      <description>&lt;P&gt;OK I think I understand well not relay&lt;/P&gt;

&lt;P&gt;So if I want to use case to get a variable named siteName and I have three possible sites identified by three possible IP’s I would normally use this&lt;/P&gt;

&lt;P&gt;'| eval siteName = case (Destination_IP == "199.47.&lt;EM&gt;”, dropbox.com, Destination_IP ==  “85.17.30.&lt;/EM&gt;", megadownload.net, Destination_IP == "195.122.131.*", rapidshare.com)'&lt;/P&gt;

&lt;P&gt;But this isn’t working and the multiple matches are not working.  Do you have any other suggestions for CASE&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:18:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48838#M11677</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2020-09-28T10:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble With CASE</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48839#M11678</link>
      <description>&lt;P&gt;I see now, / characters where removed&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2012 23:19:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48839#M11678</guid>
      <dc:creator>imrago</dc:creator>
      <dc:date>2012-01-11T23:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble With CASE</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48840#M11679</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| eval siteName = case(match(Destination_IP,"^199\.47\..*”), "dropbox.com", match(Destination_IP,“^85\.17\.30\..*"), "megadownload.net", match(Destination_IP,"^195\.122\.131\..*"), "rapidshare.com")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jan 2012 23:21:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48840#M11679</guid>
      <dc:creator>imrago</dc:creator>
      <dc:date>2012-01-11T23:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble With CASE</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48841#M11680</link>
      <description>&lt;P&gt;This is the real answer.  thanks this fixed the issue.  you are a regex guru.  thanks again&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2012 22:18:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Having-Trouble-With-CASE/m-p/48841#M11680</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2012-01-12T22:18:13Z</dc:date>
    </item>
  </channel>
</rss>

