EasyCatalog includes a powerful find and replace function to allow you to transform data within the EasyCatalog Panel, prior to it being used to create automated content.
Data cleansing is configured via Field Options > General > Cleansing Options and may include references to InDesign characters and regular expressions.
Data cleansing is particularly useful where source data is difficult to modify.
Table of Contents
|Strip whole dollars||25.00 = 25, 101.30 = 101.30||.00=;|
|Replace all text CA with Catalog Automation||CA=Catalog Automation;|
EasyCatalog also includes advanced functionality to edit data regular expressions using the REGEX: syntax.
The REGEX: syntax is similar to other regular expression functionality found in other operating systems / languages such as Perl, PHP or similar.
The syntax used within EasyCatalog and Adobe InDesign is slightly different to that of other operating systems – e.g. the ^ character needs to be used twice to distinguish between a regular expression and Adobe InDesign’s method for addressing special characters (e.g. ^p is a paragraph character, ^n is a new line character).
Common Regular Expression operators
|Find at start of field||^^|
|Find at end of field||$|
InDesign special characters
Regular Expression examples
|Remove all paragraph markers at the end of a field||REGEX:^p$=;|
|Remove all tab characters at the start of a field||REGEX:^^^t=;|
|Convert to ordinal number (1 = 1st, 2 = 2nd, etc)||REGEX:^^1$=1st;REGEX:^^2$=2nd;REGEX:^^3$=3rd;REGEXV2:^^([\d*])$=\1th|