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

how to grep ID5

Return to Member Forum

  • Author
    Posts
    • #60683
      LisaGal
      Member

      I have many instances of text within square brackets that i need to change to italic (but not the brackets). The text is within a paragraph and never a standalone paragraph. The text can be from 3 words on up in length.

      I have no idea how to grep and it looks like a really time consuming new language. Can anyone give me a starting point? Maybe there is a fantastic website that has a bunch of greps already existing!!

      thanks,

      lisa

    • #60684

      But there is such a website! One page, for example, is this: FindBetween: A Useful GREP String

      For your purposes, you need to adjust the example to the following:

      (?<=[).*?(?=])

      and leave the Change To field blank, applying Italics in the Change To format box. This does not address your specification

      The text is within a paragraph and never a standalone paragraph. The text can be from 3 words on up in length.

      — but is that really important? Because that's still possible using GREP, but the expression will go from “Anne-Marie can explain it” to “Jongware'll need to scratch his noodle to make it do exactly that, no more and no less”.

      (Even better: do not apply 'italic' as a font override, as it will give the paragraph the nasty '+' “there is something going on here” mark, but create a Character Style for your italics and apply that instead.)

    • #60691
      LisaGal
      Member

      Wow, this is great! Thank you so much.

      What are some of the grep websites?

    • #60692

      Mine, for example :D But that's not for beginners or faint-of-heart, though, as it focuses on the limits of what's possible.

      There are a few different flavors of GREP, but the differences are quite obscure and you can in general try any 'normal' GREP expression you find anywhere on the web. David gathered a couple of references:

      https://creativepro.com/grep

      and one of the first mentioned is Peter Kahrel's Shortcut, which especially targets GREP-for-InDesign users and has frequently been called “the best you can buy for a tenner”.

    • #60708

      Cari Jansen has some amazing shownotes from a presentation she did: https://www.indesignusergroup.c&#8230;..s_GREP.pdf

      Michael Murphy (AKA the InDesigner) has a series of shownotes as well which are fab: https://www.indesignusergroup.c&#8230;..murphy.pdf

      these are about as close as “off-the-shelf” solutions which can be easily customised. Jongware mentions Peter Kahrel's O'reilly book and I agree, for ten bucks it's excellent… i can't even buy lunch for that!

    • #60745
      kidpub
      Member

      One great thing about grep in ID is that you don't need to know that much about the syntax. You can construct fairly powerful grep matches using just the menu in the grep find/change dialog.

      Perry

      KidPub Press

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