Regular Expressions

Use regular expressions to specify file identification patterns in TotalFlow Production Manager.

In regular expressions:

Literal characters Any character that does not have a special meaning matches itself. Literal characters are case-sensitive. For example, A does not match a.
. The dot matches any single character. For example, .at matches cat, rat, or bat.
( ) Parentheses identify a group of characters. For example, (ABC) matches ABC.
- The hyphen defines a range of characters. For example, 0-9 matches any single digit.
* The asterisk matches the preceding character zero or more times. For example, N* matches nothing (zero copies of N),N, NN, NNN, etc. .* matches any string of one or more characters.
+ The plus sign matches the preceding character one or more times. For example, N+ matches N, NN, NNN, etc. .+ matches any string of one or more characters.
{ } A number in curly brackets indicates the number of times to match the preceding character. For example, x{3} matches xxx.
? The question mark means that the preceding character is optional. For example, jpe?g matches jpeg or jpg.
[ ] Square brackets enclose a character set. The character set matches any one of the characters in the set. For example, [ABC] matches A, B, or C.
[^ ] As the first character inside square brackets, the caret negates a character set. For example, [^ABC] matches any single character except A, B, or C.
| The vertical bar separates alternatives. For example, A|a matches A or a.
^ At the beginning of a regular expression, the caret marks the beginning of the string. For example, ^A.*\.ps matches ABC.ps.
$ At the end of a regular expression, the dollar sign marks the end of the string. For example, .*ps$ matches any file name with the extension ps.
\ The backslash means that the next character is a literal character. For example, \(ABC\) matches (ABC).

Examples

Any of these examples matches any file with a file extension of PDF, PDf, PdF, Pdf, pDF, pDf, pdF, or pdf:

.*PDF$)|(.*PDf$)|(.*PdF$)|(.*Pdf$)|(.*pDF$)|(.*pDf$)|(.*pdF$)
(.*pdf$)
.*(PDF|PDf|PdF|Pdf|pDF|pDf|pdF|pdf)$
.*[(PDF)(PDf)(PdF)(Pdf)(pDF)(pDf)(pdF)(pdf)]$
.*(P|p)(D|d)(F|f)$
.*(P|p)(D|d)(F|f)
.*[Pp][Dd][Ff]$
.*[Pp][Dd][Ff]