<?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 portion of the string using Regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515008#M144565</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;to4kawa,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Required your help one more time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This time I have field Request_URL like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://xyz/api/connections/c1d30603ddf0" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://xyz/api/connections/c1d30603ddf0&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;A href="https://lpdosputb50088.phx.aexp.com:9091/nifi-api/flow/process-groups/cccc33ba-46ae-13ed-a423-314e8fead333/controller-services" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://yte/api/flow/groups/314e8fead333/controller-services&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://tyu/api/services/968d06b5666b" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://tyu/api/services/968d06b5666b&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://hju/api/processors/b5f990b529f4/run-status" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://hju/api/processors/b5f990b529f4/run-status&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to extract&amp;nbsp;&lt;A href="https://xyz/api/connections/c1d30603ddf0" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;c1d30603ddf0&lt;/A&gt;,&lt;A href="https://lpdosputb50088.phx.aexp.com:9091/nifi-api/flow/process-groups/cccc33ba-46ae-13ed-a423-314e8fead333/controller-services" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;314e8fead333,&lt;/A&gt;&lt;A href="https://tyu/api/services/968d06b5666b" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;968d06b5666b,&lt;/A&gt;&lt;A href="https://hju/api/processors/b5f990b529f4/run-status" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;b5f990b529f4 &lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;portion . This time Request_Url is different. Can you guide me how can I do this?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Aug 2020 16:16:52 GMT</pubDate>
    <dc:creator>aditsss</dc:creator>
    <dc:date>2020-08-19T16:16:52Z</dc:date>
    <item>
      <title>How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514351#M144355</link>
      <description>&lt;P&gt;Hi Eveyone,&lt;/P&gt;&lt;P&gt;Can anyone help me out in this.&lt;/P&gt;&lt;P&gt;I have a field name&amp;nbsp; &amp;nbsp; Request_URL as =&amp;nbsp;&lt;A href="https://xyz/api/groups/230df08c/registry" target="_blank"&gt;https://xyz/api/groups/230df08c/registry&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I want to extarct "&lt;A href="https://xyz/api/groups/230df08c/registry" target="_blank"&gt;230df08c&lt;/A&gt;" portion from every Request_URL .&lt;/P&gt;&lt;P&gt;Can someone guide me with the regular expression of it in splunk&lt;/P&gt;&lt;P&gt;Thanks In advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 20:32:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514351#M144355</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-16T20:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514357#M144356</link>
      <description>&lt;P&gt;| rex field=&lt;SPAN&gt;Request_URL "groups\/(?&amp;lt;id&amp;gt;[^\/]+)"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 08:38:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514357#M144356</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-17T08:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514409#M144368</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Ultra Champion.&lt;/P&gt;&lt;P&gt;I tried this not working getting&amp;nbsp; the below Error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error in 'rex' command: The regex 'Request_URL' does not extract anything. It should specify at least one named group. Format: (?&amp;lt;name&amp;gt;...).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 08:34:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514409#M144368</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-17T08:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514410#M144369</link>
      <description>&lt;P&gt;field=(space)Request_URL is my mistake. please fix it.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 08:37:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514410#M144369</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-17T08:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514412#M144370</link>
      <description>&lt;P&gt;Hi I tried with space. But still getting the same Error&lt;/P&gt;&lt;P&gt;rex field =&amp;nbsp; &amp;nbsp;Request_URL "groups\/(?&amp;lt;id&amp;gt;[^\/]+)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error in 'rex' command: The regex 'field' does not extract anything. It should specify at least one named group. Format: (?&amp;lt;name&amp;gt;...).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 08:55:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514412#M144370</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-17T08:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514420#M144371</link>
      <description>&lt;P&gt;remove space&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 10:07:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514420#M144371</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-17T10:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514426#M144373</link>
      <description>&lt;P&gt;Thanks a lot!!!! It works.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 11:01:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/514426#M144373</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-17T11:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515008#M144565</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;to4kawa,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Required your help one more time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This time I have field Request_URL like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://xyz/api/connections/c1d30603ddf0" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://xyz/api/connections/c1d30603ddf0&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;A href="https://lpdosputb50088.phx.aexp.com:9091/nifi-api/flow/process-groups/cccc33ba-46ae-13ed-a423-314e8fead333/controller-services" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://yte/api/flow/groups/314e8fead333/controller-services&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://tyu/api/services/968d06b5666b" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://tyu/api/services/968d06b5666b&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://hju/api/processors/b5f990b529f4/run-status" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://hju/api/processors/b5f990b529f4/run-status&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to extract&amp;nbsp;&lt;A href="https://xyz/api/connections/c1d30603ddf0" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;c1d30603ddf0&lt;/A&gt;,&lt;A href="https://lpdosputb50088.phx.aexp.com:9091/nifi-api/flow/process-groups/cccc33ba-46ae-13ed-a423-314e8fead333/controller-services" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;314e8fead333,&lt;/A&gt;&lt;A href="https://tyu/api/services/968d06b5666b" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;968d06b5666b,&lt;/A&gt;&lt;A href="https://hju/api/processors/b5f990b529f4/run-status" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;b5f990b529f4 &lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;portion . This time Request_Url is different. Can you guide me how can I do this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 16:16:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515008#M144565</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-19T16:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515362#M144686</link>
      <description>&lt;P&gt;Hi , I am not allow to temper data.&lt;/P&gt;&lt;P&gt;Is there any other approach I can follow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please guide me.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 04:37:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515362#M144686</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-21T04:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515366#M144688</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225066"&gt;@aditsss&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Based on your examples, the following will work for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...| rex field=Request_URL "([^\r\n\/]*\/){4,5}(connections|groups|services|processors)\/(?&amp;lt;id&amp;gt;[^\r\n\/]+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;If you need to alter this further, or understand what the regex code is doing, then I suggest a site like regex101 (&lt;A href="https://regex101.com/" target="_blank" rel="noopener"&gt;https://regex101.com/&lt;/A&gt;) as a useful place to test and learn about regex code.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 05:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515366#M144688</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2020-08-21T05:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515396#M144705</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I cant hard coded the words&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;connections|groups|services|processors&lt;/PRE&gt;&lt;P&gt;These are some of the examples I have given of the Request_URL&lt;/P&gt;&lt;P&gt;&lt;A href="https://uyz/api/flow/controller-service-types" target="_blank" rel="noopener"&gt;https://uyz/api/flow/controller-service-types&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There are certain URL's which are of these types(as shown above). If I will hardcode the word then they will not come. I want to display the whole data . The REQUEST_URL which contain the id should display id otherwise blank.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 08:37:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515396#M144705</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-21T08:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515401#M144707</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225066"&gt;@aditsss&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;to extract a regex, you have to find a rule: position, format, near words, or a combination of them, otherwise it isn't possible to extract the word you need.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 08:55:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515401#M144707</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-21T08:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515474#M144734</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will follow this approch&lt;/P&gt;&lt;PRE&gt;rex field=Request_URL "([^\r\n\/]*\/){4,5}(connections|groups|services|processors)\/(?&amp;lt;id&amp;gt;[^\r\n\/]+)"&lt;/PRE&gt;&lt;P&gt;But there are certain URL's which also have index at 3,6,7,8&lt;/P&gt;&lt;P&gt;https://apz/api/queues/61c458568edb/flowfiles/content /regisrtry&lt;/P&gt;&lt;P&gt;&lt;A href="https://tyu/policies/read/groups/46583e4d-5984-189c-87e8-4e25daf4d5d6/var" target="_blank"&gt;https://tyu/policies/read/groups/4e25daf4d5d6/var&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://com/6547890e/" target="_blank"&gt;https://com/6547890e/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can u give me complete regex with all indexes as {3,4,5,6,7,8} to extract id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 14:17:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515474#M144734</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-21T14:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515503#M144741</link>
      <description>&lt;P&gt;Please guide me on that .&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 16:07:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515503#M144741</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-21T16:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515522#M144746</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can someone please provide me the complete regex for {3,4,5,6,7,8} as well.&lt;/P&gt;&lt;P&gt;Below regex will going to work for me. Please provide me for {3,4,5,6,7,8} currently I am getting records only which have{4,5} from below regex.&lt;/P&gt;&lt;PRE&gt; rex field=Request_URL "([^\r\n\/]*\/){4,5}(connections|groups|services|processors)\/(?&amp;lt;id&amp;gt;[^\r\n\/]+)"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Please provide me complete regex.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 17:58:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515522#M144746</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-21T17:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515524#M144748</link>
      <description>&lt;P&gt;Looks like you are trying to extract a hexadecimal string - try this:&lt;/P&gt;&lt;P&gt;| rex field=Request_URL "\/(?&amp;lt;id&amp;gt;[0-9a-f]+)($|\/)"&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 17:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515524#M144748</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-08-21T17:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515536#M144754</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not able to see any records from this.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| rex field=Request_URL "\/(?&amp;lt;id&amp;gt;[0-9a-f]+)($|\/)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Previously after using this&lt;/P&gt;&lt;PRE&gt;| rex field=Request_URL "([^\r\n\/]*\/){4,5}(connections|groups|services|processors)\/(?&amp;lt;id&amp;gt;[^\r\n\/]+)"&lt;/PRE&gt;&lt;P&gt;I am able to fetch the ID from the Request_url which includes 4 and 5 slash like below&lt;/P&gt;&lt;P&gt;&lt;A href="https://xyz/api/connections/c1d30603ddf0" target="_blank" rel="noopener nofollow noopener noreferrer noopener noreferrer"&gt;https://xyz/api/connections/c1d30603ddf0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://hju/api/processors/b5f990b529f4/run-status" target="_blank" rel="noopener nofollow noopener noreferrer noopener noreferrer"&gt;https://hju/api/processors/b5f990b529f4/run-status&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But I also have Reuest_Url which includes slashes as 3,6,7,8 as well like below&lt;/P&gt;&lt;P&gt;https://apz/api/queues/61c458568edb/flowfiles/content /regisrtry&lt;/P&gt;&lt;P&gt;&lt;A href="https://tyu/policies/read/groups/46583e4d-5984-189c-87e8-4e25daf4d5d6/var" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tyu/policies/read/groups/4e25daf4d5d6/var&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://com/6547890e/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://com/6547890e/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;so basically I want this below complete regex for slashes (3,4,5,6,7,8)&lt;/P&gt;&lt;PRE&gt;rex field=Request_URL "([^\r\n\/]*\/){4,5}(connections|groups|services|processors)\/(?&amp;lt;id&amp;gt;[^&lt;BR /&gt;\r\n\/]+)"&lt;/PRE&gt;&lt;P&gt;Please help me out in this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 19:19:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515536#M144754</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-21T19:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515542#M144758</link>
      <description>&lt;LI-CODE lang="markup"&gt;(?J)(\/api\/\w+\/(?&amp;lt;id&amp;gt;\w+))|(\/groups\/(?&amp;lt;id&amp;gt;\w+))|(\/com\/(?&amp;lt;id&amp;gt;\w+))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;REGEX must be made to match the exact log.&lt;BR /&gt;It is impossible to create a reliable one if you are not presented with the correct sample.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 20:11:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515542#M144758</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-21T20:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515555#M144763</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225066"&gt;@aditsss&lt;/a&gt;&amp;nbsp;I am not sure what it is you are trying to do. Given the example URLs you have provided, the rex expression will extract the ids. Is this not what you are after&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="67px"&gt;| makeresults | eval Request_URL="https://xyz/api/connections/c1d30603ddf0|https://hju/api/processors/b5f990b529f4/run-status|https://apz/api/queues/61c458568edb/flowfiles/content/regisrtry|https://tyu/policies/read/groups/4e25daf4d5d6/var|https://com/6547890e/" | makemv delim="|" Request_URL | mvexpand Request_URL | rex field=Request_URL "\/(?&amp;lt;id&amp;gt;[0-9a-f]+)($|\/)" | fields - _time&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Request_URL&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;id&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;https://xyz/api/connections/c1d30603ddf0&lt;/TD&gt;&lt;TD width="50%"&gt;c1d30603ddf0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;https://hju/api/processors/b5f990b529f4/run-status&lt;/TD&gt;&lt;TD width="50%"&gt;b5f990b529f4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;https://apz/api/queues/61c458568edb/flowfiles/content/regisrtry&lt;/TD&gt;&lt;TD width="50%"&gt;61c458568edb&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;https://tyu/policies/read/groups/4e25daf4d5d6/var&lt;/TD&gt;&lt;TD width="50%"&gt;4e25daf4d5d6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;https://com/6547890e/&lt;/TD&gt;&lt;TD width="50%"&gt;6547890e&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 21 Aug 2020 21:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515555#M144763</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-08-21T21:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract portion of the string using Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515562#M144765</link>
      <description>&lt;P&gt;Hi WHisperer, to4kawa&lt;/P&gt;&lt;P&gt;My requirement is some what like this.&lt;/P&gt;&lt;P&gt;I have a field called Request_URL (50+ Request_URL are there)&lt;/P&gt;&lt;P&gt;Some of the sample Request_URL 's are&lt;/P&gt;&lt;P&gt;&lt;A href="https://abc/api/flow/groups/7d0c111a-0173-1000-ffff-ffffb9f9694c" target="_blank"&gt;https://abc/api/flow/groups/7d0c111a-0173-1000-ffff-ffffb9f9694c&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://uip/api/groups/3fe13d52-d326-15a1-acef-ed3395edd973/variable-registry" target="_blank"&gt;https://uip/api/groups/3fe13d52-d326-15a1-acef-ed3395edd973/variable-registry&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://yui/api/flowfile-queues/05ee3b30-d5e1-1977-9aa9-61c458568edb/flowfiles/content" target="_blank"&gt;https://yui/api/flowfile-queues/05ee3b30-d5e1-1977-9aa9-61c458568edb/flowfiles/content&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://hjk/api/connections/0a88df6f-0174-1000-0000-0000577a28e9" target="_blank"&gt;https://hjk/api/connections/0a88df6f-0174-1000-0000-0000577a28e9&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://com/6547890e/" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer"&gt;https://com/022adcc6-8001-3d7a-b291-3d0831458357/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I want to extract ID's from Request_URL i.e&amp;nbsp;&lt;A href="https://abc/api/flow/groups/7d0c111a-0173-1000-ffff-ffffb9f9694c" target="_blank"&gt;7d0c111a-0173-1000-ffff-ffffb9f9694c&lt;/A&gt;,&lt;A href="https://uip/api/groups/3fe13d52-d326-15a1-acef-ed3395edd973/variable-registry" target="_blank"&gt;3fe13d52-d326-15a1-acef-ed3395edd973&lt;/A&gt;&amp;nbsp;etc. ID pattern is same in all Request_URL.&lt;/P&gt;&lt;P&gt;What is the exact Regex that I can use as the patterns of the URL is different.&lt;/P&gt;&lt;P&gt;I use below Regex but its showing only the Request_URL with {4,5} / slashes&lt;/P&gt;&lt;PRE&gt;rex field=Request_URL "([^\r\n\/]*\/){4,5}(connections|groups|services|processors)\/(?&amp;lt;id&amp;gt;[^&lt;BR /&gt;\r\n\/]+)"&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Can someone provide me complete Regex for it.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 22:03:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-portion-of-the-string-using-Regex/m-p/515562#M144765</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2020-08-21T22:03:38Z</dc:date>
    </item>
  </channel>
</rss>

