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

Italicized text in parenthesis, with a twist! (GREP)

Return to Member Forum

  • Author
    Posts
    • #14349649
      Geoffrey West
      Participant

      I am working a multi-page document with lots of pricing information, and some of those prices have text in parenthesis immediately after it:

      $5.00 (at the discretion of attendant)

      But there is also text in the descriptive text areas that has text in parenthesis:

      Gasoline Tank (empty)

      What I’d like to do is only have parenthetical text that follows a dollar amount be italicized. Or to simplify even further: I want parenthetical text that is ONLY at the end of a sentence to be italicized. Like this:

      Gasoline tank (NO ITALICS): $5:00 (ITALICS)

      I already know the GREP expression for styling text between parenthesis: \(.+?\)

      But what’s the other piece of the puzzle? Is it easier to add to the expression to look for text following two zeroes or to look for text at the end of a sentence?

    • #14349654
      Dhafir Photo
      Participant

      Use this: \$.+?\(\K.+?(?=\))

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