How to Replace a Word Without Affecting Longer Words?

Bulk Rename Utility How-To's

How to Replace a Word Without Affecting Longer Words?

Postby spacev2 » Fri Dec 22, 2023 11:11 pm

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
spacev2
 
Posts: 22
Joined: Fri Dec 22, 2023 10:58 pm

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

Postby pseudoryx » Sat Dec 23, 2023 7:43 pm

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

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

Postby spacev2 » Sun Dec 24, 2023 2:46 am

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.
spacev2
 
Posts: 22
Joined: Fri Dec 22, 2023 10:58 pm

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

Postby therube » Wed Dec 27, 2023 5:24 pm

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".
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm

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

Postby spacev2 » Thu Jan 04, 2024 9:01 pm

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.
spacev2
 
Posts: 22
Joined: Fri Dec 22, 2023 10:58 pm


Return to How-To


cron