<?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: Wildcards with &amp;quot;| lookup&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/578008#M201430</link>
    <description>&lt;P&gt;Assuming your lookup definition has a match type set to&amp;nbsp;WILDCARD(foo), you have to understand the wildcard in the lookup as either * for a search or % for a where command.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if your lookup table uses *, we will interpret the match that way:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;x="abc" matches&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;because &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;| where x="abc"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;| where "abc"="abc" matches the lookup&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;x="*cba*" matches&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;because&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;| where x LIKE "%abc%"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;| where "*cba*" LIKE "%cba%" matches the lookup. See how the * in the eval/where syntax are treated as characters, not wildcards&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;x="ab*" does not match&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;because&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;| where x="abc"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;| where "ab*"="abc" does not match ! * is NOT a wildcard in the eval syntax for the left argument&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;| where x LIKE "%cba%"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;| where "ab*" LIKE "%cba%" obviously does not match&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;x="dcba"does not match&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;you say, but it should match (it does on my env) because&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;| where x LIKE "%cba%"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;| where "dcba" LIKE "%cba%" matches thanks to the wildcards.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So, you can't consider the * in the data as a wildcard, but as a character.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 13:13:39 GMT</pubDate>
    <dc:creator>ldongradi_SPL</dc:creator>
    <dc:date>2021-12-10T13:13:39Z</dc:date>
    <item>
      <title>Wildcards with "| lookup"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577875#M201373</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to get wildcard lookups to work using the "lookup" function. I've followed guidance to set up the "Match Type" for the fieldin the lookup definition as per &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Knowledge/Usefieldlookupstoaddinformationtoyourevents" target="_blank" rel="noopener"&gt;Define a CSV lookup in Splunk Web - Splunk Documentation&lt;/A&gt;&amp;nbsp;(I don't have access to transforms.conf) and whatever I try,&amp;nbsp; adding WILDCARD(foo) makes no difference, as if the feature is not being applied. I've found several posts where people report success, but cannot replicate myself.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Lookup example:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="44.443548387096776%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;foo&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;bar&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;abc&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;*cba*&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;|&amp;nbsp;makeresults&lt;BR /&gt;| eval foo="x"&lt;BR /&gt;| lookup mylookup foo&lt;BR /&gt;&lt;BR /&gt;x="abc" matches&lt;BR /&gt;x="*cba*" matches&lt;BR /&gt;x="ab*" does not match&lt;BR /&gt;x="dcba" does not match&lt;/P&gt;&lt;P&gt;I'd rather not resort to inputlookup subsearches if possible as my applications are quite complex!&lt;BR /&gt;&lt;U&gt;&lt;BR /&gt;&lt;/U&gt;&lt;SPAN&gt;Splunk Verision: 8.2.2.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Many Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 11:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577875#M201373</guid>
      <dc:creator>geomore</dc:creator>
      <dc:date>2021-12-09T11:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards with "| lookup"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577956#M201393</link>
      <description>&lt;P&gt;&amp;nbsp;Are you sure you reference the lookup name i&amp;nbsp; your search, _not_ the lookup file?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 22:32:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577956#M201393</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-12-09T22:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards with "| lookup"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577985#M201413</link>
      <description>&lt;P&gt;100% sure - first thing I checked!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 08:11:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577985#M201413</guid>
      <dc:creator>geomore</dc:creator>
      <dc:date>2021-12-10T08:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards with "| lookup"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577990#M201417</link>
      <description>&lt;P&gt;And it's not named the same? Asking because that's the typical cause for wildcard match not working.&lt;/P&gt;&lt;P&gt;If the lookup is named the same as the lookup file (quite typical situation I'd say) the name applies to the file, not the lookup.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 09:37:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577990#M201417</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-12-10T09:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards with "| lookup"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577998#M201422</link>
      <description>&lt;P&gt;The lookup is e.g "mylookup" and the csv is "mylookup.csv". I 've just tried changing the lookup name too, and no improvement. This couldn't be caused by a the setting being overridden by default in the backend?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 11:11:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/577998#M201422</guid>
      <dc:creator>geomore</dc:creator>
      <dc:date>2021-12-10T11:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards with "| lookup"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/578003#M201425</link>
      <description>&lt;P&gt;Unless you have other lookup with the same settings defined elsewhere with higher priority overriding your settings, there should not be "general" settings overriding your lookup.&lt;/P&gt;&lt;P&gt;A very typical case of "should work but doesn't" is permissions problem but I don't see how mismanaged permissions would cause the lookup to be working in general but just not in the wildcard mode. Just to be on the safe side you can check the permissions for the lookup anyway.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 12:01:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/578003#M201425</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-12-10T12:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards with "| lookup"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/578008#M201430</link>
      <description>&lt;P&gt;Assuming your lookup definition has a match type set to&amp;nbsp;WILDCARD(foo), you have to understand the wildcard in the lookup as either * for a search or % for a where command.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if your lookup table uses *, we will interpret the match that way:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;x="abc" matches&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;because &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;| where x="abc"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;| where "abc"="abc" matches the lookup&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;x="*cba*" matches&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;because&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;| where x LIKE "%abc%"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;| where "*cba*" LIKE "%cba%" matches the lookup. See how the * in the eval/where syntax are treated as characters, not wildcards&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;x="ab*" does not match&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;because&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;| where x="abc"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;| where "ab*"="abc" does not match ! * is NOT a wildcard in the eval syntax for the left argument&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;| where x LIKE "%cba%"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&lt;FONT color="#339966"&gt;&lt;FONT color="#000000"&gt;| where "ab*" LIKE "%cba%" obviously does not match&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;x="dcba"does not match&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;you say, but it should match (it does on my env) because&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;| where x LIKE "%cba%"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;| where "dcba" LIKE "%cba%" matches thanks to the wildcards.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So, you can't consider the * in the data as a wildcard, but as a character.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 13:13:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/578008#M201430</guid>
      <dc:creator>ldongradi_SPL</dc:creator>
      <dc:date>2021-12-10T13:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards with "| lookup"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/578024#M201438</link>
      <description>&lt;P&gt;Many thanks for clarifying the logic.&lt;/P&gt;&lt;P&gt;I have recreated a new lookup and csv from scratch, applied exactly the same settings, and now the functionality works as intended (with asterisks, not percents, as I expected). I guess I'll have to put that down as a glitch.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 14:49:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-with-quot-lookup-quot/m-p/578024#M201438</guid>
      <dc:creator>geomore</dc:creator>
      <dc:date>2021-12-10T14:49:23Z</dc:date>
    </item>
  </channel>
</rss>

