<?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: Escaping quotes in where command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524801#M148050</link>
    <description>&lt;P&gt;Yes it is the same, splunk has made two field one with receiver_email and the other is recipient but they are the same.&lt;/P&gt;&lt;P&gt;If I replace my command with yours it doesn't work either.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2020 08:59:34 GMT</pubDate>
    <dc:creator>Sasquatchatmars</dc:creator>
    <dc:date>2020-10-15T08:59:34Z</dc:date>
    <item>
      <title>Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524791#M148041</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have been trying to use a where command but I'm stuck because of the double quotes that I can't escape.&lt;/P&gt;&lt;P&gt;My command is this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where match(content_body,"\"https://.*".recipient.".*\"")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the feeling that this isn't the right way to do it, I got no results but I'm almost sure there are. When I change it to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where match(content_body,"&amp;lt;https://.*".recipient.".*&amp;gt;")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the other results that I want. So I think it is only the escaping that doesn't work accordingly. Can someone confirm if I am right or not?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Sasquatchatmars&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 08:49:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524791#M148041</guid>
      <dc:creator>Sasquatchatmars</dc:creator>
      <dc:date>2020-10-15T08:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524794#M148044</link>
      <description>&lt;P&gt;The escaping looks right. Does the recipient field have the value you are searching for, as it would be found in the content_body field of the same event?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 08:22:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524794#M148044</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-15T08:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524795#M148045</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your reply. Yes it is exactly the same, that is why I don't understand why it doesn't work&lt;/P&gt;&lt;P&gt;Sasquatchatmars&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 08:28:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524795#M148045</guid>
      <dc:creator>Sasquatchatmars</dc:creator>
      <dc:date>2020-10-15T08:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524796#M148046</link>
      <description>&lt;P&gt;Can you share the rest of your query and a line or two from your logs (anonymised of course)?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 08:31:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524796#M148046</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-15T08:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524797#M148047</link>
      <description>&lt;P&gt;This is my search query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=[index_name]
| rename content_body{} AS content_body, receiver_email{} AS receiver_email
| where match(content_body,"\"https://.*".recipient.".*\" ")
| dedup sender_email
| table recipient sender_email content_body username&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FIY recipient is firstname.lastname@domainname&lt;/P&gt;&lt;P&gt;And the part of the log is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"https://f22c834a4f224bcbb563c127f7a8477f.svc.dynamics.com/t/r/zyqi3=
CfkIaT_ZSLfiMGTiZjG5y-6Cc5jKCmGO0YH-Nc#[recipient]:e8990=3D23"

/!\ Be aware, this link is a phishing link /!\&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 09:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524797#M148047</guid>
      <dc:creator>Sasquatchatmars</dc:creator>
      <dc:date>2020-10-15T09:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524799#M148049</link>
      <description>&lt;P&gt;If recipient is &lt;A href="mailto:firstname.lastname@domainname," target="_blank"&gt;firstname.lastname@domainname,&lt;/A&gt;&amp;nbsp;is this the same as receiver_email? Can you use&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where match(content_body,"\"https://.*".receiver_email.".*\" ")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 Oct 2020 08:56:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524799#M148049</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-15T08:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524801#M148050</link>
      <description>&lt;P&gt;Yes it is the same, splunk has made two field one with receiver_email and the other is recipient but they are the same.&lt;/P&gt;&lt;P&gt;If I replace my command with yours it doesn't work either.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 08:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524801#M148050</guid>
      <dc:creator>Sasquatchatmars</dc:creator>
      <dc:date>2020-10-15T08:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524806#M148051</link>
      <description>&lt;P&gt;The example you gave doesn't have a &lt;A href="mailto:firstname.lastname@domainname" target="_blank"&gt;firstname.lastname@domainname&lt;/A&gt;&amp;nbsp;in it. I assume this is because you anonymised it. But you have also anonymised username which you say works. There doesn't appear to be anything wrong with your match, so the conclusion is that there are no matches in your data.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 09:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524806#M148051</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-15T09:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524808#M148052</link>
      <description>&lt;P&gt;I made indeed an error because in the log part it isn't supposed to be "username" but "recipient" I will made the change.&lt;/P&gt;&lt;P&gt;Maybe there is no hit but in that case I don't know what I should use as search to verify if the field "recipient" is in the url. Do you maybe know it?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 09:12:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/524808#M148052</guid>
      <dc:creator>Sasquatchatmars</dc:creator>
      <dc:date>2020-10-15T09:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/525035#M148122</link>
      <description>&lt;P&gt;content_body needs to be rebuilt as a complete string&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval content_body=mvjoin(content_body,"")
| rex field=content_body mode=sed "s/=[\n\r]+//g"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Oct 2020 10:06:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/525035#M148122</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-16T10:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping quotes in where command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/525036#M148123</link>
      <description>&lt;P&gt;Thank you very much for your help, this is what i needed!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 10:09:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Escaping-quotes-in-where-command/m-p/525036#M148123</guid>
      <dc:creator>Sasquatchatmars</dc:creator>
      <dc:date>2020-10-16T10:09:09Z</dc:date>
    </item>
  </channel>
</rss>

