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

Simple GREP help

Return to Member Forum

  • Author
    Posts
    • #82257
      Brent Hautle
      Member

      I am very frustrated with what should be a very simple GREP problem. I am designing name tag templates which I’ll eventually use a data merge on. Since names can be very short or very long, I wanted to create a GREP style that applies a larger font to the name if it’s more than two and less than 8 characters (which would include hyphenated names and spaces.) I tried this:
      .{2,8}
      But it changes all my text.
      Can someone please tell me what I’m doing wrong?
      Thanks!

    • #82258
      David Blatner
      Keymaster

      The dot means “any character”
      Maybe try \w{2,8}
      (word boundary, word character between 2 and 8 letters, then word boundary)

    • #82259
      Brent Hautle
      Member

      Hi David, thanks for the reply. I’m sorry to say that didn’t work. I’m trying all kinds of combinations and am not solving this mystery.
      I’ll try and visualize this in case my explanation wasn’t very clear.
      The first names that are more than 8 characters (which include hyphens and spaces) would be the normal paragraph style at 36pt. Eg. Christopher
      The first names between 2 and 8 characters would be 42pt. Eg. Jane
      Sometimes I have a longer name, like Kristina Maria, which needs to stay at the smaller size.
      Thanks!

    • #82260
      Brent Hautle
      Member

      I just found a workaround! Instead of setting my default paragraph style as the smaller font size, I made it the larger font size. Then my GREP style says any characters repeated more than 8 times will be my smaller font size. It works perfectly. Thanks again for your help.

    • #82273
      David Blatner
      Keymaster
      • #82286
        Brent Hautle
        Member

        That’s absolutely brilliant! Thank you.

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