<?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: [Resolved]Splunk eval - Error in 'eval' command: The expression is malformed. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Resolved-Splunk-eval-Error-in-eval-command-The-expression-is/m-p/497116#M138467</link>
    <description>&lt;P&gt;@vnravikumar , Thank  you and it works&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2019 08:20:18 GMT</pubDate>
    <dc:creator>cheriemilk</dc:creator>
    <dc:date>2019-12-05T08:20:18Z</dc:date>
    <item>
      <title>[Resolved]Splunk eval - Error in 'eval' command: The expression is malformed.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Resolved-Splunk-eval-Error-in-eval-command-The-expression-is/m-p/497114#M138465</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;

&lt;P&gt;I got error 'Error in 'eval' command: The expression is malformed. ' when running below query. Guess it's because the double quote in the the source log. How to get rid of this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval log=" 2019-12-03 15:03:10,068                 PLV=EVENT CIP=127.0.0.1 CMID=Jessica CMN="Jessica" SN=SCM_Jessica. DPN=dbPool1 UID=cgrant UN=cgrant LOC=en_US EID="EVENT-UNKNOWN-UNKNOWN-B11S42AEFSEL-20191203150210-0020-1" AGN="\[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36\]" RDT=28579 SVT=4349 EET=28680 JSC=104 CSSC=30 CAID=2590715431-1 MID=SUCCESSION PID=SUCCESSION_TALENT_SEARCH PQ=SUCCESSION_TALENT_SEARCH_V12 ACT=SEARCH MEM=313253 CPU=1437 UCPU=1348 SCPU=89 FRE=527 FWR=0 NRE=1438 NWR=189 SQLC=236 SQLT=1808 SID=DE13EDE047CBBADFA8C93E984B****** TRS=- TIP=- TML=- TSL=- ST=1575356561147 ET=1575356589827 TTB=733 RED=- RSR=750 DIA=1223 DCP=1400 C_ktf3="\[tsv2##jobinfo\]" C_ktf4="\[gender,location\]" C_if1="21" C_ktf2="\[Background_Criteria,Profile_Criteria\]" C_bf1="false" C_bf2="false" "
| makemv delim=";" log 
| mvexpand log 
| rex field=log "ktf2=\"\[(?P(.*))\"\]" 
| makemv delim="," ktf2 
| eval ktf2= ltrim(ktf2) 
| stats count by ktf2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Dec 2019 03:22:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Resolved-Splunk-eval-Error-in-eval-command-The-expression-is/m-p/497114#M138465</guid>
      <dc:creator>cheriemilk</dc:creator>
      <dc:date>2019-12-05T03:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: [Resolved]Splunk eval - Error in 'eval' command: The expression is malformed.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Resolved-Splunk-eval-Error-in-eval-command-The-expression-is/m-p/497115#M138466</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try with escaping double quote&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval log=" 2019-12-03 15:03:10,068 PLV=EVENT CIP=127.0.0.1 CMID=Jessica CMN=\"Jessica\" SN=SCM_Jessica. DPN=dbPool1 UID=cgrant UN=cgrant LOC=en_US EID=\"EVENT-UNKNOWN-UNKNOWN-B11S42AEFSEL-20191203150210-0020-1\" AGN=\"[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36]\" RDT=28579 SVT=4349 EET=28680 JSC=104 CSSC=30 CAID=2590715431-1 MID=SUCCESSION PID=SUCCESSION_TALENT_SEARCH PQ=SUCCESSION_TALENT_SEARCH_V12 ACT=SEARCH MEM=313253 CPU=1437 UCPU=1348 SCPU=89 FRE=527 FWR=0 NRE=1438 NWR=189 SQLC=236 SQLT=1808 SID=DE13EDE047CBBADFA8C93E984B* TRS=- TIP=- TML=- TSL=- ST=1575356561147 ET=1575356589827 TTB=733 RED=- RSR=750 DIA=1223 DCP=1400 C_ktf3=\"[tsv2##jobinfo]\" C_ktf4=\"[gender,location]\" C_if1=\"21\" C_ktf2=\"[Background_Criteria,Profile_Criteria]\" C_bf1=\"false\" C_bf2=\"false\" "
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Dec 2019 03:37:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Resolved-Splunk-eval-Error-in-eval-command-The-expression-is/m-p/497115#M138466</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-12-05T03:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: [Resolved]Splunk eval - Error in 'eval' command: The expression is malformed.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Resolved-Splunk-eval-Error-in-eval-command-The-expression-is/m-p/497116#M138467</link>
      <description>&lt;P&gt;@vnravikumar , Thank  you and it works&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 08:20:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Resolved-Splunk-eval-Error-in-eval-command-The-expression-is/m-p/497116#M138467</guid>
      <dc:creator>cheriemilk</dc:creator>
      <dc:date>2019-12-05T08:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: [Resolved]Splunk eval - Error in 'eval' command: The expression is malformed.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Resolved-Splunk-eval-Error-in-eval-command-The-expression-is/m-p/497117#M138468</link>
      <description>&lt;P&gt;Missed it by &lt;CODE&gt;&amp;gt;that&amp;lt;&lt;/CODE&gt; much; you need to escape your &lt;CODE&gt;double-quotes&lt;/CODE&gt; among other minor problems; try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval log=" 2019-12-03 15:03:10,068                 PLV=EVENT CIP=127.0.0.1 CMID=Jessica CMN=\"Jessica\" SN=SCM_Jessica. DPN=dbPool1 UID=cgrant UN=cgrant LOC=en_US EID=\"EVENT-UNKNOWN-UNKNOWN-B11S42AEFSEL-20191203150210-0020-1\" AGN=\"\[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36\]\" RDT=28579 SVT=4349 EET=28680 JSC=104 CSSC=30 CAID=2590715431-1 MID=SUCCESSION PID=SUCCESSION_TALENT_SEARCH PQ=SUCCESSION_TALENT_SEARCH_V12 ACT=SEARCH MEM=313253 CPU=1437 UCPU=1348 SCPU=89 FRE=527 FWR=0 NRE=1438 NWR=189 SQLC=236 SQLT=1808 SID=DE13EDE047CBBADFA8C93E984B****** TRS=- TIP=- TML=- TSL=- ST=1575356561147 ET=1575356589827 TTB=733 RED=- RSR=750 DIA=1223 DCP=1400 C_ktf3=\"\[tsv2##jobinfo\]\" C_ktf4=\"\[gender,location\]\" C_if1=\"21\" C_ktf2=\"\[Background_Criteria,Profile_Criteria\]\" C_bf1=\"false\" C_bf2=\"false\""
| makemv delim=";" log 
| mvexpand log 
| rename log AS _raw
| kv
| table C_ktf2
| rename C_ktf2 AS ktf2
| rex field=ktf2 mode=sed "s/\\\\\[|\\\\\]//g"
| makemv delim="," ktf2 
| eval ktf2= ltrim(ktf2) 
| stats count by ktf2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Dec 2019 16:07:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Resolved-Splunk-eval-Error-in-eval-command-The-expression-is/m-p/497117#M138468</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-05T16:07:51Z</dc:date>
    </item>
  </channel>
</rss>

