<?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: Eval String Function in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Eval-String-Function/m-p/174779#M50158</link>
    <description>&lt;P&gt;try this&lt;/P&gt;

&lt;P&gt;| eval newvariable=substr(newvariable,1,5)&lt;/P&gt;</description>
    <pubDate>Wed, 05 Mar 2014 16:53:00 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-03-05T16:53:00Z</dc:date>
    <item>
      <title>Eval String Function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-String-Function/m-p/174777#M50156</link>
      <description>&lt;P&gt;I would like to trim down a field to 5 characters using an Excel Left Logic. I have read some suggestions to use LEN, but the length of the field is not fixed. &lt;/P&gt;

&lt;P&gt;In Python I would do something like this:&lt;/P&gt;

&lt;P&gt;newvariable = 'blahblahblah'&lt;BR /&gt;
newvariable[0:4]&lt;BR /&gt;
blahb&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 14:38:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-String-Function/m-p/174777#M50156</guid>
      <dc:creator>ezajac</dc:creator>
      <dc:date>2014-03-05T14:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Eval String Function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-String-Function/m-p/174778#M50157</link>
      <description>&lt;P&gt;There are many examples here:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/web_assets/pdfs/secure/Splunk_Quick_Reference_Guide.pdf"&gt;http://www.splunk.com/web_assets/pdfs/secure/Splunk_Quick_Reference_Guide.pdf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I believe what you are looking for is "substr"&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 14:42:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-String-Function/m-p/174778#M50157</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-03-05T14:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Eval String Function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-String-Function/m-p/174779#M50158</link>
      <description>&lt;P&gt;try this&lt;/P&gt;

&lt;P&gt;| eval newvariable=substr(newvariable,1,5)&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 16:53:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-String-Function/m-p/174779#M50158</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-03-05T16:53:00Z</dc:date>
    </item>
  </channel>
</rss>

