<?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: Field not fillled through eval in map in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320756#M95855</link>
    <description>&lt;P&gt;Show the output of this command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup CSV-Generic-GenCus-GenLBL-SensitiveDataKeyWords.csv | head 2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 29 May 2017 14:57:58 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-05-29T14:57:58Z</dc:date>
    <item>
      <title>Field not fillled through eval in map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320755#M95854</link>
      <description>&lt;P&gt;I have a search like this:&lt;/P&gt;

&lt;P&gt;|inputlookup CSV-Generic-GenCus-GenLBL-SensitiveDataKeyWords.csv | map [search index="*" $keyword$ | eval kw=$keyword$, rex=$regex$ | regex($regex$)]&lt;/P&gt;

&lt;P&gt;from some reason the kw field does not get a value, the kw field is displayed but It is always empty, if I look at search.log, I can see that the search is being parsed as:&lt;/P&gt;

&lt;P&gt;( index="*" IBAN ) | eval  kw=IBAN, rex="[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}"  | regex  ("[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}")&lt;/P&gt;

&lt;P&gt;but in the results, rex does show a value, but kw does not. What am I missing here?&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2017 07:15:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320755#M95854</guid>
      <dc:creator>fvegdom</dc:creator>
      <dc:date>2017-05-29T07:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Field not fillled through eval in map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320756#M95855</link>
      <description>&lt;P&gt;Show the output of this command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup CSV-Generic-GenCus-GenLBL-SensitiveDataKeyWords.csv | head 2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 May 2017 14:57:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320756#M95855</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-29T14:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Field not fillled through eval in map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320757#M95856</link>
      <description>&lt;P&gt;Thanks for looking into this, that search gives me: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;IBAN             [a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}
AccountNumber    [a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 May 2017 19:58:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320757#M95856</guid>
      <dc:creator>fvegdom</dc:creator>
      <dc:date>2017-05-29T19:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Field not fillled through eval in map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320758#M95857</link>
      <description>&lt;P&gt;You need &lt;CODE&gt;double-quotes&lt;/CODE&gt;, like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup CSV-Generic-GenCus-GenLBL-SensitiveDataKeyWords.csv | map [search index="*" $keyword$ | eval kw="$keyword$", rex="$regex$" | regex($regex$)]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 May 2017 20:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320758#M95857</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-29T20:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Field not fillled through eval in map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320759#M95858</link>
      <description>&lt;P&gt;aha, I understand, that also explains why the regex was already showing up in the results, it is already enclosed by double quotes in the original CSV. &lt;/P&gt;

&lt;P&gt;works like a charm, thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 08:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320759#M95858</guid>
      <dc:creator>fvegdom</dc:creator>
      <dc:date>2017-05-30T08:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Field not fillled through eval in map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320760#M95859</link>
      <description>&lt;P&gt;There are dangers to using the subsearch syntax ( &lt;CODE&gt;[]&lt;/CODE&gt; ) instead of the normal double-quotes for &lt;CODE&gt;map&lt;/CODE&gt;.  It involves the fact that if your outer search is streaming (most likely), your subsearch will be restarted several times.  If it does something like send an email with &lt;CODE&gt;sendemail&lt;/CODE&gt;, you may find that it emails many times instead of the single time that you expected.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 21:16:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-not-fillled-through-eval-in-map/m-p/320760#M95859</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-04-12T21:16:49Z</dc:date>
    </item>
  </channel>
</rss>

