<?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: trim a string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493769#M137689</link>
    <description>&lt;P&gt;lovely&lt;BR /&gt;
it's working&lt;BR /&gt;
thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 May 2020 11:36:10 GMT</pubDate>
    <dc:creator>vinitpathri</dc:creator>
    <dc:date>2020-05-12T11:36:10Z</dc:date>
    <item>
      <title>trim a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493765#M137685</link>
      <description>&lt;P&gt;i have a string &lt;BR /&gt;
14/04/2020|A3|ABC149251|text i really need &lt;/P&gt;

&lt;P&gt;can i run something which will trim this string from the end till it get 1st | (pipe symbol)?&lt;/P&gt;

&lt;P&gt;i tried rex for this but some error is coming which i am not able to resolve, so thought of taking it the above way.&lt;BR /&gt;
regular expression i am trying is&lt;/P&gt;

&lt;P&gt;(?^\d{2}\/\d{2}\/\d{2,4}|A\d|\ABC\d*|)(?[\w*\s-]+).&lt;BR /&gt;
getting below error&lt;BR /&gt;
Error in 'rex' command: Encountered the following error while compiling the regex '(?^\d{2}\/\d{2}\/\d{2,4}|A\d|\INC\d*|)(?[\w*\s-]+)': Regex: unrecognized character follows .&lt;/P&gt;

&lt;P&gt;please either correct my regex or let me know how to trim&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:21:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493765#M137685</guid>
      <dc:creator>vinitpathri</dc:creator>
      <dc:date>2020-09-30T05:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: trim a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493766#M137686</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;What is your expected output?&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 11:08:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493766#M137686</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-05-12T11:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: trim a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493767#M137687</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;your search
| eval result=mvindex(split(_raw,"|"),-1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;no need &lt;CODE&gt;rex&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 11:16:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493767#M137687</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-12T11:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: trim a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493768#M137688</link>
      <description>&lt;P&gt;output i am expecting : text i really need&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 11:34:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493768#M137688</guid>
      <dc:creator>vinitpathri</dc:creator>
      <dc:date>2020-05-12T11:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: trim a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493769#M137689</link>
      <description>&lt;P&gt;lovely&lt;BR /&gt;
it's working&lt;BR /&gt;
thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 11:36:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493769#M137689</guid>
      <dc:creator>vinitpathri</dc:creator>
      <dc:date>2020-05-12T11:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: trim a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493770#M137690</link>
      <description>&lt;P&gt;you're welcome and please accept the answer.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 11:37:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493770#M137690</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-12T11:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: trim a string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493771#M137691</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;You can try this also&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval str="14/04/2020|A3|ABC149251|text" 
| rex field=str "(?P&amp;lt;output&amp;gt;[^|]+)$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 May 2020 11:40:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/trim-a-string/m-p/493771#M137691</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-05-12T11:40:31Z</dc:date>
    </item>
  </channel>
</rss>

