Another advantage of GREP Styles over Nested Styles is that a GREP Style can…be applied to specific words or phrases, no matter how many times they appear in a paragraph.…This is an ideal way to automatically italicize, for instance, a publication…name, or highlight a product name, and it's one of the easiest GREP styles…you'll ever create.…In this paragraph, there are a number of different product names and I want…to highlight one in particular, the Super Widget product name, in a different Character Style.…And I want to do that everywhere it appears and I don't want to do it manually.…
So, in order to have it done automatically for me, I am going to create a new…GREP style in this product description Paragraph Style.…I will right-click that style name in the Paragraph Styles panel, choose Edit…Product Description and go to GREP Style to create a New GREP Style.…The style I want to apply is already in this document.…It's called Product Name and I will just pick that from the Apply Style menu.…
Author
Released
11/18/2009- Using metacharacters, the building blocks of GREP
- Describing text that may not exist with zero operators
- Applying multiple character styles to the same text with GREP styles
- Eliminating orphaned words at the ends of paragraphs
- Preserving and recalling subexpressions
- Customizing a GREP-based text cleanup script for long documents
Skill Level Intermediate
Duration
Views
Q: In the “Dynamically fixing orphaned words with GREP” tutorial the author uses the term:
(?<=\w)\s(?=\w+[[:punct:]]+$)
In an earlier course the author described the + (one or more) modifier as unusable in a lookbehind or lookahead i.e. (?<=.+). What's the difference here?
A: The limitation mentioned in an earlier movie referred only to positive lookbehind and negative lookbehind. I was able to use the one or more times (+) metacharacter in the positive lookahead portion of the expression because that limitation doesn't affect either positive or negative lookahead. It's only when looking backward that GREP ignores the repeat metacharacters.
Related Courses
-
InDesign Secrets
with David Blatner38h 45m Intermediate -
Learning Regular Expressions (2011)
with Kevin Skoglund5h 36m Intermediate
-
Introduction
-
Welcome1m 4s
-
-
1. GREP Basics
-
What is GREP?1m 53s
-
-
2. Basic Metacharacters
-
Escaping out metacharacters2m 49s
-
Building with wild cards9m 9s
-
Specifying locations7m 4s
-
3. Advanced Metacharacters
-
Creating "or" conditions5m 24s
-
Building subexpressions5m 52s
-
-
4. GREP Styles
-
Describing inconsistent text6m 59s
-
5. GREP Find/Change
-
Understanding queries8m 19s
-
Cleaning up text with GREP2m 45s
-
6. A Practical Project with Advanced Find/Change and GREP
-
Conclusion
-
Goodbye27s
-
- Mark as unwatched
- Mark all as unwatched
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.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Styling specific words or phrases