<?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 substr is not working with large string of 20k characters in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603322#M209975</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I just have tried your suggestion,&lt;BR /&gt;&lt;BR /&gt;| rex field=msg "^(?&amp;lt;error&amp;gt;.{1000})"&amp;nbsp; | table field&lt;/P&gt;&lt;P&gt;However it didn't work.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jun 2022 05:53:36 GMT</pubDate>
    <dc:creator>RJDev</dc:creator>
    <dc:date>2022-06-27T05:53:36Z</dc:date>
    <item>
      <title>Why won't eval substr is work with large string of 20k characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/602348#M209657</link>
      <description>&lt;P&gt;Hi, I am new to Splunk. I just started using it last month. For me the below&amp;nbsp;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;" | eval error=substr(msg, 0, 1000) |&amp;nbsp; table error app_name"&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; is not working&amp;nbsp; with my alert event.&lt;/P&gt;
&lt;P&gt;It doesn't work for large strings with 20k or more characters. The table cells show blank in this case. But values can be found in verbose mode but in fast mode.&lt;/P&gt;
&lt;P&gt;However it works when the msg is of ~1150 characters.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 16:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/602348#M209657</guid>
      <dc:creator>RJDev</dc:creator>
      <dc:date>2022-06-21T16:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: eval substr is not working with large string of 20k characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/602381#M209671</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247013"&gt;@RJDev&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;It's really stronge, it's the first time I see an issue like this, anyway, you could try to use the rex command maybe it hasn't the same limit:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=msg "^(?&amp;lt;error&amp;gt;.{1000})"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 07:48:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/602381#M209671</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-06-20T07:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: eval substr is not working with large string of 20k characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/602410#M209681</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247013"&gt;@RJDev&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I think it should work. I've check by using below search. You can try it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1
| eval error="abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz" 
| foreach 1,2,3,4,5,6,7,8,9,10 
    [| eval error=error.error]
| eval erro_new=substr(error, 0, 1000)
| eval error_c = len(error)
| eval erro_new_c = len(erro_new)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-06-20 at 5.48.21 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20178i4E4EC5CCB58CAAFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-06-20 at 5.48.21 PM.png" alt="Screenshot 2022-06-20 at 5.48.21 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 12:19:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/602410#M209681</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2022-06-20T12:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: eval substr is not working with large string of 20k characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603196#M209920</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;Thanks for replying.&lt;/P&gt;&lt;P&gt;Apologies for delayed response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will definitely give this a try shortly and let you know&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 18:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603196#M209920</guid>
      <dc:creator>RJDev</dc:creator>
      <dc:date>2022-06-24T18:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: eval substr is not working with large string of 20k characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603322#M209975</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I just have tried your suggestion,&lt;BR /&gt;&lt;BR /&gt;| rex field=msg "^(?&amp;lt;error&amp;gt;.{1000})"&amp;nbsp; | table field&lt;/P&gt;&lt;P&gt;However it didn't work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 05:53:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603322#M209975</guid>
      <dc:creator>RJDev</dc:creator>
      <dc:date>2022-06-27T05:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: eval substr is not working with large string of 20k characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603324#M209977</link>
      <description>&lt;P&gt;Did you mean&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... | table error&lt;/LI-CODE&gt;&lt;P&gt;You are extracting error with the rex command, not field&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 06:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603324#M209977</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-06-27T06:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: eval substr is not working with large string of 20k characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603328#M209978</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247013"&gt;@RJDev&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes, as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;hinted:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=msg "^(?&amp;lt;error&amp;gt;.{1000})"
| table error&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 06:37:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603328#M209978</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-06-27T06:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: eval substr is not working with large string of 20k characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603356#M209982</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I tried that too.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| rex field=msg "^(?&amp;lt;error&amp;gt;.{1000})"&amp;nbsp; | table error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Still no luck.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 09:29:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603356#M209982</guid>
      <dc:creator>RJDev</dc:creator>
      <dc:date>2022-06-27T09:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why won't eval substr is work with large string of 20k characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603473#M210006</link>
      <description>&lt;P&gt;Does the makeresults example work in your instance? If so, it would appear that the 20k is not an issue?&lt;/P&gt;&lt;P&gt;If it works, then there is one thing that may be relevant. If your field is a multivalue field, then it substr will not work.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 23:04:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-won-t-eval-substr-is-work-with-large-string-of-20k/m-p/603473#M210006</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-06-27T23:04:18Z</dc:date>
    </item>
  </channel>
</rss>

