<?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 do I extract a particular text from url/api endpoint using regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-particular-text-from-url-api-endpoint-using/m-p/586349#M204264</link>
    <description>&lt;P&gt;I'm not&amp;nbsp;&lt;EM&gt;the&amp;nbsp;&lt;/EM&gt;best at regex but I think what you're going for is &lt;A href="https://regex101.com/r/u6YYMa/1" target="_self"&gt;this&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;^\S+service\/(?&amp;lt;end_points&amp;gt;[^\s]+)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Without seeing your more of the data around the URL, it's going to be hard to help you with an accurate regex.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Feb 2022 04:49:24 GMT</pubDate>
    <dc:creator>m_pham</dc:creator>
    <dc:date>2022-02-24T04:49:24Z</dc:date>
    <item>
      <title>How do I extract a particular text from url/api endpoint using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-particular-text-from-url-api-endpoint-using/m-p/586340#M204260</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;So, I have this URL/API endpoint as&amp;nbsp;&lt;STRONG&gt;&lt;A href="http://xml.app.com/pay/ent/auth/service/getId" target="_blank"&gt;http://xml.app.com/pay/ent/auth/service/getId&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;and I want to extract&amp;nbsp;&lt;STRONG&gt;getId&lt;/STRONG&gt;&amp;nbsp;for the index that has field name &lt;STRONG&gt;'end_points' &lt;/STRONG&gt;and create table for the same field name that only displays the text &lt;STRONG&gt;'getId'&lt;/STRONG&gt;&amp;nbsp;rather than the entire URL. How to do it using regex in Splunk. Although, I tried something like this: &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;rex "^http(s)?:\W+\w+\.\w+\.com\W\w+\W\w+\W\w+\W\w+\W(?&amp;lt;end_points&amp;gt;)" | table end_points&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Since, I started learning Splunk quite a few days ago, I'm new to this. Any help would be appreciated. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 03:05:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-particular-text-from-url-api-endpoint-using/m-p/586340#M204260</guid>
      <dc:creator>ashinde3</dc:creator>
      <dc:date>2022-02-24T03:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a particular text from url/api endpoint using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-particular-text-from-url-api-endpoint-using/m-p/586349#M204264</link>
      <description>&lt;P&gt;I'm not&amp;nbsp;&lt;EM&gt;the&amp;nbsp;&lt;/EM&gt;best at regex but I think what you're going for is &lt;A href="https://regex101.com/r/u6YYMa/1" target="_self"&gt;this&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;^\S+service\/(?&amp;lt;end_points&amp;gt;[^\s]+)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Without seeing your more of the data around the URL, it's going to be hard to help you with an accurate regex.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 04:49:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-particular-text-from-url-api-endpoint-using/m-p/586349#M204264</guid>
      <dc:creator>m_pham</dc:creator>
      <dc:date>2022-02-24T04:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract a particular text from url/api endpoint using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-particular-text-from-url-api-endpoint-using/m-p/586354#M204266</link>
      <description>&lt;P&gt;You're hugely overcomplicating this.&lt;/P&gt;&lt;PRE&gt;/(?&amp;lt;last_component&amp;gt;[^/]+/?)$&lt;/PRE&gt;&lt;P&gt;And if you already have a field called endpoints, you use it like this:&lt;/P&gt;&lt;PRE&gt;rex field=endpoints "/(?&amp;lt;last_component&amp;gt;[^/]+/?)$"&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Feb 2022 05:10:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-a-particular-text-from-url-api-endpoint-using/m-p/586354#M204266</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-02-24T05:10:07Z</dc:date>
    </item>
  </channel>
</rss>

