1 Reply Latest reply on May 7, 2013 10:09 AM by Peter Spier

    Beginner GREP Style: Match a Phrase

    sierraplanet

      Hello,

       

      I'm trying to learn all the wonderful types of styles available in InDesign for a project I'm working on. I'm using InDesign CS5. I have a character style that basically just makes characters become smallcaps. I want to use this character style as a GREP style in a paragraph style.

       

      Within the paragraph, if there are character strings that match "mm" or "ct" or "ct tw", then use that smallcaps character style.

       

      I got the "To Text" field to say: (mm|ct|tw).

       

      The problem is that I have words like "twin" in the paragraph that I don't want small caps to affect, so I want it to say something like (mm|ct|ct tw), but that doesn't work.

       

      I know I can just make a second GREP style for "ct tw", but I'm hoping there's a way to make it all in one declaration. I'm sure it is a extremely simple syntax fix, but I'm completely new to GREP, so any pointers will be greatly appreciated!

       

      Thanks!