Page 1 of 1

How to Replace a Word Without Affecting Longer Words?

PostPosted: Fri Dec 22, 2023 11:11 pm
by spacev2
Hi,

I am wanting to replace the word "and" and replace it with "&". However longer words that contain the same character sequence are also being affected, for example Random, Randomized, etc.

How can I prevent longer words from being affected ?

Thanks

Re: How to Replace a Word Without Affecting Longer Words?

PostPosted: Sat Dec 23, 2023 7:43 pm
by pseudoryx
Tick "match case" or include one of the separators in your replace box, assuming that your words are separated.

Re: How to Replace a Word Without Affecting Longer Words?

PostPosted: Sun Dec 24, 2023 2:46 am
by spacev2
Thanks for the reply.

According to the user manual, "Match Case" - Performs case-sensitive replacement.

In regards to using "separators" in the replace box, the user manual does not mention anything about "separators" within the Replace (3) module. There are only "Position Modifiers".

Neither of the above are solving the issue that I am facing.

Re: How to Replace a Word Without Affecting Longer Words?

PostPosted: Wed Dec 27, 2023 5:24 pm
by therube
In 3:Replace, simply include a space before & a space after the word, "and".

So " and ".
(You don't include the " nor the ., simply hit the <spacebar>.)
(Or <sp>and<sp>, depending on how you want to visualize it).

That will find the word "and", but not "random" or "Andy".

Re: How to Replace a Word Without Affecting Longer Words?

PostPosted: Thu Jan 04, 2024 9:01 pm
by spacev2
therube wrote:In 3:Replace, simply include a space before & a space after the word, "and".

So " and ".
(You don't include the " nor the ., simply hit the <spacebar>.)
(Or <sp>and<sp>, depending on how you want to visualize it).

That will find the word "and", but not "random" or "Andy".


Thank you for the help. This worked how I wanted it. Problem is solved.