I'm trying to write a macro to replace a colon with a period when the colon appears directly after a field code. But I need any cross-references to the field to be maintained. I.e., I want to change:
Figure { SEQ Figure \* ARABIC }:
to
Figure { SEQ Figure \* ARABIC }.
without breaking the cross-references to the figure number.
I tried finding "^21:" and replacing with "^&##" (so I could then replace ":##" with ".", similar to a solution that was recommended for a similar problem), but the replacement ruined the cross-reference. The cross-ref now appears as "Figure " rather than "Figure 1".
Also, I only want to do the replacement in paragraphs of style Caption.
Thanks for your help.