<?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: How to edit my eval statement to resolve &amp;quot;Error in 'eval' command: Regex: nothing to repeat&amp;quot;? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-statement-to-resolve-quot-Error-in-eval/m-p/213600#M62655</link>
    <description>&lt;P&gt;You don't need &lt;CODE&gt;*&lt;/CODE&gt; in your match. Match matches the string with wild cards.&lt;/P&gt;

&lt;P&gt;Try using&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; eval camp = if(match(Summary,"Planned"),"mainten","other") | top limit=50 Summary,camp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Jun 2016 09:32:05 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2016-06-20T09:32:05Z</dc:date>
    <item>
      <title>How to edit my eval statement to resolve "Error in 'eval' command: Regex: nothing to repeat"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-statement-to-resolve-quot-Error-in-eval/m-p/213599#M62654</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;I'm trying to filter some event by their Summary. I just want to distinguish when they have the word Maintenance and catalogue the rest as "other".&lt;/P&gt;

&lt;P&gt;My eval statement is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval camp = if(match(Summary,"*Planned*"),"mainten","other") | top limit=50 Summary,camp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm trying with Planned because if I put "maintenance", I get this error: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'eval' command: Regex: nothing to repeat 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but there can be planned and emergency maintenances and I want all of them as the same group.&lt;/P&gt;

&lt;P&gt;Any idea why and how can I resolve this error?&lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 09:03:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-statement-to-resolve-quot-Error-in-eval/m-p/213599#M62654</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2016-06-20T09:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my eval statement to resolve "Error in 'eval' command: Regex: nothing to repeat"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-statement-to-resolve-quot-Error-in-eval/m-p/213600#M62655</link>
      <description>&lt;P&gt;You don't need &lt;CODE&gt;*&lt;/CODE&gt; in your match. Match matches the string with wild cards.&lt;/P&gt;

&lt;P&gt;Try using&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; eval camp = if(match(Summary,"Planned"),"mainten","other") | top limit=50 Summary,camp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jun 2016 09:32:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-statement-to-resolve-quot-Error-in-eval/m-p/213600#M62655</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2016-06-20T09:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my eval statement to resolve "Error in 'eval' command: Regex: nothing to repeat"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-statement-to-resolve-quot-Error-in-eval/m-p/213601#M62656</link>
      <description>&lt;P&gt;Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; It works now&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 09:39:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-eval-statement-to-resolve-quot-Error-in-eval/m-p/213601#M62656</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2016-06-20T09:39:17Z</dc:date>
    </item>
  </channel>
</rss>

