<?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 Extract a Part of the field in splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-Extract-a-Part-of-the-field-in-splunk/m-p/514046#M144289</link>
    <description>&lt;P&gt;| eval result=mvindex(split(URL,"/"),-1)&lt;/P&gt;</description>
    <pubDate>Fri, 14 Aug 2020 08:32:55 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-08-14T08:32:55Z</dc:date>
    <item>
      <title>How to Extract a Part of the field in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Extract-a-Part-of-the-field-in-splunk/m-p/514040#M144286</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;It would be great if someone help me on this.&lt;/P&gt;&lt;P&gt;I am having one field URL in my raw data.&lt;/P&gt;&lt;P&gt;URL =&amp;nbsp;&lt;A href="https://jfghdw.ind.com:1001/api/flow/groups/186yugh-w12-567c-b89-pghj67y" target="_blank" rel="noopener"&gt;https://jfghdw.ind.com:1001/xyz/flow/group/186yugh-w12-567c-b89-pghj67y&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Now I want to extract only the last portion(that will be different for each URL so Cant take hard coded value) of the field URL&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to extract the 6th portion of the field that is "&lt;A href="https://jfghdw.ind.com:1001/api/flow/groups/186yugh-w12-567c-b89-pghj67y" target="_blank" rel="noopener"&gt;186yugh-w12-567c-b89-pghj67y"&lt;/A&gt;&amp;nbsp;(It will be different for each URL)&lt;/P&gt;&lt;P&gt;using regular expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 07:16:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Extract-a-Part-of-the-field-in-splunk/m-p/514040#M144286</guid>
      <dc:creator>chavi</dc:creator>
      <dc:date>2020-08-14T07:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Extract a Part of the field in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Extract-a-Part-of-the-field-in-splunk/m-p/514046#M144289</link>
      <description>&lt;P&gt;| eval result=mvindex(split(URL,"/"),-1)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 08:32:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Extract-a-Part-of-the-field-in-splunk/m-p/514046#M144289</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-14T08:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to Extract a Part of the field in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Extract-a-Part-of-the-field-in-splunk/m-p/514069#M144292</link>
      <description>&lt;P&gt;Hi Chavi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the URL always going to be the same?&lt;/P&gt;&lt;P&gt;If that is the case you could use the following: regular expression:&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="snippet.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10251i9E69FFBEB110E38D/image-size/large?v=v2&amp;amp;px=999" role="button" title="snippet.PNG" alt="snippet.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If the URL is dynamic in each event then its probably best to use a &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchReference/MultivalueEvalFunctions" target="_blank" rel="noopener"&gt;multi value eval function&lt;/A&gt; like mvindex:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10252iF1EEFF91A2603538/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have any more question do not hesitate to respond.&lt;/P&gt;&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;bquirin&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 10:53:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Extract-a-Part-of-the-field-in-splunk/m-p/514069#M144292</guid>
      <dc:creator>bquirin</dc:creator>
      <dc:date>2020-08-14T10:53:30Z</dc:date>
    </item>
  </channel>
</rss>

