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

I love grep… But got a little problem

Return to Member Forum

  • Author
    Posts
    • #65783
      Dimitri De Bruyn
      Participant

      Hello everybody

      I’m into grepstyle lately and I think it is fantastic. But I’ve got something I want to do in grep, but it’s not working well.

      Example sentence:
      Est ut la soluptat (prepudae A omnimusci B) undis volorat eles ea volenda eperciam ipient, officiam qui (D) cus consecusda si illorem ex ex essi (E) volorum.

      First what I want to achieve. I want all single capital letters inside parentheses (including parantheses) to be bold. I used the expression (\u\)
      But that covers only (D) (E) in my example sentence. In the first words of the sentence there’s also a parenthese.
      ‘Est ut la soluptat (prepudae A omnimusci B)’ I want the parentheses and the capital letters A and B to be bold.

      I tried to search the forum, but I couldn’t find anything.

      Is this possible in grep? Do I have to use more grepstyles in one style?

      And one more last question… Is there a good book that only covers grep for indesign?

    • #65788
      Dimitri De Bruyn
      Participant

      Oops… I’ve made a mistake. My problem is different than I defined.

      Example sentence:
      Est ut la soluptat (prepudae A omnimusci B) undis volorat eles ea (volenda eperciam) ipient, officiam qui (D) cus consecusda si illorem ex ex essi (E) volorum.

      Everything inside parentheses (including parantheses) supposed to be bold. But only the one with A, B, D and E. Not ‘(volenda eperciam)’.

      It is for a manual that refers to illustrations through A, B, C etc..

    • #65790

      Possibly you made a mistake with your parentheses: both OPEN and CLOSE need to be escaped. This works for me:

      \(\u\)

      • #65792
        Dimitri De Bruyn
        Participant

        Thanks for your reply Jongware.. I allready had that one, but I see that I forgot to copy and past a backslah in my topic.

        I even got it improved with this expression if there is no difference between capitals or non-capitals

        \((?i)\u\)

        I have a new example sentence:

        Indication (A) t/m (Z) between brackets fat, not (this one), but (this one with A)

        Everything between parentheses that has A, B, C… X, Y, Z should be bold.

        In my example:
        (A) (Z) (this one with A) should be bold.

        Is there a way to post this with an image that makes it easier to understand my problem?

    • #65793
      Dimitri De Bruyn
      Participant
    • #65799

      Still no problem ;-)

      \([^)]*\u[^)]*\)

      This looks for an opening parenthesis, then zero-or-more Not-Close-Paren, followed by an uppercase character, followed by zero-or-more Not-Close-Paren and finally followed by a closing parenthesis.

      The Not-Close-Paren sequences are necessary because essentially you want to skip a list of “Not-A-Capital” — which is possible, but that also includes the closing parenthesis. In your example it would start at “(this one..” and end after the “A)”, picking up everything in between as well.

    • #65802
      Dimitri De Bruyn
      Participant

      Wow! That works perfectly…. Thank you very much.

      Btw is it possible to have a crash course in GREP given by you? ;)

      Is it possible to get in contact with you via web? I also come from the Netherlands.

    • #65803

      Ouch :-) I would love to, but my boss would surely object! I’ve got a regular job at a design office.

      For crash courses, you can check out IDSecrets’ GREP section: https://creativepro.com/resources/grep

      .. and one of the most recommended guides on Using GREP with InDesign happens to be written by a Dutchman as well: Peter Kahrel’s “GREP in InDesign” (https://shop.oreilly.com/product/9780596156015.do)

    • #65825
      Dimitri De Bruyn
      Participant

      Jongware, I just bought the eBook from Peter. And as u know I’m still a Dutchman and bought it with a 50% discount ;)

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