<?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 How to exclude a particular value from results when using the field extractor utility? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-a-particular-value-from-results-when-using-the/m-p/140097#M38630</link>
    <description>&lt;P&gt;The field extractor wizard came up with the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?=[^f]*(?:firewall:|f.*firewall:))^(?:[^"\n]*"){2}\s+(?P[^ ]+)(?:[^ \n]* ){4}(?P[^ ]+)(?:[^ \n]* ){3}(?P[^ ]+)\s+(?P[^ ]+)\s+\d+\s+(?P[^ ]+)[^"\n]*"(?P[^"]+)(?:[^ \n]* ){2}\((?P[^\)]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It sometimes interprets a field labeled &lt;CODE&gt;msg&lt;/CODE&gt; (ex. &lt;CODE&gt;msg="ip scan"&lt;/CODE&gt; is interpreted as user) as &lt;CODE&gt;user&lt;/CODE&gt; for some reason (rare).  When it does this, it always has a &lt;CODE&gt;PolicyName="Internal Policy"&lt;/CODE&gt;.  It seems the easiest way to resolve the issue is to ignore any events having a PolicyName of 'Internal Policy'.  How can I modify this regex/rex to accomplish that?&lt;/P&gt;</description>
    <pubDate>Thu, 09 Apr 2015 21:22:03 GMT</pubDate>
    <dc:creator>samuelrey</dc:creator>
    <dc:date>2015-04-09T21:22:03Z</dc:date>
    <item>
      <title>How to exclude a particular value from results when using the field extractor utility?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-a-particular-value-from-results-when-using-the/m-p/140097#M38630</link>
      <description>&lt;P&gt;The field extractor wizard came up with the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?=[^f]*(?:firewall:|f.*firewall:))^(?:[^"\n]*"){2}\s+(?P[^ ]+)(?:[^ \n]* ){4}(?P[^ ]+)(?:[^ \n]* ){3}(?P[^ ]+)\s+(?P[^ ]+)\s+\d+\s+(?P[^ ]+)[^"\n]*"(?P[^"]+)(?:[^ \n]* ){2}\((?P[^\)]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It sometimes interprets a field labeled &lt;CODE&gt;msg&lt;/CODE&gt; (ex. &lt;CODE&gt;msg="ip scan"&lt;/CODE&gt; is interpreted as user) as &lt;CODE&gt;user&lt;/CODE&gt; for some reason (rare).  When it does this, it always has a &lt;CODE&gt;PolicyName="Internal Policy"&lt;/CODE&gt;.  It seems the easiest way to resolve the issue is to ignore any events having a PolicyName of 'Internal Policy'.  How can I modify this regex/rex to accomplish that?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2015 21:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-a-particular-value-from-results-when-using-the/m-p/140097#M38630</guid>
      <dc:creator>samuelrey</dc:creator>
      <dc:date>2015-04-09T21:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude a particular value from results when using the field extractor utility?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-a-particular-value-from-results-when-using-the/m-p/140098#M38631</link>
      <description>&lt;P&gt;When you're using the field extractor, sometimes you get weird values like you mentioned.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/312i5027B051614838D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;What you can do is click on the little X on the right side of the field that was incorrectly extracted.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/313i27E8B20EB8A5F0E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;After that, Splunk will try to recreate the the regular expression to exclude that value.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;There is also a "require" option for selections in the field extractor. Adding more of these might help you filter out what you don't want.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Alternatively, as you mentioned, you can edit the regular expression. It becomes extra difficult since it is a machine generated regular expression, and often becomes easier to just write the regular expression (or multiple, simpler ones) instead of using the machine generated one. Either way, in that case, post some examples of the data (so someone could attempt to filter out the events with PolicyName or define the fields you want to try to extract)&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2015 21:59:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-a-particular-value-from-results-when-using-the/m-p/140098#M38631</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2015-04-09T21:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude a particular value from results when using the field extractor utility?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-a-particular-value-from-results-when-using-the/m-p/140099#M38632</link>
      <description>&lt;P&gt;Thanks. I was able how to use the method you described in the validate fields step correctly.  I filtered on the unwanted value then excluded it.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2015 22:36:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-a-particular-value-from-results-when-using-the/m-p/140099#M38632</guid>
      <dc:creator>samuelrey</dc:creator>
      <dc:date>2015-04-09T22:36:57Z</dc:date>
    </item>
  </channel>
</rss>

