formatting change while applying changeAll
- June 13, 2025
- 1 reply
- 306 views
Hi everyone,
I'm facing an issue with InDesign find and replace and hoping someone here can help.
Trying to insert a discretionary hyphen before a specific pattern in the text. I use a positive lookahead regex pattern (?=\w+~_) to find the target position and insert '~-', but this only works for the first occurrence in a text frame. To work around this, I tried switching the approach to use a matching regex: (\w+~_) and then use the replace string as ~-$0~k. However, when I give changeAll with this, I'm losing the character formatting (e.g., bold text gets reverted to Roman). Interestingly, when I use change one at a time, the formatting is preserved.
Has anyone encountered this issue or found a workaround to keep the formatting intact while using changeAll? Or Am I missing something in the positive lookahead pattern.
Thanks in advance for any suggestions!

