<?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: multiple eval string value if they are in a field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-something-like-if-two-of-more-of-s1-s2-s3-in-URL-and/m-p/643850#M223047</link>
    <description>&lt;P&gt;i have tried the sql like method&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;how do i do something like if two or more of ( s1,s2,s3 ) in URL, and count of symbol &amp;gt; 2 in url?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 19 May 2023 03:04:40 GMT</pubDate>
    <dc:creator>bluewizard</dc:creator>
    <dc:date>2023-05-19T03:04:40Z</dc:date>
    <item>
      <title>How to do something like if two of more of ( s1,s2,s3 ) in URL, and symbol count &gt; 2 in url?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-something-like-if-two-of-more-of-s1-s2-s3-in-URL-and/m-p/643846#M223044</link>
      <description>&lt;P&gt;.... url = "abc-jjjj-j-xyz.exmaple.come"&lt;BR /&gt;|eval s1 = abc&lt;BR /&gt;|eval s2 = efg&lt;BR /&gt;|eval s3 = xyz&lt;BR /&gt;|eval symbol ="-"&lt;/P&gt;
&lt;P&gt;how do i do something like if two of more of ( s1,s2,s3 ) in URL, and symbol count &amp;gt; 2 in url?&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 12:18:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-something-like-if-two-of-more-of-s1-s2-s3-in-URL-and/m-p/643846#M223044</guid>
      <dc:creator>bluewizard</dc:creator>
      <dc:date>2023-05-19T12:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: multiple eval string value if they are in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-something-like-if-two-of-more-of-s1-s2-s3-in-URL-and/m-p/643849#M223046</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/256861"&gt;@bluewizard&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is a run anywhere example showing a few different methods you could use...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults
| eval url="abc-jjjj-j-xyz.exmaple.come"
      ,s1=if(match(url, "abc"), "true", "false")  ``` regex ```
      ,s2=if(match(url, "efg"), "true", "false")
      ,s3=if(like(url, "%xyz%"), "true", "false") ``` more SQL like ```
      ,s4=if(searchmatch("url=*jjjj*"), "true", "false")  ``` probably the least efficient method depending on the base seach ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the latest Splunk docs on eval functions, too.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.4/SearchReference/CommonEvalFunctions#Alphabetical_list_of_functions" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.4/SearchReference/CommonEvalFunctions#Alphabetical_list_of_functions&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 02:47:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-something-like-if-two-of-more-of-s1-s2-s3-in-URL-and/m-p/643849#M223046</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-05-19T02:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: multiple eval string value if they are in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-something-like-if-two-of-more-of-s1-s2-s3-in-URL-and/m-p/643850#M223047</link>
      <description>&lt;P&gt;i have tried the sql like method&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;how do i do something like if two or more of ( s1,s2,s3 ) in URL, and count of symbol &amp;gt; 2 in url?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 May 2023 03:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-something-like-if-two-of-more-of-s1-s2-s3-in-URL-and/m-p/643850#M223047</guid>
      <dc:creator>bluewizard</dc:creator>
      <dc:date>2023-05-19T03:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: multiple eval string value if they are in a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-something-like-if-two-of-more-of-s1-s2-s3-in-URL-and/m-p/643851#M223048</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/256861"&gt;@bluewizard&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this would work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults
| eval url="abc-jjjj-j-xyz.exmaple.come"
      ,s1=if(match(url, "abc"), 1, 0)  ``` regex ```
      ,s2=if(match(url, "efg"), 1, 0)
      ,s3=if(like(url, "%xyz%"), 1, 0) ``` more SQL like ```
      ,s4=if(searchmatch("url=*jjjj*"), 1, 0)  ``` probably the least efficient method depending on the base seach ```
| addtotals label=s* fieldname="symbol_count"
| where symbol_count&amp;gt;2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;As the original question has been answered you should make this answer as solution provided.&lt;BR /&gt;&lt;BR /&gt;Karma would also be appreciated too.&lt;BR /&gt;&lt;BR /&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 03:16:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-something-like-if-two-of-more-of-s1-s2-s3-in-URL-and/m-p/643851#M223048</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-05-19T03:16:59Z</dc:date>
    </item>
  </channel>
</rss>

