<?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: Regex help in Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381673#M111623</link>
    <description>&lt;P&gt;Hi ehoward, Thank you for the response. Is there a way to exclude this in the search itself? I mean within the search query can we exclude all the URL's apart from the one's who follow pattern as 2nd point. This way we reduce the overhead and number of events&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2019 13:02:57 GMT</pubDate>
    <dc:creator>Shashank_87</dc:creator>
    <dc:date>2019-03-27T13:02:57Z</dc:date>
    <item>
      <title>Regex help in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381671#M111621</link>
      <description>&lt;P&gt;Hi, I have few events in splunk like these -&lt;BR /&gt;
1. "GET /test/materials/components/fields HTTP/1.1"&lt;BR /&gt;
2.  "GET /test1 HTTP/1.1" OR "GET /test2 HTTP/1.1&lt;BR /&gt;
Now what i want is just to see the events which are like in the 2nd point. My query should ignore the 1st one's. The 2nd type of URL has a pattern that it has only one word after "/".&lt;/P&gt;

&lt;P&gt;Can some one help?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 11:59:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381671#M111621</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2019-03-27T11:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381672#M111622</link>
      <description>&lt;P&gt;As far the regex goes, the following will only match the examples in point 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\w+\s\/\w+\s.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;-E&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 12:18:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381672#M111622</guid>
      <dc:creator>ehowardl3</dc:creator>
      <dc:date>2019-03-27T12:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381673#M111623</link>
      <description>&lt;P&gt;Hi ehoward, Thank you for the response. Is there a way to exclude this in the search itself? I mean within the search query can we exclude all the URL's apart from the one's who follow pattern as 2nd point. This way we reduce the overhead and number of events&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 13:02:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381673#M111623</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2019-03-27T13:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381674#M111624</link>
      <description>&lt;P&gt;This is the full raw data OR full value of field?? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | regex _raw=".+\"\w+\s+\/\S+\s+\w+\/\d+\.\d+\".+"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR if the extracted field name is URL&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | regex URL="\w+\s+\/\S+\s+\w+\/\d+\.\d+"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Mar 2019 14:12:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381674#M111624</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-27T14:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381675#M111625</link>
      <description>&lt;P&gt;Hi Somesoni2, The above 2 points which i mentioned are 2 different events in my index. What i want is to fetch only 2nd type of events and exclude the 1st one's.&lt;BR /&gt;
What will be the query look like?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 15:11:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381675#M111625</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2019-03-27T15:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381676#M111626</link>
      <description>&lt;P&gt;My solution is considering type 2 events. Try the same.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 15:27:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381676#M111626</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-27T15:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381677#M111627</link>
      <description>&lt;P&gt;You can not exclude with a regex pattern in your base search.  You have to put it through the regex transformation to exclude events in the search via regex pattern matching.  Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | regex url="\w+\s\/\w+\s.*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That would only match the 2nd example shown&lt;/P&gt;

&lt;P&gt;If you don't need the events &lt;STRONG&gt;at all&lt;/STRONG&gt;, you may want to consider routing them to the nullQueue:  &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/Forwarding/Routeandfilterdatad"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.5/Forwarding/Routeandfilterdatad&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The 2nd option will allow you to send specific events that you do not want to the nullQueue and they are not indexed.  If you want it all to be indexed and then filtered at search time, you will need to use the regex specific transformation commands to filter them out.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 01:45:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-Splunk/m-p/381677#M111627</guid>
      <dc:creator>ragedsparrow</dc:creator>
      <dc:date>2019-04-10T01:45:00Z</dc:date>
    </item>
  </channel>
</rss>

