Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

GREP – find/change the second occurrence of a comma

Return to Member Forum

  • Author
    Posts
    • #91852

      I have a line of copy that includes several commas. I’d like to find the second comma in each line and replace it with a paragraph return.

      I feel like this is possible with GREP, I’m just not sure how to write it.

      Thanks for you time,
      Holly

    • #91867

      Hi Holly,

      try this one:

      Find what: ^(.+?\K,\x20){2}
      Change to: \r

      Kai

    • #91880

      Thank you Kai! The solution you offered did not work. Then I discovered I needed to focus on a different element than the second comma. It was a set of upper case letters with a space after…long story.

      Anyway, I’ve accomplished what I needed a different way. Thankfully there weren’t many lines.

      I do appreciate your reply though!

      Holly

    • #91882

      Holly, I’m pretty sure, that my code should work in a perfekt world. Even if you have a solution, would you please provide two lines of a real example. Thanks

      Kai

Viewing 3 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads