<?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: Check if field match the regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Check-if-field-match-the-regex/m-p/619088#M215180</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This solved my issue&lt;/P&gt;</description>
    <pubDate>Tue, 01 Nov 2022 10:42:06 GMT</pubDate>
    <dc:creator>boxmetal</dc:creator>
    <dc:date>2022-11-01T10:42:06Z</dc:date>
    <item>
      <title>Check if field match the regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-field-match-the-regex/m-p/619070#M215165</link>
      <description>&lt;P&gt;Hi Splunk Community,&lt;/P&gt;
&lt;P&gt;I need help to check whether my directory field match the regex&lt;/P&gt;
&lt;P&gt;The regex I used is &lt;EM&gt;^\w+:\\root_folder\\((?:(?!excluded_folder).)*?)\\&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/EM&gt;to check the file path does not belong to the excluded_folder&lt;/P&gt;
&lt;P&gt;Example: c:\root_folder\excluded_folder\...\...\...\file&amp;nbsp; is False&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;d:\root_folder\subfolder\...\...\...\file is True&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Could anyone please help? Much appreciated!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 14:45:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-field-match-the-regex/m-p/619070#M215165</guid>
      <dc:creator>boxmetal</dc:creator>
      <dc:date>2022-11-01T14:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Check if field match the regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-field-match-the-regex/m-p/619072#M215167</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/246827"&gt;@boxmetal&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you couldextract the folder_to_chek field and make the check on this field. something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;yur_search&amp;gt;
| rex field=source "^\w:\\\w+\\(?&amp;lt;folder_to_check&amp;gt;\w+)"
| search folder_to_check="subfolder"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 09:28:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-field-match-the-regex/m-p/619072#M215167</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-01T09:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Check if field match the regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-field-match-the-regex/m-p/619078#M215173</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval excluded=if(match(directory,"^\w+:\\\\root_folder\\\\((?:(?!excluded_folder).)*?)\\\\"), "true", "false")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 01 Nov 2022 09:42:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-field-match-the-regex/m-p/619078#M215173</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-11-01T09:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Check if field match the regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-field-match-the-regex/m-p/619088#M215180</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This solved my issue&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 10:42:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-field-match-the-regex/m-p/619088#M215180</guid>
      <dc:creator>boxmetal</dc:creator>
      <dc:date>2022-11-01T10:42:06Z</dc:date>
    </item>
  </channel>
</rss>

