<?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 REGEX issue with multiple criteria in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56371#M13798</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I'm trying to filter our file audit logs, however I would like for it to ignore any files ending in .tmp&lt;/P&gt;

&lt;P&gt;I can't seem to get the below to work properly... it seems to match on the event code and the Accesses but completely miss the Object Name for some reason?&lt;/P&gt;

&lt;P&gt;REGEX = (?msi)EventCode=(4663|567|560).&lt;EM&gt;Object Name:\s&lt;/EM&gt;(?!.tmp).&lt;EM&gt;Accesses:\s&lt;/EM&gt;(DELETE|WRITE_DAC|WriteData)&lt;/P&gt;

&lt;P&gt;An example log is:&lt;/P&gt;

&lt;P&gt;20110309155132.000000&lt;BR /&gt;
Category=3&lt;BR /&gt;
CategoryString=Object Access&lt;BR /&gt;
ComputerName=ComputerName&lt;BR /&gt;
EventCode=560&lt;BR /&gt;
EventIdentifier=560&lt;BR /&gt;
EventType=4&lt;BR /&gt;
Logfile=Security&lt;BR /&gt;
RecordNumber=2572431&lt;BR /&gt;
SourceName=Security&lt;BR /&gt;
TimeGenerated=20110309155132.000000+600&lt;BR /&gt;
TimeWritten=20110309155132.000000+600&lt;BR /&gt;
Type=Audit Success&lt;BR /&gt;
User=&lt;STRONG&gt;Username&lt;/STRONG&gt;&lt;BR /&gt;
wmi_type=WinEventLog:Security&lt;BR /&gt;
Message=Object Open:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Object Server:  Security

Object Type:    File

Object Name:    G:\users\xxxxxx\Outlook .pst folders\~archive.pst.tmp

Handle ID:  7420

Operation ID:   {0,239001151}

Process ID: 4

Image File Name:    

Primary User Name:  SERVER$

Primary Domain: XXX

Primary Logon ID:   (0x0,0x3E7)

Client User Name:   User

Client Domain:  Domain

Client Logon ID:    (0x0,0xBA49FA7)

Accesses:   DELETE 
        ReadAttributes 


Privileges: -

Restricted Sid Count:   0

Access Mask:    0x10080
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea's as to where I'm going wrong would be appreciated....&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;DB&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2011 13:59:24 GMT</pubDate>
    <dc:creator>Scarecrowddb</dc:creator>
    <dc:date>2011-03-09T13:59:24Z</dc:date>
    <item>
      <title>REGEX issue with multiple criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56371#M13798</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I'm trying to filter our file audit logs, however I would like for it to ignore any files ending in .tmp&lt;/P&gt;

&lt;P&gt;I can't seem to get the below to work properly... it seems to match on the event code and the Accesses but completely miss the Object Name for some reason?&lt;/P&gt;

&lt;P&gt;REGEX = (?msi)EventCode=(4663|567|560).&lt;EM&gt;Object Name:\s&lt;/EM&gt;(?!.tmp).&lt;EM&gt;Accesses:\s&lt;/EM&gt;(DELETE|WRITE_DAC|WriteData)&lt;/P&gt;

&lt;P&gt;An example log is:&lt;/P&gt;

&lt;P&gt;20110309155132.000000&lt;BR /&gt;
Category=3&lt;BR /&gt;
CategoryString=Object Access&lt;BR /&gt;
ComputerName=ComputerName&lt;BR /&gt;
EventCode=560&lt;BR /&gt;
EventIdentifier=560&lt;BR /&gt;
EventType=4&lt;BR /&gt;
Logfile=Security&lt;BR /&gt;
RecordNumber=2572431&lt;BR /&gt;
SourceName=Security&lt;BR /&gt;
TimeGenerated=20110309155132.000000+600&lt;BR /&gt;
TimeWritten=20110309155132.000000+600&lt;BR /&gt;
Type=Audit Success&lt;BR /&gt;
User=&lt;STRONG&gt;Username&lt;/STRONG&gt;&lt;BR /&gt;
wmi_type=WinEventLog:Security&lt;BR /&gt;
Message=Object Open:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Object Server:  Security

Object Type:    File

Object Name:    G:\users\xxxxxx\Outlook .pst folders\~archive.pst.tmp

Handle ID:  7420

Operation ID:   {0,239001151}

Process ID: 4

Image File Name:    

Primary User Name:  SERVER$

Primary Domain: XXX

Primary Logon ID:   (0x0,0x3E7)

Client User Name:   User

Client Domain:  Domain

Client Logon ID:    (0x0,0xBA49FA7)

Accesses:   DELETE 
        ReadAttributes 


Privileges: -

Restricted Sid Count:   0

Access Mask:    0x10080
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea's as to where I'm going wrong would be appreciated....&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;DB&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2011 13:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56371#M13798</guid>
      <dc:creator>Scarecrowddb</dc:creator>
      <dc:date>2011-03-09T13:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX issue with multiple criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56372#M13799</link>
      <description>&lt;P&gt;Can you post some sample log records ?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2011 23:06:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56372#M13799</guid>
      <dc:creator>wollinet</dc:creator>
      <dc:date>2011-03-09T23:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX issue with multiple criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56373#M13800</link>
      <description>&lt;P&gt;Hi there, I've posted an example log above now.... thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2011 06:31:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56373#M13800</guid>
      <dc:creator>Scarecrowddb</dc:creator>
      <dc:date>2011-03-10T06:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX issue with multiple criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56374#M13801</link>
      <description>&lt;P&gt;Try this one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (?msi)EventCode=(4663|567|560).Object Name:\s(?&amp;lt;!\.tmp).Accesses:\s(DELETE|WRITE_DAC|WriteData)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I wonder if simply using "." to match over several lines really works. You can also try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (?mi)^EventCode=(4663|567|560).*^Object Name:.*\.tmp$.*^Accesses:\s(DELETE|WRITE_DAC|WriteData)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2011 19:11:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56374#M13801</guid>
      <dc:creator>wollinet</dc:creator>
      <dc:date>2011-03-10T19:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX issue with multiple criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56375#M13802</link>
      <description>&lt;P&gt;Hi There... sorry, but neither of the above works....&lt;/P&gt;

&lt;P&gt;Any other suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2011 05:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56375#M13802</guid>
      <dc:creator>Scarecrowddb</dc:creator>
      <dc:date>2011-03-11T05:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX issue with multiple criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56376#M13803</link>
      <description>&lt;P&gt;Any other idea's??&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2011 06:26:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56376#M13803</guid>
      <dc:creator>Scarecrowddb</dc:creator>
      <dc:date>2011-03-14T06:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX issue with multiple criteria</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56377#M13804</link>
      <description>&lt;P&gt;Just tried something like this and it seems to work:&lt;/P&gt;

&lt;P&gt;(?msi)^EventCode=(540|567|560).&lt;EM&gt;Object Name:.&lt;/EM&gt;.tmp.*Accesses:\s(DELETE|WRITE_DAC|WriteData)&lt;/P&gt;

&lt;P&gt;I couldn't try your exact pattern, but used a similar expression.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2011 14:02:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-issue-with-multiple-criteria/m-p/56377#M13804</guid>
      <dc:creator>wollinet</dc:creator>
      <dc:date>2011-03-16T14:02:59Z</dc:date>
    </item>
  </channel>
</rss>

