Insert character string before any text with a specific character style
- This topic has 1 reply, 2 voices, and was last updated 8 years, 4 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / Insert character string before any text with a specific character style
Learn / Forums / General InDesign Topics / Insert character string before any text with a specific character style
Tagged: find and replace, GREP
I am working on a membership directory with thousands of email addresses. I want to place a space-em dash-space before every email address formatted with a specific Character Style. Unfortunately, all the text was supplied to me as shown in the following example:
Don Abbott, Computer Graphics Spec. (GIS), [email protected]
I have applied a Character Style to the email addresses using a GREP string I got off your forum (thanks!). Now I would like to be able to global add an em dash so the final result looks like this:
Don Abbott, Computer Graphics Spec. (GIS) — [email protected]
Is there a way to do this?
Thanks!
Well, grep styles can’t change a comma into an em dash. I think it’s probably better just to search for the comma and replace it with the space-em-dash-space (using Find/Change). The tricky part is to find just the commas you want to change, of course. Are they always after (GIS) or always after a parenthesis or something?
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!