<?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 do you lookup match field names by wildcard or regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376566#M110551</link>
    <description>&lt;P&gt;See here for how to lookup with RegEx:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/386488/regex-in-lookuptable.html"&gt;https://answers.splunk.com/answers/386488/regex-in-lookuptable.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2019 02:03:55 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-04-01T02:03:55Z</dc:date>
    <item>
      <title>How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376561#M110546</link>
      <description>&lt;P&gt;I have some customer provided CSV lookup files. These lookup files have some "similar" field names, which means they contain some common keywords. I would like do a keyword match in lookup command to these similar fields. Is there a way to do this ?&lt;/P&gt;

&lt;P&gt;An example is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lookup file1's title is like: population, average income, location
lookup file2's title is like: population, income, location
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to use the field that contains "income" as the lookup condition, how can I do this with one common lookup statement?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 14:08:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376561#M110546</guid>
      <dc:creator>xshen_anji</dc:creator>
      <dc:date>2019-03-29T14:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376562#M110547</link>
      <description>&lt;P&gt;How are you planning to run lookup on both lookup table files? What all have you tried so far? Any specific reason to have common lookup statement?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:42:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376562#M110547</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-29T15:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376563#M110548</link>
      <description>&lt;P&gt;Basically, I am running an app which processes a lookup file with some data files. The lookup csv file, which is generated from reporting systems of different vendors, varied a little bit in title fields, but the keywords are basically the same . Since there are a lot of customers, it would be easy to manage if I have one lookup statement to support all these lookup files. Now I am trying to make it a rule to all the customers, asking for manually editing the titles to make them the same, but it would still be desirable to tolerate some kind of fault or difference.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 14:51:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376563#M110548</guid>
      <dc:creator>xshen_anji</dc:creator>
      <dc:date>2019-03-30T14:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376564#M110549</link>
      <description>&lt;P&gt;According to &lt;A href="https://answers.splunk.com/answers/28566/how-to-use-wildcard-in-lookup-based-searches-and-alerts.html"&gt;How to use wildcard in lookup-based searches and alerts?&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can specify -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; match_type = WILDCARD(income)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the &lt;CODE&gt;transforms.conf&lt;/CODE&gt; definition of your lookup. &lt;/P&gt;

&lt;P&gt;I just tested it, I have - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/etc/apps/search/local

$ cat transforms.conf 

[hosts_reporting]
batch_index_query = 0
case_sensitive_match = 1
filename = hosts_reporting.csv
match_type = WILDCARD(host)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;One of the &lt;CODE&gt;host&lt;/CODE&gt; names in &lt;CODE&gt;hosts_reporting.csv&lt;/CODE&gt; is the beginning of a &lt;CODE&gt;host&lt;/CODE&gt; name and it comes up via -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal [ | inputlookup hosts_reporting.csv | eval host=host + "*" ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it doesn't when running -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal [ | inputlookup hosts_reporting ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Isn't it weird? &lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 23:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376564#M110549</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-03-30T23:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376565#M110550</link>
      <description>&lt;P&gt;Any thoughts on this one, by any chance? @woodcock? &lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 01:32:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376565#M110550</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-04-01T01:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376566#M110551</link>
      <description>&lt;P&gt;See here for how to lookup with RegEx:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/386488/regex-in-lookuptable.html"&gt;https://answers.splunk.com/answers/386488/regex-in-lookuptable.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 02:03:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376566#M110551</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-01T02:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376567#M110552</link>
      <description>&lt;P&gt;You are misunderstanding the 2 different ways to use lookup files.  One way is with the &lt;CODE&gt;... | lookup&lt;/CODE&gt; command syntax, which uses the &lt;CODE&gt;WILDCARD()&lt;/CODE&gt; syntax (among other settings) within the &lt;CODE&gt;Lookup definitions&lt;/CODE&gt;, the other is with the &lt;CODE&gt;|inputlookup&lt;/CODE&gt; command syntax which DOES NOT interact with the &lt;CODE&gt;Lookup definitions&lt;/CODE&gt;.  In the latter case, just do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal [ |inputlookup hosts_reporting.csv | eval host=host + "*" ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Apr 2019 02:09:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376567#M110552</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-01T02:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376568#M110553</link>
      <description>&lt;P&gt;Very interesting @woodcock - thank you for the clarification.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 10:54:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376568#M110553</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-04-01T10:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376569#M110554</link>
      <description>&lt;P&gt;If you have your answer, pick one and click &lt;CODE&gt;Accept&lt;/CODE&gt; to close the question.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 20:24:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376569#M110554</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-01T20:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup match field names by wildcard or regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376570#M110555</link>
      <description>&lt;P&gt;Hi @woodcock - it's not mine - I just joined the ride ; -)&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 21:39:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-match-field-names-by-wildcard-or-regex/m-p/376570#M110555</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-04-01T21:39:52Z</dc:date>
    </item>
  </channel>
</rss>

