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 find in between only works with ()

Return to Member Forum

  • Author
    Posts
    • #81482

      Just started with GREP, and inspired by David Blatner, the find in between GREP code only works with paranthesis.
      If I change () to antyhing else like “, all text between the outermost quotation marks will be affected by the character style.
      Can´t show it here but see for yourself if you make a document.
      BTW, if you split the quotation text with a soft retrun, it behaves like the () text.
      What have I missed ?

      Hi (hello) okay. Hi (yes) well.
      (?<=\().+?(?=\))

      Hi ”hello” okay. Hi ”yes” well.
      (?<=”).+?(?=”)

    • #81575

      Well, it suddenly occured to me, the problem lies of course in the fact,
      that a qoute character ” is a single unicode used twice in the GREP code.
      Where as the paranthesis ( ) is of course 2 different unicode´s.

      So I, as a GREP trainee came up with this very simple solution:

      1st GREP linecode: italic style to “.+?”
      2nd GREP linecode: regular style to “+

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