<?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: In inputs.conf whitelist, how do I create a regex expression for whitelisting files which contain a certain string? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429467#M75231</link>
    <description>&lt;P&gt;How about this &lt;CODE&gt;whitelist = (?i)termite&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Oct 2018 18:34:42 GMT</pubDate>
    <dc:creator>sudosplunk</dc:creator>
    <dc:date>2018-10-18T18:34:42Z</dc:date>
    <item>
      <title>In inputs.conf whitelist, how do I create a regex expression for whitelisting files which contain a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429465#M75229</link>
      <description>&lt;P&gt;I need to whitelist files that contain a string in any case and in any place in the filename.  And, they can either be .txt or .csv.  For example.....any file that contains the string "termite"&lt;/P&gt;

&lt;P&gt;termite.txt or termite.csv or TERMite.txt or october_termite_file01.csv&lt;/P&gt;

&lt;P&gt;I got "/termite/gmi" from regex 101 but does not seem to work in inputs.conf whitelist.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:38:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429465#M75229</guid>
      <dc:creator>coreyf311</dc:creator>
      <dc:date>2020-09-29T21:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: In inputs.conf whitelist, how do I create a regex expression for whitelisting files which contain a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429466#M75230</link>
      <description>&lt;P&gt;Try &lt;CODE&gt;&amp;lt;field&amp;gt;=%(?i)[\s\S]*termite[\s\S]*%&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;It's been a while but as I remember inputs.conf doesn't allow quotation marks when using regexs, or . as a wildcard. The above regex worked for me (minus the (?i) for case, but that should be okay for you) for blacklisting. See:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/671735/why-is-blacklisting-windows-event-logs-on-a-deploy-1.html"&gt;https://answers.splunk.com/answers/671735/why-is-blacklisting-windows-event-logs-on-a-deploy-1.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 18:14:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429466#M75230</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2018-10-18T18:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: In inputs.conf whitelist, how do I create a regex expression for whitelisting files which contain a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429467#M75231</link>
      <description>&lt;P&gt;How about this &lt;CODE&gt;whitelist = (?i)termite&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 18:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429467#M75231</guid>
      <dc:creator>sudosplunk</dc:creator>
      <dc:date>2018-10-18T18:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: In inputs.conf whitelist, how do I create a regex expression for whitelisting files which contain a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429468#M75232</link>
      <description>&lt;P&gt;Thank you for all the suggestions.  Here is what I came up with.  I ended up needing multiple strings in the whitelist.  I realize there are probably other ways but this one works for me.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;whitelist = (.*string.*|.*otherstring.*|.*something.*)&lt;/CODE&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 14:58:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429468#M75232</guid>
      <dc:creator>coreyf311</dc:creator>
      <dc:date>2018-10-22T14:58:44Z</dc:date>
    </item>
  </channel>
</rss>

