<?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 Using regex and time to discard results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-and-time-to-discard-results/m-p/622428#M216363</link>
    <description>&lt;P&gt;Good morning,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a filter to avoid events where the user is 3 letters and 4 numbers (Not 0), f.e. FSA4568 and to avoid events at the time of entry to work for these users. I have created the filter for the user regex but I don't know how to integrate it with the time. The thing is that no events appear when the users have the structure of 3 letters plus four numbers and the time is between 7.30 and 9.30 a.m. How can I integrate it?&lt;/P&gt;
&lt;P&gt;This is the search:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(index="anb_andorra" OR index="anb_luxembourg" OR index="anb_monaco" OR index="anb_espana") source="XmlWinEventLog:Security" ((EventCode IN (4771,4768) Error_Code=0x6)  OR (EventCode=4625 Error_Code="0xc000006d")) user!="*$" src!="::ffff:*"  
| regex user!="([A-Z]{3}[1-9]{4})"
| eval timestamp = _time*1000, name = signature&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2022 15:26:44 GMT</pubDate>
    <dc:creator>adrifs95</dc:creator>
    <dc:date>2022-11-29T15:26:44Z</dc:date>
    <item>
      <title>Using regex and time to discard results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-and-time-to-discard-results/m-p/622428#M216363</link>
      <description>&lt;P&gt;Good morning,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a filter to avoid events where the user is 3 letters and 4 numbers (Not 0), f.e. FSA4568 and to avoid events at the time of entry to work for these users. I have created the filter for the user regex but I don't know how to integrate it with the time. The thing is that no events appear when the users have the structure of 3 letters plus four numbers and the time is between 7.30 and 9.30 a.m. How can I integrate it?&lt;/P&gt;
&lt;P&gt;This is the search:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(index="anb_andorra" OR index="anb_luxembourg" OR index="anb_monaco" OR index="anb_espana") source="XmlWinEventLog:Security" ((EventCode IN (4771,4768) Error_Code=0x6)  OR (EventCode=4625 Error_Code="0xc000006d")) user!="*$" src!="::ffff:*"  
| regex user!="([A-Z]{3}[1-9]{4})"
| eval timestamp = _time*1000, name = signature&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 15:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-and-time-to-discard-results/m-p/622428#M216363</guid>
      <dc:creator>adrifs95</dc:creator>
      <dc:date>2022-11-29T15:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using regex and time to discard results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-and-time-to-discard-results/m-p/622434#M216367</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250609"&gt;@adrifs95&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;did you explored the time_hour and time_minute fields?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index="anb_andorra" OR index="anb_luxembourg" OR index="anb_monaco" OR index="anb_espana") source="XmlWinEventLog:Security" ((EventCode IN (4771,4768) Error_Code=0x6)  OR (EventCode=4625 Error_Code="0xc000006d")) user!="*$" src!="::ffff:*" ((time_hour&amp;gt;6 time_minute&amp;gt;29) (time_hour&amp;lt;10 time_minute&amp;lt;31)) 
| regex user!="([A-Z]{3}[1-9]{4})"
| eval timestamp = _time*1000, name = signature&lt;/LI-CODE&gt;&lt;P&gt;If you don't have them, you can extract them using strftime funtion.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 15:01:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-and-time-to-discard-results/m-p/622434#M216367</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-29T15:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using regex and time to discard results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-and-time-to-discard-results/m-p/622439#M216369</link>
      <description>&lt;P&gt;Good,&lt;/P&gt;&lt;P&gt;Ok I'm going to try but the problem is that I want both conditions USER AND TIME at the same time so as the user is in a regex I don't know how to use it.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 15:13:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-and-time-to-discard-results/m-p/622439#M216369</guid>
      <dc:creator>adrifs95</dc:creator>
      <dc:date>2022-11-29T15:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using regex and time to discard results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-and-time-to-discard-results/m-p/622483#M216392</link>
      <description>&lt;P&gt;Random code blobs are not sufficient to illustrate what you want to solve. &amp;nbsp;Always share sample data (anonymize as needed) and sample output from your code, then explain why the result is not what you expect.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 18:26:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-and-time-to-discard-results/m-p/622483#M216392</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-29T18:26:08Z</dc:date>
    </item>
  </channel>
</rss>

