<?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 Help with regex to extract a string? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-extract-a-string/m-p/317803#M95090</link>
    <description>&lt;P&gt;Need to fetch API name from URL. &lt;BR /&gt;
e.g.  base_url/products_support/system_name/api-name?parameters&lt;/P&gt;

&lt;P&gt;Here I need to fetch "system_name/api-name" string between "product_support" and "?". &lt;/P&gt;

&lt;P&gt;Any inputs which regex needs to use here?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 17:03:19 GMT</pubDate>
    <dc:creator>Pramodkuber</dc:creator>
    <dc:date>2020-09-29T17:03:19Z</dc:date>
    <item>
      <title>Help with regex to extract a string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-extract-a-string/m-p/317803#M95090</link>
      <description>&lt;P&gt;Need to fetch API name from URL. &lt;BR /&gt;
e.g.  base_url/products_support/system_name/api-name?parameters&lt;/P&gt;

&lt;P&gt;Here I need to fetch "system_name/api-name" string between "product_support" and "?". &lt;/P&gt;

&lt;P&gt;Any inputs which regex needs to use here?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:03:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-extract-a-string/m-p/317803#M95090</guid>
      <dc:creator>Pramodkuber</dc:creator>
      <dc:date>2020-09-29T17:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex to extract a string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-extract-a-string/m-p/317804#M95091</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=YourFieldHere "(?&amp;lt;base_url&amp;gt;[^\/?]+)\/(?&amp;lt;producst_support&amp;gt;[^\/?]+)\/(?&amp;lt;system_name&amp;gt;[^\/?]+)\/(?&amp;lt;api_name&amp;gt;[^\/?]+)?(?&amp;lt;parameters&amp;gt;.*)$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Dec 2017 21:48:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-extract-a-string/m-p/317804#M95091</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-12-01T21:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex to extract a string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-extract-a-string/m-p/317805#M95092</link>
      <description>&lt;P&gt;Thanks a lot for your inputs. This is really very helpful. But I have few URLs where parameters are coming in path instead of queryparams. &lt;BR /&gt;
How to take care of that? any idea?&lt;/P&gt;

&lt;P&gt;e.g. &lt;BR /&gt;
v2/customers/{customerID}/tickets&lt;BR /&gt;
v2/customers/123456/tickets&lt;BR /&gt;
v2/customers/987654/tickets&lt;/P&gt;

&lt;P&gt;When I use "| stats values(api_name)" I am getting very big list as customer ID are different. I am looking result for 2/customers/&lt;EM&gt;/tickets&lt;BR /&gt;
"&lt;/EM&gt;" should take care of all dynamic values for customer Ids and " stats values(api_name)" sjoul return only one row for "v2/customers/*/tickets"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:16:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-extract-a-string/m-p/317805#M95092</guid>
      <dc:creator>Pramodkuber</dc:creator>
      <dc:date>2020-09-29T17:16:51Z</dc:date>
    </item>
  </channel>
</rss>

