Exclude file regex example with dirscan
search cancel

Exclude file regex example with dirscan

book

Article ID: 128426

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

Example of a regular expression that can be used to exclude a specific file from being scanned in a directory?

Environment

  • UIM
  • dirscan

Resolution

Example exclude of a specific file:

     /^(?!DefaultFile.xml*).*$/ 

Example of an include and exclude where files with MY_TEST are in the name but 500 is not:

     /^MY_TEST(?!.*500\.txt).*$/

Result: