<?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 can I bypass or ignore a word in a result withouth affecting to search for that same word in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326753#M4660</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Good morning. I have literally searched in several documents on how to do this, but still I haven't really found what I'm looking for (At least I think). So what I'm trying to do is to search in a &lt;STRONG&gt;source="file.csv"&lt;/STRONG&gt;  a series of words that matches an issue, &lt;EM&gt;for this example it is "drive" issues, like "Hard Drive" issues&lt;/EM&gt;, etc. (The .csv is a compilation of Emails, in which it has column (Fields) identified by "Subject", "Body") but unfortunately that same word may be accompanied by a punctuation sign or a word that it's combination will result in a result I do not need, for example &lt;EM&gt;"2120 Drake Drive".&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Example of search:&lt;BR /&gt;
&lt;CODE&gt;source"file.csv" drive&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;I have the words I need to discard (for this example it would be &lt;STRONG&gt;Drake&lt;/STRONG&gt;). My question is, How can I ask Splunk to search for &lt;STRONG&gt;Drive&lt;/STRONG&gt;, but ignore those results that show as &lt;STRONG&gt;Drake Drive&lt;/STRONG&gt; without discarding the result (bypass)? To explain the question a bit better, when the results come up it shows that it finds results with that word (Drive), but it is not because it is a &lt;STRONG&gt;Drive&lt;/STRONG&gt; issue, it is because it shows that in the signature of the email it shows &lt;STRONG&gt;Drake Drive&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;I tried the following:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;source"file.csv" drive NOT "drake drive"&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;But this what it does is discard the result because of the address in the signature, and the email may have a Hard drive issue. I hope I was able to make my point, and explain my question.&lt;/P&gt;

&lt;P&gt;Any thoughts on how can I do this?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jul 2017 13:44:48 GMT</pubDate>
    <dc:creator>rasamur</dc:creator>
    <dc:date>2017-07-21T13:44:48Z</dc:date>
    <item>
      <title>How can I bypass or ignore a word in a result withouth affecting to search for that same word</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326753#M4660</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Good morning. I have literally searched in several documents on how to do this, but still I haven't really found what I'm looking for (At least I think). So what I'm trying to do is to search in a &lt;STRONG&gt;source="file.csv"&lt;/STRONG&gt;  a series of words that matches an issue, &lt;EM&gt;for this example it is "drive" issues, like "Hard Drive" issues&lt;/EM&gt;, etc. (The .csv is a compilation of Emails, in which it has column (Fields) identified by "Subject", "Body") but unfortunately that same word may be accompanied by a punctuation sign or a word that it's combination will result in a result I do not need, for example &lt;EM&gt;"2120 Drake Drive".&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Example of search:&lt;BR /&gt;
&lt;CODE&gt;source"file.csv" drive&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;I have the words I need to discard (for this example it would be &lt;STRONG&gt;Drake&lt;/STRONG&gt;). My question is, How can I ask Splunk to search for &lt;STRONG&gt;Drive&lt;/STRONG&gt;, but ignore those results that show as &lt;STRONG&gt;Drake Drive&lt;/STRONG&gt; without discarding the result (bypass)? To explain the question a bit better, when the results come up it shows that it finds results with that word (Drive), but it is not because it is a &lt;STRONG&gt;Drive&lt;/STRONG&gt; issue, it is because it shows that in the signature of the email it shows &lt;STRONG&gt;Drake Drive&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;I tried the following:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;source"file.csv" drive NOT "drake drive"&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;But this what it does is discard the result because of the address in the signature, and the email may have a Hard drive issue. I hope I was able to make my point, and explain my question.&lt;/P&gt;

&lt;P&gt;Any thoughts on how can I do this?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 13:44:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326753#M4660</guid>
      <dc:creator>rasamur</dc:creator>
      <dc:date>2017-07-21T13:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I bypass or ignore a word in a result withouth affecting to search for that same word</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326754#M4661</link>
      <description>&lt;P&gt;Hi rasamur,&lt;BR /&gt;
sorry but I don't understand your question:&lt;BR /&gt;
to search for a word you have to insert it in your search and to discard one or more words your have to insert NOT before the word&lt;BR /&gt;
(if they are more than one use parenthesys and OR: NOT (word1 OR word2))&lt;BR /&gt;
in other words:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search Drive NOT Drake | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 15:07:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326754#M4661</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-07-21T15:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I bypass or ignore a word in a result withouth affecting to search for that same word</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326755#M4662</link>
      <description>&lt;P&gt;You'll probably have to use some regex-fu to make this work.  Create a field using the &lt;CODE&gt;rex&lt;/CODE&gt; command and use a negative lookbehind to find "Drake " or "drake " preceding "drive" to discard those matches.  Then search for any events with a value in your new field.  Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search 
| rex "(?i)(?&amp;lt;Valid_Drive&amp;gt;(?&amp;lt;!drake\s)drive)"
| search Valid_Drive=*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jul 2017 15:36:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326755#M4662</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2017-07-21T15:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I bypass or ignore a word in a result withouth affecting to search for that same word</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326756#M4663</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval Body="A bad disk drive will drive anybody on
Drake Drive insane, especially poor Drake"

| rename COMMENT AS "Everything above generates sample data; everything below is your solution"

| rex max_match=100 field=Body "(?msi)(?&amp;lt;drive&amp;gt;drive)"
| eval drive_count=mvcount(drive)
| rex max_match=100 field=Body "(?msi)(?&amp;lt;drake_drive&amp;gt;drake drive)"
| eval drake_drive_count=mvcount(drake_drive)
| eval etc_drive_count=0
| where drive_count &amp;gt; (drake_drive_count + etc_drive_count)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Jul 2017 21:56:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326756#M4663</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-22T21:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I bypass or ignore a word in a result withouth affecting to search for that same word</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326757#M4664</link>
      <description>&lt;P&gt;Hi Woodcock&lt;/P&gt;

&lt;P&gt;This did the trick, thank you for your effort and time.&lt;/P&gt;

&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 15:25:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-can-I-bypass-or-ignore-a-word-in-a-result-withouth-affecting/m-p/326757#M4664</guid>
      <dc:creator>rasamur</dc:creator>
      <dc:date>2017-07-24T15:25:16Z</dc:date>
    </item>
  </channel>
</rss>

