I'm trying to select the first to words after each • but not include the •. I'm not having any luck. It always selects the • too. Is there any way to do this?
var cStyle = curDoc.characterStyles.item("Style"); var curSel = app.selection; app.findGrepPreferences = NothingEnum.nothing; app.findGrepPreferences.findWhat = "•\\s\\S+\\s\\S+"; app.changeGrepPreferences.appliedCharacterStyle = cStyle; curSel.changeGrep();
It's called "Positive Look Behind"
Success! Thank you so much.
I'm trying to select the first to words after each • but not include the •
Do you perhaps mean: "I try to select the first two words after each •" …
And one more question: These "•" are not automatically bullet points - right?
Please show a screenshot with visible hidden characters.
Normally, greps like the following should work in most cases:
Screenshot submitted later
Such a grep should also work without problems - and can be adapted relatively easily to new requirements.