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 to change space to tab

Return to Member Forum

  • Author
    Posts
    • #76732
      Marianne Michalakis
      Participant

      I have a long list that contains 2digits-2digits and then a space followed by some text that I need to change to
      2digits-2digits followed by tab text follows

      Ex 31-45space change to 31-45tab

      How would I write that GREP?

      Thanks

    • #76733
      Gert Verrept
      Member

      I think this should do the trick

      (\d\d-\d\d)\S

      change into

      $1

    • #76734
      Gert Verrept
      Member

      Sorry, the \S should be a (= any white space).

    • #76740
      Marianne Michalakis
      Participant

      THANK YOU!

    • #76742
      Marianne Michalakis
      Participant

      Help with Another more challenging GREP
      Now I need to change the space that is before each 1-digit.00 or 2-digit.00 to a tab. The text before the decimal numbers varies in length. Any ideas?

      Listing ex:
      88-25 25¢ Francis Ouimet #2377(change space to tab)11.00
      88-26 45¢ Harvey Cushing #2188(change space to tab)2.50

    • #76743
      David Blatner
      Keymaster

      I encourage you to try finding some of these grep codes yourself in the links on this page: https://creativepro.com/grep

    • #76744
      Masood Ahmad
      Participant

      After looking at your example text it seems that the text just before the space is a hash symbol followed by digits, if that is so, then here is the code for you. Try this and let us know if it works for you.

      GREP Find Change:
      Find what: (\K#\d+)(\d)
      Change to: $1$2

      I hope you are working in CS6 or higher version, because \K code didn’t work in lower version.

    • #76799
      Marianne Michalakis
      Participant

      Thank you, Masood– that worked!

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