<?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 write a regular expression to filter out field values starting with &amp;quot;note-&amp;quot;, followed by more than 15 characters? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regular-expression-to-filter-out-field-values/m-p/254360#M76166</link>
    <description>&lt;P&gt;You can try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | regex yourfield!="^note-\w{15}.*"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 30 Aug 2016 15:08:10 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-08-30T15:08:10Z</dc:date>
    <item>
      <title>How to write a regular expression to filter out field values starting with "note-", followed by more than 15 characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regular-expression-to-filter-out-field-values/m-p/254358#M76164</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I want to exclude the field values starting with "note-" and more than 15 characters after it. How can I write the regex for this.&lt;/P&gt;

&lt;P&gt;eg:&lt;/P&gt;

&lt;P&gt;device&lt;BR /&gt;
note-acv234454dfgdfg&lt;BR /&gt;
note-dfdffgfghffe4353456 &lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 14:43:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regular-expression-to-filter-out-field-values/m-p/254358#M76164</guid>
      <dc:creator>kiran331</dc:creator>
      <dc:date>2016-08-30T14:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regular expression to filter out field values starting with "note-", followed by more than 15 characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regular-expression-to-filter-out-field-values/m-p/254359#M76165</link>
      <description>&lt;P&gt;Does it have to be in regex? You could extract all the fieldvalues and then filter out using &lt;CODE&gt;where&lt;/CODE&gt; Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex (?&amp;lt;device&amp;gt;captureeverything&amp;gt; | where NOT match(device, "note*") OR len(device)&amp;lt;15
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Aug 2016 14:47:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regular-expression-to-filter-out-field-values/m-p/254359#M76165</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-30T14:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regular expression to filter out field values starting with "note-", followed by more than 15 characters?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regular-expression-to-filter-out-field-values/m-p/254360#M76166</link>
      <description>&lt;P&gt;You can try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | regex yourfield!="^note-\w{15}.*"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Aug 2016 15:08:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regular-expression-to-filter-out-field-values/m-p/254360#M76166</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-30T15:08:10Z</dc:date>
    </item>
  </channel>
</rss>

