<?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 can I include a wildcard character in eval command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300652#M90526</link>
    <description>&lt;P&gt;"I make mistakes at least once a day, just to keep in practice"&lt;/P&gt;

&lt;P&gt;Ha ha!&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2017 16:11:33 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2017-08-25T16:11:33Z</dc:date>
    <item>
      <title>How can I include a wildcard character in eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300648#M90522</link>
      <description>&lt;P&gt;I have the following search:&lt;/P&gt;

&lt;P&gt;eval "tt"=case(transporttype="sip","Sip",................)&lt;/P&gt;

&lt;P&gt;I can't figure out how do i include wildcard character behind and infront of sip. I have the following information in my data:&lt;BR /&gt;
video sip&lt;BR /&gt;
video_sip&lt;BR /&gt;
sip_audio&lt;/P&gt;

&lt;P&gt;I just want to count everything that has the word "sip" in there. How could i do this is eval command?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:30:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300648#M90522</guid>
      <dc:creator>tamduong16</dc:creator>
      <dc:date>2020-09-29T15:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include a wildcard character in eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300649#M90523</link>
      <description>&lt;P&gt;You are looking for the &lt;CODE&gt;match()&lt;/CODE&gt; function or the &lt;CODE&gt;like()&lt;/CODE&gt; function.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/ConditionalFunctions"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/ConditionalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;match()&lt;/CODE&gt; uses regular expressions, &lt;CODE&gt;like()&lt;/CODE&gt; uses a SQL-like syntax&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval "tt"=case(match(transporttype,"(?i)sip"),"Sip",        ................)
| eval "tt"=case(like(transporttype,"%sip%"),"Sip",        ................)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;updated to close both function parens as per @jkat54's suggestion, and make match expression case-insensitive and unanchored as per @woodcock's suggestion.&lt;/P&gt;

&lt;P&gt;I make mistakes at least once a day, just to keep in practice.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 21:33:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300649#M90523</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-24T21:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include a wildcard character in eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300650#M90524</link>
      <description>&lt;P&gt;Close those match perenthisis @daljeanis&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 22:56:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300650#M90524</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-24T22:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include a wildcard character in eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300651#M90525</link>
      <description>&lt;P&gt;Splunk RegEx is always unanchored by default so this is better (and case insensitive):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval tt=case(match(transporttype, "(?i)sip"), "Sip", ........, true(), "OOPS!")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Aug 2017 02:05:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300651#M90525</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-25T02:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include a wildcard character in eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300652#M90526</link>
      <description>&lt;P&gt;"I make mistakes at least once a day, just to keep in practice"&lt;/P&gt;

&lt;P&gt;Ha ha!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 16:11:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300652#M90526</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-25T16:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include a wildcard character in eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300653#M90527</link>
      <description>&lt;P&gt;Some people think that I am really clever but actually I am EXTENSIVELY Ex-dumb.  They look the same from the outside, if you ignore the scars.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 17:32:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300653#M90527</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-25T17:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include a wildcard character in eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300654#M90528</link>
      <description>&lt;P&gt;@woodcock- yes, experience is a wonderful thing, isn't it?  It enables you to quickly recognize a mistake when you make it again.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 22:22:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-include-a-wildcard-character-in-eval-command/m-p/300654#M90528</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-25T22:22:52Z</dc:date>
    </item>
  </channel>
</rss>

