<?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 I write a Search that can match a word from 2 different lookup files? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-that-can-match-a-word-from-two-different/m-p/642601#M222581</link>
    <description>&lt;P&gt;Can you explain what is the desired output? &amp;nbsp;In other words, what does "match" mean in this context? &amp;nbsp;Is this entire exercise between two lookups or will it involve event data?&lt;/P&gt;</description>
    <pubDate>Tue, 09 May 2023 06:21:27 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-05-09T06:21:27Z</dc:date>
    <item>
      <title>How do I write a search that can match a word from two different lookup files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-that-can-match-a-word-from-two-different/m-p/642539#M222562</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 different files names lookup1.csv and lookup2.csv, which have column A and column B in both.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can we merge two files using a single word in Column A in both files with a sentence in it?&lt;/P&gt;
&lt;P&gt;lookup1: Column A: "I am good"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;lookup2: Column A: "I am bad"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to combine both the files using a word "I am" in this case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 14:32:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-that-can-match-a-word-from-two-different/m-p/642539#M222562</guid>
      <dc:creator>satyaallaparthi</dc:creator>
      <dc:date>2023-05-09T14:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a Search that can match a word from 2 different lookup files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-that-can-match-a-word-from-two-different/m-p/642601#M222581</link>
      <description>&lt;P&gt;Can you explain what is the desired output? &amp;nbsp;In other words, what does "match" mean in this context? &amp;nbsp;Is this entire exercise between two lookups or will it involve event data?&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 06:21:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-that-can-match-a-word-from-two-different/m-p/642601#M222581</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-05-09T06:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a Search that can match a word from 2 different lookup files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-that-can-match-a-word-from-two-different/m-p/642655#M222591</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Entire output will be in between two lookups.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;desired output: if there is a word match in between Column A of two files, then I want to display “yes” in a new Column called Matching_word and “no” if there is no word match.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 12:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-that-can-match-a-word-from-two-different/m-p/642655#M222591</guid>
      <dc:creator>satyaallaparthi</dc:creator>
      <dc:date>2023-05-09T12:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a Search that can match a word from 2 different lookup files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-that-can-match-a-word-from-two-different/m-p/642772#M222628</link>
      <description>&lt;P&gt;Splunk may not be the best tool for this task because SPL doesn't have a builtin definition of "word". &amp;nbsp;If I take space as word boundary, you can do something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup1
| eval lookup = lookup1
| append 
    [ | inputlookup lookup2
    | eval lookup = lookup2]
| eval ColumnA = split(ColumnA, " ") ``` assume space is the only word boundary ```
| stats dc(lookup) as sources by ColumnA
| stats max(sources) as match
| eval match = if(match &amp;gt; 1, "yes", "no")&lt;/LI-CODE&gt;&lt;P&gt;dc is the basic idea. &amp;nbsp;You can improve/enhance word detection. &amp;nbsp;But there is a limit to what you can do before it becomes labor.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 08:32:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-that-can-match-a-word-from-two-different/m-p/642772#M222628</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-05-10T08:32:39Z</dc:date>
    </item>
  </channel>
</rss>

