<?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 to filter out a specific phrase in a Splunk search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681396#M232843</link>
    <description>&lt;P&gt;I understand. Still, trying to run the search it returns no result...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=example host=* message_name=* AND profileId="example" AND "deviceClass":"example" AND "Message received: {"name":"screenView","screenName":"assetcard""
| rex field=_raw "Message received:\s\{(?P&amp;lt;check&amp;gt;.*?)\,\"previous"
| where like(check,"%assetcard%")&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 20 Mar 2024 16:47:46 GMT</pubDate>
    <dc:creator>frodelauka</dc:creator>
    <dc:date>2024-03-20T16:47:46Z</dc:date>
    <item>
      <title>How to filter out a specific phrase in a Splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681374#M232832</link>
      <description>&lt;P&gt;I'm trying to search for a specific phrase with the search below but I only want result1, not result2. The issue here, I guess, is that parts of the phrase I'm searching for is present in both results (&lt;STRONG&gt;same phrase marked in bold&lt;/STRONG&gt;) -&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Search:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;index=example host=example message_name=* AND profileId="xxxx-xxxxx-xxxxx" AND "deviceClass":"example" AND &lt;FONT color="#008000"&gt;"Message received: {&lt;STRONG&gt;"name":"screenView","screenName":"assetcard&lt;/STRONG&gt;""&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MessageReceiver:96 - &lt;FONT color="#008000"&gt;Message received: {"&lt;STRONG&gt;name":"screenView","screenName":"assetcard&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;,"previous":{"name":"screenView","screenName":"homeScreen","subscreenName":"STB.TOP.HOME"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MessageReceiver:96 - Message received: {"name":"screenView","screenName":"homeScreen","previous":{&lt;FONT color="#FF0000"&gt;"name":"screenView","screenName":"assetcard"&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 12:32:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681374#M232832</guid>
      <dc:creator>frodelauka</dc:creator>
      <dc:date>2024-03-20T12:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out a specific phrase in a Splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681384#M232836</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/265955"&gt;@frodelauka&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;One way to do it based on the events you shared is as below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval log="MessageReceiver:96 - Message received: {\"name\":\"screenView\",\"screenName\":\"assetcard\",\"previous\":{\"name\":\"screenView\",\"screenName\":\"homeScreen\",\"subscreenName\":\"STB.TOP.HOME\"\r\nMessageReceiver:96 - Message received: {\"name\":\"screenView\",\"screenName\":\"homeScreen\",\"previous\":{\"name\":\"screenView\",\"screenName\":\"assetcard\"" 
| makemv log delim="\r\n" 
| mvexpand log 
| eval check_msg_rxd=trim(replace(replace(mvindex(split(mvindex(split(log,",\"previous"),0),"received:"),-1),"\"",""),"\{",""))
|  where like(check_msg_rxd,"%assetcard")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the reply helps, a Karma upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 13:02:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681384#M232836</guid>
      <dc:creator>Gr0und_Z3r0</dc:creator>
      <dc:date>2024-03-20T13:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out a specific phrase in a Splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681388#M232838</link>
      <description>&lt;P&gt;I appreciate the feedback but as I'm just a Splunk rookie I do not understand the logic behind you query. Also, the makeresults function should be the first in the search so how would the entire search look like?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 13:27:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681388#M232838</guid>
      <dc:creator>frodelauka</dc:creator>
      <dc:date>2024-03-20T13:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out a specific phrase in a Splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681389#M232839</link>
      <description>&lt;P&gt;Simplifying the way to approach it with a regex...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| rex field=_raw "Message received:\s\{(?P&amp;lt;check&amp;gt;.*?)\,\"previous"
| where like(check,"%assetcard%")&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;The idea is to get values before the word "previous" and check that string with the one you want to meet your search criteria.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 16:47:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681389#M232839</guid>
      <dc:creator>Gr0und_Z3r0</dc:creator>
      <dc:date>2024-03-20T16:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out a specific phrase in a Splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681396#M232843</link>
      <description>&lt;P&gt;I understand. Still, trying to run the search it returns no result...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=example host=* message_name=* AND profileId="example" AND "deviceClass":"example" AND "Message received: {"name":"screenView","screenName":"assetcard""
| rex field=_raw "Message received:\s\{(?P&amp;lt;check&amp;gt;.*?)\,\"previous"
| where like(check,"%assetcard%")&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Mar 2024 16:47:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-a-specific-phrase-in-a-Splunk-search/m-p/681396#M232843</guid>
      <dc:creator>frodelauka</dc:creator>
      <dc:date>2024-03-20T16:47:46Z</dc:date>
    </item>
  </channel>
</rss>

