Grep to find first occurrence of a particular word in a story
hello grepers
i haven't had luck working out grep find first / last occurrence of particular word in story.
to find first occurrence of word hello in paragraph use grep.
(hello(?!=hello*$))
for last works.
((?=hello(?=.*hello)))|(hello(?!=hello*$))
i have tried single line , multiline prefixes don't trick.
waiting in suspence,
trevor
look ahead , behind work text adjacent term trying find, , ^ , $ locators work if search term first or last bit of text in paragraph.
i may wrong, don't think there way find first or last occurrence of word in paragraph in generalized case, i.e. don't think it's possible in sentence "i said 'hello' man on bike, , smiled , said, 'hello you, too.'"
More discussions in InDesign
adobe
Comments
Post a Comment