<?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 search does not match token which contains file path with special characters in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/search-does-not-match-token-which-contains-file-path-with/m-p/514597#M144447</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I passed a token which contain a file path with some special character into a search but it does not show any result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=wineventlog EventCode=4660 OR EventCode=4663 Account_Name!="ANONYMOUS LOGON" host="MELFP" Account_Name!="*$" 
| eval ObjectName=urldecode("D:\Company Data\HR\Payroll\HR$ (MELFP02) (P) - Shortcut.lnk") 
| eval ObjectName=replace(ObjectName,"\\\\","\\\\\\")
| where match(Object_Name,ObjectName)
| table _time host Account_Name Account_Domain Object_Name Accesses EventCodeDescription 
| sort _time desc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, If I compare directly as below then it would show result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|search Object_Name="D:\\Company Data\\HR\Payroll\\HR$ (MELFP02) (P) - Shortcut.lnk"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure why because if I shows the ObjectName, it is decoded correctly as below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"D:\\Company Data\\HR\Payroll\\HR$ (MELFP02) (P) - Shortcut.lnk"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Aug 2020 06:15:22 GMT</pubDate>
    <dc:creator>ToniHuynh</dc:creator>
    <dc:date>2020-08-18T06:15:22Z</dc:date>
    <item>
      <title>search does not match token which contains file path with special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-does-not-match-token-which-contains-file-path-with/m-p/514597#M144447</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I passed a token which contain a file path with some special character into a search but it does not show any result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=wineventlog EventCode=4660 OR EventCode=4663 Account_Name!="ANONYMOUS LOGON" host="MELFP" Account_Name!="*$" 
| eval ObjectName=urldecode("D:\Company Data\HR\Payroll\HR$ (MELFP02) (P) - Shortcut.lnk") 
| eval ObjectName=replace(ObjectName,"\\\\","\\\\\\")
| where match(Object_Name,ObjectName)
| table _time host Account_Name Account_Domain Object_Name Accesses EventCodeDescription 
| sort _time desc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, If I compare directly as below then it would show result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|search Object_Name="D:\\Company Data\\HR\Payroll\\HR$ (MELFP02) (P) - Shortcut.lnk"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure why because if I shows the ObjectName, it is decoded correctly as below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"D:\\Company Data\\HR\Payroll\\HR$ (MELFP02) (P) - Shortcut.lnk"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 06:15:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-does-not-match-token-which-contains-file-path-with/m-p/514597#M144447</guid>
      <dc:creator>ToniHuynh</dc:creator>
      <dc:date>2020-08-18T06:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: search does not match token which contains file path with special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-does-not-match-token-which-contains-file-path-with/m-p/514700#M144475</link>
      <description>&lt;P&gt;The second argument to the &lt;FONT face="courier new,courier"&gt;match&lt;/FONT&gt; function must be a valid regular expression.&amp;nbsp; While you've taken the precaution to escape the backslash characters, you must also do so with the other regex special characters such as &lt;FONT face="courier new,courier"&gt;$&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;(&lt;/FONT&gt;, and &lt;FONT face="courier new,courier"&gt;.&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;If that's too much effort (understandable), try the &lt;FONT face="courier new,courier"&gt;like&lt;/FONT&gt; function, instead.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 13:42:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-does-not-match-token-which-contains-file-path-with/m-p/514700#M144475</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-18T13:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: search does not match token which contains file path with special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-does-not-match-token-which-contains-file-path-with/m-p/517348#M145474</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;but like function still does not work for me.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where like(Object_Name,ObjectName) &lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Sep 2020 00:03:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-does-not-match-token-which-contains-file-path-with/m-p/517348#M145474</guid>
      <dc:creator>ToniHuynh</dc:creator>
      <dc:date>2020-09-02T00:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: search does not match token which contains file path with special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-does-not-match-token-which-contains-file-path-with/m-p/517474#M145515</link>
      <description>&lt;P&gt;Are Object_Name and ObjectName identical?&amp;nbsp; If not, does ObjectName contain pattern characters that would produce a match with Object_Name?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 13:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-does-not-match-token-which-contains-file-path-with/m-p/517474#M145515</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-02T13:02:00Z</dc:date>
    </item>
  </channel>
</rss>

