Logmon file and file path regex examples

Document ID : KB000097134
Last Modified Date : 18/05/2018
Show Technical Document Details
Question:
How would I create a regex that would allow me to scan a number of files in the same profile using the same watcher rules?
Answer:
Example of setting an expression in logmon to grab two files in the same directory:

in Linux:

/var/opt/(|local.log|test.log|)

in Windows:

C:\temp\(|test.log|local.log|)

Example of how to log for the same file in multiple directories:

C:\temp\stat(|15$|60$|61$|16$|)\test.log

In this case I have four directories each with the file test.log under them:

stat35715
stat35716
stat35760
stat35761

where 15$, 60$, 61$, 16$ all represent that the directory name ends with those numbers