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 help! Ignore 2nd Tab?

Return to Member Forum

  • Author
    Posts
    • #84969
      Elma
      Member

      I need help in Indesign Find/Change.
      I am changing the first tab to a forced line break and a tab (I can do this much).
      But the text I am working with has a second tab that I do not want to change.
      Is there a GREP wildcard to ignore this second tab?
      Here’s an example of the text I currently have:

      Name (tab) Address (tab) Phone

      I want to do this:
      Name
      Address (tab) Phone

      Thanks for the help.

    • #84970
      Anonymous
      Inactive

      Why don’t you ad the word address to your grep

      Find : Name/t Address
      Change : Name/nAddress

      This way you won’t affect the second TAB and won’t go to a complicated GREP.

      Patrick

      • #84972
        Matt Isaac
        Participant

        I’m assuming the word Address would not be in the document. but rather the actual address of the person.

    • #84971
      Matt Isaac
      Participant

      Find:(?=.+)
      Replace

      This simple GREP Should work for finding the first of two tabs. However, if you would need the first of three tabs this expression would need to be altered.
      The positive lookahead (?=.+) looks ahead but does not select any text after the first tab that is followed by a tab.

    • #84973
      Elma
      Member

      Pure Genius! Thank you kindly. It worked!

    • #84976
      Ari Singer
      Member

      The following GREP expression is much more robust as it finds the first instance of a tab in a sentence regardless of how many tabs follow it. Because Skemicle’s expression (as he noted himself) only works if you have exactly two tabs in the paragraph. if there’s only one, or more than two it doesn’t work they way it should. Plus, if you have two tabs consecutively (highly unlikely, but still…) it won’t find either of them. But the following expression has none of those issues:

      Find What: (?!=*$)
      Change To:

      G’luck!

    • #84977
      Elma
      Member

      Thank you all for your help. Skemicle’s code did work for us…

      Ari, thank you for the code as well. I’ll print this out and keep it on hand for future projects.

      This is the first time I’ve used the forum. It’s great that help came through so quickly!!

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