is now part of CreativePro.com!

Temporarily Turning Off a GREP Style

7

I’m not the best GREPper out there, but I do know how to create a few simple styles. One of the things I like to do is see the results of turning a GREP style on and off for several types of paragraphs. But I don’t want to delete my precious, laboriously-made GREP formulas. This morning I had an epiphany.

To temporarily turn off the GREP style, select the character style and change it to None. It’s that simple! You don’t delete the GREP style, you just make it do nothing.

A GREP style set to apply the No Break character style

A GREP style set to apply the No Break character style.

A GREP style turned off by setting it to None.

A GREP style turned off by setting it to None.

But then I found Anne-Marie’s comment to Mike Rankin’s post Adventures in GREPland where she reminds him that an asterisk (*) in front of a GREP expression will turn off the expression.

Placing an asterisk in front of a GREP express also turns it off

Placing an asterisk in front of a GREP express also turns it off.

The benefit to using the asterisk trick is that you don’t have to remember which character style was associated with that expression. You just have to remember to use an asterisk.

Sandee Cohen is a New York City-based instructor and corporate trainer in a wide variety of graphic programs, especially the Adobe products, including InDesign, Illustrator, Photoshop, and Acrobat. She has been an instructor for New School University, Cooper Union, Pratt, and School of Visual Arts. She is a frequent speaker for various events. She has also been a speaker for Seybold Seminars, Macworld Expo, and PhotoPlus conferences. She is the author of many versions of the Visual Quickstart Guides for InDesign.
  • Shane Robinson says:

    Don’t forget Grep Toggler and tomaxxiGrep… https://tomaxxi.com/downloads/

  • Eugene Tyson says:

    Sometimes I GREP just because I can.

  • I too would also recommend Marijan Tompa’s GREP Toggler and tomaxxiGrep.

  • Chris Ryland says:

    Sandee, if you turn off the grep style by using an invalid regular expression (which is how an initial * probably works), think of the pain you’re causing the grep styles machinery. At every move, it’s hit with a lurching error internally…

  • Eugene Tyson says:

    I’m not sure if it’s an actual switch for disabling GREPs or not – but the asterisks is a valid GREP code – match zero or more of the preceding character or expression.

    As there are no preceding characters it doesn’t find anything – therefore the rest of the code is inert.

  • Ob-wan Kenobi says:

    A talent is rare and valuable! Some have it, some don’t. Some detect it at first glance, some don’t. Some are looking for it, some don’t …
    Marijan Tompa is an awesome scripter, rare and precious.
    Among other things, he has published tomaxxiGREP in the summer of 2011! … There are three years! Pure genius! Without further comment.

  • Joshua Seymour says:

    Does anyone know where I can find Marijan Tompa’s GREP Toggler? the links above are no longer good and I can’t find mention of it anywhere.

  • >