<?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 extracting specific data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-specific-data/m-p/260806#M78242</link>
    <description>&lt;P&gt;Given bunch of results in a format like:&lt;/P&gt;

&lt;P&gt;6d2112effbe814f41ef6a6b984221c2490ef5112b70d394c074bb1427561556c some.site.com REST.GET.OBJECT text/2015/xml/somefile.xml "GET /some.site.com/text/2015/xml/somefile.xmll?Expires=1479754790 HTTP/1.1" 200 - 24583 24583 27 26 "-" "-" -&lt;/P&gt;

&lt;P&gt;How can I return only:&lt;/P&gt;

&lt;P&gt;/some.site.com/text/2015/xml/somefile.xmll?Expires=1479754790&lt;/P&gt;

&lt;P&gt;(in other words from: /some.site.com/ all the way till the next white space)?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2016 23:44:02 GMT</pubDate>
    <dc:creator>Reosoul</dc:creator>
    <dc:date>2016-03-23T23:44:02Z</dc:date>
    <item>
      <title>Help with extracting specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-specific-data/m-p/260806#M78242</link>
      <description>&lt;P&gt;Given bunch of results in a format like:&lt;/P&gt;

&lt;P&gt;6d2112effbe814f41ef6a6b984221c2490ef5112b70d394c074bb1427561556c some.site.com REST.GET.OBJECT text/2015/xml/somefile.xml "GET /some.site.com/text/2015/xml/somefile.xmll?Expires=1479754790 HTTP/1.1" 200 - 24583 24583 27 26 "-" "-" -&lt;/P&gt;

&lt;P&gt;How can I return only:&lt;/P&gt;

&lt;P&gt;/some.site.com/text/2015/xml/somefile.xmll?Expires=1479754790&lt;/P&gt;

&lt;P&gt;(in other words from: /some.site.com/ all the way till the next white space)?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 23:44:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-specific-data/m-p/260806#M78242</guid>
      <dc:creator>Reosoul</dc:creator>
      <dc:date>2016-03-23T23:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with extracting specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-specific-data/m-p/260807#M78243</link>
      <description>&lt;P&gt;Well, if the format is consistent, then something like this should work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex "GET\s+(?&amp;lt;cool_field&amp;gt;\S+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Essentially find in the raw data where there is GET followed by a space (or spaces), then capture everything that is not a space after that and store it in a new field called "cool_field"&lt;/P&gt;

&lt;P&gt;If the events are not in a consistent enough format where that would work, then maybe include some of the events where it doesn't work too and I'm sure we can adjust&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 00:22:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-specific-data/m-p/260807#M78243</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2016-03-24T00:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with extracting specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-specific-data/m-p/260808#M78244</link>
      <description>&lt;P&gt;Great that worked! If within that cool_field I have some events that end with .jpg or .jpeg, is there a way to filter those out?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 14:11:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-specific-data/m-p/260808#M78244</guid>
      <dc:creator>Reosoul</dc:creator>
      <dc:date>2016-03-24T14:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with extracting specific data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-specific-data/m-p/260809#M78245</link>
      <description>&lt;P&gt;Not sure I understand exactly where they would be since the field ends with the expires part, but something like this should remove anything .jpg in that field&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; your base search | rex "GET\s+(?&amp;lt;cool_field&amp;gt;\S+)" | rex field=cool_field mode=sed "s/\.jpe?g//g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The sed mode of the rex command can be used for replacing strings.  In this case, I'm looking for anything .jp(e)g and replacing it with nothing...and that's done (g)lobally in that field.  &lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 16:33:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-extracting-specific-data/m-p/260809#M78245</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2016-03-24T16:33:06Z</dc:date>
    </item>
  </channel>
</rss>

