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

Viewing 1 reply thread
  • Author
    Posts
    • #80322
      Anthony Smith
      Participant

      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!

    • #80327
      David Blatner
      Keymaster

      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?

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
>