cmdReporter Wiki

File Event "Fuzzy"-mode Regex Filtering

Applies to FileEventInclusionPaths and FileEventExclusionPaths preference fields.

Changes the regex evaluation logic to scan through the file path searching for where the regular expression pattern produces a match.

Fuzzy searching is case-insensitive when matching and does not require the first part of the path to match the regular expression.

Note: Forward slashes and spaces in file paths should not be escaped when defining inclusion paths in the preference file.


To Enable Fuzzy-mode Regex Filtering

<key>FileEventUseFuzzyMatch</key>
<false/>


Fuzzy Regex Matching Example

FileEventInclusionPaths defined in plistĀ (with fuzzy match enabled)

<key>FileEventInclusionPaths</key>
  <array>
    <string>Doc</string>
    <string>\.app</string>
  </array>
</key>


Evaluation strings below, each line is a different event

Highlighted portions means a match and event will be logged.

/Library/Preferences/com.testing.noMatch.plist
/Users/joe/Documents/big presentation.txt
/Users/joe/Documents/big text document.pdf
/Applications/Calculator.app
/Applications/Utilities/Terminal.app
/usr/bin/perl

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.