<?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: Search Query when having multiple right boundaries. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71638#M17891</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie host=qalws* LR_VPT_HYBRIS 
| rex field=uri "/(?P&amp;lt;command&amp;gt;.*?)[?\"]"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;should work&lt;/P&gt;</description>
    <pubDate>Fri, 21 Dec 2012 22:32:04 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-12-21T22:32:04Z</dc:date>
    <item>
      <title>Search Query when having multiple right boundaries.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71637#M17890</link>
      <description>&lt;P&gt;Hi i would like to get the commands from the below pattern. For example i am looking for search, content, gcom.suggestions.json, etc.&lt;/P&gt;

&lt;P&gt;i have used the below query. In the rex i have mentioned to capture (at least i wanted to be) uri part  which starts with / and ends with either ? (urls other than /content) or space (for  /content uri there is nothing after this). But it is not working properly. Is this how this should be done? when you have multiple left and right boundaries.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie host=qalws* LR_VPT_HYBRIS | rex field=uri "(?i)/(?P&amp;lt;command&amp;gt;[\?|\s)" | top limit=100 command


167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "POST /search?searchQuery=RELAYS%20%20ELECTRIC* HTTP/1.1" 
167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "GET /content HTTP/1.1" 
167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "GET /content HTTP/1.1" 
167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "GET /content/homepage HTTP/1.1" 
167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "GET /gcom.suggestions.json?selectedText=TAPE%20*&amp;amp;start=0&amp;amp;count=Infinity HTTP/1.1" 
167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "POST /search?searchQuery=ADAPTER* HTTP/1.1" 
167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "GET /content/homepage HTTP/1.1" 
167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "POST /search?searchQuery=HYDRAULICS* HTTP/1.1" 
167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "POST /search?searchQuery=COPPER%20TUBING* HTTP/1.1" 
167.115.210.254 - - [18/Dec/2012:11:29:59 -0600] "GET /gcom.suggestions.json?selectedText=BEARING|*&amp;amp;start=0&amp;amp;count=Infinity HTTP/1.1" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Dec 2012 21:27:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71637#M17890</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2012-12-21T21:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search Query when having multiple right boundaries.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71638#M17891</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie host=qalws* LR_VPT_HYBRIS 
| rex field=uri "/(?P&amp;lt;command&amp;gt;.*?)[?\"]"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;should work&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2012 22:32:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71638#M17891</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-12-21T22:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Search Query when having multiple right boundaries.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71639#M17892</link>
      <description>&lt;P&gt;Thank you. I will try that.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2012 23:37:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71639#M17892</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2012-12-21T23:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Search Query when having multiple right boundaries.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71640#M17893</link>
      <description>&lt;P&gt;Hi, I have tired and it is working but i wanted to exclude resources like js, css, img, etc.&lt;BR /&gt;
Si have added this uri != "(?i).*.(?:js|css|png|img|png)"  anything needs to be corrected in that? &lt;/P&gt;

&lt;P&gt;sourcetype=access_combined_wcookie host=qalws* LR_VPT_HYBRIS uri != "(?i).&lt;EM&gt;.(?:js|css|png|img|png)" | rex field=uri "/(?P&lt;COMMAND&gt;.&lt;/COMMAND&gt;&lt;/EM&gt;?)[?\"]" | top limit=500 command&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:00:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71640#M17893</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2020-09-28T13:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Search Query when having multiple right boundaries.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71641#M17894</link>
      <description>&lt;P&gt;I have been trying to achieve this and it seems I was missing ? after .*&lt;BR /&gt;
Your comment helped me. &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 11:14:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Query-when-having-multiple-right-boundaries/m-p/71641#M17894</guid>
      <dc:creator>ppuru</dc:creator>
      <dc:date>2018-06-19T11:14:59Z</dc:date>
    </item>
  </channel>
</rss>

