<?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: Combine two values from the same field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-values-from-the-same-field/m-p/618245#M214865</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249566"&gt;@msarkaus&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if the structure of your field is always: /string/string and changes only for the last slash, you could use a regex like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| rex field=urlPthTxt "^(?&amp;lt;urlPthTxt_new&amp;gt;\/\w+\/\w+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/JqzYh2/1" target="_blank"&gt;https://regex101.com/r/JqzYh2/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2022 13:42:35 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-10-25T13:42:35Z</dc:date>
    <item>
      <title>How to combine two values from the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-values-from-the-same-field/m-p/618239#M214862</link>
      <description>&lt;P&gt;I'm trying to combine two simular values from the same field. and rename the values.&lt;/P&gt;
&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Splunk pic2.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22133i5DED1FAE19E96767/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Splunk pic2.png" alt="Splunk pic2.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Splunk pic2.png&lt;/span&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;I would like to combine&amp;nbsp; /v1/product and&amp;nbsp;/v1/product/ and rename it Product API&lt;/P&gt;
&lt;P&gt;Search String:&lt;/P&gt;
&lt;P&gt;| stats count by urlPthTxt&lt;/P&gt;
&lt;P&gt;I did try a few different&amp;nbsp; commands but didn't work. Please help.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 14:03:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-values-from-the-same-field/m-p/618239#M214862</guid>
      <dc:creator>msarkaus</dc:creator>
      <dc:date>2022-10-25T14:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Combine two values from the same field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-values-from-the-same-field/m-p/618245#M214865</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249566"&gt;@msarkaus&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if the structure of your field is always: /string/string and changes only for the last slash, you could use a regex like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| rex field=urlPthTxt "^(?&amp;lt;urlPthTxt_new&amp;gt;\/\w+\/\w+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/JqzYh2/1" target="_blank"&gt;https://regex101.com/r/JqzYh2/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 13:42:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-values-from-the-same-field/m-p/618245#M214865</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-25T13:42:35Z</dc:date>
    </item>
  </channel>
</rss>

