Using Complex Regular Expressions in Filter Patterns

<< Click to Display Table of Contents >>

Navigation:  Peer Global File Service Help > Basic Concepts > File and Folder Filters > Defining Filter Patterns >

Using Complex Regular Expressions in Filter Patterns

You can use complex regular expressions in filter patterns.  Use the following format for a regular expression:

<<regEx>>

For example, the following filter pattern contains a regular expression that finds AutoCAD temporary files (atmp files):

<<^.*\\atmp[0-9]{4,}$>>

Using the following regular expression in an exclusion pattern excludes any path containing a folder XX that also contains a child folder YY:

<<^.*\\XX\\YY(\\.*$|$)>>

The following files and folders MATCH the above expression:

\projects\xx\yy

\accounting\projects\xx\yy\file.txt

\accounting\projects\xx\yy\zz\file.txt

The following files and folders DO NOT MATCH the above expression:

\projects\accounting\file.txt

\projects\xx\y

\projects\xx\yyy\file.txt

\accounting\projects\xx\file.txt

\accounting\projects\yy\xx\zz\file.txt

A good reference on regular expressions can be found here: http://www.regular-expressions.info/reference.html