<?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 Regex expression in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression/m-p/97258#M25117</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have events like this and i am using the below expression to extract the command before query string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="access_combined_wcookie" host=prlws*  | rex field=uri "(?P&amp;lt;command&amp;gt;\w+)" | top limit=50 command
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it is capturing gcom as it has . after gcom.suggestions.json. Is there way to capture the whole thing meaning gcom.suggestions.json&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;167.234.83.253 - - [16/Jul/2013:17:47:44 -0500] "GET /gcom.suggestions.json?selectedText=5GKA2*&amp;amp;start=0&amp;amp;count=Infinity HTTP/1.1" 200 

167.234.83.254 - - [16/Jul/2013:17:47:52 -0500] "GET /GenericController?action=getSecurityToken&amp;amp;domain=new.grainger.com&amp;amp;_=1374014869039 HTTP/1.1" 200
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Jul 2013 22:57:51 GMT</pubDate>
    <dc:creator>xvxt006</dc:creator>
    <dc:date>2013-07-16T22:57:51Z</dc:date>
    <item>
      <title>Regex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression/m-p/97258#M25117</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have events like this and i am using the below expression to extract the command before query string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="access_combined_wcookie" host=prlws*  | rex field=uri "(?P&amp;lt;command&amp;gt;\w+)" | top limit=50 command
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it is capturing gcom as it has . after gcom.suggestions.json. Is there way to capture the whole thing meaning gcom.suggestions.json&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;167.234.83.253 - - [16/Jul/2013:17:47:44 -0500] "GET /gcom.suggestions.json?selectedText=5GKA2*&amp;amp;start=0&amp;amp;count=Infinity HTTP/1.1" 200 

167.234.83.254 - - [16/Jul/2013:17:47:52 -0500] "GET /GenericController?action=getSecurityToken&amp;amp;domain=new.grainger.com&amp;amp;_=1374014869039 HTTP/1.1" 200
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2013 22:57:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-expression/m-p/97258#M25117</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2013-07-16T22:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression/m-p/97259#M25118</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;Try with this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| rex field=uri "(?P&amp;lt; command &amp;gt;(\w+|\.)+)" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*Remove blanks before and after command&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 06:43:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-expression/m-p/97259#M25118</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2013-07-17T06:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression/m-p/97260#M25119</link>
      <description>&lt;P&gt;Thank you. It worked !!!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2013 15:17:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-expression/m-p/97260#M25119</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2013-07-18T15:17:05Z</dc:date>
    </item>
  </channel>
</rss>

