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

Deleteing or changing things with GREP

Return to Member Forum

  • Author
    Posts
    • #60313
      SteveD
      Member

      Is is possible to delete or change characters or text in a GREP style such as when a new line character (soft return) is encountered it is replaced with a space or tab etc? Or is that only possible using GREP in Find/Change?

      Example:

      Chapter 1
      How I bought two tons of mustard from the Govenor

      Chapter 1 has a new line character that separates it from the chapter title. If I want to grab that text when creating a TOC it also grabs the new line character. It would be nice for the TOC style that is applied to the text in the TOC to replace the new line character with a tab to read like this

      Chapter 1 How I bought two tons of mustard from the Govenor

      I think it may not be possible to do that in a GREP style and have not found a way to do this but that may mean it is possible and I just haven't discovered a way to do it.

      So I'm looking for some confirmation.

    • #60316
      Anonymous
      Inactive

      No – grep styles cannot add or remove text. It can only search for patterns of text and apply a character style to it.

      For the TOC though all you have to do is search for ^(Chapters+d+)r and replace it with $1t or something similar.

    • #60324
      SteveD
      Member

      Thanks for the reply. I was afraid that was the case so thanks for confirming that to me.

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