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 removing parentheses

Return to Member Forum

  • Author
    Posts
    • #64329
      Gaspar
      Member

      Hi everyone,

      I have to swap many occurences of (180 x 130 cm) into 180 x 130 cm (the actual dimentions vary). So without the parentheses. In the GREP find field I type this equation: (.+?) which finds the occurences correctly. Now, what do I have to type in the Change field, so that the text in parenthesis stays and the parenthesis are gone? I can't find any useful variables in the flyout menu.

      Thanks very much.

    • #64330
      Eugenyus
      Member

      Find What: ((.+?))

      Change To: $1

    • #65794
      Dimitri De Bruyn
      Participant

      The reply form Eugenyus is not correct. Or he did not copy and paste the backslash in the expression.

      This one is tested en works perfectly..

      Find: \((.+?)\)

      Change to: $1

    • #65795
      Matt Mayerchak
      Participant

      The expression above will remove ALL parenthetical expressions from your text. Is that what you want?

      You could narrow it down to just finding sets of dimensions using centimeters by changing it to \((\d+ x \d+ cm)\) – but this won’t find fractions or decimal percentages. However, there are ways to do all of those as well, so it’s just a matter of how specific you need to be or how general you can get away with being.

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