Text Alternate Coloring
(posted on March 5, 2025)
Note: sample .idml file Download Button at the end of the Description
Question asked on the Adobe InDesign Forum:
The Game is to have an Alternating Colorization of pieces of text separated by a comma followed by a space, the set enclosed in parentheses. Of course, using one or several Grep Styles!
I always thought that imagining a global and complex Grep code was a waste of time.
Between us, it’s much faster and of course easier to create “small pieces”! Like below:
\(([\d.-]+,\h){0}\K[\d.-]+(?=.*\))
\(([\d.-]+,\h){2}\K[\d.-]+(?=.*\))
\(([\d.-]+,\h){4}\K[\d.-]+(?=.*\))
\(([\d.-]+,\h){6}\K[\d.-]+(?=.*\))
\(([\d.-]+,\h){8}\K[\d.-]+(?=.*\))
…
Click on the pink picto (above, on the right side) to place the text to the clipboard.

… At your own risks, you could try this Global Grep Code. Same result than above but with just a single code:
(\(|[\d.-]+,\h)\K([\d.-]+(?![^\)]*\())
Click on the pink picto (above, on the right side) to place the text to the clipboard.
