<?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 create a Splunk regex to match URI? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-regex-to-match-URI/m-p/378658#M110988</link>
    <description>&lt;P&gt;Have you seen the URL Toolbox app (&lt;A href="https://splunkbase.splunk.com/app/2734/"&gt;https://splunkbase.splunk.com/app/2734/&lt;/A&gt;)?  It will parse the URL for you.&lt;/P&gt;

&lt;P&gt;If you really want or need to do it yourself, provide some sample data and we should be able to help you find a regex string that works with it.&lt;/P&gt;</description>
    <pubDate>Tue, 01 May 2018 18:31:17 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2018-05-01T18:31:17Z</dc:date>
    <item>
      <title>How to create a Splunk regex to match URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-regex-to-match-URI/m-p/378657#M110987</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I am trying to come up with a Splunk regex search for detecting URIs of URLs.&lt;BR /&gt;
What I am interested in is the last random character and length string after the forward slash of the URLs below:&lt;/P&gt;

&lt;P&gt;txx.zlx.mam-bg.ru/avuTbur334vxasd&lt;BR /&gt;
zlx.axa.babishop18.ml/aipiruqwbXasal2&lt;/P&gt;

&lt;P&gt;My fast solution to this so far is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`... | regex uri="^/[a-zA-Z0`-9]{8,20}$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I am unable to verify if this works as I don't have access to the logs currently.&lt;BR /&gt;
Any suggestions for improvement would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 15:46:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-regex-to-match-URI/m-p/378657#M110987</guid>
      <dc:creator>danast</dc:creator>
      <dc:date>2018-05-01T15:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Splunk regex to match URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-regex-to-match-URI/m-p/378658#M110988</link>
      <description>&lt;P&gt;Have you seen the URL Toolbox app (&lt;A href="https://splunkbase.splunk.com/app/2734/"&gt;https://splunkbase.splunk.com/app/2734/&lt;/A&gt;)?  It will parse the URL for you.&lt;/P&gt;

&lt;P&gt;If you really want or need to do it yourself, provide some sample data and we should be able to help you find a regex string that works with it.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 18:31:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-regex-to-match-URI/m-p/378658#M110988</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-05-01T18:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Splunk regex to match URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-regex-to-match-URI/m-p/378659#M110989</link>
      <description>&lt;P&gt;Rich thanks for the link to the app, I will give it a try later.&lt;/P&gt;

&lt;P&gt;I asked some sample URLs to be emailed, here they are:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.zdp.xu9lb084.IRISHKO.RU/bnhwf28dzmxoo"&gt;http://www.zdp.xu9lb084.IRISHKO.RU/bnhwf28dzmxoo&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://ylg.zc90xzeu.mama-bg.ru/aoxzc28jlcabog"&gt;http://ylg.zc90xzeu.mama-bg.ru/aoxzc28jlcabog&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://hzm.hzm.6ju4a0t6.river-runningasd.ga/gqnckvx30hxgdtils"&gt;http://hzm.hzm.6ju4a0t6.river-runningasd.ga/gqnckvx30hxgdtils&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;As you can see the last random character/length string after the domain suffix and / connect all of them. What I am trying to do here is to go through logs and find any urls that have such string. From what I know the length of the string varies between 8-20 characters.&lt;/P&gt;

&lt;P&gt;Any suggestions for improvement would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 18:50:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-regex-to-match-URI/m-p/378659#M110989</guid>
      <dc:creator>danast</dc:creator>
      <dc:date>2018-05-01T18:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Splunk regex to match URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-regex-to-match-URI/m-p/378660#M110990</link>
      <description>&lt;P&gt;The URL Toolbox app can do that easily.&lt;/P&gt;

&lt;P&gt;This regex string matches your sample text: &lt;CODE&gt;\.\w+\/(?&amp;lt;URI&amp;gt;.*)&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 13:27:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-regex-to-match-URI/m-p/378660#M110990</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-05-02T13:27:59Z</dc:date>
    </item>
  </channel>
</rss>

