Cleansing options
Clean up a field's data with simple search-and-replace rules, before it is formatted and placed in the document.
Data from a supplier, a PIM or a spreadsheet is not always ready to print. It may use the wrong symbol, contain extra characters or use abbreviations.
Cleansing options fix this inside EasyCatalog, without changing your original data. Each cleansing option is a small search and replace rule: "find this, and replace it with that".
Where to write cleansing options
Cleansing options are set for each field, in the General pane of the Field Options dialog. See The general pane.
You can write them in two ways:
Type them directly in the Cleansing Options text box.
Click the pencil icon next to Cleansing Options. This opens the Edit Cleansing Options dialog. It shows each rule in a table with two columns: Find and Change. From this dialog you can also add rules (New), change them (Edit...), remove them (Delete...), see a Preview, and Import... or Export... your rules.

How to write a cleansing option
Every cleansing option follows this pattern:
On the left of the
=: the text to find.On the right of the
=: the text to replace it with.At the end: a semicolon
;.
Examples
#=£;
Replaces every # with £.
#=£;*=•;
Two rules at once: # becomes £ and * becomes •. Each rule ends with ;.
#=;
Removes every #. Leave the right side empty to delete a character.
ESY=EasyCatalog;
Replaces the text ESY with EasyCatalog. Rules work with words, too.
a==b=a equals b;
Replaces a=b with a equals b. See the warning below.
Exercise
Your supplier writes pcs instead of pieces, and adds an asterisk (*) to some product names. Write the cleansing options that fix both problems.
Write a rule that replaces
pcswithpieces.Write a rule that removes every
*.Put both rules together, one after the other.
Regular expressions (advanced)
A regular expression is a pattern that describes text, instead of the exact text. For example, "a paragraph mark at the end of the field". It is a powerful tool for advanced users.
To use a regular expression, start the cleansing option with REGEX::
This removes every paragraph mark (^p) at the end of the field ($): it replaces them with nothing.
To learn more about regular expressions, see Regular expression on Wikipedia.
Import and export cleansing options
If you use the same cleansing options in many fields, save them in a plain text file. Then import them whenever you need them.
To import cleansing options:
In the General pane, click the pencil icon next to Cleansing Options.
In the Edit Cleansing Options dialog, click Import....
Select the text file that contains your cleansing options.
To save the current cleansing options to a file, click Export... in the same dialog.
InDesign metacharacters
A metacharacter is a short code that starts with a caret (^) and stands for a special InDesign character, such as a bullet or a tab. They are the same codes used in InDesign's Find/Change dialog.
You can use them in cleansing options and in the Prefix and Suffix of the General pane. For example:
This replaces every asterisk (*) with an InDesign bullet (•).
Last updated
Was this helpful?