In this article, you will learn
- what Regular Expressions are,
- where they can be used within the Workflow, and
- which Expressions are available.
1. Introduction
Regular Expressions, often referred to as RegEx or GREP, are patterns consisting of characters and special symbols that can be used to search, check, extract, or modify character strings. They are highly powerful because they allow for flexible matching rules instead of exact text comparisons. This means you can use placeholders in Regular Expressions to describe a character string.
- Allowed characters – letters, digits, or special characters.
- Number of occurrences – at least, at most, or optional
- Existing characters – must or may be present
- Position of the searched string – at the beginning or end
- Variables and groups – grouping and reusing parts of a pattern (e.g., using backreferences)
In the application, there are two main areas where Regular Expressions play an important role:
- Checks and Fixups – in certain cases, Fixups use Regular Expressions, for example, to identify Spot Color names. By entering the appropriate Expressions, conditions can be defined in Check-in Preflight and Fixup Templates, in individual Fixups, or within Fixup Chains, as well as automated modification or filtering rules.
- Extracting metadata from the file name – Templates can be created that use Regular Expressions to automatically transfer parts of the file name into system or user-defined fields. These Templates can then be used, for example, during upload, in Hotfolder, in Batch Processing, or in Dropzones.
2. Glossary
This glossary of Regular Expressions is intended to provide you with an overview of the vocabulary used in GREP commands. It does not claim to be exhaustive.
2.1. General Expressions and Expressions
| Expression | Explanation |
|---|---|
[] | A pair of square brackets defines a character class, which always matches a single character in a search pattern. |
[abc] | Within square brackets, any letters can be searched for. The example matches one of the characters with the value a, b or c. |
[a-f] | A hyphen between two letters inside square brackets defines a specific range. The example matches a character with the value a, b, c, d, e, or f. |
[0-9] | A hyphen between two numbers can only be used with digits. The example matches a digit in the range from 0 to 9. |
[a-zA-Z0-9] | Within square brackets, multiple ranges as well as individual characters can be specified. The example matches any character that falls within all lowercase letters from a to z, all uppercase letters from A to Z and all digits from 0 to 9. |
[^abc] | If the ^ character – called the Caret – is placed at the beginning of a character set inside square brackets, the listed characters are excluded from the search. The example matches a character that does not correspond to any of the specified characters. |
^a | When the ^ character is not placed inside square brackets, it marks the beginning of a text. The example searches for a character with the value a at the beginning of a paragraph. |
. | The dot serves as a placeholder for any character and can therefore match any character – letters, digits, and whitespace. |
() | A pair of parentheses denotes a character group consisting of one or more characters, which can be nested. |
(RAL) | A string in parentheses is matched exactly as it is written. The example searches for the string RAL. The difference between (RAL) and RAL is that the former is stored as a group, whereas the latter is interpreted simply as a sequence of consecutive characters. The group can later be used as a value for a placeholder. |
{2} | A pair of curly braces specifies the number of repetitions (characters). The example matches exactly 2 characters. If you enter {2,4} it will search for 2 to 4 characters. |
| | If the | symbol (pipe) is placed between two characters or strings, either of the characters/strings will be matched. You can insert your own Regular Expressions before and after the pipe. |
(?i) | The search ignores the spelling – upper and lower case – for all letters. The expression applies to the entire text string. |
2.2. Expressions for Placeholders
| Expression | Explanation |
|---|---|
\d | Represents any digit. |
\D | Corresponds to the opposite of \d. It matches any character that is not a digit. |
[\l\u] | Matches any letter. |
\s | Matches any whitespace or tab character. |
\S | Corresponds to the opposite of \s. It matches any character that is not whitespace or a tab. |
\w | Matches all word characters. |
\W | Corresponds to the opposite of \w. It matches any character that is not a word character. |
\u | Matches all uppercase letters. |
\U | Corresponds to the opposite of \u. It matches any character that is not an uppercase letter. |
\l | Matches all lowercase letters. |
\L | Corresponds to the opposite of \l. It matches any character that is not a lowercase letter. |
2.3. Expressions for Repetitions
| Expression | Explanation |
|---|---|
? | The question mark stands for zero or one occurrence. If the question mark is placed after a character, that character may or may not appear at this position. For example, aa? matches either a or aa. |
* | The asterisk indicates zero or more occurrences. When placed after a character, that character may appear multiple times or not at all at that position. For example, a* matches either a single a or multiple a characters. |
+ | The plus sign stands for one or more occurrences. If the plus sign is placed after a character, that character must appear at least once at this position, but it can appear multiple times. For example, a+ matches either a single a or a multiple a characters. |
{n} | Exactly n times. For example, \d{1} matches exactly one digit. |
{n,} | More than n times. For example, \d{3,} matches digit sequences with three or more digits. |
{n,m} | More than n times and at most m times. For example, \d{3,5} matches digit sequences with three, four, or five digits. |
2.4. Expressions for Position Anchors
| Expression | Explanation |
|---|---|
^ | The searched value is located at the beginning of a string. In the example (^Hallo), the word Hallo matches only at the beginning of a string. |
$ | The searched value is located at the end of a string. In the example (Hallo$), the word Hallo matches only at the end of the string. |
\b | Represents a word boundary. When a word is enclosed by these expressions, the RegEx matches exactly that word. In the example (\bHund\b), only the word Hund is matched. The word Hunde is not matched. |
\B | This expression can be used to match parts of a word. In the example (\Bab), all words containing “ab” are matched, for example Laben. |
2.5. Matches and Conditions
| Expression | Explanation |
|---|---|
(?<= ) | Positive Lookbehind: A specific text exists before the text to be matched. In the example (?<=x)y, the y is only matched if it is preceded by an x. |
(?<! ) | Negative Lookbehind: A specific text does not exist after the text to be matched: In the example (?<!x)y , the y is only matched if there is no x before it. |
(?= ) | Positive Lookahead: A specific text exists after the text to be matched. In the example y(?=x), the y is only matched if it is followed by an x . |
(?! ) | Negative Lookahead: A specific text does not exist after the text to be matched. In the example y(?!x), the y is only matched if it is not followed by an x. |
Article Update: Workflow 1.21.1 – 09/2025