Imagine you would like to assign a character style to all numbers that occur throughout a document. Install the software first, and then fire up InDesign and open the document.
- Create a character style to your liking (e.g. it could be called AllNumbers or so and it could use a specific font with nice digits).
- Create a text frame on the left hand pasteboard of the first page of the document.
- In this frame, type a line with the following 3 characters
\d+ - This is a GREP expression that matches all numeric strings of one or more digits.
- Now the magic bit: select the GREP expression (i.e. \d+) and format it with the desired AllNumbers character style. The trick is that we link our desired formatting and style to a GREP expression by formatting the GREP expression itself.
- Select the API – StylePainter – Paint Document menu item
If all goes well, all strings of one or more digits in your document will now have the AllNumbers character style applied to them.