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

Return to Member Forum

  • Author
    Posts
    • #61787
      jhandelun
      Member

      I have the following grep expression to target right indent (shift indent) and one character after: ~y.

      This works fine but I want to target the text that comes after this, how would I do this exactly? I would need to target the last 3 characters of a text frame.

      Below is a reference photo of first how it looks now and then how I want it to look. This is for a signature so I can't target the end of the paragraph (because I want to use the same paragraph style for the last paragraph as others).

    • #61793

      Is that square a Wingdings or dingbat? If so, you can include it and the Right Indent code inselfin a Lookbehind, like this:

      (?<=~yX ).+$

      — I put an 'X' where you should paste the dingbat. Note I added a space after the “X” as well, as per your sample — that way you always need a space between the dingbat and the following text.

      If you are using different dingbats, you could use the 'any' wildcard:

      (?<=~y. ).+$

      as it does roughly the same: after a Right Indent and any character at all, apply your character style up to the end of the paragraph. If possible use the first one, because this one will also pick up a stray space that might have crept in right after that Right Indent, and then the bolding is done on everything after that.

      This is for a signature so I can't target the end of the paragraph (because I want to use the same paragraph style for the last paragraph as others).

      As it is, my first suggestion will only be applied to Some more text in the exact sequence “Right Indent — Dingbat — Space — Some more text — End of the line”, and it will ignore every paragraph where this does not occur. So it's quite safe, I'd say.

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