<?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 a URL from a text string and assign it to a variable in Splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264079#M79270</link>
    <description>&lt;P&gt;Need a sample log entry&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2016 16:46:39 GMT</pubDate>
    <dc:creator>twinspop</dc:creator>
    <dc:date>2016-09-01T16:46:39Z</dc:date>
    <item>
      <title>How to extract a URL from a text string and assign it to a variable in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264078#M79269</link>
      <description>&lt;P&gt;I cannot find a working example of this anywhere.  I can find examples a mile long on google, but am having trouble actually assigning them to a variable in Splunk.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 16:42:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264078#M79269</guid>
      <dc:creator>Cuyose</dc:creator>
      <dc:date>2016-09-01T16:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a URL from a text string and assign it to a variable in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264079#M79270</link>
      <description>&lt;P&gt;Need a sample log entry&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 16:46:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264079#M79270</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-09-01T16:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a URL from a text string and assign it to a variable in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264080#M79271</link>
      <description>&lt;P&gt;http or https &lt;BR /&gt;
then ://&lt;BR /&gt;
then anything up to .&lt;BR /&gt;
then anything up to .&lt;BR /&gt;
then anything up to first /&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 17:00:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264080#M79271</guid>
      <dc:creator>Cuyose</dc:creator>
      <dc:date>2016-09-01T17:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a URL from a text string and assign it to a variable in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264081#M79272</link>
      <description>&lt;P&gt;Try this, for 3 capturing groups. You can name each group, if desired.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "https?:\/\/([^\.]+)\.([^\.]+)\.([^\/]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Sep 2016 17:05:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264081#M79272</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-01T17:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a URL from a text string and assign it to a variable in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264082#M79273</link>
      <description>&lt;P&gt;I got what I needed using the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=_raw "(?(https?:\/\/([-\w\.]+)+(:\d+)?))"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Sep 2016 17:08:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-URL-from-a-text-string-and-assign-it-to-a/m-p/264082#M79273</guid>
      <dc:creator>Cuyose</dc:creator>
      <dc:date>2016-09-01T17:08:03Z</dc:date>
    </item>
  </channel>
</rss>

