<?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 REGEX for data filter in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161946#M45790</link>
    <description>&lt;P&gt;In my &lt;STRONG&gt;transforms.conf&lt;/STRONG&gt; I currently have&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[filter-marimba]
REGEX=^(?!\[[^\]]+\]\s+-\s+warning.*)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It should be catching any message that doesn't have 'warning' in it. &lt;BR /&gt;
This is data it should be &lt;STRONG&gt;allowing&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[19/Jun/2015:09:07:36 -0500] - warning nce054_a 50012 Common Reboot Service is disabled.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is some data it should be sending to the &lt;STRONG&gt;null queue&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[19/Jun/2015:09:07:42 -0500] - info nce054_a 9236 Adapter stopped, packaged channel URL: &lt;A href="http://mrbamtx:5282/Root/Prod/DeskMgmt/PrintQMigration" target="test_blank"&gt;http://mrbamtx:5282/Root/Prod/DeskMgmt/PrintQMigration&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any advice?&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jun 2015 14:24:42 GMT</pubDate>
    <dc:creator>nce054</dc:creator>
    <dc:date>2015-06-19T14:24:42Z</dc:date>
    <item>
      <title>Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161946#M45790</link>
      <description>&lt;P&gt;In my &lt;STRONG&gt;transforms.conf&lt;/STRONG&gt; I currently have&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[filter-marimba]
REGEX=^(?!\[[^\]]+\]\s+-\s+warning.*)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It should be catching any message that doesn't have 'warning' in it. &lt;BR /&gt;
This is data it should be &lt;STRONG&gt;allowing&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[19/Jun/2015:09:07:36 -0500] - warning nce054_a 50012 Common Reboot Service is disabled.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is some data it should be sending to the &lt;STRONG&gt;null queue&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[19/Jun/2015:09:07:42 -0500] - info nce054_a 9236 Adapter stopped, packaged channel URL: &lt;A href="http://mrbamtx:5282/Root/Prod/DeskMgmt/PrintQMigration" target="test_blank"&gt;http://mrbamtx:5282/Root/Prod/DeskMgmt/PrintQMigration&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any advice?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:24:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161946#M45790</guid>
      <dc:creator>nce054</dc:creator>
      <dc:date>2015-06-19T14:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161947#M45791</link>
      <description>&lt;P&gt;Is this still true?&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\Windows\.marimba\MarimbaEndpointTuner\history-y*.log]
sourcetype = marimba
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[marimba]
TRANSFORMS-mfilter=filter-marimba
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:30:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161947#M45791</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T14:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161948#M45792</link>
      <description>&lt;P&gt;Yes, both of those are the same. Sorry for starting a new thread, I felt like it was getting congested. Trying the REGEX = ^# right now.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161948#M45792</guid>
      <dc:creator>nce054</dc:creator>
      <dc:date>2015-06-19T14:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161949#M45793</link>
      <description>&lt;P&gt;This REGEX=^# is essentially saying that any input string that matches this (anything that starts with #) should be sent to the nullQueue, i.e. not sent to Indexer. Is that correct? When I put the expression ^# into &lt;A href="https://regex101.com/"&gt;https://regex101.com/&lt;/A&gt; and insert one of my pieces of data, like `#[19/Jun/2015:09:31:29 -0500]&lt;/P&gt;

&lt;H1&gt;ret = 0` , it says that there is a match, but no groups were extracted.&lt;/H1&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161949#M45793</guid>
      <dc:creator>nce054</dc:creator>
      <dc:date>2015-06-19T14:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161950#M45794</link>
      <description>&lt;P&gt;ARGH!  Then your example data (admittedly from previous question) was not written correctly by you!&lt;BR /&gt;
Try this one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX= \]\s+#
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161950#M45794</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T14:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161951#M45795</link>
      <description>&lt;P&gt;My apologies, I messed up on that one. The basic point of this is trying to remove events where the only content is comments. Sorry for the confusion. According to &lt;A href="https://regex101.com"&gt;https://regex101.com&lt;/A&gt; , that pattern wouldn't match the junk data. If I'm wrong, please let me know. My experience with REGEX is extremely limited. Thanks for your time.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161951#M45795</guid>
      <dc:creator>nce054</dc:creator>
      <dc:date>2015-06-19T14:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161952#M45796</link>
      <description>&lt;P&gt;I pushed this REGEX out in the transforms.conf at 9:46, and I still found this at 9:52 on the Search Head : &lt;BR /&gt;
    #[19/Jun/2015:09:52:42 -0500]&lt;BR /&gt;
    #ret = 0&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161952#M45796</guid>
      <dc:creator>nce054</dc:creator>
      <dc:date>2015-06-19T14:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161953#M45797</link>
      <description>&lt;P&gt;In this use-case, the manner of RegEx is not &lt;CODE&gt;anchored&lt;/CODE&gt; but your tool must be.  To test with your tool, add &lt;CODE&gt;.*&lt;/CODE&gt; to the front and back ends of the RegEx, like this: &lt;CODE&gt;.*\]\s+#.*&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:55:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161953#M45797</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T14:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161954#M45798</link>
      <description>&lt;P&gt;Is there really a leading '#' character?  You really have to make up your mind about what your data looks like!  In any case, I am worn out.  I have used this basic configuration a dozen time and it works great so I am convinced the problem is the RegEx but I am worn out and will let somebody else comment.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 15:06:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161954#M45798</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T15:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161955#M45799</link>
      <description>&lt;P&gt;Yes, there is really a leading '#' character. Thanks for the effort.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 15:08:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161955#M45799</guid>
      <dc:creator>nce054</dc:creator>
      <dc:date>2015-06-19T15:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161956#M45800</link>
      <description>&lt;P&gt;Are you saying that regular expression is sending the one with "warning" to the null queue or not sending the other one?  I would have written a match to send '^[[^]]+]\s+-\s+warning' to a real queue instead of using a negative lookahead assertion, and then everything else to the nullQueue, but the regex you have should work on those example lines.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 21:47:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161956#M45800</guid>
      <dc:creator>ccraig42</dc:creator>
      <dc:date>2015-06-19T21:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161957#M45801</link>
      <description>&lt;P&gt;It takes 2 steps to do it that way which is why I showed you a 1-step design that throws away what matches.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 22:11:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161957#M45801</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T22:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161958#M45802</link>
      <description>&lt;P&gt;Sorry, I'm not trying to say it's a bad regex, that's exactly my problem.  It's not what I would have used, but it should work with the example data he has, which makes it rather difficult to produce a regular expression that works on the data that's failing, but isn't provided.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 22:18:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161958#M45802</guid>
      <dc:creator>ccraig42</dc:creator>
      <dc:date>2015-06-19T22:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161959#M45803</link>
      <description>&lt;P&gt;This regex uses a negative lookahead to match all lines (in the same format as the samples you've provided) to not match any event that has either the words warning or info in them:&lt;/P&gt;

&lt;P&gt;^(?:[[^]]+]\s+-)\s+(?!warning).&lt;EM&gt;$&lt;BR /&gt;
^(?:[[^]]+]\s+-)\s+(?!info).&lt;/EM&gt;$&lt;/P&gt;

&lt;P&gt;You can test the first of the regexes at the following link: &lt;A href="http://regexr.com/3b8m7"&gt;http://regexr.com/3b8m7&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;To test, remove one of the letters from the word "warning" and you will see it instantly match the sample event.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 00:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161959#M45803</guid>
      <dc:creator>rkent</dc:creator>
      <dc:date>2015-06-23T00:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with REGEX for data filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161960#M45804</link>
      <description>&lt;P&gt;I just tested this configuration and it DOES work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[filter-marimba]
REGEX=^\[[^\]]+\]\s+-\s+(?!warning).*
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It should be trashing any message that doesn't have 'warning' in that particular spot.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jun 2015 21:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-REGEX-for-data-filter/m-p/161960#M45804</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-28T21:19:05Z</dc:date>
    </item>
  </channel>
</rss>

