Copy link to clipboard
Copied
Copy link to clipboard
Copied
Can you show a screenshot of a real text example?
Copy link to clipboard
Copied
In a paragraph style, you can only apply character styles with a GREP style. So, you'd have to find all full-stops followed by hyphen and pipe, but not include the hyphen and pipe, correct?
The two easiest ways are:
1) Don't use a GREP Style, use a Nested Style instead. You can apply any character style Up To the first hyphen. This only works if you know that any fullstop followed by a hyphen should have the character style applied. If there are exceptions, this won't work. In which case, you can use...
2) Use a GREP Style with a positive lookahead. Your first group should be
(\.)
The backslash means "only match a fullstop character." If you don't escape your fullstop, it means "any one character" in GREP. Your second group should be
(?=-|)
This is a "positive lookahead" which means that it's going to match anything after the ?= but it's not included in what is found. So it will look for
.-|
but it is only going to match the period character, not the hyphen or pipe.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more