Regular expression syntax

You use regular expression syntax in Ricoh ProcessDirector in several places: control files; step templates such as CompressFiles and SetJobTypeFromFileName; Hot folder input devices, and in Ricoh ProcessDirector features and extended features. This section contains a summary of regular expression syntax and some examples.

For more information on regular expression syntax, see Open Group Base Specifications Issue 6, Chapter 9 here: If you want to test the match results for your expression before using it in your workflow, you can find many free utilities on the Web. For example, this is a free browser-based expression testing tool:

Syntax summary

  • Period (.) matches a single occurrence of any character (letter or number).
  • Asterisk (*) matches zero or more occurrences of the preceding character, up to the maximum file name length.
  • Backslash (\) is the escape character that means that the next character is interpreted literally.
  • Dollar sign ($) means that a match signifies the end of the expression.
  • Question mark (?) makes the preceding token optional; for example, colou?r would match color or colour.
  • Plus sign (+) matches one or more of the preceding token.

Characters in the value are case-sensitive. For example, .*PDF$,.*AFP$ represent patterns that are different from .*pdf$,.*afp$.

Separate multiple patterns by commas; do not type a space between them.

Note that although you commonly see *. used as a matching term (for example, when searching for files on a Windows system), this sequence of characters is not valid regular expression syntax.

This is an example of a regular expression that uses the first four alphanumeric characters of the file name:


The pattern in square brackets, [A-Za-z0-9], matches any characters in the ranges A–Z, a–z, or 0–9. The number in braces, {4}, indicates the number of characters to use.

Copyright © 2006, 2017