<?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 How to search two strings and create a message in email body? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/634956#M220578</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;I am trying to search &amp;lt;string1&amp;gt; and &amp;lt;String2&amp;gt; from different lines in same log having 100 lines, if both matched i want to show in result with _time, Sring1, String2. Please assist me.&lt;/P&gt;
&lt;P&gt;Sample log is like below&lt;/P&gt;
&lt;P&gt;... 66 lines omitted ...&lt;/P&gt;
&lt;P&gt;Linexx&lt;/P&gt;
&lt;P&gt;Linexx ]: "&amp;lt;string1&amp;gt;"&lt;/P&gt;
&lt;P&gt;Linexx &amp;lt;string2&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result should be link&amp;nbsp;&lt;/P&gt;
&lt;P&gt;_time , String1&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2023 17:33:20 GMT</pubDate>
    <dc:creator>sandeepparcha44</dc:creator>
    <dc:date>2023-03-17T17:33:20Z</dc:date>
    <item>
      <title>How to search two strings and create a message in email body?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/634956#M220578</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;I am trying to search &amp;lt;string1&amp;gt; and &amp;lt;String2&amp;gt; from different lines in same log having 100 lines, if both matched i want to show in result with _time, Sring1, String2. Please assist me.&lt;/P&gt;
&lt;P&gt;Sample log is like below&lt;/P&gt;
&lt;P&gt;... 66 lines omitted ...&lt;/P&gt;
&lt;P&gt;Linexx&lt;/P&gt;
&lt;P&gt;Linexx ]: "&amp;lt;string1&amp;gt;"&lt;/P&gt;
&lt;P&gt;Linexx &amp;lt;string2&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result should be link&amp;nbsp;&lt;/P&gt;
&lt;P&gt;_time , String1&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 17:33:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/634956#M220578</guid>
      <dc:creator>sandeepparcha44</dc:creator>
      <dc:date>2023-03-17T17:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to search two strings and create a message in email body?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/634964#M220584</link>
      <description>&lt;P&gt;If the 100 lines are all in the same event then a simple AND should do it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=foo "string1" "string2"
| eval string1="string1"
| table _time string1&lt;/LI-CODE&gt;&lt;P&gt;The result will not be a link, however.&lt;/P&gt;&lt;P&gt;If the 100 lines are in separate events then correlating string1 and string2 requires something common to the two events.&amp;nbsp; What would that be?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 17:58:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/634964#M220584</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-03-17T17:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to search two strings and create a message in email body?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/634997#M220603</link>
      <description>&lt;P&gt;Thank you for reply,&lt;/P&gt;&lt;P&gt;Sorry i missed one thing, Sting 1 is like "*(DC)_String1",&amp;nbsp; when it is showing result it show DC_String1. Is it possible.&lt;/P&gt;&lt;P&gt;Example like AZ_String1 or TX_String1 like this.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2023 04:24:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/634997#M220603</guid>
      <dc:creator>sandeepparcha44</dc:creator>
      <dc:date>2023-03-18T04:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to search two strings and create a message in email body?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/635009#M220607</link>
      <description>&lt;P&gt;It is possible only if you state the problem accurately. &amp;nbsp;Using the same formula as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;'s,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=foo "*_String1" "string2"
| rex "\b(?&amp;lt;dc_string&amp;gt;\w+_String1)\b"
| table _time dc_string&lt;/LI-CODE&gt;&lt;P&gt;Based on your example, the above assumes that this (DC)_String1 is surrounded by word boundaries.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2023 08:24:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/635009#M220607</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-03-18T08:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to search two strings and create a message in email body?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/635015#M220609</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Example like AZ_String1 or TX_String1 like this.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2023 08:50:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/635015#M220609</guid>
      <dc:creator>sandeepparcha44</dc:creator>
      <dc:date>2023-03-18T08:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to search two strings and create a message in email body?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/635041#M220623</link>
      <description>&lt;P&gt;Then the above rex should give you that.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2023 19:04:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/635041#M220623</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-03-18T19:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to search two strings and create a message in email body?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/635061#M220635</link>
      <description>&lt;P&gt;A side note - remember that searching for terms with a wildcard at the start is very inefficient.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 10:08:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-two-strings-and-create-a-message-in-email-body/m-p/635061#M220635</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-03-19T10:08:41Z</dc:date>
    </item>
  </channel>
</rss>

