<?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 Extracting field using rex for URL in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extracting-field-using-rex-for-URL/m-p/229109#M67851</link>
    <description>&lt;P&gt;I have this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nitro_prod_ecomm sourcetype = nitro_access_log earliest=-30m@m | rex field=_raw "\d\d\:\d\d\:\d\d\s+(?\d+\.\d+)" | search ResponseTime&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That gives me results like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10.022.020.203  10.200.130.180:7001 -   2016-08-15  01:09:02    4.55    GET   /product/nitro?skuId=11023031 skuId=11023031  200 124221]"

10.402.300.103  10.200.111.116:7001 -   2016-08-15  01:09:00    6.033   POST /myaccount/json/acc_nitro_login_json.jsp   -   302 0]"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to get "product" &amp;amp; "myaccount" into a field called page, basically whatever that first word is after GET, and POST&lt;/P&gt;

&lt;P&gt;Any solutions? I can get the entire URL but I am unsure as to how to get just that first part.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2016 14:22:30 GMT</pubDate>
    <dc:creator>JoshuaJohn</dc:creator>
    <dc:date>2016-08-15T14:22:30Z</dc:date>
    <item>
      <title>Extracting field using rex for URL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-field-using-rex-for-URL/m-p/229109#M67851</link>
      <description>&lt;P&gt;I have this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nitro_prod_ecomm sourcetype = nitro_access_log earliest=-30m@m | rex field=_raw "\d\d\:\d\d\:\d\d\s+(?\d+\.\d+)" | search ResponseTime&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That gives me results like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10.022.020.203  10.200.130.180:7001 -   2016-08-15  01:09:02    4.55    GET   /product/nitro?skuId=11023031 skuId=11023031  200 124221]"

10.402.300.103  10.200.111.116:7001 -   2016-08-15  01:09:00    6.033   POST /myaccount/json/acc_nitro_login_json.jsp   -   302 0]"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to get "product" &amp;amp; "myaccount" into a field called page, basically whatever that first word is after GET, and POST&lt;/P&gt;

&lt;P&gt;Any solutions? I can get the entire URL but I am unsure as to how to get just that first part.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 14:22:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-field-using-rex-for-URL/m-p/229109#M67851</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-08-15T14:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting field using rex for URL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-field-using-rex-for-URL/m-p/229110#M67852</link>
      <description>&lt;P&gt;Try this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;... | rex (?&amp;lt;page&amp;gt;(GET|POST)\s+\/(\w+))&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 14:42:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-field-using-rex-for-URL/m-p/229110#M67852</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-08-15T14:42:20Z</dc:date>
    </item>
  </channel>
</rss>

