Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ChromeZero

macrumors newbie
Original poster
Apr 28, 2011
2
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?
 

MiltK

macrumors newbie
Mar 4, 2014
1
0
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.