Adobe Indesign GREP Help

Discussion in 'Design and Graphics' started by ChromeZero, Apr 28, 2011.

  1. ChromeZero macrumors newbie

    Joined:
    Apr 28, 2011
    #1
    Not so great at GREPs for Adobe Indesign. Would anyone care to help me figure out a GREP statement for the following scenarios:

    1) Find letter x which occurs before letter a, ie 'xa'. Apply character style 1 to x.
    2) Find letter combo xx. Apply character style 2 to the first x of this combo.

    Any help would be much appreciated. I have an account on adobe.com, but i can't create threads there for some reason. This seemed like the next best place?
     
  2. macstudent macrumors 6502

    macstudent

    Joined:
    Feb 12, 2002
    Location:
    Milwaukee, WI
    #2
    I would recommend posting your question to the forums on www.indesignsecrets.com.

    GREP questions get answered very quickly there.
     
  3. MiltK macrumors newbie

    Joined:
    Mar 4, 2014
    #3
    Grep assist?

    Hi All,
    I’m trying to write a grep to convert improperly styled times on a calendar to the proper style.
    I want the grep to find “am.” and change it to “a.m.”
    But since there is the possibility of having an “am.” being part of a show title such as “Sam I am.” I wanted to use a look behind to exclude an “am.” that is preceded by an “I” and a blank space.

    The negative lookbehind grep I was writing looks like this:
    \s(am\.)(?<!I\s)

    I also tried a positive lookbehind for an am. preceded by a space and a digit to narrow the types of am.s that could be selected
    \s(am\.)(?<=\d)

    The first one still selects the “am.” following the “I” and the space.
    The second selects nothing.
    Any ideas on how to use a lookbehind to select only the “am.” following a digit and a space?
     
  4. jamietshaw macrumors member

    Joined:
    Sep 25, 2009
    Location:
    UK
    #4
    Find: (x)a
    Replace: $1


    Find: (x)x
    Replace: $1
     
  5. superscape, Apr 28, 2014
    Last edited: Apr 28, 2014

    superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #5

Share This Page