<?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: How to find field data that does not match expected output in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293277#M88537</link>
    <description>&lt;P&gt;Thanks very much for this - it has provided me with a list of all events that do NOT contain a 9 digit number in the field, which is exactly what I wanted &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2018 13:01:22 GMT</pubDate>
    <dc:creator>vincenp2</dc:creator>
    <dc:date>2018-01-11T13:01:22Z</dc:date>
    <item>
      <title>How to find field data that does not match expected output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293273#M88533</link>
      <description>&lt;P&gt;I am collecting data from a field that should contain a 9 digit number. &lt;BR /&gt;
I am finding that there are some instances where this field is blank, or contains alphanumeric characters&lt;/P&gt;

&lt;P&gt;In order to quantify the issue (and identify this other content), could anyone advise what search query can I use to identify these events where the field does NOT contain a 9 digit number please ?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 08:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293273#M88533</guid>
      <dc:creator>vincenp2</dc:creator>
      <dc:date>2018-01-10T08:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to find field data that does not match expected output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293274#M88534</link>
      <description>&lt;P&gt;hey @vincenp2&lt;/P&gt;

&lt;P&gt;Try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval your_field="123456789" | rex field=your_field "(?P&amp;lt;field1&amp;gt;^\d{9})"    
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;your_field&lt;/CODE&gt; is the field that contains &lt;CODE&gt;blank,9 digit and alphanumeric characters/numbers&lt;/CODE&gt; and &lt;CODE&gt;field1&lt;/CODE&gt; is the one with only &lt;CODE&gt;9 digit number&lt;/CODE&gt; which you can use for further analysis.&lt;/P&gt;

&lt;P&gt;In your environment you should write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;your_base_search&amp;gt;|  rex field=your_field "(?P&amp;lt;field1&amp;gt;^\d{9})"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;chekc for &lt;CODE&gt;field1&lt;/CODE&gt; values which you can use in search query instead &lt;CODE&gt;your_field&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;Let me know if this works!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 08:26:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293274#M88534</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-10T08:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to find field data that does not match expected output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293275#M88535</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;rex field=your_field "^(?&amp;lt;expected_field&amp;gt;[0-9]{9})$" | search NOT expected_field=*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jan 2018 15:31:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293275#M88535</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-10T15:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to find field data that does not match expected output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293276#M88536</link>
      <description>&lt;P&gt;Thanks for the input - it didn't quite produce what I was wanting - whether that was me getting it wrong somewhere or not I'm not sure - the accepted answer has provided the info I needed _ I don't know if from this you can get an understanding of the differences?&lt;/P&gt;

&lt;P&gt;Thanks for replying though, much appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 13:00:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293276#M88536</guid>
      <dc:creator>vincenp2</dc:creator>
      <dc:date>2018-01-11T13:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to find field data that does not match expected output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293277#M88537</link>
      <description>&lt;P&gt;Thanks very much for this - it has provided me with a list of all events that do NOT contain a 9 digit number in the field, which is exactly what I wanted &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 13:01:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293277#M88537</guid>
      <dc:creator>vincenp2</dc:creator>
      <dc:date>2018-01-11T13:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to find field data that does not match expected output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293278#M88538</link>
      <description>&lt;P&gt;hey this also gives same output just that you need to filter out events&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;your_base_search&amp;gt;|  rex field=your_field "(?P&amp;lt;field1&amp;gt;^\d{9})" | search NOT field1=*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jan 2018 13:04:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293278#M88538</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-11T13:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to find field data that does not match expected output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293279#M88539</link>
      <description>&lt;P&gt;I think the issue with your regex may be that it doesn't enforce that there are no additional characters after the nine digits.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2018 05:19:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-field-data-that-does-not-match-expected-output/m-p/293279#M88539</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-13T05:19:15Z</dc:date>
    </item>
  </channel>
</rss>

