<?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 Expression is malformed, eval expecting a &amp;quot;)&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Expression-is-malformed-eval-expecting-a-quot-quot/m-p/91596#M23605</link>
    <description>&lt;P&gt;Greetings guys.&lt;BR /&gt;
Like my other posts today, I'm trying to find workarounds for splunk's inability to search for a literal asterisk. I am working on call detail records, in which there is a field showing the exact buttons a user pressed on their phone. For feature usage like *69, this becomes a big PITA.&lt;BR /&gt;
For this search, the "DIALED_DIGITS" field can contain *68 or #68, one enables a feature, the other disables it.&lt;/P&gt;

&lt;P&gt;Here is my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=PHONE
|regex Dialed_Digits="(\*68|#68).*"
|eval Feature_Code=case((like(Dialed_Digits,"%68%") NOT like(Dialed_Digits,"%#68%")),"Line Feature - Enable")
|table Feature_Code
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are more feature codes to be searched for, hence using the case function. Running it returns an error stating "Error in 'eval' command: The expression is malformed. Expected )."&lt;/P&gt;

&lt;P&gt;I have quadruple checked to make sure my syntax is correct, and have similar searches (using OR, but not NOT). I can't figure out what the issue is unless its a problem with using NOT.&lt;BR /&gt;
Any advice would really be appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Mar 2012 01:10:37 GMT</pubDate>
    <dc:creator>msarro</dc:creator>
    <dc:date>2012-03-14T01:10:37Z</dc:date>
    <item>
      <title>Expression is malformed, eval expecting a ")"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expression-is-malformed-eval-expecting-a-quot-quot/m-p/91596#M23605</link>
      <description>&lt;P&gt;Greetings guys.&lt;BR /&gt;
Like my other posts today, I'm trying to find workarounds for splunk's inability to search for a literal asterisk. I am working on call detail records, in which there is a field showing the exact buttons a user pressed on their phone. For feature usage like *69, this becomes a big PITA.&lt;BR /&gt;
For this search, the "DIALED_DIGITS" field can contain *68 or #68, one enables a feature, the other disables it.&lt;/P&gt;

&lt;P&gt;Here is my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=PHONE
|regex Dialed_Digits="(\*68|#68).*"
|eval Feature_Code=case((like(Dialed_Digits,"%68%") NOT like(Dialed_Digits,"%#68%")),"Line Feature - Enable")
|table Feature_Code
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are more feature codes to be searched for, hence using the case function. Running it returns an error stating "Error in 'eval' command: The expression is malformed. Expected )."&lt;/P&gt;

&lt;P&gt;I have quadruple checked to make sure my syntax is correct, and have similar searches (using OR, but not NOT). I can't figure out what the issue is unless its a problem with using NOT.&lt;BR /&gt;
Any advice would really be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2012 01:10:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expression-is-malformed-eval-expecting-a-quot-quot/m-p/91596#M23605</guid>
      <dc:creator>msarro</dc:creator>
      <dc:date>2012-03-14T01:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Expression is malformed, eval expecting a ")"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expression-is-malformed-eval-expecting-a-quot-quot/m-p/91597#M23606</link>
      <description>&lt;P&gt;You need to explicitly specify the AND condition, it isn't implicitly added automatically in &lt;CODE&gt;eval&lt;/CODE&gt;. So, instead of "&lt;CODE&gt;... NOT like(...&lt;/CODE&gt;"  you need "&lt;CODE&gt;... AND NOT like(...&lt;/CODE&gt;"&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2012 06:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expression-is-malformed-eval-expecting-a-quot-quot/m-p/91597#M23606</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-03-14T06:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Expression is malformed, eval expecting a ")"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expression-is-malformed-eval-expecting-a-quot-quot/m-p/91598#M23607</link>
      <description>&lt;P&gt;That worked, thank you&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2012 17:57:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expression-is-malformed-eval-expecting-a-quot-quot/m-p/91598#M23607</guid>
      <dc:creator>msarro</dc:creator>
      <dc:date>2012-03-14T17:57:31Z</dc:date>
    </item>
  </channel>
</rss>

