Find/Replace Abbreviation Formatting
- This topic has 3 replies, 3 voices, and was last updated 7 years ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / Find/Replace Abbreviation Formatting
Learn / Forums / General InDesign Topics / Find/Replace Abbreviation Formatting
Tagged: find/replace, GREP
Hi, I’m trying to write a GREP style for the Find/Replace function to ensure consistent formatting of abbreviations in my document. For example, in some places, the abbreviation “PE” appears “P.E.” I was able to fix these with the following GREP expression:
Find: ([\l\u])[.]([\l\u])[.]
Replace: $1$2
However, for other abbreviations, such as “C.F.M.” or “C.P.S.M.”, this code doesn’t work. Is there a way to modify the expression so it finds any length abbreviation, or do I need to conduct a separate search for each with an expression that looks for each specific length?
Thanks!
Use this code “\b([\l\u](\.)){2,}” to find and apply a character style, then look for any periods that have the character style applied to them and replace with nothing to delete them.
Thank you, Chad!
Either way you can try this as well:
GREP Find/Change:
Find What: (\u)(\.)+?
Change to: $1
I see that the acronyms in your text are all uppercase. If yes, then give it a try…
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!