<?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 id from url message? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-id-from-url-message/m-p/619392#M215273</link>
    <description>&lt;P&gt;The sample data looks like _raw rather than msg.&lt;/P&gt;&lt;P&gt;You can try something like this which extracts any 13 digit number nested between forward slashes. This could be more flexible depending on the variability of your data.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\/(?&amp;lt;myid&amp;gt;\d{13})\/"
| table myid&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Nov 2022 01:43:26 GMT</pubDate>
    <dc:creator>johnhuang</dc:creator>
    <dc:date>2022-11-03T01:43:26Z</dc:date>
    <item>
      <title>How to extract id from url message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-id-from-url-message/m-p/619373#M215266</link>
      <description>&lt;P&gt;Hi, I have below message and Iam trying to use rex to extract the id... But myid always shows empty.. Please help&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN class=""&gt;02/Nov/2022:17:43:03&lt;/SPAN&gt; &lt;SPAN class=""&gt;-0400&lt;/SPAN&gt;&lt;SPAN&gt;] "&lt;/SPAN&gt;&lt;SPAN class=""&gt;PUT&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/application/resources/cat/v7/product/&lt;/SPAN&gt;1234567890003/&lt;SPAN class=""&gt;status&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;HTTP/1.1&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;201&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt;&amp;nbsp;abcd&lt;SPAN class=""&gt;.com&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;8&lt;/SPAN&gt; &lt;SPAN class=""&gt;web-614&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rex field=msg "&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/application/resources/cat/v7/product/&lt;/SPAN&gt;&lt;/SPAN&gt;(?&amp;lt;myid&amp;gt;[0-9]*)/&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;status&lt;/SPAN&gt;&lt;/SPAN&gt;" | table myid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 22:57:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-id-from-url-message/m-p/619373#M215266</guid>
      <dc:creator>Span</dc:creator>
      <dc:date>2022-11-02T22:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract id from url message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-id-from-url-message/m-p/619381#M215271</link>
      <description>&lt;P&gt;Slashes in regular expressions must be escaped.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;rex field=msg "\/application\/resources\/cat\/v7\/product\/(?&amp;lt;myid&amp;gt;[0-9]*)/status" | table myid&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Nov 2022 23:59:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-id-from-url-message/m-p/619381#M215271</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-02T23:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract id from url message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-id-from-url-message/m-p/619392#M215273</link>
      <description>&lt;P&gt;The sample data looks like _raw rather than msg.&lt;/P&gt;&lt;P&gt;You can try something like this which extracts any 13 digit number nested between forward slashes. This could be more flexible depending on the variability of your data.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\/(?&amp;lt;myid&amp;gt;\d{13})\/"
| table myid&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 01:43:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-id-from-url-message/m-p/619392#M215273</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-11-03T01:43:26Z</dc:date>
    </item>
  </channel>
</rss>

