replace character only if it is the last letter


Hello :rolleyes:
I' m trying to replace a specifique letter with something else but only if its the last letter of a word
For example, in a random phrase "Flowers & guns" I'm trying to replace the "s" with lets say "t"
I've been using ACTION>REPLACE>"s ">"t " (with space) but that covers only the first word.
If I use wildcard ".s" then all the "s" gets replaced & I dont want that.
Is there a way to make a rule that replaces only the last letter of a word if it is a specifique one?


That should cover all words with an s at the end, followed by a blank.
You could try 2 actions of the "Replace with regular expression" as an action group.
The first handles the words followed by a blank (e.g. with the expression you have already tried).
The second handles the words at the end of the field:
Search-String s$
Replace with: t


Works like a charm. Thank you :slight_smile: