<?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 How to extract data at specific position from url? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595117#M207096</link>
    <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am new to splunk. I am searching the logs and I am getting my url like this&amp;nbsp;&lt;STRONG&gt;/api/sns/exts/djs/310200019110274535/ds/310200019110274536/. &lt;/STRONG&gt;What I want here is i want to extract the djs data which is&amp;nbsp;&lt;STRONG&gt;310200019110274535 &lt;/STRONG&gt;in this case. Any help would be appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Apr 2022 15:17:28 GMT</pubDate>
    <dc:creator>marcosjags</dc:creator>
    <dc:date>2022-04-25T15:17:28Z</dc:date>
    <item>
      <title>How to extract data at specific position from url?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595117#M207096</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am new to splunk. I am searching the logs and I am getting my url like this&amp;nbsp;&lt;STRONG&gt;/api/sns/exts/djs/310200019110274535/ds/310200019110274536/. &lt;/STRONG&gt;What I want here is i want to extract the djs data which is&amp;nbsp;&lt;STRONG&gt;310200019110274535 &lt;/STRONG&gt;in this case. Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 15:17:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595117#M207096</guid>
      <dc:creator>marcosjags</dc:creator>
      <dc:date>2022-04-25T15:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: extract data at specific position from url</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595118#M207097</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245172"&gt;@marcosjags&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if the string to extract is always in the seventh position in the url, you can use something lie this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "^(\/\w+){6}\/(?&amp;lt;djs&amp;gt;\d+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/HvJFCS/1" target="_blank"&gt;https://regex101.com/r/HvJFCS/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if instead after the string to extract there's always "/.", you can use this regex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;djs&amp;gt;\d+)\/\."&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 07:14:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595118#M207097</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-25T07:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: extract data at specific position from url</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595119#M207098</link>
      <description>&lt;P&gt;Or if it always follows "/djs/"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\/djs\/(?&amp;lt;djs&amp;gt;\d+)\/"&lt;/LI-CODE&gt;&lt;P&gt;The main thing is that you need to determine the pattern in the URL which helps you anchor where to find the data you are looking for.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 07:20:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595119#M207098</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-25T07:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: extract data at specific position from url</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595120#M207099</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;How can i show that in the table next to url like this&lt;BR /&gt;&lt;BR /&gt;/api/sns/exts/djs/310200019110274535/ds/310200019110274536/&amp;nbsp;&amp;nbsp;310200019110274535&lt;/P&gt;&lt;P&gt;do I have to hold this in a variable and then should I do&amp;nbsp;&lt;/P&gt;&lt;P&gt;table url variable&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 07:24:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595120#M207099</guid>
      <dc:creator>marcosjags</dc:creator>
      <dc:date>2022-04-25T07:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: extract data at specific position from url</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595121#M207100</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245172"&gt;@marcosjags&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you should try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| rex field=url "^(\/\w+){6}\/(?&amp;lt;variable&amp;gt;\d+)"
| table url variable&lt;/LI-CODE&gt;&lt;P&gt;If you need also to extract url field, you should share some sample of your logs.&lt;/P&gt;&lt;P&gt;My hint is to follow the Splunk Search Tutorial (&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchTutorial/WelcometotheSearchTutorial" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchTutorial/WelcometotheSearchTutorial&lt;/A&gt;)&amp;nbsp; to know how to use Splunk commands.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 07:28:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595121#M207100</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-25T07:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: extract data at specific position from url</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595124#M207101</link>
      <description>&lt;P&gt;Thanks for the help&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;. I will surely check the documentation&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 07:34:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595124#M207101</guid>
      <dc:creator>marcosjags</dc:creator>
      <dc:date>2022-04-25T07:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: extract data at specific position from url</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595125#M207102</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245172"&gt;@marcosjags&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 07:35:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-data-at-specific-position-from-url/m-p/595125#M207102</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-25T07:35:10Z</dc:date>
    </item>
  </channel>
</rss>

