<?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 Parse response string value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595664#M207312</link>
    <description>&lt;P&gt;I think you misunderstood the post - the search I gave was an example showing you how it works using your data. However, the solution is just the replace or rex statement - this regex is simply using a regular expression to remove the bits you don't want - i.e. _ followed by one or more numbers to the end of the string.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Data_Method_1=replace(Data, "_\d+$", "")&lt;/LI-CODE&gt;&lt;P&gt;Change 'Data' to your field name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2022 22:42:15 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2022-04-27T22:42:15Z</dc:date>
    <item>
      <title>How to Parse response string value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595294#M207172</link>
      <description>&lt;P&gt;I have a log I am am trying to parse one of the responses&lt;/P&gt;
&lt;P&gt;Field Value&lt;/P&gt;
&lt;P&gt;Test Response&lt;/P&gt;
&lt;P&gt;Response Test&lt;/P&gt;
&lt;P&gt;Testing_Response&lt;/P&gt;
&lt;P&gt;For the value "Testing_Response" I would like it to display "Testing" in the results.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 20:43:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595294#M207172</guid>
      <dc:creator>pmjoen</dc:creator>
      <dc:date>2022-04-25T20:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Parse response string value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595313#M207182</link>
      <description>&lt;P&gt;You can rename fields like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename Testing_Response as Testing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;or if you are talking about changing the value of a field then there are various ways, but try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval your_field=if(your_field="Testing_Response", "Testing", your_field)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 00:32:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595313#M207182</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-04-26T00:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Parse response string value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595443#M207234</link>
      <description>&lt;P&gt;In this scenario, the data is similar to this:&lt;/P&gt;&lt;P&gt;Document A&lt;/P&gt;&lt;P&gt;Document B&lt;/P&gt;&lt;P&gt;Document C_1425&lt;/P&gt;&lt;P&gt;Document C_2235&lt;/P&gt;&lt;P&gt;Document C_5134&lt;/P&gt;&lt;P&gt;I am grouping them together but due to the _number changing not matching it wont group them and I am looking to remove the _number from each one.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 15:56:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595443#M207234</guid>
      <dc:creator>pmjoen</dc:creator>
      <dc:date>2022-04-26T15:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to Parse response string value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595495#M207248</link>
      <description>&lt;P&gt;Here are two ways, using regex to do that&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval Data=split("Document A,Document B,Document C_1425,Document C_2235,Document C_5134", ",")
| fields - _time
| mvexpand Data
| eval Data_Method_1=replace(Data, "_\d+$", "")
| eval Data_Method_2=Data
| rex field=Data_Method_2 mode=sed "s/_\d+$//"&lt;/LI-CODE&gt;&lt;P&gt;so, you can either use replace() or rex mode=sed&lt;/P&gt;&lt;P&gt;Either way, you are defining the regex to remove what you don't want&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 23:38:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595495#M207248</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-04-26T23:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to Parse response string value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595613#M207293</link>
      <description>&lt;P&gt;As the value&amp;nbsp;&lt;SPAN&gt;Document C_2235 would&amp;nbsp;&lt;/SPAN&gt;grow exponentially, would your example require me to enter all values?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 15:52:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595613#M207293</guid>
      <dc:creator>pmjoen</dc:creator>
      <dc:date>2022-04-27T15:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to Parse response string value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595624#M207297</link>
      <description>&lt;P&gt;Resolved with following:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;replace “Document C_*” with “Document C” in &amp;lt;field name&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 17:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595624#M207297</guid>
      <dc:creator>pmjoen</dc:creator>
      <dc:date>2022-04-27T17:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Parse response string value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595664#M207312</link>
      <description>&lt;P&gt;I think you misunderstood the post - the search I gave was an example showing you how it works using your data. However, the solution is just the replace or rex statement - this regex is simply using a regular expression to remove the bits you don't want - i.e. _ followed by one or more numbers to the end of the string.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Data_Method_1=replace(Data, "_\d+$", "")&lt;/LI-CODE&gt;&lt;P&gt;Change 'Data' to your field name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 22:42:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Parse-response-string-value/m-p/595664#M207312</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-04-27T22:42:15Z</dc:date>
    </item>
  </channel>
</rss>

