'InDesign GREP: replace final letter of words from a defined list
I'm trying to write a broad find/change command for InDesign which looks for words from a defined list (the list is long, around 500 words) and replaces the final character with something else.
Let's say I want words some words ending "-e" to instead end "-i" (so "table" becomes "tabli").
This would be easy to do if I wanted this change to happen on every word ending -e:
find: e\>
change: i
but what if I only want this change to happen on a particular list of words, like only nouns? The method above would change:
I see a table
to:
I sei a tabli
when what we want would be:
I see a tabli
Short of writing 500 different find/change expressions for each word, is there a way to apply this to only words from a pre-defined list?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
