spacer
spacer
spacer

Buy Adobe Creative Suite 5 Design Premium How-Tos: 100 Essential Techniques on Peachpit.com

spacer

Buy Adobe InDesign CS4 Styles on Peachpit.com

spacer

Learn GREP from The InDesigner on Lynda.com

November 19th, 2009 | by Michael Murphy

My first course for Lynda.comβ€”InDesign CS4: Learning GREPβ€”is now live on the Online Training Library. This 3-hour, 45-minute title is the first comprehensive, video-based course to be offered about using GREP specifically in InDesign. Starting with an explanation of what GREP is, and how to write expressions using metacharacters, InDesign CS4: Learning GREP covers both GREP Find/Change (CS3 and CS4), and GREP Styles (CS4) in depth.

Exercises demonstrated in the course include:

  • describing figure references in parentheses without styling the parentheses themselves
  • cleaning up inconsistent U.S. phone number formatting
  • describing every e-mail address in the world with one expression
  • simultaneously applying two or more character styles to the same text
  • dynamically preventing orphaned words at the end of a paragraph
  • converting and reformatting spreadsheet data from Excel to produce directory listings
  • inserting anchored objects with Find/Change
  • customizing a text cleanup script

Viewing the full course requires a paid Lynda.com account. However, 9 of the movies in the course are available for non-members to preview. For a 24-hour free pass to the Online Training Library, click here.

Posted in GREP, News/Announcements | 12 Comments »


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

12 Responses to “Learn GREP from The InDesigner on Lynda.com”

  1. superz3 says:
    November 23rd, 2009 at 8:23 am

    Hi Michael. Congrats for making it on lynda.com! It’s an awesome site & definitely worth the money. Ciao Z

  2. KLS says:
    November 25th, 2009 at 3:12 pm

    Excellent course. I the course earlier this week and I’d highly recommend it to anyone wanting to learn more about GREP.

  3. Paeon says:
    November 30th, 2009 at 1:16 pm

    Wonderful course, explained in English, with tips about undocumented GREP metacharacters.

    So, I have a question. Is it possible using GREP to find the first instance of a word and style it one way, but find further instances of a word and style it differently? Client wants the first instance of a term styled, but not any further occurrences. I can’t make head or tail out of UNIX guides, but there did seem to be a /m metacharacter for first instance. Any help would be appreciated.

  4. lowjackson says:
    December 1st, 2009 at 8:46 am

    Paeon
    It would be great if your could set Nested Style to an exact “Word” or “Small Phrase”. Anyone know if this is possible?

  5. Michael Murphy says:
    December 1st, 2009 at 9:09 am

    @Paeon — The only workaround I can think of is to put a unique invisible character around the first instance of the word/phrase (like an End Nested Style character), but not around any of the others. Then, write a GREP expression that requires that unique character be present using Positive Lookahead and/or Lookbehind to apply the “first instance” style. Another GREP expression could describe the word/phrase but only if it isn’t preceded or followed by that unique character (using Negative Lookahead and/or Lookbehind). There’s no GREP expression that determines “first instance” in one step.

  6. Michael Murphy says:
    December 1st, 2009 at 9:11 am

    @lowjackson — GREP Styles exist to get around exactly that limitation of Nested Styles. If you need to find every instance of a product name (i.e. “SuperWidget”), just create a GREP Style using the text “SuperWidget” and choose the appropriate character style to be applied to it.

  7. Paeon says:
    December 1st, 2009 at 3:05 pm

    Thanks, Michael. I’ll give that a try.

  8. vpaulsmithjr says:
    March 18th, 2010 at 10:01 pm

    Is there a way to have dynamic changing of phone numbers using GREP Styles? I only that you can apply a character style, but that won’t add the parentheses, etc. And Find/Change permanently changes the text. Is there a solution?

  9. Michael Murphy says:
    March 18th, 2010 at 10:17 pm

    This is the unfortunate either/or choice between GREP Styles and GREP Find/Change. GREP Styles do one thing — apply character styles — but they do it dynamically. GREP Find/Change does more — re-arranges and modifies found text — but it’s permanent. You just have to choose which is the best compromise for your needs on any given task or project.

  10. Jensedhi says:
    July 27th, 2010 at 9:09 am

    Hi Michael, first, thanks for posting your tutorial on lynda.com, it is the most comprehensive outline to GREP styles I’ve found thus far.

    I have a question in regards to a style for websites. How do you account for the differences for sites that have include the www (or http) vs ones that don’t as well as those that have a path after the .com vs those that don’t. The closest style I could come up with is
    (www|http).\w+\.(gov|com|edu|org)
    but it doesn’t include everything. Do you have any suggestions?

  11. Michael Murphy says:
    July 27th, 2010 at 9:59 am

    I’ve tried coming up with a universal method for defining all web sites with one GREP pattern, as I did in the Lynda.com video where I defined every possible e-mail address with one expression. The problem is, e-mail addresses are limited by more strict rules than URLs. A web address can have multiple domains, and people can type them with or without the or the www. in a document (as opposed to e-mail addresses, which must be typed correctly or they’re incorrect). I have yet to find a solution that doesn’t break other things. The challenge is accounting for an that may or may not be there, a www. that may or may not be there, a full domain, a secondary domain that may or may not exist, and some URLs have a slash and specific directory following them. That’s another challenge. I haven’t given up, but I’ve put that problem aside for now. If I resolve it, I’ll post it here.

  12. Jensedhi says:
    July 27th, 2010 at 11:39 am

    Thanks Michael. I’ll be sure to check back in and keep trying myself.

Leave a Reply

« Best Ever Offer for InDesign Magazine
Episode 53: Acrobat-Friendly Form Design, Part 2 »


gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.