<?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: mismatch '[' in search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66769#M16645</link>
    <description>&lt;P&gt;Wow that works! What does the double dollar sign do to make this work?&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2013 23:17:35 GMT</pubDate>
    <dc:creator>dgadjov</dc:creator>
    <dc:date>2013-03-19T23:17:35Z</dc:date>
    <item>
      <title>mismatch '[' in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66765#M16641</link>
      <description>&lt;P&gt;Running this through the Splunk search I get no errors. However when I put this search in my Advance XML I get: mismatch '['&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/usr/local/splunk/splunk_test/test_data/sample_data" _time=[ search source="/usr/local/splunk/splunk_test/test_data/sample_data" | stats latest(_time) as new_data | return $new_data] | table * | replace "Failed" with 0 "Passed" with 100 | appendpipe [stats avg(*) as *] | replace 0 with "Failed" 100 with "Passed"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Mar 2013 21:15:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66765#M16641</guid>
      <dc:creator>dgadjov</dc:creator>
      <dc:date>2013-03-19T21:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: mismatch '[' in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66766#M16642</link>
      <description>&lt;P&gt;Hey dgagjov,&lt;/P&gt;

&lt;P&gt;My guess would be that the characters in the search that you are doing are being recognized as xml tags and is confusing things.  If you enclose your search in &amp;lt;![CDATA[ and ]]&amp;gt;, it will allow you to place anything into your search without there being any issue.&lt;/P&gt;

&lt;P&gt;Eg:&lt;BR /&gt;
&amp;lt;![CDATA[&lt;BR /&gt;
source="/usr/local/splunk/splunk_test/test_data/sample_data" _time=[ search source="/usr/local/splunk/splunk_test/test_data/sample_data" | stats latest(_time) as new_data | return $new_data] | table * | replace "Failed" with 0 "Passed" with 100 | appendpipe [stats avg(*) as *] | replace 0 with "Failed" 100 with "Passed"&lt;BR /&gt;
]]&amp;gt;&lt;/P&gt;

&lt;P&gt;Let me know if you need me to elaborate, and let me know if this does not work.&lt;/P&gt;

&lt;P&gt;Regards Vince&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:32:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66766#M16642</guid>
      <dc:creator>vincesesto</dc:creator>
      <dc:date>2020-09-28T13:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: mismatch '[' in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66767#M16643</link>
      <description>&lt;P&gt;This is actually the first thing that I tried when I got this error. With or without the CDATA the mismatch will occur.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2013 21:35:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66767#M16643</guid>
      <dc:creator>dgadjov</dc:creator>
      <dc:date>2013-03-19T21:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: mismatch '[' in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66768#M16644</link>
      <description>&lt;P&gt;My guess is your "return $new_value]" got turned into "return " because there was no such variable to substitute. Try escaping the dollar sign with another dollar sign like this: "return $$new_value]"&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2013 22:39:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66768#M16644</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-19T22:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: mismatch '[' in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66769#M16645</link>
      <description>&lt;P&gt;Wow that works! What does the double dollar sign do to make this work?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2013 23:17:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66769#M16645</guid>
      <dc:creator>dgadjov</dc:creator>
      <dc:date>2013-03-19T23:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: mismatch '[' in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66770#M16646</link>
      <description>&lt;P&gt;$$ gets turned into $, much like \\ getting turned into \ in regular expressions. With a single dollar sign it's trying to substitute variables such as $foo$.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2013 23:19:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mismatch-in-search/m-p/66770#M16646</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-19T23:19:28Z</dc:date>
    </item>
  </channel>
</rss>

