Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

InDesign Secrets

From: InDesign Secrets

Video: 013 Three cool GREP styles everyone can use

Anne-Marie Concepcion: One of the most powerful and underutilized features of Adobe InDesign is GREP styles. I want to show you three cool GREP styles that everyone can do. This is really cool stuff. Let me show you. For example, you may have seen the word grep in Find Change, which it's been around in Find Change since I think CS2 or CS3, and GREP Find Change lets you find text based on a pattern. So instead of just a straight text you can actually say find any digits that's repeated a bunch of times or that you know falls at the beginning or end of a paragraph that kind of thing.

013 Three cool GREP styles everyone can use

Anne-Marie Concepcion: One of the most powerful and underutilized features of Adobe InDesign is GREP styles. I want to show you three cool GREP styles that everyone can do. This is really cool stuff. Let me show you. For example, you may have seen the word grep in Find Change, which it's been around in Find Change since I think CS2 or CS3, and GREP Find Change lets you find text based on a pattern. So instead of just a straight text you can actually say find any digits that's repeated a bunch of times or that you know falls at the beginning or end of a paragraph that kind of thing.

And with the GREP Find Change you cannot just find text based on that matching pattern, but then you can change it. You can add characters before or after, you can flip around parts of it, like you can changed cents to dollars or put the last name in front of a first name, and of course you can find based on format or change the format of found text. So that kind of GREP is slightly different than what I want to talk about, which is GREP Styles. Now GREP styles were added in CS4 and the GREP style lets you embed that Find what, that pattern within a paragraph style.

It does not let you change what is found, but it does let you apply a character style. So it's kind of like a hybrid between Find/Change GREP and a nested style, Or maybe you can think of it a nested style that's more intelligent. So let's take an example of the first very cool GREP Style that you can do. Here we have a paragraph. This one that starts with in a matter of weeks and this is a paragraph from a Hansel & Petal plant catalog. The company name is Hansel & Petal. And let's say that every time Hansel & Petal is mentioned we want it to be bold.

You could go to Find/Change and make it bold but then you would also have to say every time that Hansel & Petal lowercase or let's say it's also uppercase sometimes, so let's say we'll just add it right here, Hansel&Petal, and sometimes it is also separated by spaces. Hansel & Petal. Well that's a lot of Find/Changes that you'd have to do constantly and every time you edited something or before you send it to press or before you export it a PDF for the website, you'd have to always do the same Find/Change and look for these and apply the bold style.

Instead what you could do would be to edit the body style so that these automatically become bold. I am just going to double click, body, and go down to GREP Style and I want to add a new GREP style. You just need two things with the GREP style. You need to know what is the name of the character style that you are going to apply to the found text, that's this drop-down menu here, and if you forgot to create a character style, you have this wonderful little feature that let's you create one on the fly right here without having to back out of all these dialog boxes. But I did think about it first, so I want to make something bold. And then to the pattern.

Now it only suggests in a one or more digits. I don't know why it's there. It should just be blank in my opinion. But what we want to do is we want to apply the bold style to every time somebody rights Hansel & Petal and you can do that just by typing it in. No GREP code necessary, check this out. Hansel&Petal. Now as soon as you type it doesn't automatically happen. You have to click in the gray area to make it go into effect. So that worked on that one but it didn't work on this one or this one. So you think okay, fine, well I know how to do it now. I'll just add a new GREP style because there is no limit to the number of GREP Styles you can add to a paragraph style. Well there probably is. Maybe there's a million that you can, but I haven't tested it myself.

But instead of actually creating you know another GREP style that says well if they're uppercase and another one that says if there is space, you can combine them. You can be more efficient and save electrons by just editing this one and creating what we call an Or statement. So if the text says this or it starts with a capital H and a capital P, so the Or character is this pipe, it's called. It's the vertical line and it's the character in your keyboard right above the backslash. So it's Shift+Backslash. Let's do another one, Hansel & Petal.

So even though we are doing a GREP style, we're not using any particular GREP code, just straight text. So didn't I tell you? It's a cool GREP code that anyone can do. Click in the gray area and notice that they all become bold automatically. So now you don't have to worry about it. Whether the text is existing or you're typing it on the fly or you're flowing it into a document, as soon as you apply this paragraph style called body, all of these instances will become bold or of course you know you could've applied any other kind of character style to any other kind of pattern that you're looking for.

So keep that in mind. Here's an easy one for anybody, that anybody can use a GREP style based on matching text and variations of that separated by this pipe. Let's look at another example. I am going to zoom out and go up here to this paragraph. Let's zoom in a bit. Here we have an example of a paragraph with a fraction in it. And normally when I see this fraction I would want to select it and apply the Fraction character style. But what a pain, right. Can't we just make the Fraction style part of the paragraph definition? So this paragraph style is Section Blurb. If I come down here to Section Blurb and under open type features I turn on Fractions, watch what happens.

It does apply the formatting correctly to this two thirds, but look what has happened to the other punctuation. This comma moved up, this period moved up. Some OpenType fonts are not as smart as others. And when you turn on use fraction glyphs for the paragraph style it applies the Fraction style to anything it thinks could be a numerator, like periods and commas and so on. So instead you're supposed to apply the fraction one by one to the actual fractions. Oh, that's pain. So let's turn that off and instead we're going to go right to GREP Style, and it's still using the Hansel & Petal but we're going to add another one here and we're going to apply the style called Fraction to a fraction.

I am just going to do a very simple fraction here. So we want one or more numbers, right. That's what that means. The slash indeed means any digits and the plus symbol means one and more times followed by a slash and then the same thing, one and more numbers, right. So that's \d+. Click in the gray area. I have preview box turned on and we can see that two thirds is now formatted correctly, but the commas and periods have stayed in place. So that's two GREP styles that anyone can use and now let's do another one. This one is lot of fun.

This one can search for anything in between quotes and apply a character style to the entire phrase including the quotes. That can come in handy lots of times. Let's test it out. Let's say many plants cannot compete well in a border. We'll surround that with quotes and now we're going to edit section blurb again and down here under GREP Style I'm going to add a new GREP style that applies the style let's say italic to� And now how do you say anything in between quotes? Well luckily you can just start out by saying opening quotes. It doesn't make any difference if it's curly or straight. And then any character is .+?", right.

Click in the gray area. Tada! So we can type stuff and quotes. So let's say soil type, freshness of the water, or we can just go ahead and add quotes anywhere that we want and it automatically gets that character style applied because we added it as a GREP Style. So it's just been a few minutes and now you know three cool GREP styles that you can start applying to your projects today.

Show transcript

This video is part of

Image for InDesign Secrets
InDesign Secrets

176 video lessons · 80724 viewers

Anne-Marie Concepción and David Blatner
Author

 
Expand all | Collapse all
  1. 5m 54s
    1. 176 Making captions easy (ignore text wrap, object style, library item, live caption) NEW
      5m 54s
  2. 51s
    1. 001 Welcome to InDesign Secrets
      51s
  3. 9m 41s
    1. 173 Making a character style change only the tint of your text
      2m 27s
    2. 174 Editing table set up from the keyboard
      4m 40s
    3. 175 How to sort text in InDesign
      2m 34s
  4. 12m 59s
    1. 170 All about All Caps (change case, open type option)
      4m 36s
    2. 171 Batch convert InDesign files to IDML and other formats
      2m 35s
    3. 172 Fun with placeholder text
      5m 48s
  5. 11m 52s
    1. 167 Creating blank entry spaces on forms
      3m 53s
    2. 168 Creative uses of the Slug area
      4m 45s
    3. 169 Change the UI languaging in InDesign CS6 and CC
      3m 14s
  6. 21m 11s
    1. 162 Keeping page numbers on top of master items
      3m 55s
    2. 163 Adding automatic currency symbols in a table cell or before text
      3m 50s
    3. 164 Make a pop-up footnote for your ebook
      3m 48s
    4. 165 Deleting tabs at the beginning of paragraphs and applying a paragraph style
      3m 10s
    5. 166 Five InDesign Presentation tips
      6m 28s
  7. 19m 54s
    1. 158 Sharing swatches (PS/IL/ID and ID to ID)
      3m 36s
    2. 159 Convert rounded corners to editable paths
      3m 15s
    3. 160 Convert local formatting to character styles
      5m 14s
    4. 161 Sort an index by page number
      7m 49s
  8. 16m 58s
    1. 154 When InDesign ignores your leading values
      4m 5s
    2. 155 Extracting images from a Word document
      3m 42s
    3. 156 Uncommon uses for Quick Apply
      6m 2s
    4. 157 Uncovering InDesign's magic font folders
      3m 9s
  9. 28m 47s
    1. 149 Cropping with paste into
      5m 18s
    2. 150 Using vertical justification to spread out text in a frame automatically
      5m 16s
    3. 151 Rotate text inside a frame, or the frame around the text
      2m 30s
    4. 152 Looking at snippets vs. libraries
      6m 49s
    5. 153 Import a folder full of pictures, one per page
      8m 54s
  10. 19m 1s
    1. 145 Lay out a front, back and spine for a book jacket
      6m 12s
    2. 146 Ghosting area of image behind text
      2m 53s
    3. 147 Make a transparency mask in InDesign
      3m 45s
    4. 148 Using preflight to find common document errors
      6m 11s
  11. 22m 35s
    1. 140 Faking bold and italic when the font family doesn’t have one
      5m 2s
    2. 141 Keeping the same scale size when updating or relinking to images
      3m 9s
    3. 142 Inserting glyphs
      6m 42s
    4. 143 Building richer, bolder color gradients
      3m 7s
    5. 144 Finding the right font with InDesign’s font menus
      4m 35s
  12. 21m 28s
    1. 136 Fitting text to a specific size
      4m 45s
    2. 137 Quick tips for making a small PDF file size
      6m 9s
    3. 138 Sharing presets, workspaces, and custom shortcuts sets
      5m 17s
    4. 139 Making a multi-level numbered list
      5m 17s
  13. 17m 21s
    1. 132 Changing the shape of polygons and starburst as you draw or afterward
      4m 17s
    2. 133 Contextual text and images that you only want sometimes visible
      4m 55s
    3. 134 Creating nav points in a movie
      4m 31s
    4. 135 Adding effects to your rule above and rule below
      3m 38s
  14. 22m 44s
    1. 128 Making automatic jump lines
      6m 52s
    2. 129 Turning off allow pages to shuffle in order to separate facing pages
      3m 40s
    3. 130 Dealing with parentheses around text size
      4m 19s
    4. 131 Make a fill in the blank label for contracts and forms
      7m 53s
  15. 23m 25s
    1. 123 Allow text frame to resize with text
      2m 43s
    2. 124 Mapping Word styles to InDesign styles
      5m 48s
    3. 125 Make two automatically threaded text flows
      3m 37s
    4. 126 Saving for Web in InDesign
      6m 7s
    5. 127 Numbering rows in a table
      5m 10s
  16. 13m 50s
    1. 120 Making alternative body text styles for fast typesetting
      5m 4s
    2. 121 Making InDesign patterns with the free PatternMaker
      3m 45s
    3. 122 Creating pull quotes the easy way
      5m 1s
  17. 13m 56s
    1. 117 Selecting text with the InDesign keyboard dance
      2m 0s
    2. 118 Including a total page count in your page numbers
      6m 19s
    3. 119 Making a custom arrowhead
      5m 37s
  18. 21m 53s
    1. 112 Packaging images on the pasteboard
      3m 32s
    2. 113 Automatically updating figure references for books
      6m 9s
    3. 114 Adding Tool Tips to your form fields in InDesign
      3m 21s
    4. 115 Setting poetry, flush left, center on longest line
      3m 54s
    5. 116 Use bookmarks to navigate long documents in production
      4m 57s
  19. 18m 26s
    1. 108 Using the same keyboard shortcut for two different commands with the Context feature
      5m 22s
    2. 109 Making a text highlighter
      3m 33s
    3. 110 Updating an interactive PDF without losing work done in Acrobat
      5m 31s
    4. 111 Adding custom text at the beginning of each line automatically
      4m 0s
  20. 25m 3s
    1. 104 Converting text to outlines the right way
      4m 30s
    2. 105 Turning InDesign into a speed demon
      8m 31s
    3. 106 Working with MiniBridge
      5m 45s
    4. 107 Customize your QR codes
      6m 17s
  21. 16m 34s
    1. 100 Aligning Objects tips and tricks
      5m 10s
    2. 101 Applying corner options to any shape
      2m 17s
    3. 102 Converting footnotes to endnotes with a free script
      4m 49s
    4. 103 Making tab leaders pretty
      4m 18s
  22. 24m 41s
    1. 096 Managing changing pages with primary text frames
      5m 23s
    2. 097 Secrets of the Info panel
      7m 31s
    3. 098 Surprising ways to do a word count
      5m 29s
    4. 099 Placing an object where you want it with an object style
      6m 18s
  23. 30m 33s
    1. 090 Three great Object Styles for any designer
      8m 1s
    2. 091 Choosing alpha channel image transparency
      2m 25s
    3. 092 Adding and reading metadata for InDesign files
      3m 25s
    4. 093 Adding ALT tags to your images
      6m 59s
    5. 094 How to Place & Link a text frame's text but not its formatting
      7m 4s
    6. 095 Setting the baseline position of a caption
      2m 39s
  24. 17m 58s
    1. 086 Using Illustrator to create InDesign gradient swatches
      4m 49s
    2. 087 Building a simple grep style to change character size
      3m 45s
    3. 088 Exporting a grayscale PDF
      3m 16s
    4. 089 Three ways to cheat text outside of its frame
      6m 8s
  25. 28m 38s
    1. 082 Creating a custom cross-reference format
      13m 53s
    2. 083 Putting different-sized pages on a single spread
      3m 7s
    3. 084 Formatting prices with nested and grep styles
      6m 21s
    4. 085 Checking out the Gridify tricks
      5m 17s
  26. 19m 15s
    1. 078 The secrets of formatting objects with Find/Change
      6m 34s
    2. 079 Using ruler guides: 10 great tricks
      5m 3s
    3. 080 Converting a clipping path to a frame
      4m 24s
    4. 081 Adding a drop shadow to a single word inside a frame
      3m 14s
  27. 31m 18s
    1. 074 Working with sets in the content conveyor tool
      10m 40s
    2. 075 Running text along the top and the bottom of a circle
      3m 51s
    3. 076 Creating a list using the Table of Contents feature
      3m 25s
    4. 077 Quickly threading frames together and unthreading frames
      13m 22s
  28. 29m 32s
    1. 070 Ten uses of the Story Editor
      11m 39s
    2. 071 Moving an object: Ten ways!
      7m 18s
    3. 072 Understanding optical margin alignment (and the quote trick)
      4m 23s
    4. 073 Changing the shape of any frame with the pen tool
      6m 12s
  29. 17m 47s
    1. 066 Customizing the story editor preferences
      6m 4s
    2. 067 Setting the size of text exactly with this free script
      3m 28s
    3. 068 Using Gravity to simulate perspective
      3m 15s
    4. 069 Fixing the overflowing text frame problem in EPUBs
      5m 0s
  30. 23m 37s
    1. 062 Embedding images
      7m 43s
    2. 063 Adjusting leading inside a paragraph
      4m 31s
    3. 064 Placing one InDesign file inside another
      3m 58s
    4. 065 Creating bookmarks for PDFs
      7m 25s
  31. 29m 16s
    1. 058 Text wrapping
      6m 54s
    2. 059 Inserting pages: Understanding the Pages panel
      4m 20s
    3. 060 Copying paths between Illustrator and InDesign
      5m 14s
    4. 061 Automating Find/Change with the Find/ChangeByList script
      12m 48s
  32. 35m 12s
    1. 052 Five things that should be in every new file
      5m 19s
    2. 053 Forcing EPUB page breaks with invisible objects
      6m 21s
    3. 054 Understanding component information
      6m 39s
    4. 055 Creating running heads using section markers
      4m 16s
    5. 056 Making a font with InDesign using the IndyFont script
      5m 20s
    6. 057 Finding where that color is used
      7m 17s
  33. 23m 41s
    1. 048 Specifying an exact amount of space between objects
      5m 17s
    2. 049 Fixing last lines that are too short
      8m 16s
    3. 050 Creating web graphics from your InDesign artwork
      7m 20s
    4. 051 Using “No Language” to suppress unwanted hyphenation, spell-checking, and smart quotes
      2m 48s
  34. 21m 30s
    1. 044 Formatting fractions correctly
      8m 11s
    2. 045 Fixing unwanted hyperlinks in an imported Word file
      5m 57s
    3. 046 Inline graphic tricks with invisible paragraphs
      4m 21s
    4. 047 Ensuring the first line of every chapter starts in the same spot
      3m 1s
  35. 29m 56s
    1. 038 Updating a linked table without losing formatting
      5m 38s
    2. 039 Creating electronic sticky notes
      4m 49s
    3. 040 Moving master page items to the top layer for visibility
      2m 48s
    4. 041 Five guide tricks that will impress your coworkers
      6m 18s
    5. 042 Letting InDesign add the diacritics
      4m 21s
    6. 043 Using single-cell table cells for custom paragraph formatting
      6m 2s
  36. 28m 19s
    1. 034 Importing a custom dictionary
      7m 8s
    2. 035 Changing document orientation and page size
      6m 45s
    3. 036 Numbering instead of using auto page numbers
      6m 23s
    4. 037 Setting story order with the Articles panel
      8m 3s
  37. 37m 59s
    1. 028 Creating running heads using variables
      5m 1s
    2. 029 Live Caption tips and tricks
      8m 3s
    3. 030 Making professional drop caps
      10m 37s
    4. 031 Making two-state buttons in interactive documents
      5m 5s
    5. 032 Moving pages from one document to another
      3m 15s
    6. 033 Wrapping bulleted text around a curve
      5m 58s
  38. 23m 50s
    1. 024 Using layer comps in Photoshop files to show alternates in InDesign
      4m 19s
    2. 025 Adding custom HTML tags to EPUB/HTML exports
      5m 32s
    3. 026 Tracking down type issues with the composition highlighter
      8m 13s
    4. 027 Managing your InDesign panels
      5m 46s
  39. 21m 34s
    1. 020 Using multiple windows for comparisons
      3m 35s
    2. 021 Putting images on a stroke
      5m 23s
    3. 022 Making your own motion path
      5m 43s
    4. 023 Copying objects between Illustrator and InDesign
      6m 53s
  40. 23m 9s
    1. 016 Aligning numbered lists by decimal points
      3m 10s
    2. 017 Running a script
      9m 33s
    3. 018 When text disappears from a text frame
      6m 18s
    4. 019 Preview and Presentation modes (changing color, etc.)
      4m 8s
  41. 25m 19s
    1. 012 InDesign's Easter eggs
      5m 0s
    2. 013 Three cool GREP styles everyone can use
      7m 35s
    3. 014 A field guide to special characters
      8m 2s
    4. 015 Trashing the application preferences to solve weird behaviors
      4m 42s
  42. 26m 7s
    1. 008 Selecting through and into objects using cmd-click and Select Above/Below
      5m 46s
    2. 009 Some great tips and tricks for the Swatches panel
      9m 40s
    3. 010 Saving down for backward compatibility with INX and IDML
      5m 55s
    4. 011 Using the INX and IDML formats to fix problems
      4m 46s
  43. 23m 26s
    1. 004 The indispensible Quick Apply feature
      5m 29s
    2. 005 Customizing the Links panel
      6m 53s
    3. 006 Magically building graphs with the Chartwell font
      7m 43s
    4. 007 Using the Eyedropper tool to pick up character or paragraph attributes
      3m 21s
  44. 9m 6s
    1. 002 The hidden "auto-expand text" feature
      5m 51s
    2. 003 Letting InDesign do the math for you
      3m 15s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed InDesign Secrets.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.