In this article, you will learn,
- how Regular Expressions can be used to help with searching and replacing, and
- how they can assist in searching for Spot Color names.
Search and Replace
The aim of this search is to locate a character string that follows a defined structure and replace it with a newly composed character string.
(PANTONE)\s((?:.*))\sU – search for a text string, e.g., PANTONE 327 U:
- which begins with PANTONE – written in capital letters
- followed by any space – there are spaces of various widths
- followed by any number of characters – letters and numbers, regardless of upper or lower case
- followed by any blank space – there are spaces of different widths
- and finally ends by a U
Explanation
Round brackets are used to define character groups. In this example:
(PANTONE)is character group 1.((?:.*))is character group 2.
When replacing characters, the character groups can be inserted using the placeholders $1, $2, and so on.
$1 $2 C – Replaces the target text according to the following pattern:
$1– inserts the content of character group 1.Space– inserts a normal blank space.$2– inserts the content of character group 2.Space– inserts a normal blank space.C– inserts the letter C.
Search for Spot Color Names used for a "Dieline" in different Languages
The aim of the search is to identify multiple character strings that follow a defined structure. Example: Search for Spot Color names that are used in print production to describe a Dieline in various languages.
(?i)die.*|cut.*|thru.*|fustella.*|stan.*|decoupe.*|key.*|plan.*|taglio.*|troquel.*|corte.*|gaikei.*|bicak.*|vysek.*
Search for Spot Color names that are used in print production to describe a Dieline in different languages. The individual expressions have the following meanings:
(?i)– during the search, the spelling – upper or lower case – of all letters is ignored. The expression applies to the entire text string (i.e., all characters contained in the searched text).die.*– searches for all text strings that begin with "die" followed by none or more characters. This will find terms such as Die, Dieline, Dies, Die Line, etc. However, Die Cut will also be matched.|– means Or. It searches for all text strings that begin with die or cut or thru or fustella etc.
Search for Color Names for the Designation of "White" in different Languages
(?i)white.*|weiß?s?.*|bianco.*|blanc.*|bc.*|beyaz.*|bialy.*|spot ?white.*|opaque ?white.*|hpi-white.*|hpi.*|SS White|trykhvid.*
Search for Spot Color names that are used in print production to describe the Spot Color White in different languages. The individual expressions have the following meanings:
(?i)– during the search, the spelling – upper or lower case – of all letters is ignored. The expression applies to the entire text string (i.e., all characters in the searched text).wei.*– searches for all text strings that begin with "wei" and end with none or any number of characters. This will find terms Wei, Weiß, Weiss, Weis, etc., but also longer terms such as Weißdruck, Weißfläche, Weißlicht, etc.|– means Or. It searches all strings that start with wei, white, bianco, blanc etc.?– means that a letter may or may not be present. For example, the expressionweiß?s?searches for whether Weiß is written with a sharp ß or Weis with a normal s. However, a text string like "weiß" would also be matched.
Usage in Check-in Preflight and Fixup Templates
Copy this Regular Expression into the Fixup Rename Spot Colors within the Check-in Preflight and Fixup Template, and remove any languages you do not require.
Article update: Workflow 1.21.0 – 09/2025