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/replace: change string of tabs to special characters

Return to Member Forum

  • Author
    Posts
    • #14365916
      Mat Gill
      Participant

      Hi,

      I’m hoping there is a relatively straight forward GREP language to achieve this… I’ve had no luck searching the forum (I confess I spent minutes rather than hours looking!)

      I am importing/copying data from Excel into ID text frames for para styling

      Pasting it into a text frame separates the columns with tabs – I would like to replace specific tabs with other special characters e.g. Right Indent tab etc. To be specific:

      CHANGE:

      Digit <tab> Word <tab> Digit <tab> Word <tab> Symbol <paragraph return>

      TO:

      Digit <double space> Word <forced line break> Digit <right indent tab> Word <space> Symbol <paragraph return>

      I’ve managed to write an expression to find the string, but is there a way to replace this sequences using GREP?

      Simple examples that I can extrapolate would be great or links to other posts that I can learn from.

      Many thanks!

      Mat

    • #14365921
      Dhafir Photo
      Participant

      in Find: ^.+?\K(.+?)(.+?)(.+?)(?=.+$)
      in Change: $1$2~y$3

    • #14365918
      Dhafir Photo
      Participant

      The of InDesign GREP forum is “The Treasure of GREP” group:
      https://www.facebook.com/groups/TreasuresofGrep

      About your question you can use this to achieve that:

      in Find: ^.+?\K(.+?)(.+?)(.+?)(?=.+$)
      in Change: $1$2~y$3

      • #14365932
        David Blatner
        Keymaster

        Thank you Dhafir! I believe this reply was held up in moderation by our system… I do not know why. If it happens again, please feel free to reach out to me directly and just tell me… I can click the approve button. :-)

        Great to see you at CreativePro Week last week!

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